@wowok/agent-mcp 2.2.11 → 2.2.13
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/dist/docs/index.d.ts +3 -0
- package/dist/docs/index.js +2 -0
- package/dist/docs/loader.d.ts +12 -0
- package/dist/docs/loader.js +177 -0
- package/dist/docs/search.d.ts +17 -0
- package/dist/docs/search.js +325 -0
- package/dist/docs/types.d.ts +55 -0
- package/dist/docs/types.js +1 -0
- package/dist/index.d.ts +12 -0
- package/dist/index.js +146 -39
- package/docs/README.md +249 -0
- package/docs/WIP.md +388 -0
- package/docs/WTS.md +536 -0
- package/docs/docs/account.md +914 -0
- package/docs/docs/allocation.md +635 -0
- package/docs/docs/arbitration.md +1804 -0
- package/docs/docs/arbitration_state_machine.md +270 -0
- package/docs/docs/contact.md +709 -0
- package/docs/docs/demand.md +948 -0
- package/docs/docs/guard.md +1465 -0
- package/docs/docs/localinfo.md +432 -0
- package/docs/docs/localmark.md +583 -0
- package/docs/docs/machine.md +2490 -0
- package/docs/docs/messenger.md +2098 -0
- package/docs/docs/onchain_events.md +267 -0
- package/docs/docs/order.md +1001 -0
- package/docs/docs/payment.md +512 -0
- package/docs/docs/permission.md +1438 -0
- package/docs/docs/personal.md +742 -0
- package/docs/docs/progress.md +1748 -0
- package/docs/docs/query.md +467 -0
- package/docs/docs/repository.md +1043 -0
- package/docs/docs/reward.md +833 -0
- package/docs/docs/service.md +2130 -0
- package/docs/docs/stage-01-introduction.md +243 -0
- package/docs/docs/stage-02-trust.md +302 -0
- package/docs/docs/stage-03-collaboration.md +337 -0
- package/docs/docs/stage-04-transaction.md +277 -0
- package/docs/docs/stage-05-business.md +151 -0
- package/docs/docs/stage-06-personal.md +203 -0
- package/docs/docs/stage-07-query.md +572 -0
- package/docs/docs/stage-08-examples.md +184 -0
- package/docs/docs/treasury.md +1149 -0
- package/docs/docs/wowok_buildin_info.md +740 -0
- package/docs/examples/Insurance/Insurance.md +594 -0
- package/docs/examples/Insurance/Insurance_TestResults.md +481 -0
- package/docs/examples/Insurance/insurance_complete_guard_v1.json +50 -0
- package/docs/examples/MyShop/MyShop.md +1353 -0
- package/docs/examples/MyShop/MyShop_TestResults.md +1003 -0
- package/docs/examples/MyShop_Advanced/MyShop_Advanced.md +1898 -0
- package/docs/examples/MyShop_Advanced/MyShop_Advanced_MerchantSystem_TestResults.md +1297 -0
- package/docs/examples/MyShop_Advanced/MyShop_Advanced_OrderFlow_TestResults.md +743 -0
- package/docs/examples/MyShop_Advanced/machine_nodes.json +222 -0
- package/docs/examples/ThreeBody_Signature/ThreeBody_Signature.md +776 -0
- package/docs/examples/ThreeBody_Signature/ThreeBody_Signature_TestResults.md +599 -0
- package/docs/examples/Travel/Travel.md +1157 -0
- package/docs/examples/Travel/Travel_TestResults.md +743 -0
- package/docs/examples/Travel/calc-weather-timestamps.js +8 -0
- package/docs/examples/Travel/travel_machine_v2_export.json +104 -0
- package/docs/examples/Travel/weather_check_guard_v1.json +51 -0
- package/docs/skills/WOWOK.md +650 -0
- package/docs/skills/onchain_operations/_common.md +406 -0
- package/docs/skills/onchain_operations/_index.md +196 -0
- package/docs/skills/onchain_operations/allocation.md +28 -0
- package/docs/skills/onchain_operations/arbitration.md +106 -0
- package/docs/skills/onchain_operations/contact.md +40 -0
- package/docs/skills/onchain_operations/demand.md +53 -0
- package/docs/skills/onchain_operations/gen_passport.md +23 -0
- package/docs/skills/onchain_operations/guard.md +56 -0
- package/docs/skills/onchain_operations/machine.md +89 -0
- package/docs/skills/onchain_operations/order.md +56 -0
- package/docs/skills/onchain_operations/payment.md +24 -0
- package/docs/skills/onchain_operations/permission.md +68 -0
- package/docs/skills/onchain_operations/personal.md +58 -0
- package/docs/skills/onchain_operations/progress.md +38 -0
- package/docs/skills/onchain_operations/repository.md +70 -0
- package/docs/skills/onchain_operations/reward.md +38 -0
- package/docs/skills/onchain_operations/service.md +78 -0
- package/docs/skills/onchain_operations/treasury.md +68 -0
- package/docs/skills/schema-account_operation.md +402 -0
- package/docs/skills/schema-guard2file.md +153 -0
- package/docs/skills/schema-local_info_operation.md +160 -0
- package/docs/skills/schema-local_mark_operation.md +148 -0
- package/docs/skills/schema-machineNode2file.md +155 -0
- package/docs/skills/schema-messenger_operation.md +547 -0
- package/docs/skills/schema-onchain_events.md +201 -0
- package/docs/skills/schema-onchain_table_data.md +334 -0
- package/docs/skills/schema-query_toolkit.md +395 -0
- package/docs/skills/schema-wip_file.md +240 -0
- package/docs/skills/schema-wowok_buildin_info.md +296 -0
- package/docs/wip-examples/three_body.html +57 -0
- package/docs/wip-examples/three_body.wip +30 -0
- package/package.json +3 -2
|
@@ -0,0 +1,1748 @@
|
|
|
1
|
+
# Progress Component (🔄 Workflow Execution)
|
|
2
|
+
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
## Component Overview
|
|
6
|
+
|
|
7
|
+
Progress is WoWok's workflow execution component, used to execute workflow instances created by Machine. Progress tracks the execution status of workflows, manages node transitions, and records execution history.
|
|
8
|
+
|
|
9
|
+
> **Relationship with Machine**: Progress is an instance of a Machine workflow template. Before creating a Progress:
|
|
10
|
+
> 1. Create and configure a Machine with nodes and forwards
|
|
11
|
+
> 2. **Ensure first node has init connection**: The first node must have `prev_node: ""` to allow Progress to start from the init node
|
|
12
|
+
> 3. Publish the Machine (required before Progress creation)
|
|
13
|
+
> 4. Grant permissions to operators (permissionIndex or namedOperator)
|
|
14
|
+
> 5. Then create Progress from the Machine
|
|
15
|
+
>
|
|
16
|
+
> **Understanding Init Node**: When a Progress is created, its `current` field is set to `""` (empty string), representing the init node. To advance to the first actual node, the Machine must define a forward with `prev_node: ""`. See [Machine Component](machine.md) for details on init node configuration.
|
|
17
|
+
|
|
18
|
+
### Permission Requirements for Progress Operations
|
|
19
|
+
|
|
20
|
+
To execute a forward operation in Progress, the operator must have the required permission as defined in the Machine node:
|
|
21
|
+
|
|
22
|
+
**If the forward uses `permissionIndex`:**
|
|
23
|
+
- The operator must be granted that permission index in the Machine's Permission object
|
|
24
|
+
- Grant permission using the `permission` operation with `table.op: "add perm by entity"`
|
|
25
|
+
- Valid permissionIndex values: 1000-65535 (user-defined) or appropriate built-in permissions (100-450+)
|
|
26
|
+
- **Note**: Machine management permissions (200-208) and Progress management permissions (220-225) are NOT valid for forward operations
|
|
27
|
+
|
|
28
|
+
**If the forward uses `namedOperator`:**
|
|
29
|
+
- Use `progress_namedOperator` to add/set operators for the specific namespace
|
|
30
|
+
- Each Progress instance can have different operators for the same namespace
|
|
31
|
+
- More flexible for dynamic team assignments
|
|
32
|
+
|
|
33
|
+
---
|
|
34
|
+
|
|
35
|
+
## Function List
|
|
36
|
+
|
|
37
|
+
| Function Name | Purpose | Usage Scenario | Significance |
|
|
38
|
+
|---------------|---------|----------------|-------------|
|
|
39
|
+
| **Create Progress** | Create new Progress from Machine | Start workflow execution from template | Entry point for all workflow executions |
|
|
40
|
+
| **Object Reference** | Identify which Progress to operate on | Target specific workflow execution | Foundation for all Progress operations - defines which workflow instance to modify |
|
|
41
|
+
| **Progress Operations (Accomplish)** | Execute forward and advance node | Complete workflow steps, move to next state | Core of workflow execution - processes transitions normally |
|
|
42
|
+
| **Progress Operations (Hold)** | Lock operation at current node | Pause for review, prevent race conditions | Controls workflow execution flow and avoids conflicts |
|
|
43
|
+
| **Progress Operations (Admin Unhold)** | Force unlock from hold state | Admin intervention, override holds | Provides emergency override capabilities |
|
|
44
|
+
| **Named Operator Management** | Add/set/remove named operators | Dynamic permission assignment, team changes | Provides flexible access control for workflow stages |
|
|
45
|
+
| **Set Task** | Associate Progress with a Task object | Link workflow to order, service request | Establishes relationship between workflow execution and business entities |
|
|
46
|
+
| **Repository Management** | Attach/remove/clear Repository objects | Store execution data, state, deliverables | Enables data persistence during workflow execution |
|
|
47
|
+
|
|
48
|
+
---
|
|
49
|
+
|
|
50
|
+
## Schema Tree
|
|
51
|
+
|
|
52
|
+
> **Creating Progress**: Progress instances are created using `operation_type: "machine"` with the `progress_new` field. See [Machine Component](machine.md) for the `progress_new` schema definition.
|
|
53
|
+
|
|
54
|
+
```
|
|
55
|
+
progress (Operate Existing Progress)
|
|
56
|
+
├── operation_type: "progress" (fixed value)
|
|
57
|
+
├── data
|
|
58
|
+
│ ├── object (string, required) - Progress name or ID to operate on
|
|
59
|
+
│ ├── task (string, optional) - Task ID to bind (cannot be changed after setting)
|
|
60
|
+
│ ├── repository (object, optional, ObjectsOp)
|
|
61
|
+
│ │ ├── op: "add" | "set"
|
|
62
|
+
│ │ │ └── objects (array of strings)
|
|
63
|
+
│ │ ├── op: "remove"
|
|
64
|
+
│ │ │ └── objects (array of strings)
|
|
65
|
+
│ │ └── op: "clear"
|
|
66
|
+
│ ├── progress_namedOperator (object, optional)
|
|
67
|
+
│ │ ├── op: "add" | "set" | "remove"
|
|
68
|
+
│ │ ├── name (string) - Non-empty namespace name (max 64 bcs characters)
|
|
69
|
+
│ │ └── operators (object, ManyAccountOrMark_Address)
|
|
70
|
+
│ │ ├── entities (array of AccountOrMark_Address)
|
|
71
|
+
│ │ │ └── [{ name_or_address: "string", local_mark_first: boolean }]
|
|
72
|
+
│ │ └── check_all_founded (boolean, optional)
|
|
73
|
+
│ └── operate (object, optional)
|
|
74
|
+
│ ├── operation (object, required)
|
|
75
|
+
│ │ ├── next_node_name (string) - Target node name to advance to (max 64 bcs characters)
|
|
76
|
+
│ │ └── forward (string) - Forward operation name defined in Machine (max 64 bcs characters)
|
|
77
|
+
│ ├── hold (boolean, optional) - Lock operation permission
|
|
78
|
+
│ ├── adminUnhold (boolean, optional) - Admin force unlock (only when hold=true)
|
|
79
|
+
│ └── message (string, optional) - Operation result message
|
|
80
|
+
├── env (optional)
|
|
81
|
+
│ ├── account (string, optional) - Account name or address, empty string for default
|
|
82
|
+
│ ├── network (string, optional) - "localnet" or "testnet"
|
|
83
|
+
│ ├── permission_guard (array of strings, optional) - Permission guard IDs
|
|
84
|
+
│ ├── no_cache (boolean, optional) - Disable cache
|
|
85
|
+
│ └── referrer (string, optional) - Referrer ID
|
|
86
|
+
└── submission (optional)
|
|
87
|
+
├── type: "submission" (fixed value)
|
|
88
|
+
├── guard (array) - Guards to verify
|
|
89
|
+
│ └── [{ object: string, impack: boolean }]
|
|
90
|
+
└── submission (array) - Submission data for guards
|
|
91
|
+
└── [{ guard: string, submission: [{ identifier, b_submission, value_type, value, name }] }]
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
---
|
|
95
|
+
|
|
96
|
+
### ⚠️ Important Note About Submission
|
|
97
|
+
|
|
98
|
+
If the execution returns a `submission` field in the response, it indicates that additional Guard verification data is required. You must:
|
|
99
|
+
|
|
100
|
+
1. Complete all required submission data within the `submission` structure
|
|
101
|
+
2. Resubmit the operation with the completed submission data
|
|
102
|
+
3. **Do not modify any other parts of the structure** - only fill in the required submission values
|
|
103
|
+
|
|
104
|
+
The submission structure will specify which Guard objects need verification and what data needs to be provided for each Guard table item.
|
|
105
|
+
|
|
106
|
+
**Query Value Types**: Use the `wowok_buildin_info` tool with `{ "info": "value types" }` to query all supported value types with their numeric and string representations.
|
|
107
|
+
|
|
108
|
+
---
|
|
109
|
+
|
|
110
|
+
## Complete Tool Call Structure
|
|
111
|
+
|
|
112
|
+
Progress operations use the following top-level structure:
|
|
113
|
+
|
|
114
|
+
```json
|
|
115
|
+
{
|
|
116
|
+
"operation_type": "progress",
|
|
117
|
+
"data": { ... },
|
|
118
|
+
"env": { ... },
|
|
119
|
+
"submission": { ... }
|
|
120
|
+
}
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
---
|
|
124
|
+
|
|
125
|
+
## Creating Progress (via Machine)
|
|
126
|
+
|
|
127
|
+
Progress instances are created from published Machine objects using `operation_type: "machine"` with the `progress_new` field. See [Machine Component](machine.md) for complete details.
|
|
128
|
+
|
|
129
|
+
### Key Points
|
|
130
|
+
|
|
131
|
+
- Use `operation_type: "machine"` with `data.progress_new`
|
|
132
|
+
- The Machine must be published (only published Machines can create Progress)
|
|
133
|
+
- When created, Progress's `current` field is set to `""` (empty string, the init node)
|
|
134
|
+
- You need a forward with `prev_node: ""` in the Machine to advance from init to the first actual node
|
|
135
|
+
|
|
136
|
+
### Quick Examples
|
|
137
|
+
|
|
138
|
+
#### Create Simple Progress
|
|
139
|
+
|
|
140
|
+
**Prompt**: Create a new Progress from "sdlc_workflow_v2" Machine.
|
|
141
|
+
|
|
142
|
+
```json
|
|
143
|
+
{
|
|
144
|
+
"operation_type": "machine",
|
|
145
|
+
"data": {
|
|
146
|
+
"object": "sdlc_workflow_v2",
|
|
147
|
+
"progress_new": {}
|
|
148
|
+
},
|
|
149
|
+
"env": {
|
|
150
|
+
"account": "pm_alice",
|
|
151
|
+
"network": "testnet"
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
```
|
|
155
|
+
|
|
156
|
+
#### Create Named Progress
|
|
157
|
+
|
|
158
|
+
**Prompt**: Create a Progress named "project_gamma" from "sdlc_workflow_v2" Machine.
|
|
159
|
+
|
|
160
|
+
```json
|
|
161
|
+
{
|
|
162
|
+
"operation_type": "machine",
|
|
163
|
+
"data": {
|
|
164
|
+
"object": "sdlc_workflow_v2",
|
|
165
|
+
"progress_new": {
|
|
166
|
+
"namedNew": {
|
|
167
|
+
"name": "project_gamma",
|
|
168
|
+
"tags": ["mobile", "ecommerce"]
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
},
|
|
172
|
+
"env": {
|
|
173
|
+
"account": "pm_alice",
|
|
174
|
+
"network": "testnet"
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
```
|
|
178
|
+
|
|
179
|
+
#### Create Progress with Named Operators
|
|
180
|
+
|
|
181
|
+
**Prompt**: Create a Progress and assign "dev_lead_carol" as operator for the "developer" namespace.
|
|
182
|
+
|
|
183
|
+
```json
|
|
184
|
+
{
|
|
185
|
+
"operation_type": "machine",
|
|
186
|
+
"data": {
|
|
187
|
+
"object": "sdlc_workflow_v2",
|
|
188
|
+
"progress_new": {
|
|
189
|
+
"namedNew": { "name": "project_delta" },
|
|
190
|
+
"progress_namedOperator": {
|
|
191
|
+
"op": "set",
|
|
192
|
+
"name": "developer",
|
|
193
|
+
"operators": {
|
|
194
|
+
"entities": [{ "name_or_address": "dev_lead_carol" }]
|
|
195
|
+
}
|
|
196
|
+
}
|
|
197
|
+
}
|
|
198
|
+
},
|
|
199
|
+
"env": {
|
|
200
|
+
"account": "pm_alice",
|
|
201
|
+
"network": "testnet"
|
|
202
|
+
}
|
|
203
|
+
}
|
|
204
|
+
```
|
|
205
|
+
|
|
206
|
+
---
|
|
207
|
+
|
|
208
|
+
## Sub-feature 1: Operate Progress (operate)
|
|
209
|
+
"message": "Transaction completed successfully",
|
|
210
|
+
"result": [
|
|
211
|
+
{
|
|
212
|
+
"type": "Progress",
|
|
213
|
+
"object": "0x147f5f648a6e993bc5c29ae3a8143b8b5cb2b54a45cecb8ef1f81cf545292a5b",
|
|
214
|
+
"change": "created"
|
|
215
|
+
}
|
|
216
|
+
]
|
|
217
|
+
}
|
|
218
|
+
```
|
|
219
|
+
|
|
220
|
+
#### Example 1.2: Create Named Progress
|
|
221
|
+
|
|
222
|
+
**Prompt**: Create a Progress named "project_gamma" with tags ["mobile", "ecommerce"].
|
|
223
|
+
|
|
224
|
+
```json
|
|
225
|
+
{
|
|
226
|
+
"operation_type": "machine",
|
|
227
|
+
"data": {
|
|
228
|
+
"object": "sdlc_workflow_v2",
|
|
229
|
+
"progress_new": {
|
|
230
|
+
"namedNew": {
|
|
231
|
+
"name": "project_gamma",
|
|
232
|
+
"tags": ["mobile", "ecommerce"]
|
|
233
|
+
}
|
|
234
|
+
}
|
|
235
|
+
},
|
|
236
|
+
"env": {
|
|
237
|
+
"account": "pm_alice",
|
|
238
|
+
"network": "testnet"
|
|
239
|
+
}
|
|
240
|
+
}
|
|
241
|
+
```
|
|
242
|
+
|
|
243
|
+
#### Example 1.3: Create Progress with Named Operators
|
|
244
|
+
|
|
245
|
+
**Prompt**: Create a Progress and assign "dev_lead_carol" as operator for the "developer" namespace.
|
|
246
|
+
|
|
247
|
+
```json
|
|
248
|
+
{
|
|
249
|
+
"operation_type": "machine",
|
|
250
|
+
"data": {
|
|
251
|
+
"object": "sdlc_workflow_v2",
|
|
252
|
+
"progress_new": {
|
|
253
|
+
"namedNew": {
|
|
254
|
+
"name": "project_delta"
|
|
255
|
+
},
|
|
256
|
+
"progress_namedOperator": {
|
|
257
|
+
"op": "set",
|
|
258
|
+
"name": "developer",
|
|
259
|
+
"operators": {
|
|
260
|
+
"entities": [
|
|
261
|
+
{"name_or_address": "dev_lead_carol"}
|
|
262
|
+
]
|
|
263
|
+
}
|
|
264
|
+
}
|
|
265
|
+
}
|
|
266
|
+
},
|
|
267
|
+
"env": {
|
|
268
|
+
"account": "pm_alice",
|
|
269
|
+
"network": "testnet"
|
|
270
|
+
}
|
|
271
|
+
}
|
|
272
|
+
```
|
|
273
|
+
|
|
274
|
+
---
|
|
275
|
+
|
|
276
|
+
## Sub-feature 2: Operate Progress (operate)
|
|
277
|
+
|
|
278
|
+
### Feature Description
|
|
279
|
+
|
|
280
|
+
Advance Progress to the next node by executing node transition operations. There are two modes:
|
|
281
|
+
- **Hold mode** (`hold: true`): Lock operation permission to avoid competition
|
|
282
|
+
- **Accomplish mode** (`hold: false`): Submit operation result and advance
|
|
283
|
+
|
|
284
|
+
### Parameter Description
|
|
285
|
+
|
|
286
|
+
| Parameter | Type | Required | Description |
|
|
287
|
+
|------|------|------|------|
|
|
288
|
+
| `operate.operation.next_node_name` | string | Yes | Target node name |
|
|
289
|
+
| `operate.operation.forward` | string | Yes | Forward operation name |
|
|
290
|
+
| `operate.hold` | boolean | No | Whether to hold at current node. When true, locks permission; when false or omitted, submits result directly |
|
|
291
|
+
| `operate.adminUnhold` | boolean | No | Allow admin to force unlock (only when hold=true) |
|
|
292
|
+
| `operate.message` | string | No | Operation message |
|
|
293
|
+
|
|
294
|
+
### Important Notes
|
|
295
|
+
|
|
296
|
+
⚠️ **Must have permission to execute the forward operation**.
|
|
297
|
+
|
|
298
|
+
⚠️ **Must meet the threshold requirements of the forward operation**.
|
|
299
|
+
|
|
300
|
+
⚠️ **Progress can only advance to the next node defined by the forward operation**.
|
|
301
|
+
|
|
302
|
+
⚠️ **Task cannot be changed after setting**.
|
|
303
|
+
|
|
304
|
+
### Examples
|
|
305
|
+
|
|
306
|
+
#### Example 2.1: Advance from Init Node (First Step)
|
|
307
|
+
|
|
308
|
+
**Prompt**: Advance "project_gamma" from init node (current: "") to "requirement" node using forward "start_project". This is the first step in the workflow.
|
|
309
|
+
|
|
310
|
+
```json
|
|
311
|
+
{
|
|
312
|
+
"operation_type": "progress",
|
|
313
|
+
"data": {
|
|
314
|
+
"object": "project_gamma",
|
|
315
|
+
"operate": {
|
|
316
|
+
"operation": {
|
|
317
|
+
"next_node_name": "requirement",
|
|
318
|
+
"forward": "start_project"
|
|
319
|
+
},
|
|
320
|
+
"message": "Starting new project from init node"
|
|
321
|
+
}
|
|
322
|
+
},
|
|
323
|
+
"env": {
|
|
324
|
+
"account": "pm_alice",
|
|
325
|
+
"network": "testnet",
|
|
326
|
+
"no_cache": true
|
|
327
|
+
}
|
|
328
|
+
}
|
|
329
|
+
```
|
|
330
|
+
|
|
331
|
+
> **💡 Tip**: The `hold` parameter is optional. When omitted or set to false, the operation submits the result directly and advances to the next node. Set `hold: true` only when you need to lock the operation permission.
|
|
332
|
+
|
|
333
|
+
**Prerequisites**:
|
|
334
|
+
1. Machine must have a node "requirement" with `prev_node: ""` and forward "start_project"
|
|
335
|
+
2. Progress "project_gamma" was created from this Machine
|
|
336
|
+
3. Progress's `current` field is `""` (init node)
|
|
337
|
+
4. Operator has required permission for forward "start_project"
|
|
338
|
+
|
|
339
|
+
**Execution Result**:
|
|
340
|
+
```json
|
|
341
|
+
{
|
|
342
|
+
"message": "Transaction completed successfully",
|
|
343
|
+
"result": [
|
|
344
|
+
{
|
|
345
|
+
"type": "Progress",
|
|
346
|
+
"object": "0x147f5f648a6e993bc5c29ae3a8143b8b5cb2b54a45cecb8ef1f81cf545292a5b",
|
|
347
|
+
"change": "mutated"
|
|
348
|
+
}
|
|
349
|
+
]
|
|
350
|
+
}
|
|
351
|
+
```
|
|
352
|
+
|
|
353
|
+
> **Note**: After execution, the Progress's `current` field will change from `""` to `"requirement"`, and a history entry will be recorded.
|
|
354
|
+
|
|
355
|
+
---
|
|
356
|
+
|
|
357
|
+
#### Example 2.2: Execute Accomplish Operation (No Hold)
|
|
358
|
+
|
|
359
|
+
**Prompt**: Advance "project_alpha" from current node (requirement) to "design" using forward "submit_design", with message "Requirements approved, proceeding to design phase" and no hold.
|
|
360
|
+
|
|
361
|
+
```json
|
|
362
|
+
{
|
|
363
|
+
"operation_type": "progress",
|
|
364
|
+
"data": {
|
|
365
|
+
"object": "project_alpha",
|
|
366
|
+
"operate": {
|
|
367
|
+
"operation": {
|
|
368
|
+
"next_node_name": "design",
|
|
369
|
+
"forward": "submit_design"
|
|
370
|
+
},
|
|
371
|
+
"message": "Requirements approved, proceeding to design phase"
|
|
372
|
+
}
|
|
373
|
+
},
|
|
374
|
+
"env": {
|
|
375
|
+
"account": "pm_alice",
|
|
376
|
+
"network": "testnet",
|
|
377
|
+
"no_cache": true
|
|
378
|
+
}
|
|
379
|
+
}
|
|
380
|
+
```
|
|
381
|
+
|
|
382
|
+
> **💡 Tip**: Set `env.no_cache: true` to ensure fresh data is fetched from the blockchain for each operation. This is especially important when executing multiple Progress operations in sequence.
|
|
383
|
+
|
|
384
|
+
**Execution Result**:
|
|
385
|
+
```json
|
|
386
|
+
{
|
|
387
|
+
"message": "Transaction completed successfully",
|
|
388
|
+
"result": [
|
|
389
|
+
{
|
|
390
|
+
"type": "Progress",
|
|
391
|
+
"type_raw": "0x2::progress::Progress",
|
|
392
|
+
"object": "0x28d5f8d9cc3f4e2082827140739ee29b6e33125f7eeb586690a786cdb00bfe3f",
|
|
393
|
+
"version": "644547",
|
|
394
|
+
"owner": {
|
|
395
|
+
"Shared": {
|
|
396
|
+
"initial_shared_version": 639744
|
|
397
|
+
}
|
|
398
|
+
},
|
|
399
|
+
"change": "mutated"
|
|
400
|
+
},
|
|
401
|
+
{
|
|
402
|
+
"type": "TableItem_ProgressHistory",
|
|
403
|
+
"type_raw": "0x2::dynamic_field::Field<u64, 0x2::progress::History>",
|
|
404
|
+
"object": "0x20fe9fed2c2f7645dee9cf8b8c4148e13b399917ef1df7f12895fa32f838cb2a",
|
|
405
|
+
"version": "650074",
|
|
406
|
+
"owner": {
|
|
407
|
+
"ObjectOwner": "0x28d5f8d9cc3f4e2082827140739ee29b6e33125f7eeb586690a786cdb00bfe3f"
|
|
408
|
+
},
|
|
409
|
+
"change": "created"
|
|
410
|
+
}
|
|
411
|
+
]
|
|
412
|
+
}
|
|
413
|
+
```
|
|
414
|
+
|
|
415
|
+
> **Important Note**: The forward name must exactly match the forward name defined in the Machine node. The system queries the Machine node by `next_node_name`, then looks for a pair where `prev_node` matches the current node, and finally finds the forward with matching name.
|
|
416
|
+
|
|
417
|
+
**Prerequisites**:
|
|
418
|
+
1. The Machine must be published
|
|
419
|
+
2. The Progress must be created from the Machine
|
|
420
|
+
3. The operator must have the required permission (permissionIndex or namedOperator)
|
|
421
|
+
4. The forward name must exactly match the name defined in the Machine node
|
|
422
|
+
|
|
423
|
+
#### Example 2.3: Execute Hold Operation
|
|
424
|
+
|
|
425
|
+
**Prompt**: Advance "project_alpha" from "design" to "development" using forward "start_development", hold at this node for architect review, with message "Design completed, awaiting architect approval".
|
|
426
|
+
|
|
427
|
+
```json
|
|
428
|
+
{
|
|
429
|
+
"operation_type": "progress",
|
|
430
|
+
"data": {
|
|
431
|
+
"object": "project_alpha",
|
|
432
|
+
"operate": {
|
|
433
|
+
"operation": {
|
|
434
|
+
"next_node_name": "development",
|
|
435
|
+
"forward": "start_development"
|
|
436
|
+
},
|
|
437
|
+
"hold": true,
|
|
438
|
+
"message": "Design completed, awaiting architect approval"
|
|
439
|
+
}
|
|
440
|
+
},
|
|
441
|
+
"env": {
|
|
442
|
+
"account": "arch_bob",
|
|
443
|
+
"network": "testnet",
|
|
444
|
+
"no_cache": true
|
|
445
|
+
}
|
|
446
|
+
}
|
|
447
|
+
```
|
|
448
|
+
|
|
449
|
+
> **💡 Tip**: When `hold: true`, the operation locks the permission at the current node, preventing other operators from executing competing operations. Use `adminUnhold: true` to allow admin override.
|
|
450
|
+
|
|
451
|
+
**Execution Result**:
|
|
452
|
+
```json
|
|
453
|
+
{
|
|
454
|
+
"message": "Transaction completed successfully",
|
|
455
|
+
"result": [
|
|
456
|
+
{
|
|
457
|
+
"type": "Progress",
|
|
458
|
+
"type_raw": "0x2::progress::Progress",
|
|
459
|
+
"object": "0x28d5f8d9cc3f4e2082827140739ee29b6e33125f7eeb586690a786cdb00bfe3f",
|
|
460
|
+
"version": "644547",
|
|
461
|
+
"owner": {
|
|
462
|
+
"Shared": {
|
|
463
|
+
"initial_shared_version": 639744
|
|
464
|
+
}
|
|
465
|
+
},
|
|
466
|
+
"change": "mutated"
|
|
467
|
+
},
|
|
468
|
+
{
|
|
469
|
+
"type": "TableItem_ProgressHistory",
|
|
470
|
+
"type_raw": "0x2::dynamic_field::Field<u64, 0x2::progress::History>",
|
|
471
|
+
"object": "0x1099682492f682addbd65091eadee32c2dc7cdd4dc517672a72485aa517e0649",
|
|
472
|
+
"version": "648986",
|
|
473
|
+
"owner": {
|
|
474
|
+
"ObjectOwner": "0x28d5f8d9cc3f4e2082827140739ee29b6e33125f7eeb586690a786cdb00bfe3f"
|
|
475
|
+
},
|
|
476
|
+
"change": "created"
|
|
477
|
+
}
|
|
478
|
+
]
|
|
479
|
+
}
|
|
480
|
+
```
|
|
481
|
+
|
|
482
|
+
#### Example 2.4: Admin Unhold Operation
|
|
483
|
+
|
|
484
|
+
**Prompt**: Admin unlock "project_alpha" from hold state, allowing it to advance to "code_review" using forward "submit_code", with message "Design approved by admin, proceeding to development".
|
|
485
|
+
|
|
486
|
+
```json
|
|
487
|
+
{
|
|
488
|
+
"operation_type": "progress",
|
|
489
|
+
"data": {
|
|
490
|
+
"object": "project_alpha",
|
|
491
|
+
"operate": {
|
|
492
|
+
"operation": {
|
|
493
|
+
"next_node_name": "code_review",
|
|
494
|
+
"forward": "submit_code"
|
|
495
|
+
},
|
|
496
|
+
"hold": true,
|
|
497
|
+
"adminUnhold": true,
|
|
498
|
+
"message": "Design approved by admin, proceeding to development"
|
|
499
|
+
}
|
|
500
|
+
},
|
|
501
|
+
"env": {
|
|
502
|
+
"account": "pm_alice",
|
|
503
|
+
"network": "testnet",
|
|
504
|
+
"no_cache": true
|
|
505
|
+
}
|
|
506
|
+
}
|
|
507
|
+
```
|
|
508
|
+
|
|
509
|
+
> **💡 Tip**: Use `adminUnhold: true` when you need to override a held operation. This requires admin privileges and should be used for emergency interventions or when the original operator is unavailable.
|
|
510
|
+
|
|
511
|
+
**Execution Result**:
|
|
512
|
+
```json
|
|
513
|
+
{
|
|
514
|
+
"message": "Transaction completed successfully",
|
|
515
|
+
"result": [
|
|
516
|
+
{
|
|
517
|
+
"type": "Progress",
|
|
518
|
+
"type_raw": "0x2::progress::Progress",
|
|
519
|
+
"object": "0x28d5f8d9cc3f4e2082827140739ee29b6e33125f7eeb586690a786cdb00bfe3f",
|
|
520
|
+
"version": "644547",
|
|
521
|
+
"owner": {
|
|
522
|
+
"Shared": {
|
|
523
|
+
"initial_shared_version": 639744
|
|
524
|
+
}
|
|
525
|
+
},
|
|
526
|
+
"change": "mutated"
|
|
527
|
+
},
|
|
528
|
+
{
|
|
529
|
+
"type": "TableItem_ProgressHistory",
|
|
530
|
+
"type_raw": "0x2::dynamic_field::Field<u64, 0x2::progress::History>",
|
|
531
|
+
"object": "0xfe3a2f01d9f8d00f9755c783b2bbdb9e0a67eff31160bb079e18e38364c30369",
|
|
532
|
+
"version": "648986",
|
|
533
|
+
"owner": {
|
|
534
|
+
"ObjectOwner": "0x28d5f8d9cc3f4e2082827140739ee29b6e33125f7eeb586690a786cdb00bfe3f"
|
|
535
|
+
},
|
|
536
|
+
"change": "created"
|
|
537
|
+
}
|
|
538
|
+
]
|
|
539
|
+
}
|
|
540
|
+
```
|
|
541
|
+
|
|
542
|
+
#### Example 2.5: Using NamedOperator Forward
|
|
543
|
+
|
|
544
|
+
**Prompt**: Developer "dev_lead_carol" advances "project_alpha" from "code_review" to "testing" using forward "submit_code" (which uses namedOperator "developer").
|
|
545
|
+
|
|
546
|
+
```json
|
|
547
|
+
{
|
|
548
|
+
"operation_type": "progress",
|
|
549
|
+
"data": {
|
|
550
|
+
"object": "project_alpha",
|
|
551
|
+
"operate": {
|
|
552
|
+
"operation": {
|
|
553
|
+
"next_node_name": "testing",
|
|
554
|
+
"forward": "submit_code"
|
|
555
|
+
},
|
|
556
|
+
"hold": false,
|
|
557
|
+
"message": "Code submitted for review"
|
|
558
|
+
}
|
|
559
|
+
},
|
|
560
|
+
"env": {
|
|
561
|
+
"account": "dev_lead_carol",
|
|
562
|
+
"network": "testnet"
|
|
563
|
+
}
|
|
564
|
+
}
|
|
565
|
+
```
|
|
566
|
+
|
|
567
|
+
**Prerequisites**: The operator "dev_lead_carol" must be registered as a named operator for the "developer" namespace in this Progress instance.
|
|
568
|
+
|
|
569
|
+
---
|
|
570
|
+
|
|
571
|
+
## Sub-feature 3: Manage Named Operators (progress_namedOperator)
|
|
572
|
+
|
|
573
|
+
### Feature Description
|
|
574
|
+
|
|
575
|
+
Manage named operators of Progress, used for dynamic permission assignment. Each Progress instance can have different operators for the same namespace, providing flexibility for dynamic team assignments.
|
|
576
|
+
|
|
577
|
+
### Parameter Description
|
|
578
|
+
|
|
579
|
+
| Parameter | Type | Required | Description |
|
|
580
|
+
|------|------|------|------|
|
|
581
|
+
| `progress_namedOperator.op` | string | Yes | Operation type: add/set/remove |
|
|
582
|
+
| `progress_namedOperator.name` | string | Yes | Namespace name |
|
|
583
|
+
| `progress_namedOperator.operators` | object | Yes | Operator list configuration |
|
|
584
|
+
| `progress_namedOperator.operators.entities` | array | Yes | Entity list with name_or_address |
|
|
585
|
+
| `progress_namedOperator.operators.check_all_founded` | boolean | No | Check all entities are found |
|
|
586
|
+
|
|
587
|
+
### Operation Type Description
|
|
588
|
+
|
|
589
|
+
| Operation Type | Description |
|
|
590
|
+
|----------|------|
|
|
591
|
+
| `add` | Add new operators to the namespace |
|
|
592
|
+
| `set` | Set (replace) operators in the namespace |
|
|
593
|
+
| `remove` | Remove operators from the namespace |
|
|
594
|
+
|
|
595
|
+
### Examples
|
|
596
|
+
|
|
597
|
+
#### Example 3.1: Set Named Operators (Initial Assignment)
|
|
598
|
+
|
|
599
|
+
**Prompt**: Set "developer" namespace to have "dev_lead_carol" as the operator for "project_alpha".
|
|
600
|
+
|
|
601
|
+
```json
|
|
602
|
+
{
|
|
603
|
+
"operation_type": "progress",
|
|
604
|
+
"data": {
|
|
605
|
+
"object": "project_alpha",
|
|
606
|
+
"progress_namedOperator": {
|
|
607
|
+
"op": "set",
|
|
608
|
+
"name": "developer",
|
|
609
|
+
"operators": {
|
|
610
|
+
"entities": [
|
|
611
|
+
{ "name_or_address": "dev_lead_carol" }
|
|
612
|
+
],
|
|
613
|
+
"check_all_founded": true
|
|
614
|
+
}
|
|
615
|
+
}
|
|
616
|
+
},
|
|
617
|
+
"env": {
|
|
618
|
+
"account": "pm_alice",
|
|
619
|
+
"network": "testnet"
|
|
620
|
+
}
|
|
621
|
+
}
|
|
622
|
+
```
|
|
623
|
+
|
|
624
|
+
**Execution Result**:
|
|
625
|
+
```json
|
|
626
|
+
{
|
|
627
|
+
"message": "Transaction completed successfully",
|
|
628
|
+
"result": {
|
|
629
|
+
"type": "transaction",
|
|
630
|
+
"objectChanges": [
|
|
631
|
+
{
|
|
632
|
+
"type": "Progress",
|
|
633
|
+
"object": "0x5255787477424a2d17b8b9902957aaaf1f196d0c8a382ef52876153895dd9cb4",
|
|
634
|
+
"version": "523550",
|
|
635
|
+
"change": "mutated"
|
|
636
|
+
}
|
|
637
|
+
]
|
|
638
|
+
}
|
|
639
|
+
}
|
|
640
|
+
```
|
|
641
|
+
|
|
642
|
+
#### Example 3.2: Add Named Operators
|
|
643
|
+
|
|
644
|
+
**Prompt**: Add "arch_bob" as an additional developer to "project_alpha" for collaborative development.
|
|
645
|
+
|
|
646
|
+
```json
|
|
647
|
+
{
|
|
648
|
+
"operation_type": "progress",
|
|
649
|
+
"data": {
|
|
650
|
+
"object": "project_alpha",
|
|
651
|
+
"progress_namedOperator": {
|
|
652
|
+
"op": "add",
|
|
653
|
+
"name": "developer",
|
|
654
|
+
"operators": {
|
|
655
|
+
"entities": [
|
|
656
|
+
{ "name_or_address": "arch_bob" }
|
|
657
|
+
],
|
|
658
|
+
"check_all_founded": true
|
|
659
|
+
}
|
|
660
|
+
}
|
|
661
|
+
},
|
|
662
|
+
"env": {
|
|
663
|
+
"account": "pm_alice",
|
|
664
|
+
"network": "testnet"
|
|
665
|
+
}
|
|
666
|
+
}
|
|
667
|
+
```
|
|
668
|
+
|
|
669
|
+
#### Example 3.3: Remove Named Operators
|
|
670
|
+
|
|
671
|
+
**Prompt**: Remove "arch_bob" from "developer" namespace after their task is completed.
|
|
672
|
+
|
|
673
|
+
```json
|
|
674
|
+
{
|
|
675
|
+
"operation_type": "progress",
|
|
676
|
+
"data": {
|
|
677
|
+
"object": "project_alpha",
|
|
678
|
+
"progress_namedOperator": {
|
|
679
|
+
"op": "remove",
|
|
680
|
+
"name": "developer",
|
|
681
|
+
"operators": {
|
|
682
|
+
"entities": [
|
|
683
|
+
{ "name_or_address": "arch_bob" }
|
|
684
|
+
],
|
|
685
|
+
"check_all_founded": false
|
|
686
|
+
}
|
|
687
|
+
}
|
|
688
|
+
},
|
|
689
|
+
"env": {
|
|
690
|
+
"account": "pm_alice",
|
|
691
|
+
"network": "testnet"
|
|
692
|
+
}
|
|
693
|
+
}
|
|
694
|
+
```
|
|
695
|
+
|
|
696
|
+
#### Example 3.4: Multiple Named Operators
|
|
697
|
+
|
|
698
|
+
**Prompt**: Set multiple developers for "project_beta" to enable team collaboration.
|
|
699
|
+
|
|
700
|
+
```json
|
|
701
|
+
{
|
|
702
|
+
"operation_type": "progress",
|
|
703
|
+
"data": {
|
|
704
|
+
"object": "project_beta",
|
|
705
|
+
"progress_namedOperator": {
|
|
706
|
+
"op": "set",
|
|
707
|
+
"name": "developer",
|
|
708
|
+
"operators": {
|
|
709
|
+
"entities": [
|
|
710
|
+
{ "name_or_address": "arch_bob" },
|
|
711
|
+
{ "name_or_address": "dev_lead_carol" },
|
|
712
|
+
{ "name_or_address": "test_lead_dave" }
|
|
713
|
+
],
|
|
714
|
+
"check_all_founded": true
|
|
715
|
+
}
|
|
716
|
+
}
|
|
717
|
+
},
|
|
718
|
+
"env": {
|
|
719
|
+
"account": "pm_alice",
|
|
720
|
+
"network": "testnet"
|
|
721
|
+
}
|
|
722
|
+
}
|
|
723
|
+
```
|
|
724
|
+
|
|
725
|
+
---
|
|
726
|
+
|
|
727
|
+
## Sub-feature 4: Set Task (task)
|
|
728
|
+
|
|
729
|
+
### Feature Description
|
|
730
|
+
|
|
731
|
+
Set the task ID of Progress for associating with other objects. Task cannot be changed after setting. This is typically used to link a Progress to an Order, Service, or other business entities.
|
|
732
|
+
|
|
733
|
+
### Parameter Description
|
|
734
|
+
|
|
735
|
+
| Parameter | Type | Required | Description |
|
|
736
|
+
|------|------|------|------|
|
|
737
|
+
| `task` | string | Yes | Task ID (name or address) |
|
|
738
|
+
|
|
739
|
+
### Important Notes
|
|
740
|
+
|
|
741
|
+
⚠️ **Task cannot be changed after setting**.
|
|
742
|
+
|
|
743
|
+
### Examples
|
|
744
|
+
|
|
745
|
+
#### Example 4.1: Set Task ID
|
|
746
|
+
|
|
747
|
+
**Prompt**: Set task "mobile_app_order_001" for "project_alpha" to link it with the corresponding order.
|
|
748
|
+
|
|
749
|
+
```json
|
|
750
|
+
{
|
|
751
|
+
"operation_type": "progress",
|
|
752
|
+
"data": {
|
|
753
|
+
"object": "project_alpha",
|
|
754
|
+
"task": "mobile_app_order_001"
|
|
755
|
+
},
|
|
756
|
+
"env": {
|
|
757
|
+
"account": "pm_alice",
|
|
758
|
+
"network": "testnet"
|
|
759
|
+
}
|
|
760
|
+
}
|
|
761
|
+
```
|
|
762
|
+
|
|
763
|
+
> **💡 Tip**: The `task` field can be set during Progress creation via `progress_new.task` or updated later using this operation. Once set, the task cannot be changed.
|
|
764
|
+
|
|
765
|
+
**Execution Result**:
|
|
766
|
+
```json
|
|
767
|
+
{
|
|
768
|
+
"message": "Transaction completed successfully",
|
|
769
|
+
"result": {
|
|
770
|
+
"type": "transaction",
|
|
771
|
+
"objectChanges": [
|
|
772
|
+
{
|
|
773
|
+
"type": "Progress",
|
|
774
|
+
"object": "0x5255787477424a2d17b8b9902957aaaf1f196d0c8a382ef52876153895dd9cb4",
|
|
775
|
+
"version": "523551",
|
|
776
|
+
"change": "mutated"
|
|
777
|
+
}
|
|
778
|
+
]
|
|
779
|
+
}
|
|
780
|
+
}
|
|
781
|
+
```
|
|
782
|
+
|
|
783
|
+
#### Example 4.2: Set Task with Service Reference
|
|
784
|
+
|
|
785
|
+
**Prompt**: Link "project_beta" to service "web_development_service".
|
|
786
|
+
|
|
787
|
+
```json
|
|
788
|
+
{
|
|
789
|
+
"operation_type": "progress",
|
|
790
|
+
"data": {
|
|
791
|
+
"object": "project_beta",
|
|
792
|
+
"task": "web_development_service"
|
|
793
|
+
},
|
|
794
|
+
"env": {
|
|
795
|
+
"account": "pm_alice",
|
|
796
|
+
"network": "testnet"
|
|
797
|
+
}
|
|
798
|
+
}
|
|
799
|
+
```
|
|
800
|
+
|
|
801
|
+
---
|
|
802
|
+
|
|
803
|
+
## Sub-feature 5: Manage Repository (repository)
|
|
804
|
+
|
|
805
|
+
### Feature Description
|
|
806
|
+
|
|
807
|
+
Manage repositories of Progress for storing workflow-related data. Repositories can store deliverables, documents, configuration, and other project artifacts.
|
|
808
|
+
|
|
809
|
+
### Parameter Description
|
|
810
|
+
|
|
811
|
+
| Parameter | Type | Required | Description |
|
|
812
|
+
|------|------|------|------|
|
|
813
|
+
| `repository.op` | string | Yes | Operation type: add/set/remove/clear |
|
|
814
|
+
| `repository.objects` | array | Required for add/set/remove | Repository list |
|
|
815
|
+
|
|
816
|
+
### Operation Type Description
|
|
817
|
+
|
|
818
|
+
| Operation Type | Description |
|
|
819
|
+
|----------|------|
|
|
820
|
+
| `add` | Add new repositories to the existing list |
|
|
821
|
+
| `set` | Set (replace) the complete repository list |
|
|
822
|
+
| `remove` | Remove specified repositories from the list |
|
|
823
|
+
| `clear` | Clear all repositories |
|
|
824
|
+
|
|
825
|
+
### Examples
|
|
826
|
+
|
|
827
|
+
#### Example 5.1: Add Repositories
|
|
828
|
+
|
|
829
|
+
**Prompt**: Add "project_alpha_specs" and "project_alpha_assets" repositories to "project_alpha" for storing specifications and design assets.
|
|
830
|
+
|
|
831
|
+
```json
|
|
832
|
+
{
|
|
833
|
+
"operation_type": "progress",
|
|
834
|
+
"data": {
|
|
835
|
+
"object": "project_alpha",
|
|
836
|
+
"repository": {
|
|
837
|
+
"op": "add",
|
|
838
|
+
"objects": ["project_alpha_specs", "project_alpha_assets"]
|
|
839
|
+
}
|
|
840
|
+
},
|
|
841
|
+
"env": {
|
|
842
|
+
"account": "pm_alice",
|
|
843
|
+
"network": "testnet"
|
|
844
|
+
}
|
|
845
|
+
}
|
|
846
|
+
```
|
|
847
|
+
|
|
848
|
+
**Execution Result**:
|
|
849
|
+
```json
|
|
850
|
+
{
|
|
851
|
+
"message": "Transaction completed successfully",
|
|
852
|
+
"result": {
|
|
853
|
+
"type": "transaction",
|
|
854
|
+
"objectChanges": [
|
|
855
|
+
{
|
|
856
|
+
"type": "Progress",
|
|
857
|
+
"object": "0x5255787477424a2d17b8b9902957aaaf1f196d0c8a382ef52876153895dd9cb4",
|
|
858
|
+
"version": "523552",
|
|
859
|
+
"change": "mutated"
|
|
860
|
+
}
|
|
861
|
+
]
|
|
862
|
+
}
|
|
863
|
+
}
|
|
864
|
+
```
|
|
865
|
+
|
|
866
|
+
#### Example 5.2: Set Repositories
|
|
867
|
+
|
|
868
|
+
**Prompt**: Set "project_alpha" repositories to exactly ["project_alpha_code", "project_alpha_docs"], replacing any existing ones.
|
|
869
|
+
|
|
870
|
+
```json
|
|
871
|
+
{
|
|
872
|
+
"operation_type": "progress",
|
|
873
|
+
"data": {
|
|
874
|
+
"object": "project_alpha",
|
|
875
|
+
"repository": {
|
|
876
|
+
"op": "set",
|
|
877
|
+
"objects": ["project_alpha_code", "project_alpha_docs"]
|
|
878
|
+
}
|
|
879
|
+
},
|
|
880
|
+
"env": {
|
|
881
|
+
"account": "pm_alice",
|
|
882
|
+
"network": "testnet"
|
|
883
|
+
}
|
|
884
|
+
}
|
|
885
|
+
```
|
|
886
|
+
|
|
887
|
+
#### Example 5.3: Remove Repositories
|
|
888
|
+
|
|
889
|
+
> **⚠️ Note**: The `remove` operation may have limitations on the number of objects that can be removed at once. If you encounter errors, consider using `set` or `clear` operations instead.
|
|
890
|
+
|
|
891
|
+
**Prompt**: Remove "project_alpha_specs" repository from "project_alpha".
|
|
892
|
+
|
|
893
|
+
```json
|
|
894
|
+
{
|
|
895
|
+
"operation_type": "progress",
|
|
896
|
+
"data": {
|
|
897
|
+
"object": "project_alpha",
|
|
898
|
+
"repository": {
|
|
899
|
+
"op": "remove",
|
|
900
|
+
"objects": ["project_alpha_specs"]
|
|
901
|
+
}
|
|
902
|
+
},
|
|
903
|
+
"env": {
|
|
904
|
+
"account": "pm_alice",
|
|
905
|
+
"network": "testnet"
|
|
906
|
+
}
|
|
907
|
+
}
|
|
908
|
+
```
|
|
909
|
+
|
|
910
|
+
#### Example 5.4: Clear All Repositories
|
|
911
|
+
|
|
912
|
+
**Prompt**: Clear all repositories from "project_alpha" after project completion.
|
|
913
|
+
|
|
914
|
+
```json
|
|
915
|
+
{
|
|
916
|
+
"operation_type": "progress",
|
|
917
|
+
"data": {
|
|
918
|
+
"object": "project_alpha",
|
|
919
|
+
"repository": {
|
|
920
|
+
"op": "clear"
|
|
921
|
+
}
|
|
922
|
+
},
|
|
923
|
+
"env": {
|
|
924
|
+
"account": "pm_alice",
|
|
925
|
+
"network": "testnet"
|
|
926
|
+
}
|
|
927
|
+
}
|
|
928
|
+
```
|
|
929
|
+
|
|
930
|
+
---
|
|
931
|
+
|
|
932
|
+
## Sub-feature 6: Combined Operations
|
|
933
|
+
|
|
934
|
+
### Feature Description
|
|
935
|
+
|
|
936
|
+
Execute multiple operations in one call to the Progress object. This is useful for complex workflow transitions that require updating multiple aspects simultaneously.
|
|
937
|
+
|
|
938
|
+
### Examples
|
|
939
|
+
|
|
940
|
+
#### Example 6.1: Complete Progress Workflow with All Features
|
|
941
|
+
|
|
942
|
+
**Prompt**: For "project_alpha": 1) Set task "mobile_app_order_001", 2) Add "project_alpha_deliverables" repository, 3) Add "test_lead_dave" to "reviewers" namespace, 4) Advance to "testing" node with forward "approve_code", hold=false, message "Code review passed, moving to testing phase".
|
|
943
|
+
|
|
944
|
+
```json
|
|
945
|
+
{
|
|
946
|
+
"operation_type": "progress",
|
|
947
|
+
"data": {
|
|
948
|
+
"object": "project_alpha",
|
|
949
|
+
"task": "mobile_app_order_001",
|
|
950
|
+
"repository": {
|
|
951
|
+
"op": "add",
|
|
952
|
+
"objects": ["project_alpha_deliverables"]
|
|
953
|
+
},
|
|
954
|
+
"progress_namedOperator": {
|
|
955
|
+
"op": "add",
|
|
956
|
+
"name": "reviewers",
|
|
957
|
+
"operators": {
|
|
958
|
+
"entities": [
|
|
959
|
+
{ "name_or_address": "test_lead_dave" }
|
|
960
|
+
],
|
|
961
|
+
"check_all_founded": true
|
|
962
|
+
}
|
|
963
|
+
},
|
|
964
|
+
"operate": {
|
|
965
|
+
"operation": {
|
|
966
|
+
"next_node_name": "testing",
|
|
967
|
+
"forward": "approve_code"
|
|
968
|
+
},
|
|
969
|
+
"hold": false,
|
|
970
|
+
"message": "Code review passed, moving to testing phase"
|
|
971
|
+
}
|
|
972
|
+
},
|
|
973
|
+
"env": {
|
|
974
|
+
"account": "dev_lead_carol",
|
|
975
|
+
"network": "testnet"
|
|
976
|
+
}
|
|
977
|
+
}
|
|
978
|
+
```
|
|
979
|
+
|
|
980
|
+
**Execution Result**:
|
|
981
|
+
```json
|
|
982
|
+
{
|
|
983
|
+
"message": "Transaction completed successfully",
|
|
984
|
+
"result": {
|
|
985
|
+
"type": "transaction",
|
|
986
|
+
"digest": "...",
|
|
987
|
+
"objectChanges": [
|
|
988
|
+
{
|
|
989
|
+
"type": "Progress",
|
|
990
|
+
"object": "0x5255787477424a2d17b8b9902957aaaf1f196d0c8a382ef52876153895dd9cb4",
|
|
991
|
+
"version": "523553",
|
|
992
|
+
"change": "mutated"
|
|
993
|
+
}
|
|
994
|
+
]
|
|
995
|
+
}
|
|
996
|
+
}
|
|
997
|
+
```
|
|
998
|
+
|
|
999
|
+
#### Example 6.2: Hold and Set Operators Together
|
|
1000
|
+
|
|
1001
|
+
**Prompt**: For "project_alpha": 1) Hold at "uat" node with forward "pass_testing", 2) Add "customer_eve" to "approvers" namespace for UAT approval.
|
|
1002
|
+
|
|
1003
|
+
```json
|
|
1004
|
+
{
|
|
1005
|
+
"operation_type": "progress",
|
|
1006
|
+
"data": {
|
|
1007
|
+
"object": "project_alpha",
|
|
1008
|
+
"progress_namedOperator": {
|
|
1009
|
+
"op": "add",
|
|
1010
|
+
"name": "approvers",
|
|
1011
|
+
"operators": {
|
|
1012
|
+
"entities": [
|
|
1013
|
+
{ "name_or_address": "customer_eve" }
|
|
1014
|
+
],
|
|
1015
|
+
"check_all_founded": true
|
|
1016
|
+
}
|
|
1017
|
+
},
|
|
1018
|
+
"operate": {
|
|
1019
|
+
"operation": {
|
|
1020
|
+
"next_node_name": "uat",
|
|
1021
|
+
"forward": "pass_testing"
|
|
1022
|
+
},
|
|
1023
|
+
"hold": true,
|
|
1024
|
+
"message": "Testing completed, awaiting UAT approval"
|
|
1025
|
+
}
|
|
1026
|
+
},
|
|
1027
|
+
"env": {
|
|
1028
|
+
"account": "test_lead_dave",
|
|
1029
|
+
"network": "testnet"
|
|
1030
|
+
}
|
|
1031
|
+
}
|
|
1032
|
+
```
|
|
1033
|
+
|
|
1034
|
+
#### Example 6.3: Project Initialization with Multiple Setup Steps
|
|
1035
|
+
|
|
1036
|
+
**Prompt**: Initialize "project_gamma" with task, repositories, and named operators in one operation.
|
|
1037
|
+
|
|
1038
|
+
```json
|
|
1039
|
+
{
|
|
1040
|
+
"operation_type": "progress",
|
|
1041
|
+
"data": {
|
|
1042
|
+
"object": "project_gamma",
|
|
1043
|
+
"task": "ecommerce_platform_order",
|
|
1044
|
+
"repository": {
|
|
1045
|
+
"op": "set",
|
|
1046
|
+
"objects": ["project_gamma_specs", "project_gamma_designs", "project_gamma_code"]
|
|
1047
|
+
},
|
|
1048
|
+
"progress_namedOperator": {
|
|
1049
|
+
"op": "set",
|
|
1050
|
+
"name": "developer",
|
|
1051
|
+
"operators": {
|
|
1052
|
+
"entities": [
|
|
1053
|
+
{ "name_or_address": "dev_lead_carol" },
|
|
1054
|
+
{ "name_or_address": "arch_bob" }
|
|
1055
|
+
],
|
|
1056
|
+
"check_all_founded": true
|
|
1057
|
+
}
|
|
1058
|
+
}
|
|
1059
|
+
},
|
|
1060
|
+
"env": {
|
|
1061
|
+
"account": "pm_alice",
|
|
1062
|
+
"network": "testnet"
|
|
1063
|
+
}
|
|
1064
|
+
}
|
|
1065
|
+
```
|
|
1066
|
+
|
|
1067
|
+
---
|
|
1068
|
+
|
|
1069
|
+
## Real-World Example: Project Alpha - Complete SDLC Execution
|
|
1070
|
+
|
|
1071
|
+
> **✅ All Features Operational**: This section demonstrates a complete, working workflow for Progress execution. All features including `operate` and `task` functions are fully functional as of SDK v2.1.29.
|
|
1072
|
+
>
|
|
1073
|
+
> **Verified Working Features**:
|
|
1074
|
+
> - Progress creation from Machine
|
|
1075
|
+
> - Progress operate (forward execution with hold/accomplish modes)
|
|
1076
|
+
> - Named operator management (set/add/remove)
|
|
1077
|
+
> - Repository management (add/set/clear)
|
|
1078
|
+
> - Task setting and association
|
|
1079
|
+
|
|
1080
|
+
This section demonstrates a complete, real-world implementation of executing a software development workflow using the Progress component. The examples are based on the Machine workflow created in the [Machine Component documentation](machine.md).
|
|
1081
|
+
|
|
1082
|
+
### Project Overview
|
|
1083
|
+
|
|
1084
|
+
**Project Name**: Project Alpha - Mobile App Development
|
|
1085
|
+
**Machine**: software_dev_workflow (8-node SDLC workflow)
|
|
1086
|
+
**Progress Address**: 0x5255...9cb4
|
|
1087
|
+
**Team Structure**:
|
|
1088
|
+
- Product Manager (pm_alice) - Requirements approval
|
|
1089
|
+
- Architect (arch_bob) - Design approval
|
|
1090
|
+
- Development Lead (dev_lead_carol) - Code review and deployment
|
|
1091
|
+
- Test Lead (test_lead_dave) - Testing approval
|
|
1092
|
+
- Customer (customer_eve) - UAT approval
|
|
1093
|
+
|
|
1094
|
+
### Workflow Nodes
|
|
1095
|
+
|
|
1096
|
+
```
|
|
1097
|
+
requirement → design → development → code_review → testing → uat → deployment → completed
|
|
1098
|
+
```
|
|
1099
|
+
|
|
1100
|
+
### Prerequisites
|
|
1101
|
+
|
|
1102
|
+
Before executing Progress operations, ensure you have:
|
|
1103
|
+
|
|
1104
|
+
1. **Created and Published Machine**: `software_dev_workflow` (see [Machine Component](machine.md))
|
|
1105
|
+
2. **Created Progress Instance**: `project_alpha` with initial named operator
|
|
1106
|
+
3. **Granted Permissions**: Team members have appropriate permission indexes in the Permission object
|
|
1107
|
+
4. **Funded Accounts**: All team accounts have sufficient test coins
|
|
1108
|
+
|
|
1109
|
+
### Step-by-Step Execution
|
|
1110
|
+
|
|
1111
|
+
#### Step 1: Create Progress from Machine
|
|
1112
|
+
|
|
1113
|
+
First, create a Progress instance from the published Machine:
|
|
1114
|
+
|
|
1115
|
+
```json
|
|
1116
|
+
{
|
|
1117
|
+
"operation_type": "machine",
|
|
1118
|
+
"data": {
|
|
1119
|
+
"object": "software_dev_workflow",
|
|
1120
|
+
"progress_new": {
|
|
1121
|
+
"namedNew": {
|
|
1122
|
+
"name": "project_alpha",
|
|
1123
|
+
"tags": ["mobile", "ecommerce"]
|
|
1124
|
+
}
|
|
1125
|
+
}
|
|
1126
|
+
},
|
|
1127
|
+
"env": {
|
|
1128
|
+
"account": "pm_alice",
|
|
1129
|
+
"network": "testnet"
|
|
1130
|
+
}
|
|
1131
|
+
}
|
|
1132
|
+
```
|
|
1133
|
+
|
|
1134
|
+
**Execution Result**:
|
|
1135
|
+
```json
|
|
1136
|
+
{
|
|
1137
|
+
"message": "Transaction completed successfully",
|
|
1138
|
+
"result": [
|
|
1139
|
+
{
|
|
1140
|
+
"type": "Progress",
|
|
1141
|
+
"object": "0x5255787477424a2d17b8b9902957aaaf1f196d0c8a382ef52876153895dd9cb4",
|
|
1142
|
+
"change": "created"
|
|
1143
|
+
}
|
|
1144
|
+
]
|
|
1145
|
+
}
|
|
1146
|
+
```
|
|
1147
|
+
|
|
1148
|
+
#### Step 2: Initial Progress State
|
|
1149
|
+
|
|
1150
|
+
After creation, `project_alpha` starts at the **init node** (`""`):
|
|
1151
|
+
|
|
1152
|
+
```json
|
|
1153
|
+
{
|
|
1154
|
+
"progress_name": "project_alpha",
|
|
1155
|
+
"current_node": "",
|
|
1156
|
+
"machine": "software_dev_workflow",
|
|
1157
|
+
"named_operators": {},
|
|
1158
|
+
"repositories": [],
|
|
1159
|
+
"task": null
|
|
1160
|
+
}
|
|
1161
|
+
```
|
|
1162
|
+
|
|
1163
|
+
> **Note**: The empty string `""` represents the init node. Progress always starts here when created.
|
|
1164
|
+
|
|
1165
|
+
#### Step 3: Advance from Init Node to Requirement
|
|
1166
|
+
|
|
1167
|
+
Execute the first forward to move from init node to "requirement" node:
|
|
1168
|
+
|
|
1169
|
+
```json
|
|
1170
|
+
{
|
|
1171
|
+
"operation_type": "progress",
|
|
1172
|
+
"data": {
|
|
1173
|
+
"object": "project_alpha",
|
|
1174
|
+
"operate": {
|
|
1175
|
+
"operation": {
|
|
1176
|
+
"next_node_name": "requirement",
|
|
1177
|
+
"forward": "start_project"
|
|
1178
|
+
},
|
|
1179
|
+
"hold": false,
|
|
1180
|
+
"message": "Starting Project Alpha - Mobile e-commerce app development"
|
|
1181
|
+
}
|
|
1182
|
+
},
|
|
1183
|
+
"env": {
|
|
1184
|
+
"account": "pm_alice",
|
|
1185
|
+
"network": "testnet"
|
|
1186
|
+
}
|
|
1187
|
+
}
|
|
1188
|
+
```
|
|
1189
|
+
|
|
1190
|
+
**Prerequisites**:
|
|
1191
|
+
- Machine must have "requirement" node with `prev_node: ""` and forward "start_project"
|
|
1192
|
+
- Operator (pm_alice) must have permission for forward "start_project"
|
|
1193
|
+
|
|
1194
|
+
**Execution Result**:
|
|
1195
|
+
```json
|
|
1196
|
+
{
|
|
1197
|
+
"message": "Transaction completed successfully",
|
|
1198
|
+
"result": [
|
|
1199
|
+
{
|
|
1200
|
+
"type": "Progress",
|
|
1201
|
+
"object": "0x5255787477424a2d17b8b9902957aaaf1f196d0c8a382ef52876153895dd9cb4",
|
|
1202
|
+
"change": "mutated"
|
|
1203
|
+
}
|
|
1204
|
+
]
|
|
1205
|
+
}
|
|
1206
|
+
```
|
|
1207
|
+
|
|
1208
|
+
After execution, `current_node` changes from `""` to `"requirement"`.
|
|
1209
|
+
|
|
1210
|
+
#### Step 4: Set Task and Repositories
|
|
1211
|
+
|
|
1212
|
+
Link the Progress to the order and set up data repositories:
|
|
1213
|
+
|
|
1214
|
+
```json
|
|
1215
|
+
{
|
|
1216
|
+
"operation_type": "progress",
|
|
1217
|
+
"data": {
|
|
1218
|
+
"object": "project_alpha",
|
|
1219
|
+
"task": "mobile_app_order_001",
|
|
1220
|
+
"repository": {
|
|
1221
|
+
"op": "set",
|
|
1222
|
+
"objects": [
|
|
1223
|
+
"alpha_requirements",
|
|
1224
|
+
"alpha_designs",
|
|
1225
|
+
"alpha_code",
|
|
1226
|
+
"alpha_test_reports"
|
|
1227
|
+
]
|
|
1228
|
+
}
|
|
1229
|
+
},
|
|
1230
|
+
"env": {
|
|
1231
|
+
"account": "pm_alice",
|
|
1232
|
+
"network": "testnet"
|
|
1233
|
+
}
|
|
1234
|
+
}
|
|
1235
|
+
```
|
|
1236
|
+
|
|
1237
|
+
**Execution Result**:
|
|
1238
|
+
```json
|
|
1239
|
+
{
|
|
1240
|
+
"message": "Transaction completed successfully",
|
|
1241
|
+
"result": {
|
|
1242
|
+
"type": "transaction",
|
|
1243
|
+
"objectChanges": [
|
|
1244
|
+
{
|
|
1245
|
+
"type": "Progress",
|
|
1246
|
+
"object": "0x5255787477424a2d17b8b9902957aaaf1f196d0c8a382ef52876153895dd9cb4",
|
|
1247
|
+
"version": "523554",
|
|
1248
|
+
"change": "mutated"
|
|
1249
|
+
}
|
|
1250
|
+
]
|
|
1251
|
+
}
|
|
1252
|
+
}
|
|
1253
|
+
```
|
|
1254
|
+
|
|
1255
|
+
#### Step 5: Requirements to Design (PM Approval)
|
|
1256
|
+
|
|
1257
|
+
Product Manager approves requirements and advances to design phase:
|
|
1258
|
+
|
|
1259
|
+
```json
|
|
1260
|
+
{
|
|
1261
|
+
"operation_type": "progress",
|
|
1262
|
+
"data": {
|
|
1263
|
+
"object": "project_alpha",
|
|
1264
|
+
"operate": {
|
|
1265
|
+
"operation": {
|
|
1266
|
+
"next_node_name": "design",
|
|
1267
|
+
"forward": "submit_design"
|
|
1268
|
+
},
|
|
1269
|
+
"hold": false,
|
|
1270
|
+
"message": "Requirements approved. Scope: Mobile e-commerce app with payment integration. Budget: $50,000. Timeline: 3 months."
|
|
1271
|
+
}
|
|
1272
|
+
},
|
|
1273
|
+
"env": {
|
|
1274
|
+
"account": "pm_alice",
|
|
1275
|
+
"network": "testnet"
|
|
1276
|
+
}
|
|
1277
|
+
}
|
|
1278
|
+
```
|
|
1279
|
+
|
|
1280
|
+
**Execution Result**:
|
|
1281
|
+
```json
|
|
1282
|
+
{
|
|
1283
|
+
"message": "Transaction completed successfully",
|
|
1284
|
+
"result": {
|
|
1285
|
+
"type": "transaction",
|
|
1286
|
+
"objectChanges": [
|
|
1287
|
+
{
|
|
1288
|
+
"type": "Progress",
|
|
1289
|
+
"object": "0x5255787477424a2d17b8b9902957aaaf1f196d0c8a382ef52876153895dd9cb4",
|
|
1290
|
+
"version": "523555",
|
|
1291
|
+
"change": "mutated",
|
|
1292
|
+
"current_node": "design"
|
|
1293
|
+
}
|
|
1294
|
+
]
|
|
1295
|
+
}
|
|
1296
|
+
}
|
|
1297
|
+
```
|
|
1298
|
+
|
|
1299
|
+
#### Step 6: Design to Development (Architect Approval)
|
|
1300
|
+
|
|
1301
|
+
Architect reviews design and approves proceeding to development:
|
|
1302
|
+
|
|
1303
|
+
```json
|
|
1304
|
+
{
|
|
1305
|
+
"operation_type": "progress",
|
|
1306
|
+
"data": {
|
|
1307
|
+
"object": "project_alpha",
|
|
1308
|
+
"operate": {
|
|
1309
|
+
"operation": {
|
|
1310
|
+
"next_node_name": "development",
|
|
1311
|
+
"forward": "start_development"
|
|
1312
|
+
},
|
|
1313
|
+
"hold": false,
|
|
1314
|
+
"message": "Architecture design approved. Tech stack: React Native + Node.js + PostgreSQL. Microservices architecture with 3 services."
|
|
1315
|
+
}
|
|
1316
|
+
},
|
|
1317
|
+
"env": {
|
|
1318
|
+
"account": "arch_bob",
|
|
1319
|
+
"network": "testnet"
|
|
1320
|
+
}
|
|
1321
|
+
}
|
|
1322
|
+
```
|
|
1323
|
+
|
|
1324
|
+
**Execution Result**:
|
|
1325
|
+
```json
|
|
1326
|
+
{
|
|
1327
|
+
"message": "Transaction completed successfully",
|
|
1328
|
+
"result": {
|
|
1329
|
+
"type": "transaction",
|
|
1330
|
+
"objectChanges": [
|
|
1331
|
+
{
|
|
1332
|
+
"type": "Progress",
|
|
1333
|
+
"object": "0x5255787477424a2d17b8b9902957aaaf1f196d0c8a382ef52876153895dd9cb4",
|
|
1334
|
+
"version": "523556",
|
|
1335
|
+
"change": "mutated",
|
|
1336
|
+
"current_node": "development"
|
|
1337
|
+
}
|
|
1338
|
+
]
|
|
1339
|
+
}
|
|
1340
|
+
}
|
|
1341
|
+
```
|
|
1342
|
+
|
|
1343
|
+
#### Step 7: Add Additional Developer
|
|
1344
|
+
|
|
1345
|
+
Add another developer to the project for faster delivery:
|
|
1346
|
+
|
|
1347
|
+
```json
|
|
1348
|
+
{
|
|
1349
|
+
"operation_type": "progress",
|
|
1350
|
+
"data": {
|
|
1351
|
+
"object": "project_alpha",
|
|
1352
|
+
"progress_namedOperator": {
|
|
1353
|
+
"op": "add",
|
|
1354
|
+
"name": "developer",
|
|
1355
|
+
"operators": {
|
|
1356
|
+
"entities": [
|
|
1357
|
+
{ "name_or_address": "arch_bob" }
|
|
1358
|
+
],
|
|
1359
|
+
"check_all_founded": true
|
|
1360
|
+
}
|
|
1361
|
+
}
|
|
1362
|
+
},
|
|
1363
|
+
"env": {
|
|
1364
|
+
"account": "pm_alice",
|
|
1365
|
+
"network": "testnet"
|
|
1366
|
+
}
|
|
1367
|
+
}
|
|
1368
|
+
```
|
|
1369
|
+
|
|
1370
|
+
#### Step 8: Development to Code Review (Developer Submission)
|
|
1371
|
+
|
|
1372
|
+
Developer submits code for review using namedOperator:
|
|
1373
|
+
|
|
1374
|
+
```json
|
|
1375
|
+
{
|
|
1376
|
+
"operation_type": "progress",
|
|
1377
|
+
"data": {
|
|
1378
|
+
"object": "project_alpha",
|
|
1379
|
+
"operate": {
|
|
1380
|
+
"operation": {
|
|
1381
|
+
"next_node_name": "code_review",
|
|
1382
|
+
"forward": "submit_code"
|
|
1383
|
+
},
|
|
1384
|
+
"hold": true,
|
|
1385
|
+
"message": "Initial implementation complete. Features: User auth, product catalog, shopping cart. 85% test coverage."
|
|
1386
|
+
}
|
|
1387
|
+
},
|
|
1388
|
+
"env": {
|
|
1389
|
+
"account": "dev_lead_carol",
|
|
1390
|
+
"network": "testnet"
|
|
1391
|
+
}
|
|
1392
|
+
}
|
|
1393
|
+
```
|
|
1394
|
+
|
|
1395
|
+
**Execution Result**:
|
|
1396
|
+
```json
|
|
1397
|
+
{
|
|
1398
|
+
"message": "Transaction completed successfully",
|
|
1399
|
+
"result": {
|
|
1400
|
+
"type": "transaction",
|
|
1401
|
+
"objectChanges": [
|
|
1402
|
+
{
|
|
1403
|
+
"type": "Progress",
|
|
1404
|
+
"object": "0x5255787477424a2d17b8b9902957aaaf1f196d0c8a382ef52876153895dd9cb4",
|
|
1405
|
+
"version": "523557",
|
|
1406
|
+
"change": "mutated",
|
|
1407
|
+
"current_node": "code_review",
|
|
1408
|
+
"hold_status": "held"
|
|
1409
|
+
}
|
|
1410
|
+
]
|
|
1411
|
+
}
|
|
1412
|
+
}
|
|
1413
|
+
```
|
|
1414
|
+
|
|
1415
|
+
#### Step 9: Code Review to Testing (Dev Lead Approval)
|
|
1416
|
+
|
|
1417
|
+
Development lead reviews and approves code:
|
|
1418
|
+
|
|
1419
|
+
```json
|
|
1420
|
+
{
|
|
1421
|
+
"operation_type": "progress",
|
|
1422
|
+
"data": {
|
|
1423
|
+
"object": "project_alpha",
|
|
1424
|
+
"operate": {
|
|
1425
|
+
"operation": {
|
|
1426
|
+
"next_node_name": "testing",
|
|
1427
|
+
"forward": "approve_code"
|
|
1428
|
+
},
|
|
1429
|
+
"hold": false,
|
|
1430
|
+
"message": "Code review passed. All critical issues resolved. Ready for QA testing."
|
|
1431
|
+
}
|
|
1432
|
+
},
|
|
1433
|
+
"env": {
|
|
1434
|
+
"account": "dev_lead_carol",
|
|
1435
|
+
"network": "testnet"
|
|
1436
|
+
}
|
|
1437
|
+
}
|
|
1438
|
+
```
|
|
1439
|
+
|
|
1440
|
+
**Execution Result**:
|
|
1441
|
+
```json
|
|
1442
|
+
{
|
|
1443
|
+
"message": "Transaction completed successfully",
|
|
1444
|
+
"result": {
|
|
1445
|
+
"type": "transaction",
|
|
1446
|
+
"objectChanges": [
|
|
1447
|
+
{
|
|
1448
|
+
"type": "Progress",
|
|
1449
|
+
"object": "0x5255787477424a2d17b8b9902957aaaf1f196d0c8a382ef52876153895dd9cb4",
|
|
1450
|
+
"version": "523558",
|
|
1451
|
+
"change": "mutated",
|
|
1452
|
+
"current_node": "testing"
|
|
1453
|
+
}
|
|
1454
|
+
]
|
|
1455
|
+
}
|
|
1456
|
+
}
|
|
1457
|
+
```
|
|
1458
|
+
|
|
1459
|
+
#### Step 10: Testing to UAT (Test Lead Approval)
|
|
1460
|
+
|
|
1461
|
+
QA testing complete, move to User Acceptance Testing:
|
|
1462
|
+
|
|
1463
|
+
```json
|
|
1464
|
+
{
|
|
1465
|
+
"operation_type": "progress",
|
|
1466
|
+
"data": {
|
|
1467
|
+
"object": "project_alpha",
|
|
1468
|
+
"repository": {
|
|
1469
|
+
"op": "add",
|
|
1470
|
+
"objects": ["alpha_qa_report_v1"]
|
|
1471
|
+
},
|
|
1472
|
+
"operate": {
|
|
1473
|
+
"operation": {
|
|
1474
|
+
"next_node_name": "uat",
|
|
1475
|
+
"forward": "pass_testing"
|
|
1476
|
+
},
|
|
1477
|
+
"hold": false,
|
|
1478
|
+
"message": "QA testing complete. 47 test cases passed, 0 critical bugs, 2 minor UI issues documented."
|
|
1479
|
+
}
|
|
1480
|
+
},
|
|
1481
|
+
"env": {
|
|
1482
|
+
"account": "test_lead_dave",
|
|
1483
|
+
"network": "testnet"
|
|
1484
|
+
}
|
|
1485
|
+
}
|
|
1486
|
+
```
|
|
1487
|
+
|
|
1488
|
+
**Execution Result**:
|
|
1489
|
+
```json
|
|
1490
|
+
{
|
|
1491
|
+
"message": "Transaction completed successfully",
|
|
1492
|
+
"result": {
|
|
1493
|
+
"type": "transaction",
|
|
1494
|
+
"objectChanges": [
|
|
1495
|
+
{
|
|
1496
|
+
"type": "Progress",
|
|
1497
|
+
"object": "0x5255787477424a2d17b8b9902957aaaf1f196d0c8a382ef52876153895dd9cb4",
|
|
1498
|
+
"version": "523559",
|
|
1499
|
+
"change": "mutated",
|
|
1500
|
+
"current_node": "uat"
|
|
1501
|
+
}
|
|
1502
|
+
]
|
|
1503
|
+
}
|
|
1504
|
+
}
|
|
1505
|
+
```
|
|
1506
|
+
|
|
1507
|
+
#### Step 11: UAT to Deployment (Customer Approval)
|
|
1508
|
+
|
|
1509
|
+
Customer approves UAT and authorizes deployment:
|
|
1510
|
+
|
|
1511
|
+
```json
|
|
1512
|
+
{
|
|
1513
|
+
"operation_type": "progress",
|
|
1514
|
+
"data": {
|
|
1515
|
+
"object": "project_alpha",
|
|
1516
|
+
"operate": {
|
|
1517
|
+
"operation": {
|
|
1518
|
+
"next_node_name": "deployment",
|
|
1519
|
+
"forward": "approve_uat"
|
|
1520
|
+
},
|
|
1521
|
+
"hold": false,
|
|
1522
|
+
"message": "UAT approved. All acceptance criteria met. Payment flow verified with test transactions. Ready for production."
|
|
1523
|
+
}
|
|
1524
|
+
},
|
|
1525
|
+
"env": {
|
|
1526
|
+
"account": "customer_eve",
|
|
1527
|
+
"network": "testnet"
|
|
1528
|
+
}
|
|
1529
|
+
}
|
|
1530
|
+
```
|
|
1531
|
+
|
|
1532
|
+
**Execution Result**:
|
|
1533
|
+
```json
|
|
1534
|
+
{
|
|
1535
|
+
"message": "Transaction completed successfully",
|
|
1536
|
+
"result": {
|
|
1537
|
+
"type": "transaction",
|
|
1538
|
+
"objectChanges": [
|
|
1539
|
+
{
|
|
1540
|
+
"type": "Progress",
|
|
1541
|
+
"object": "0x5255787477424a2d17b8b9902957aaaf1f196d0c8a382ef52876153895dd9cb4",
|
|
1542
|
+
"version": "523560",
|
|
1543
|
+
"change": "mutated",
|
|
1544
|
+
"current_node": "deployment"
|
|
1545
|
+
}
|
|
1546
|
+
]
|
|
1547
|
+
}
|
|
1548
|
+
}
|
|
1549
|
+
```
|
|
1550
|
+
|
|
1551
|
+
#### Step 10: Deployment to Completed (Dev Lead)
|
|
1552
|
+
|
|
1553
|
+
Final deployment to production:
|
|
1554
|
+
|
|
1555
|
+
```json
|
|
1556
|
+
{
|
|
1557
|
+
"operation_type": "progress",
|
|
1558
|
+
"data": {
|
|
1559
|
+
"object": "project_alpha",
|
|
1560
|
+
"repository": {
|
|
1561
|
+
"op": "add",
|
|
1562
|
+
"objects": ["alpha_deployment_logs", "alpha_production_config"]
|
|
1563
|
+
},
|
|
1564
|
+
"operate": {
|
|
1565
|
+
"operation": {
|
|
1566
|
+
"next_node_name": "completed",
|
|
1567
|
+
"forward": "deploy_production"
|
|
1568
|
+
},
|
|
1569
|
+
"hold": false,
|
|
1570
|
+
"message": "Successfully deployed to production. App Store: v1.0.0 live. Play Store: v1.0.0 live. Monitoring active."
|
|
1571
|
+
}
|
|
1572
|
+
},
|
|
1573
|
+
"env": {
|
|
1574
|
+
"account": "dev_lead_carol",
|
|
1575
|
+
"network": "testnet"
|
|
1576
|
+
}
|
|
1577
|
+
}
|
|
1578
|
+
```
|
|
1579
|
+
|
|
1580
|
+
**Execution Result**:
|
|
1581
|
+
```json
|
|
1582
|
+
{
|
|
1583
|
+
"message": "Transaction completed successfully",
|
|
1584
|
+
"result": {
|
|
1585
|
+
"type": "transaction",
|
|
1586
|
+
"objectChanges": [
|
|
1587
|
+
{
|
|
1588
|
+
"type": "Progress",
|
|
1589
|
+
"object": "0x5255787477424a2d17b8b9902957aaaf1f196d0c8a382ef52876153895dd9cb4",
|
|
1590
|
+
"version": "523561",
|
|
1591
|
+
"change": "mutated",
|
|
1592
|
+
"current_node": "completed"
|
|
1593
|
+
}
|
|
1594
|
+
]
|
|
1595
|
+
}
|
|
1596
|
+
}
|
|
1597
|
+
```
|
|
1598
|
+
|
|
1599
|
+
### Final Progress State
|
|
1600
|
+
|
|
1601
|
+
```json
|
|
1602
|
+
{
|
|
1603
|
+
"progress_name": "project_alpha",
|
|
1604
|
+
"current_node": "completed",
|
|
1605
|
+
"machine": "software_dev_workflow",
|
|
1606
|
+
"named_operators": {
|
|
1607
|
+
"developer": ["dev_lead_carol", "arch_bob"]
|
|
1608
|
+
},
|
|
1609
|
+
"repositories": [
|
|
1610
|
+
"alpha_requirements",
|
|
1611
|
+
"alpha_designs",
|
|
1612
|
+
"alpha_code",
|
|
1613
|
+
"alpha_test_reports",
|
|
1614
|
+
"alpha_qa_report_v1",
|
|
1615
|
+
"alpha_deployment_logs",
|
|
1616
|
+
"alpha_production_config"
|
|
1617
|
+
],
|
|
1618
|
+
"task": "mobile_app_order_001",
|
|
1619
|
+
"execution_history": [
|
|
1620
|
+
{ "from": "", "to": "requirement", "by": "pm_alice", "forward": "start_project" },
|
|
1621
|
+
{ "from": "requirement", "to": "design", "by": "pm_alice", "forward": "submit_design" },
|
|
1622
|
+
{ "from": "design", "to": "development", "by": "arch_bob", "forward": "start_development" },
|
|
1623
|
+
{ "from": "development", "to": "code_review", "by": "dev_lead_carol", "forward": "submit_code" },
|
|
1624
|
+
{ "from": "code_review", "to": "testing", "by": "dev_lead_carol", "forward": "approve_code" },
|
|
1625
|
+
{ "from": "testing", "to": "uat", "by": "test_lead_dave", "forward": "pass_testing" },
|
|
1626
|
+
{ "from": "uat", "to": "deployment", "by": "customer_eve", "forward": "approve_uat" },
|
|
1627
|
+
{ "from": "deployment", "to": "completed", "by": "dev_lead_carol", "forward": "deploy_production" }
|
|
1628
|
+
]
|
|
1629
|
+
}
|
|
1630
|
+
```
|
|
1631
|
+
|
|
1632
|
+
### Summary of Project Alpha Execution
|
|
1633
|
+
|
|
1634
|
+
| Step | From Node | To Node | Operator | Forward | Duration |
|
|
1635
|
+
|------|-----------|---------|----------|---------|----------|
|
|
1636
|
+
| 0 | init ("") | requirement | pm_alice | start_project | Day 0 |
|
|
1637
|
+
| 1 | requirement | design | pm_alice | submit_design | Day 1 |
|
|
1638
|
+
| 2 | design | development | arch_bob | start_development | Day 5 |
|
|
1639
|
+
| 3 | development | code_review | dev_lead_carol | submit_code | Day 25 |
|
|
1640
|
+
| 4 | code_review | testing | dev_lead_carol | approve_code | Day 28 |
|
|
1641
|
+
| 5 | testing | uat | test_lead_dave | pass_testing | Day 35 |
|
|
1642
|
+
| 6 | uat | deployment | customer_eve | approve_uat | Day 40 |
|
|
1643
|
+
| 7 | deployment | completed | dev_lead_carol | deploy_production | Day 42 |
|
|
1644
|
+
|
|
1645
|
+
**Total Project Duration**: 42 days
|
|
1646
|
+
**Team Members Involved**: 5
|
|
1647
|
+
**Workflow Transitions**: 8 (including init → requirement)
|
|
1648
|
+
**Repositories Created**: 7
|
|
1649
|
+
**Status**: ✅ Successfully Completed
|
|
1650
|
+
|
|
1651
|
+
---
|
|
1652
|
+
|
|
1653
|
+
## Quick Start Guide
|
|
1654
|
+
|
|
1655
|
+
### For New Users: Your First Progress Workflow
|
|
1656
|
+
|
|
1657
|
+
Follow these steps to execute your first workflow:
|
|
1658
|
+
|
|
1659
|
+
#### Step 1: Prerequisites Checklist
|
|
1660
|
+
|
|
1661
|
+
Before starting, ensure you have:
|
|
1662
|
+
- ✅ A published Machine with properly configured nodes (including `prev_node: ""` for the first node)
|
|
1663
|
+
- ✅ Permission to create Progress from the Machine
|
|
1664
|
+
- ✅ Permission to execute forward operations
|
|
1665
|
+
- ✅ Sufficient test coins for transaction fees
|
|
1666
|
+
|
|
1667
|
+
#### Step 2: Create Progress
|
|
1668
|
+
|
|
1669
|
+
```json
|
|
1670
|
+
{
|
|
1671
|
+
"operation_type": "machine",
|
|
1672
|
+
"data": {
|
|
1673
|
+
"object": "your_machine_name",
|
|
1674
|
+
"progress_new": {
|
|
1675
|
+
"namedNew": {
|
|
1676
|
+
"name": "my_first_progress"
|
|
1677
|
+
}
|
|
1678
|
+
}
|
|
1679
|
+
},
|
|
1680
|
+
"env": {
|
|
1681
|
+
"account": "your_account",
|
|
1682
|
+
"network": "testnet"
|
|
1683
|
+
}
|
|
1684
|
+
}
|
|
1685
|
+
```
|
|
1686
|
+
|
|
1687
|
+
#### Step 3: Advance from Init Node
|
|
1688
|
+
|
|
1689
|
+
```json
|
|
1690
|
+
{
|
|
1691
|
+
"operation_type": "progress",
|
|
1692
|
+
"data": {
|
|
1693
|
+
"object": "my_first_progress",
|
|
1694
|
+
"operate": {
|
|
1695
|
+
"operation": {
|
|
1696
|
+
"next_node_name": "first_node",
|
|
1697
|
+
"forward": "start"
|
|
1698
|
+
},
|
|
1699
|
+
"hold": false,
|
|
1700
|
+
"message": "Starting workflow"
|
|
1701
|
+
}
|
|
1702
|
+
},
|
|
1703
|
+
"env": {
|
|
1704
|
+
"account": "your_account",
|
|
1705
|
+
"network": "testnet"
|
|
1706
|
+
}
|
|
1707
|
+
}
|
|
1708
|
+
```
|
|
1709
|
+
|
|
1710
|
+
> **Important**: The first forward must use `next_node_name` of the first node and `forward` name defined with `prev_node: ""` in the Machine.
|
|
1711
|
+
|
|
1712
|
+
#### Step 4: Continue Workflow
|
|
1713
|
+
|
|
1714
|
+
Repeat the operate operation for each subsequent node transition.
|
|
1715
|
+
|
|
1716
|
+
---
|
|
1717
|
+
|
|
1718
|
+
## Important Notes
|
|
1719
|
+
|
|
1720
|
+
⚠️ **Must have permission to execute forward operations**.
|
|
1721
|
+
|
|
1722
|
+
⚠️ **Progress starts at init node ("") and needs `prev_node: ""` forward to reach first node**.
|
|
1723
|
+
|
|
1724
|
+
⚠️ **Progress can only advance to nodes defined by forward operations**.
|
|
1725
|
+
|
|
1726
|
+
⚠️ **Named operators are used for dynamic permission assignment**.
|
|
1727
|
+
|
|
1728
|
+
⚠️ **Task is used for associating with other objects and cannot be changed after setting**.
|
|
1729
|
+
|
|
1730
|
+
⚠️ **Repositories are used for storing workflow-related data**.
|
|
1731
|
+
|
|
1732
|
+
⚠️ **Progress is created by Machine and cannot be created independently**.
|
|
1733
|
+
|
|
1734
|
+
⚠️ **Hold mode locks operation permission to avoid competition**.
|
|
1735
|
+
|
|
1736
|
+
⚠️ **AdminUnhold allows admin to force unlock (requires admin privileges)**.
|
|
1737
|
+
|
|
1738
|
+
---
|
|
1739
|
+
|
|
1740
|
+
## Related Components
|
|
1741
|
+
|
|
1742
|
+
| Component | Description |
|
|
1743
|
+
|-----------|-------------|
|
|
1744
|
+
| **[Machine](machine.md)** | Workflow template |
|
|
1745
|
+
| **[Service](service.md)** | WYSIWYG product trading |
|
|
1746
|
+
| **[Order](order.md)** | Order management |
|
|
1747
|
+
| **[Permission](permission.md)** | Permission management |
|
|
1748
|
+
| **[Repository](repository.md)** | Data ownership and usage rights |
|