@carthooks/arcubase-cli 0.1.10 → 0.1.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bundle/arcubase-admin.mjs +1274 -375
- package/bundle/arcubase.mjs +1274 -375
- package/dist/generated/command_registry.generated.d.ts +36 -35
- package/dist/generated/command_registry.generated.d.ts.map +1 -1
- package/dist/generated/command_registry.generated.js +37 -36
- package/dist/generated/type_index.generated.d.ts +23 -23
- package/dist/generated/type_index.generated.js +23 -23
- package/dist/runtime/entity_save_schema.d.ts.map +1 -1
- package/dist/runtime/entity_save_schema.js +30 -0
- package/dist/runtime/env.d.ts +2 -1
- package/dist/runtime/env.d.ts.map +1 -1
- package/dist/runtime/env.js +10 -1
- package/dist/runtime/errors.d.ts +2 -0
- package/dist/runtime/errors.d.ts.map +1 -1
- package/dist/runtime/execute.d.ts +4 -2
- package/dist/runtime/execute.d.ts.map +1 -1
- package/dist/runtime/execute.js +944 -134
- package/dist/runtime/paths.d.ts +1 -1
- package/dist/runtime/paths.d.ts.map +1 -1
- package/dist/runtime/paths.js +9 -2
- package/dist/runtime/upload.d.ts +1 -11
- package/dist/runtime/upload.d.ts.map +1 -1
- package/dist/runtime/upload.js +19 -133
- package/dist/runtime/zod_registry.d.ts +5 -3
- package/dist/runtime/zod_registry.d.ts.map +1 -1
- package/dist/runtime/zod_registry.js +108 -48
- package/dist/tests/bootstrap.test.js +12 -0
- package/dist/tests/command_registry.test.js +8 -0
- package/dist/tests/docs_readability.test.d.ts +2 -0
- package/dist/tests/docs_readability.test.d.ts.map +1 -0
- package/dist/tests/docs_readability.test.js +87 -0
- package/dist/tests/entity_save_schema.test.js +22 -0
- package/dist/tests/execute_validation.test.js +381 -44
- package/dist/tests/help.test.js +45 -8
- package/dist/tests/upload.test.js +30 -77
- package/package.json +1 -1
- package/sdk-dist/docs/runtime-reference/README.md +43 -29
- package/sdk-dist/docs/runtime-reference/access-rule.md +109 -0
- package/sdk-dist/docs/runtime-reference/condition.md +182 -0
- package/sdk-dist/docs/runtime-reference/entity-schema/README.md +6 -5
- package/sdk-dist/docs/runtime-reference/entity-schema/checkbox.md +1 -1
- package/sdk-dist/docs/runtime-reference/entity-schema/file.md +2 -2
- package/sdk-dist/docs/runtime-reference/entity-schema/image.md +2 -2
- package/sdk-dist/docs/runtime-reference/entity-schema/linkto.md +3 -3
- package/sdk-dist/docs/runtime-reference/entity-schema/number.md +1 -1
- package/sdk-dist/docs/runtime-reference/entity-schema/query.md +3 -3
- package/sdk-dist/docs/runtime-reference/entity-schema/relation.md +3 -3
- package/sdk-dist/docs/runtime-reference/entity-schema/relationfield.md +3 -3
- package/sdk-dist/docs/runtime-reference/entity-schema/status.md +1 -1
- package/sdk-dist/docs/runtime-reference/entity-schema/text.md +1 -1
- package/sdk-dist/docs/runtime-reference/entity-schema.md +28 -21
- package/sdk-dist/docs/runtime-reference/examples/README.md +1 -1
- package/sdk-dist/docs/runtime-reference/examples/crm-01/README.md +30 -11
- package/sdk-dist/docs/runtime-reference/examples/crm-01/contact.create-entity.json +1 -0
- package/sdk-dist/docs/runtime-reference/examples/crm-01/contact.schema.json +1 -0
- package/sdk-dist/docs/runtime-reference/examples/crm-01/create-app.json +1 -0
- package/sdk-dist/docs/runtime-reference/examples/crm-01/customer.create-entity.json +1 -0
- package/sdk-dist/docs/runtime-reference/examples/crm-01/customer.schema.json +1 -0
- package/sdk-dist/docs/runtime-reference/examples/crm-01/follow-up.create-entity.json +1 -0
- package/sdk-dist/docs/runtime-reference/examples/crm-01/follow-up.schema.json +1 -0
- package/sdk-dist/docs/runtime-reference/examples/crm-01/lead.bulk-update.json +1 -0
- package/sdk-dist/docs/runtime-reference/examples/crm-01/lead.create-entity.json +1 -0
- package/sdk-dist/docs/runtime-reference/examples/crm-01/lead.query.json +1 -0
- package/sdk-dist/docs/runtime-reference/examples/crm-01/lead.row.insert.json +1 -0
- package/sdk-dist/docs/runtime-reference/examples/crm-01/lead.schema.json +1 -0
- package/sdk-dist/docs/runtime-reference/examples/crm-01/lead.selection.condition.json +1 -0
- package/sdk-dist/docs/runtime-reference/examples/oms-01/README.md +26 -26
- package/sdk-dist/docs/runtime-reference/examples/oms-01/sales-order.row.insert.json +1 -1
- package/sdk-dist/docs/runtime-reference/examples/wms-01/README.md +26 -10
- package/sdk-dist/docs/runtime-reference/examples/wms-01/create-app.json +1 -0
- package/sdk-dist/docs/runtime-reference/examples/wms-01/goods-receipt.create-entity.json +1 -0
- package/sdk-dist/docs/runtime-reference/examples/wms-01/goods-receipt.schema.json +1 -0
- package/sdk-dist/docs/runtime-reference/examples/wms-01/inventory-snapshot.bulk-update.json +1 -0
- package/sdk-dist/docs/runtime-reference/examples/wms-01/inventory-snapshot.create-entity.json +1 -0
- package/sdk-dist/docs/runtime-reference/examples/wms-01/inventory-snapshot.query.json +1 -0
- package/sdk-dist/docs/runtime-reference/examples/wms-01/inventory-snapshot.schema.json +1 -0
- package/sdk-dist/docs/runtime-reference/examples/wms-01/inventory-snapshot.selection.condition.json +1 -0
- package/sdk-dist/docs/runtime-reference/examples/wms-01/item-master.create-entity.json +1 -0
- package/sdk-dist/docs/runtime-reference/examples/wms-01/item-master.schema.json +1 -0
- package/sdk-dist/docs/runtime-reference/examples/wms-01/stock-issue.create-entity.json +1 -0
- package/sdk-dist/docs/runtime-reference/examples/wms-01/stock-issue.schema.json +1 -0
- package/sdk-dist/docs/runtime-reference/row-crud.md +35 -8
- package/sdk-dist/docs/runtime-reference/search-and-bulk-actions.md +31 -95
- package/sdk-dist/docs/runtime-reference/selection.md +128 -0
- package/sdk-dist/docs/runtime-reference/table-lifecycle.md +113 -30
- package/sdk-dist/docs/runtime-reference/uploads.md +30 -59
- package/sdk-dist/docs/runtime-reference/workflow/README.md +129 -13
- package/sdk-dist/generated/command_registry.generated.ts +37 -36
- package/sdk-dist/generated/type_index.generated.ts +23 -23
- package/src/generated/command_registry.generated.ts +37 -36
- package/src/generated/type_index.generated.ts +23 -23
- package/src/runtime/entity_save_schema.ts +30 -0
- package/src/runtime/env.ts +14 -2
- package/src/runtime/errors.ts +2 -0
- package/src/runtime/execute.ts +1166 -134
- package/src/runtime/paths.ts +11 -2
- package/src/runtime/upload.ts +19 -178
- package/src/runtime/zod_registry.ts +113 -48
- package/src/tests/bootstrap.test.ts +16 -0
- package/src/tests/command_registry.test.ts +9 -0
- package/src/tests/docs_readability.test.ts +96 -0
- package/src/tests/entity_save_schema.test.ts +22 -0
- package/src/tests/execute_validation.test.ts +508 -47
- package/src/tests/help.test.ts +49 -8
- package/src/tests/upload.test.ts +34 -91
|
@@ -10,18 +10,17 @@ Use this page when the goal is:
|
|
|
10
10
|
The successful path is command-first:
|
|
11
11
|
|
|
12
12
|
1. create the app
|
|
13
|
-
2. create the
|
|
14
|
-
3.
|
|
15
|
-
4.
|
|
16
|
-
5. probe rows with `query-entity`
|
|
13
|
+
2. create the table with non-empty fields
|
|
14
|
+
3. verify the saved table schema
|
|
15
|
+
4. probe rows with `row query`
|
|
17
16
|
|
|
18
|
-
Do not
|
|
17
|
+
Do not create an empty table shell. `table create` requires `fields` and `field_id_seq`.
|
|
19
18
|
|
|
20
19
|
CLI phase split:
|
|
21
20
|
|
|
22
21
|
- schema phase uses `arcubase-admin`
|
|
23
22
|
- row phase uses `arcubase`
|
|
24
|
-
- the switch happens immediately after `
|
|
23
|
+
- the switch happens immediately after `table update-schema`
|
|
25
24
|
- do not use `arcubase-admin` for row insert or row query
|
|
26
25
|
|
|
27
26
|
## Step 1: create the app
|
|
@@ -29,7 +28,7 @@ CLI phase split:
|
|
|
29
28
|
Command:
|
|
30
29
|
|
|
31
30
|
```bash
|
|
32
|
-
arcubase-admin app create
|
|
31
|
+
arcubase-admin app create --body-file create-app.json | --body-json <json-string>
|
|
33
32
|
```
|
|
34
33
|
|
|
35
34
|
Minimal `create-app.json`:
|
|
@@ -45,57 +44,141 @@ Rules:
|
|
|
45
44
|
- `name` is required
|
|
46
45
|
- keep `name` at `20` characters or fewer
|
|
47
46
|
|
|
48
|
-
## Step 2: create the
|
|
47
|
+
## Step 2: create the table with schema
|
|
49
48
|
|
|
50
49
|
Command:
|
|
51
50
|
|
|
52
51
|
```bash
|
|
53
|
-
arcubase-admin
|
|
54
|
-
--id <app_id> \
|
|
55
|
-
--body-file create
|
|
52
|
+
arcubase-admin table create \
|
|
53
|
+
--app-id <app_id> \
|
|
54
|
+
--body-json <json-string> | --body-file table-create.json
|
|
56
55
|
```
|
|
57
56
|
|
|
58
|
-
Minimal `create
|
|
57
|
+
Minimal `table-create.json`:
|
|
59
58
|
|
|
60
59
|
```json
|
|
61
60
|
{
|
|
62
|
-
"name": "
|
|
61
|
+
"name": "Orders",
|
|
62
|
+
"parent": 0,
|
|
63
|
+
"schema_version": 0,
|
|
64
|
+
"field_id_seq": 1004,
|
|
65
|
+
"layout": [[1001], [1002], [1003]],
|
|
66
|
+
"fields": [
|
|
67
|
+
{
|
|
68
|
+
"id": 1001,
|
|
69
|
+
"label": "Order No",
|
|
70
|
+
"type": "text",
|
|
71
|
+
"required": true,
|
|
72
|
+
"unique": false,
|
|
73
|
+
"editable": true,
|
|
74
|
+
"visible": true,
|
|
75
|
+
"show_label": true,
|
|
76
|
+
"scannable": false,
|
|
77
|
+
"default_value_mode": 0,
|
|
78
|
+
"description": "",
|
|
79
|
+
"value": null,
|
|
80
|
+
"number_decimal": 0,
|
|
81
|
+
"depends": [],
|
|
82
|
+
"key": "order_no",
|
|
83
|
+
"code_index": false,
|
|
84
|
+
"options": {"type": "text", "placeholder": "", "lengthLimit": false, "lengthMin": 0, "lengthMax": 255},
|
|
85
|
+
"transfers": null,
|
|
86
|
+
"children": null
|
|
87
|
+
},
|
|
88
|
+
{
|
|
89
|
+
"id": 1002,
|
|
90
|
+
"label": "Description",
|
|
91
|
+
"type": "textarea",
|
|
92
|
+
"required": false,
|
|
93
|
+
"unique": false,
|
|
94
|
+
"editable": true,
|
|
95
|
+
"visible": true,
|
|
96
|
+
"show_label": true,
|
|
97
|
+
"scannable": false,
|
|
98
|
+
"default_value_mode": 0,
|
|
99
|
+
"description": "",
|
|
100
|
+
"value": null,
|
|
101
|
+
"number_decimal": 0,
|
|
102
|
+
"depends": [],
|
|
103
|
+
"key": "description",
|
|
104
|
+
"code_index": false,
|
|
105
|
+
"options": {"placeholder": "", "html": false, "size": "default", "lengthLimit": false, "lengthMin": 0, "lengthMax": 2000},
|
|
106
|
+
"transfers": null,
|
|
107
|
+
"children": null
|
|
108
|
+
},
|
|
109
|
+
{
|
|
110
|
+
"id": 1003,
|
|
111
|
+
"label": "Status",
|
|
112
|
+
"type": "select",
|
|
113
|
+
"required": true,
|
|
114
|
+
"unique": false,
|
|
115
|
+
"editable": true,
|
|
116
|
+
"visible": true,
|
|
117
|
+
"show_label": true,
|
|
118
|
+
"scannable": false,
|
|
119
|
+
"default_value_mode": 1,
|
|
120
|
+
"description": "",
|
|
121
|
+
"value": "draft",
|
|
122
|
+
"number_decimal": 0,
|
|
123
|
+
"depends": [],
|
|
124
|
+
"key": "status",
|
|
125
|
+
"code_index": false,
|
|
126
|
+
"options": {
|
|
127
|
+
"horizontal": false,
|
|
128
|
+
"numberMax": "",
|
|
129
|
+
"numberMin": "",
|
|
130
|
+
"numberRange": false,
|
|
131
|
+
"repeatRemind": "This value already exists and duplicate submission is not allowed",
|
|
132
|
+
"options": {
|
|
133
|
+
"mode": "custom",
|
|
134
|
+
"colorful": false,
|
|
135
|
+
"items": [
|
|
136
|
+
{"key": 1, "value": "draft"},
|
|
137
|
+
{"key": 2, "value": "active"}
|
|
138
|
+
]
|
|
139
|
+
}
|
|
140
|
+
},
|
|
141
|
+
"transfers": null,
|
|
142
|
+
"children": null
|
|
143
|
+
}
|
|
144
|
+
],
|
|
145
|
+
"options": {"Buttons": [], "CustomActions": [], "FrontendEvents": [], "TitleFormat": {"Fields": [], "Parts": [], "Body": ""}, "misc": {}},
|
|
146
|
+
"workflow_enabled": false
|
|
63
147
|
}
|
|
64
148
|
```
|
|
65
149
|
|
|
66
150
|
Rules:
|
|
67
151
|
|
|
68
|
-
-
|
|
69
|
-
-
|
|
152
|
+
- `fields` must be non-empty
|
|
153
|
+
- `field_id_seq` must be greater than every `field.id`
|
|
154
|
+
- use `text`, not `string`
|
|
155
|
+
- use `member`, not `user`
|
|
156
|
+
- for `select`, use `options.options.items`
|
|
70
157
|
|
|
71
|
-
## Step 3:
|
|
158
|
+
## Step 3: verify the saved schema
|
|
72
159
|
|
|
73
160
|
Command:
|
|
74
161
|
|
|
75
162
|
```bash
|
|
76
|
-
arcubase-admin
|
|
163
|
+
arcubase-admin table get \
|
|
77
164
|
--app-id <app_id> \
|
|
78
165
|
--table-id <table_id>
|
|
79
166
|
```
|
|
80
167
|
|
|
81
|
-
Use the returned shell as the base for `save-entity.json`.
|
|
82
|
-
|
|
83
168
|
Rules:
|
|
84
169
|
|
|
85
|
-
-
|
|
86
|
-
- do not
|
|
87
|
-
- keep `id`, `app_id`, `name`, and `workflow_enabled` from the shell
|
|
88
|
-
- normalize shell placeholder `null` values before save
|
|
170
|
+
- success requires non-empty `fields`
|
|
171
|
+
- do not call the table ready until row probe succeeds
|
|
89
172
|
|
|
90
|
-
##
|
|
173
|
+
## Update existing schema
|
|
91
174
|
|
|
92
175
|
Command:
|
|
93
176
|
|
|
94
177
|
```bash
|
|
95
|
-
arcubase-admin
|
|
178
|
+
arcubase-admin table update-schema \
|
|
96
179
|
--app-id <app_id> \
|
|
97
180
|
--table-id <table_id> \
|
|
98
|
-
--body-file save-entity.json
|
|
181
|
+
--body-json <json-string> | --body-file save-entity.json
|
|
99
182
|
```
|
|
100
183
|
|
|
101
184
|
Read before writing `save-entity.json`:
|
|
@@ -104,12 +187,12 @@ Read before writing `save-entity.json`:
|
|
|
104
187
|
2. `entity-schema/README.md`
|
|
105
188
|
3. the exact field-type pages you need
|
|
106
189
|
|
|
107
|
-
After
|
|
190
|
+
After schema save, switch binaries:
|
|
108
191
|
|
|
109
192
|
- use `arcubase row create` for row insertion
|
|
110
193
|
- use `arcubase row query` for readiness and row reads
|
|
111
194
|
|
|
112
|
-
## Step
|
|
195
|
+
## Step 4: probe readiness
|
|
113
196
|
|
|
114
197
|
Command:
|
|
115
198
|
|
|
@@ -117,7 +200,7 @@ Command:
|
|
|
117
200
|
arcubase row query \
|
|
118
201
|
--app-id <app_id> \
|
|
119
202
|
--table-id <table_id> \
|
|
120
|
-
--body-file query.json
|
|
203
|
+
--body-json <json-string> | --body-file query.json
|
|
121
204
|
```
|
|
122
205
|
|
|
123
206
|
Minimal `query.json`:
|
|
@@ -132,4 +215,4 @@ Minimal `query.json`:
|
|
|
132
215
|
Rules:
|
|
133
216
|
|
|
134
217
|
- only call the table ready after this command succeeds
|
|
135
|
-
- if shell creation succeeded but `query
|
|
218
|
+
- if shell creation succeeded but `row query` still fails, the table is not ready
|
|
@@ -4,71 +4,61 @@ Use this page when a row contains a `file` or `image` field.
|
|
|
4
4
|
|
|
5
5
|
The successful path is:
|
|
6
6
|
|
|
7
|
-
1. run `arcubase upload
|
|
8
|
-
2.
|
|
9
|
-
3.
|
|
7
|
+
1. run `arcubase upload token`
|
|
8
|
+
2. upload the file through the returned token data
|
|
9
|
+
3. use `arcubase upload preview`, `arcubase upload mobile`, or `arcubase upload check-mobile` only when the task requires that exact API
|
|
10
|
+
4. insert or update the row with `arcubase row create` or `arcubase row update`
|
|
10
11
|
|
|
11
12
|
Do not construct `upload_id`, `assets_id`, or OSS form fields by hand.
|
|
12
13
|
|
|
13
|
-
## Upload
|
|
14
|
+
## Upload Token
|
|
14
15
|
|
|
15
16
|
Command:
|
|
16
17
|
|
|
17
18
|
```bash
|
|
18
|
-
arcubase upload
|
|
19
|
+
arcubase upload token --body-json '{"global":false}'
|
|
19
20
|
```
|
|
20
21
|
|
|
21
|
-
|
|
22
|
+
Body type: `GetUploadTokenReqVO`.
|
|
22
23
|
|
|
23
|
-
|
|
24
|
-
- `--global`
|
|
24
|
+
Supported body fields:
|
|
25
25
|
|
|
26
|
-
|
|
26
|
+
- `global`
|
|
27
|
+
|
|
28
|
+
## Preview
|
|
27
29
|
|
|
28
30
|
```bash
|
|
29
|
-
arcubase upload
|
|
31
|
+
arcubase upload preview --body-file preview.json | --body-json <json-string>
|
|
30
32
|
```
|
|
31
33
|
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
The command returns a JSON array.
|
|
35
|
-
|
|
36
|
-
Example:
|
|
34
|
+
Example `preview.json`:
|
|
37
35
|
|
|
38
36
|
```json
|
|
39
37
|
{
|
|
40
|
-
"
|
|
41
|
-
|
|
42
|
-
"upload_id": 123456,
|
|
43
|
-
"file": "contract.pdf",
|
|
44
|
-
"file_name": "contract.pdf",
|
|
45
|
-
"meta": {}
|
|
46
|
-
}
|
|
47
|
-
]
|
|
38
|
+
"upload_id": 123456,
|
|
39
|
+
"fname": "contract.pdf"
|
|
48
40
|
}
|
|
49
41
|
```
|
|
50
42
|
|
|
51
|
-
|
|
43
|
+
## Mobile Upload
|
|
52
44
|
|
|
53
|
-
|
|
45
|
+
```bash
|
|
46
|
+
arcubase upload mobile --body-file mobile-upload.json | --body-json <json-string>
|
|
47
|
+
```
|
|
54
48
|
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
"upload_id": 123456,
|
|
62
|
-
"file": "contract.pdf",
|
|
63
|
-
"file_name": "contract.pdf",
|
|
64
|
-
"meta": {}
|
|
65
|
-
}
|
|
66
|
-
]
|
|
67
|
-
}
|
|
68
|
-
}
|
|
49
|
+
Body type: `MobileUploadReqVO`.
|
|
50
|
+
|
|
51
|
+
## Check Mobile Upload
|
|
52
|
+
|
|
53
|
+
```bash
|
|
54
|
+
arcubase upload check-mobile --body-file mobile-upload-check.json | --body-json <json-string>
|
|
69
55
|
```
|
|
70
56
|
|
|
71
|
-
|
|
57
|
+
Body type: `MobileUploadCheckReqVO`.
|
|
58
|
+
|
|
59
|
+
## Row Field Value
|
|
60
|
+
|
|
61
|
+
After upload returns a file value array, use the returned array directly as the field value for a `file` or `image` field.
|
|
72
62
|
|
|
73
63
|
```json
|
|
74
64
|
{
|
|
@@ -85,22 +75,3 @@ Use the `data` array directly as the field value for a `file` or `image` field.
|
|
|
85
75
|
"changed_fields": [1008]
|
|
86
76
|
}
|
|
87
77
|
```
|
|
88
|
-
|
|
89
|
-
## Preview an uploaded file
|
|
90
|
-
|
|
91
|
-
Command:
|
|
92
|
-
|
|
93
|
-
```bash
|
|
94
|
-
arcubase common upload-preview --body-file preview.json
|
|
95
|
-
```
|
|
96
|
-
|
|
97
|
-
Example `preview.json`:
|
|
98
|
-
|
|
99
|
-
```json
|
|
100
|
-
{
|
|
101
|
-
"upload_id": 123456,
|
|
102
|
-
"fname": "contract.pdf"
|
|
103
|
-
}
|
|
104
|
-
```
|
|
105
|
-
|
|
106
|
-
This returns a preview URL for the upload token entry. It does not insert or update a row.
|
|
@@ -1,19 +1,135 @@
|
|
|
1
1
|
# Workflow Runtime Reference
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Use this page for workflow runtime actions with `arcubase`.
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
## Process Map
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
-
|
|
10
|
-
-
|
|
11
|
-
-
|
|
12
|
-
|
|
7
|
+
```bash
|
|
8
|
+
arcubase workflow process-map \
|
|
9
|
+
--app-id <app_id> \
|
|
10
|
+
--table-id <table_id> \
|
|
11
|
+
--row-id <row_id>
|
|
12
|
+
```
|
|
13
13
|
|
|
14
|
-
|
|
14
|
+
## Approve
|
|
15
15
|
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
16
|
+
Body type: `EntityDoActionReqVO`.
|
|
17
|
+
|
|
18
|
+
```bash
|
|
19
|
+
arcubase workflow approve \
|
|
20
|
+
--app-id <app_id> \
|
|
21
|
+
--table-id <table_id> \
|
|
22
|
+
--row-id <row_id> \
|
|
23
|
+
--body-json '{"task_id":2188890521,"fields":{"1004":"checked"},"changed":[1004],"comment":{"content":"Approved"}}'
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
Required:
|
|
27
|
+
|
|
28
|
+
- `task_id`
|
|
29
|
+
- node-required fields in `fields`
|
|
30
|
+
- changed field ids in `changed`
|
|
31
|
+
|
|
32
|
+
## Rollback
|
|
33
|
+
|
|
34
|
+
Body type: `EntityDoActionReqVO`.
|
|
35
|
+
|
|
36
|
+
```bash
|
|
37
|
+
arcubase workflow rollback \
|
|
38
|
+
--app-id <app_id> \
|
|
39
|
+
--table-id <table_id> \
|
|
40
|
+
--row-id <row_id> \
|
|
41
|
+
--body-json '{"task_id":2188890521,"backstep":2188890602,"comment":{"content":"Need changes"}}'
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
Required:
|
|
45
|
+
|
|
46
|
+
- `task_id`
|
|
47
|
+
- `backstep`
|
|
48
|
+
|
|
49
|
+
## Countersign
|
|
50
|
+
|
|
51
|
+
Body type: `EntityDoActionReqVO`.
|
|
52
|
+
|
|
53
|
+
```bash
|
|
54
|
+
arcubase workflow countersign \
|
|
55
|
+
--app-id <app_id> \
|
|
56
|
+
--table-id <table_id> \
|
|
57
|
+
--row-id <row_id> \
|
|
58
|
+
--body-json '{"task_id":2188890521,"comment":{"content":"Add countersign"}}'
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
## Forward
|
|
62
|
+
|
|
63
|
+
Body type: `EntityDoActionReqVO`.
|
|
64
|
+
|
|
65
|
+
```bash
|
|
66
|
+
arcubase workflow forward \
|
|
67
|
+
--app-id <app_id> \
|
|
68
|
+
--table-id <table_id> \
|
|
69
|
+
--row-id <row_id> \
|
|
70
|
+
--body-json '{"task_id":2188890521,"user":[{"type":"member","id":2188889902}],"comment":{"content":"Please review"}}'
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
Required:
|
|
74
|
+
|
|
75
|
+
- `task_id`
|
|
76
|
+
- `user`
|
|
77
|
+
|
|
78
|
+
## Retract
|
|
79
|
+
|
|
80
|
+
Body type: `EntityDoActionReqVO`.
|
|
81
|
+
|
|
82
|
+
```bash
|
|
83
|
+
arcubase workflow retract \
|
|
84
|
+
--app-id <app_id> \
|
|
85
|
+
--table-id <table_id> \
|
|
86
|
+
--row-id <row_id> \
|
|
87
|
+
--body-json '{"task_id":2188890521,"comment":{"content":"Retract"}}'
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
Required:
|
|
91
|
+
|
|
92
|
+
- `task_id`
|
|
93
|
+
|
|
94
|
+
## Resolve
|
|
95
|
+
|
|
96
|
+
Body type: `EntityResolveWorkflowReqVO`.
|
|
97
|
+
|
|
98
|
+
```bash
|
|
99
|
+
arcubase workflow resolve \
|
|
100
|
+
--app-id <app_id> \
|
|
101
|
+
--table-id <table_id> \
|
|
102
|
+
--body-json '{"version_id":2188890601,"node_id":2188890602,"record_id":2188890411,"approve_users":[2188889901],"closeCurrentTasks":true}'
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
Required:
|
|
106
|
+
|
|
107
|
+
- `version_id`
|
|
108
|
+
- `node_id`
|
|
109
|
+
- `record_id`
|
|
110
|
+
- `approve_users`
|
|
111
|
+
|
|
112
|
+
## Query Approve Users
|
|
113
|
+
|
|
114
|
+
Body type: `EntityWorkflowApproveUsersReqVO`.
|
|
115
|
+
|
|
116
|
+
```bash
|
|
117
|
+
arcubase workflow query-approve-users \
|
|
118
|
+
--app-id <app_id> \
|
|
119
|
+
--table-id <table_id> \
|
|
120
|
+
--body-json '{"version_id":2188890601,"node_id":2188890602,"record_id":2188890411}'
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
Required:
|
|
124
|
+
|
|
125
|
+
- `version_id`
|
|
126
|
+
- `node_id`
|
|
127
|
+
- `record_id`
|
|
128
|
+
|
|
129
|
+
## Query Nodes
|
|
130
|
+
|
|
131
|
+
```bash
|
|
132
|
+
arcubase workflow query-nodes \
|
|
133
|
+
--app-id <app_id> \
|
|
134
|
+
--table-id <table_id>
|
|
135
|
+
```
|