-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathE-Commerce_Order_Processing_1.json
More file actions
113 lines (113 loc) 路 3.2 KB
/
Copy pathE-Commerce_Order_Processing_1.json
File metadata and controls
113 lines (113 loc) 路 3.2 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
{
"createTime": 1762040673232,
"updateTime": 1762083628020,
"name": "E-Commerce Order Processing",
"description": "When a customer places an order, this workflow handles everything: payment processing, inventory checks, email confirmations, and shipping coordination. Shows how to build resilient, production-ready automation for e-commerce systems.",
"version": 1,
"tasks": [
{
"name": "http",
"taskReferenceName": "process_payment",
"inputParameters": {
"uri": "https://httpbin.org/post",
"method": "POST",
"accept": "application/json",
"contentType": "application/json",
"encode": true,
"body": {
"orderId": "${workflow.input.orderId}",
"customerId": "${workflow.input.customerId}",
"totalAmount": "${workflow.input.totalAmount}",
"paymentMethod": "credit_card"
}
},
"type": "HTTP",
"decisionCases": {},
"defaultCase": [],
"forkTasks": [],
"startDelay": 0,
"joinOn": [],
"optional": false,
"defaultExclusiveJoinTask": [],
"asyncComplete": false,
"loopOver": [],
"onStateChange": {},
"permissive": false
},
{
"name": "switch",
"taskReferenceName": " check_payment_status",
"inputParameters": {
"paid": "success"
},
"type": "SWITCH",
"decisionCases": {
"success": [
{
"name": "http",
"taskReferenceName": "send_confirmation_email",
"inputParameters": {
"uri": "https://httpbin.org/post",
"method": "POST",
"accept": "application/json",
"contentType": "application/json",
"encode": true,
"body": {
"to": "${workflow.input.customerEmail}",
"subject": "Order Confirmation",
"orderId": "${workflow.input.orderId}",
"message": "Your order has been confirmed!"
}
},
"type": "HTTP",
"decisionCases": {},
"defaultCase": [],
"forkTasks": [],
"startDelay": 0,
"joinOn": [],
"optional": false,
"defaultExclusiveJoinTask": [],
"asyncComplete": false,
"loopOver": [],
"onStateChange": {},
"permissive": false
}
]
},
"defaultCase": [],
"forkTasks": [],
"startDelay": 0,
"joinOn": [],
"optional": false,
"defaultExclusiveJoinTask": [],
"asyncComplete": false,
"loopOver": [],
"evaluatorType": "graaljs",
"expression": "$.paid",
"onStateChange": {},
"permissive": false
}
],
"inputParameters": [
"orderId",
"customerId",
"customerEmail",
"totalAmount",
"items"
],
"outputParameters": {
"trackingNumber": ""
},
"failureWorkflow": "",
"schemaVersion": 2,
"restartable": true,
"workflowStatusListenerEnabled": false,
"ownerEmail": "ashleysally00@gmail.com",
"timeoutPolicy": "ALERT_ONLY",
"timeoutSeconds": 0,
"variables": {},
"inputTemplate": {},
"enforceSchema": true,
"metadata": {},
"maskedFields": []
}