@wmfs/tymly-schedule-plugin 1.0.1 → 1.2.0

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.
Files changed (40) hide show
  1. package/.version +1 -1
  2. package/CHANGELOG.md +49 -0
  3. package/lib/blueprints/schedule-blueprint/card-templates/create-scheduled-task.json +97 -0
  4. package/lib/blueprints/schedule-blueprint/card-templates/view-all-scheduled-tasks.json +36 -0
  5. package/lib/blueprints/schedule-blueprint/card-templates/view-scheduled-task.json +148 -0
  6. package/lib/blueprints/schedule-blueprint/categories/schedule.json +8 -0
  7. package/lib/blueprints/schedule-blueprint/functions/generate-key.js +16 -0
  8. package/lib/blueprints/schedule-blueprint/functions/get-available-state-machines.js +18 -0
  9. package/lib/blueprints/schedule-blueprint/models/task.json +0 -14
  10. package/lib/blueprints/schedule-blueprint/state-machines/create-scheduled-task.json +66 -0
  11. package/lib/blueprints/schedule-blueprint/state-machines/modify-scheduled-task.json +74 -0
  12. package/lib/blueprints/schedule-blueprint/state-machines/start-task.json +36 -0
  13. package/lib/blueprints/schedule-blueprint/state-machines/stop-task.json +36 -0
  14. package/lib/blueprints/schedule-blueprint/state-machines/view-all-scheduled-tasks.json +69 -0
  15. package/lib/blueprints/schedule-blueprint/state-machines/view-scheduled-task.json +46 -0
  16. package/lib/blueprints/schedule-blueprint/template-roles/schedule-admin.json +4 -0
  17. package/lib/components/services/schedule/index.js +82 -24
  18. package/lib/components/services/schedule/utils/datetime-to-rule.js +1 -1
  19. package/lib/components/state-resources/create-scheduled-task/doc/example.json +8 -0
  20. package/lib/components/state-resources/create-scheduled-task/doc/index.js +4 -0
  21. package/lib/components/state-resources/create-scheduled-task/index.js +55 -0
  22. package/lib/components/state-resources/find-scheduled-executions/doc/example.json +8 -0
  23. package/lib/components/state-resources/find-scheduled-executions/doc/index.js +4 -0
  24. package/lib/components/state-resources/find-scheduled-executions/index.js +12 -0
  25. package/lib/components/state-resources/start-scheduled-task/doc/example.json +8 -0
  26. package/lib/components/state-resources/start-scheduled-task/doc/index.js +4 -0
  27. package/lib/components/state-resources/start-scheduled-task/index.js +12 -0
  28. package/lib/components/state-resources/stop-scheduled-task/doc/example.json +8 -0
  29. package/lib/components/state-resources/stop-scheduled-task/doc/index.js +4 -0
  30. package/lib/components/state-resources/stop-scheduled-task/index.js +12 -0
  31. package/lib/components/state-resources/update-scheduled-state-machine-config/doc/example.json +12 -0
  32. package/lib/components/state-resources/update-scheduled-state-machine-config/doc/index.js +4 -0
  33. package/lib/components/state-resources/update-scheduled-state-machine-config/index.js +35 -0
  34. package/lib/components/state-resources/update-scheduled-task/doc/example.json +13 -0
  35. package/lib/components/state-resources/update-scheduled-task/doc/index.js +4 -0
  36. package/lib/components/state-resources/update-scheduled-task/index.js +26 -0
  37. package/package.json +5 -6
  38. package/plugin.json +1 -1
  39. package/test/rule-to-datetime-tests.js +2 -2
  40. package/test/schedule-tests.js +17 -14
package/.version CHANGED
@@ -1 +1 @@
1
- VERSION=1.0.1
1
+ VERSION=1.2.0
package/CHANGELOG.md CHANGED
@@ -1,3 +1,52 @@
1
+ # [1.2.0](https://github.com/wmfs/tymly-schedule-plugin/compare/v1.1.0...v1.2.0) (2022-07-28)
2
+
3
+
4
+ ### ✨ Features
5
+
6
+ * updates for scheduled sending [sc-14535] ([8703224](https://github.com/wmfs/tymly-schedule-plugin/commit/8703224e3c1cf8a0ba93be3027eafa64841cfc4f))
7
+
8
+
9
+ ### 🐛 Bug Fixes
10
+
11
+ * update unit tests for datetime [sc-14535] ([155d3a5](https://github.com/wmfs/tymly-schedule-plugin/commit/155d3a544f6dcb9cf22c95713b5bd62a6a2d45c9))
12
+
13
+
14
+ ### 🛠 Builds
15
+
16
+ * **deps-dev:** update dependency [@wmfs](https://github.com/wmfs)/tymly-pg-plugin to v1.268.1 ([0bd7069](https://github.com/wmfs/tymly-schedule-plugin/commit/0bd7069404eadf1d08e3824ed1ce9d1ff6816cfc))
17
+ * **deps-dev:** update dependency [@wmfs](https://github.com/wmfs)/tymly-test-helpers to v1.17.0 ([e9202a6](https://github.com/wmfs/tymly-schedule-plugin/commit/e9202a6cd86dc8429dfa1d077bccdef985231d85))
18
+
19
+
20
+ ### ♻️ Chores
21
+
22
+ * enable tymly sync ([58ce844](https://github.com/wmfs/tymly-schedule-plugin/commit/58ce844d32d72c4be3c7cd19d230a99b6b53db6f))
23
+
24
+ # [1.1.0](https://github.com/wmfs/tymly-schedule-plugin/compare/v1.0.1...v1.1.0) (2022-03-16)
25
+
26
+
27
+ ### ✨ Features
28
+
29
+ * ability to create/modify tasks from ui ([b7d56c5](https://github.com/wmfs/tymly-schedule-plugin/commit/b7d56c5e44609d4b2b14dbdc4e13a6c91f784eee))
30
+ * admin tools to create scheduled task ([b0e6ddc](https://github.com/wmfs/tymly-schedule-plugin/commit/b0e6ddc5325ace6332516275893471b39703c1ba))
31
+ * admin tools to start/stop tasks ([106f5fa](https://github.com/wmfs/tymly-schedule-plugin/commit/106f5fa7daedca13030b49fac473a891c5c6d9e1))
32
+ * admin tools to update schedule of state machine ([c6df466](https://github.com/wmfs/tymly-schedule-plugin/commit/c6df4669823e002916d4b86a0458e4e1d57ab45d))
33
+ * admin tools to update state machine config ([e26928a](https://github.com/wmfs/tymly-schedule-plugin/commit/e26928a276c1783fb92785eb2355570dd01f32ac))
34
+ * admin tools to view all and view specific tasks ([b9f80c8](https://github.com/wmfs/tymly-schedule-plugin/commit/b9f80c89077115ae2c783c0b03e8de322111319f))
35
+ * admin tools to view scheduled executions ([89b9094](https://github.com/wmfs/tymly-schedule-plugin/commit/89b90941de1b48a14896043ec3710df2c2440949))
36
+ * remove last ran start/end and total run count, as these can be found from executions ([d6c673b](https://github.com/wmfs/tymly-schedule-plugin/commit/d6c673b926654c564d08f6de1b5f22bcf61b3783))
37
+
38
+
39
+ ### 🐛 Bug Fixes
40
+
41
+ * issue with finding scheduled executions ([b198bd1](https://github.com/wmfs/tymly-schedule-plugin/commit/b198bd1bf49ffb517229309eadaf7fdaed9f1ff7))
42
+ * use function from service to get executions ([b9082bc](https://github.com/wmfs/tymly-schedule-plugin/commit/b9082bc49ccdbd39c1316c786f83efddd7396a7d))
43
+
44
+
45
+ ### 🚨 Tests
46
+
47
+ * fix status after re-boot with datetime schedule in past ([e4e9cba](https://github.com/wmfs/tymly-schedule-plugin/commit/e4e9cba84fbdaf91838e880b7dacda4659e60119))
48
+ * remove unused executions model ([92e888d](https://github.com/wmfs/tymly-schedule-plugin/commit/92e888d266803dac531a27f0c8d74ff6d6b22e52))
49
+
1
50
  ## [1.0.1](https://github.com/wmfs/tymly-schedule-plugin/compare/v1.0.0...v1.0.1) (2022-03-15)
2
51
 
3
52
 
@@ -0,0 +1,97 @@
1
+ {
2
+ "templateMeta": {
3
+ "name": "create-scheduled-task",
4
+ "title": "Configure a Scheduled State Machine",
5
+ "category": "schedule"
6
+ },
7
+ "hooks": {
8
+ "afterSubmit": {
9
+ "actions": [
10
+ {
11
+ "type": "Action.PushCard",
12
+ "stateMachineName": "schedule_viewScheduledTask_1_0",
13
+ "input": {
14
+ "key": "$.key"
15
+ }
16
+ }
17
+ ]
18
+ }
19
+ },
20
+ "type": "AdaptiveCard",
21
+ "body": [
22
+ {
23
+ "showWhen": "data.editing !== true",
24
+ "id": "name",
25
+ "type": "Input.Text",
26
+ "title": "Schedule name",
27
+ "validation": {
28
+ "requiredIf": "data.editing !== true"
29
+ }
30
+ },
31
+ {
32
+ "id": "scheduleType",
33
+ "type": "Input.ChoiceSet",
34
+ "title": "What type of schedule?",
35
+ "choices": [
36
+ {
37
+ "title": "Interval",
38
+ "value": "interval"
39
+ },
40
+ {
41
+ "title": "Date/time",
42
+ "value": "datetime"
43
+ }
44
+ ],
45
+ "validation": {
46
+ "required": true
47
+ }
48
+ },
49
+ {
50
+ "showWhen": "data.scheduleType === 'interval'",
51
+ "id": "interval",
52
+ "type": "Input.Text",
53
+ "title": "Interval",
54
+ "validation": {
55
+ "requiredIf": "data.scheduleType === 'interval'"
56
+ }
57
+ },
58
+ {
59
+ "showWhen": "data.scheduleType === 'datetime'",
60
+ "id": "datetime",
61
+ "type": "Input.DateTime",
62
+ "title": "Date/time",
63
+ "validation": {
64
+ "requiredIf": "data.scheduleType === 'datetime'"
65
+ }
66
+ },
67
+ {
68
+ "id": "stateMachineName",
69
+ "type": "Input.ChoiceSet",
70
+ "title": "Which state machine?",
71
+ "filter": true,
72
+ "choicesPath": "data.availableStateMachines",
73
+ "validation": {
74
+ "required": true
75
+ }
76
+ },
77
+ {
78
+ "id": "inputStr",
79
+ "type": "Input.Text",
80
+ "title": "Input",
81
+ "isMultiline": true,
82
+ "value": "{}"
83
+ }
84
+ ],
85
+ "actions": [
86
+ {
87
+ "type": "Action.Cancel",
88
+ "title": "Cancel"
89
+ },
90
+ {
91
+ "type": "Action.Submit",
92
+ "title": "Submit"
93
+ }
94
+ ],
95
+ "$schema": "http://adaptivecards.io/schemas/adaptive-card.json",
96
+ "version": "1.0"
97
+ }
@@ -0,0 +1,36 @@
1
+ {
2
+ "templateMeta": {
3
+ "name": "view-scheduled-tasks",
4
+ "title": "View Scheduled State Machines",
5
+ "category": "schedule"
6
+ },
7
+ "type": "AdaptiveCard",
8
+ "body": [
9
+ {
10
+ "type": "MarkupTable",
11
+ "title": "Scheduled State Machines",
12
+ "arrayPath": "data.tasks",
13
+ "clickToLaunch": true,
14
+ "columns": [
15
+ {
16
+ "title": "Key",
17
+ "value": "{{ item.key }}"
18
+ },
19
+ {
20
+ "title": "Schedule",
21
+ "value": "{{ item.scheduleType === 'datetime' ? item.datetime : item.interval }}"
22
+ },
23
+ {
24
+ "title": "State machine name",
25
+ "value": "{{ item.stateMachineName }}"
26
+ },
27
+ {
28
+ "title": "Status",
29
+ "value": "{{ item.status }}"
30
+ }
31
+ ]
32
+ }
33
+ ],
34
+ "$schema": "http://adaptivecards.io/schemas/adaptive-card.json",
35
+ "version": "1.0"
36
+ }
@@ -0,0 +1,148 @@
1
+ {
2
+ "templateMeta": {
3
+ "name": "view-scheduled-task",
4
+ "title": "View Scheduled State Machine",
5
+ "category": "schedule"
6
+ },
7
+ "type": "AdaptiveCard",
8
+ "body": [
9
+ {
10
+ "type": "Container",
11
+ "color": "accent",
12
+ "spacing": "none",
13
+ "items": [
14
+ {
15
+ "type": "TextBlock",
16
+ "text": "{{ data.key }}",
17
+ "weight": "bolder",
18
+ "spacing": "none"
19
+ }
20
+ ]
21
+ },
22
+ {
23
+ "type": "ColumnSet",
24
+ "columns": [
25
+ {
26
+ "type": "Column",
27
+ "width": 8,
28
+ "items": [
29
+ {
30
+ "type": "FactSet",
31
+ "showAllIfUndefined": true,
32
+ "facts": [
33
+ {
34
+ "title": "Key",
35
+ "value": "{{ data.key }}"
36
+ },
37
+ {
38
+ "title": "Schedule",
39
+ "value": "{{ data.scheduleType === 'datetime' ? data.datetime : data.interval }}"
40
+ },
41
+ {
42
+ "title": "State machine name",
43
+ "value": "{{ data.stateMachineName }}"
44
+ },
45
+ {
46
+ "title": "Input",
47
+ "value": "{{ JSON.stringify(data.input) }}"
48
+ },
49
+ {
50
+ "title": "Send response",
51
+ "value": "{{ data.sendResponse }}"
52
+ },
53
+ {
54
+ "title": "Start on boot?",
55
+ "value": "{{ data.startOnBoot ? 'Yes' : 'No' }}"
56
+ },
57
+ {
58
+ "title": "Status",
59
+ "value": "{{ data.status }}"
60
+ },
61
+ {
62
+ "title": "Created",
63
+ "value": "{{ formatDate(data.created, 'DD/MM/YYYY HH:mm') }}"
64
+ },
65
+ {
66
+ "title": "Created by",
67
+ "value": "{{ data.createdBy || '-' }}"
68
+ },
69
+ {
70
+ "title": "Modified",
71
+ "value": "{{ formatDate(data.modified, 'DD/MM/YYYY HH:mm') }}"
72
+ },
73
+ {
74
+ "title": "Modified by",
75
+ "value": "{{ data.modifiedBy || '-' }}"
76
+ }
77
+ ]
78
+ }
79
+ ]
80
+ },
81
+ {
82
+ "type": "Column",
83
+ "width": 4,
84
+ "items": [
85
+ {
86
+ "type": "ActionSet",
87
+ "actions": [
88
+ {
89
+ "showWhen": "data.status === 'STARTED'",
90
+ "type": "Action.PushCard",
91
+ "title": "Stop task",
92
+ "stateMachineName": "schedule_stopTask_1_0",
93
+ "input": {
94
+ "key": "$.key"
95
+ }
96
+ },
97
+ {
98
+ "showWhen": "data.status !== 'STARTED'",
99
+ "type": "Action.PushCard",
100
+ "title": "Start task",
101
+ "stateMachineName": "schedule_startTask_1_0",
102
+ "input": {
103
+ "key": "$.key"
104
+ }
105
+ },
106
+ {
107
+ "type": "Action.PushCard",
108
+ "title": "Modify schedule",
109
+ "stateMachineName": "schedule_modifyScheduledTask_1_0",
110
+ "input": {
111
+ "key": "$.key"
112
+ }
113
+ }
114
+ ]
115
+ }
116
+ ]
117
+ }
118
+ ]
119
+ },
120
+ {
121
+ "title": "State machine executions",
122
+ "type": "Table",
123
+ "arrayPath": "data.executions",
124
+ "columns": [
125
+ {
126
+ "title": "Execution name",
127
+ "field": "executionName"
128
+ },
129
+ {
130
+ "title": "Status",
131
+ "field": "status"
132
+ },
133
+ {
134
+ "title": "Created",
135
+ "field": "created",
136
+ "format": "formatDate(val, 'DD/MM/YYYY HH:mm')"
137
+ },
138
+ {
139
+ "title": "Modified",
140
+ "field": "modified",
141
+ "format": "formatDate(val, 'DD/MM/YYYY HH:mm')"
142
+ }
143
+ ]
144
+ }
145
+ ],
146
+ "$schema": "http://adaptivecards.io/schemas/adaptive-card.json",
147
+ "version": "1.0"
148
+ }
@@ -0,0 +1,8 @@
1
+ {
2
+ "label": "Schedule",
3
+ "description": "Scheduled state machines",
4
+ "style": {
5
+ "icon": "schedule",
6
+ "backgroundColor": "#008800"
7
+ }
8
+ }
@@ -0,0 +1,16 @@
1
+ const capitalise = str => str.charAt(0).toUpperCase() + str.slice(1)
2
+ const schema = 'schedule'
3
+
4
+ module.exports = function () {
5
+ return function (event, env) {
6
+ const now = env.bootedServices.timestamp.now()
7
+
8
+ const key = [
9
+ schema,
10
+ event.trim().split(' ').map((n, i) => i === 0 ? n : capitalise(n)).join(''),
11
+ now.format('YYYYMMDD-HHmm')
12
+ ].join('_')
13
+
14
+ return { key }
15
+ }
16
+ }
@@ -0,0 +1,18 @@
1
+ module.exports = function () {
2
+ return async function getAvailableStateMachines (event, env) {
3
+ const availableStateMachines = env.bootedServices.statebox
4
+ .listStateMachines()
5
+ .map(({ name }) => {
6
+ return {
7
+ title: name,
8
+ value: name
9
+ }
10
+ })
11
+
12
+ return {
13
+ availableStateMachines,
14
+ availableStateMachinesOrig: availableStateMachines,
15
+ availableStateMachinesFilt: availableStateMachines
16
+ }
17
+ }
18
+ }
@@ -35,20 +35,6 @@
35
35
  "startOnBoot": {
36
36
  "type": "boolean"
37
37
  },
38
- "lastRanStart": {
39
- "type": "string",
40
- "format": "date-time"
41
- },
42
- "lastRanEnd": {
43
- "type": "string",
44
- "format": "date-time"
45
- },
46
- "lastRanExecutionName": {
47
- "type": "string"
48
- },
49
- "totalRunCount": {
50
- "type": "integer"
51
- },
52
38
  "status": {
53
39
  "type": "string"
54
40
  }
@@ -0,0 +1,66 @@
1
+ {
2
+ "Comment": "Set up a Scheduled State Machine",
3
+ "name": "Set up a Scheduled State Machine",
4
+ "version": "1.0",
5
+ "categories": [
6
+ "schedule"
7
+ ],
8
+ "instigators": [
9
+ "user"
10
+ ],
11
+ "instigatorGroup": "form",
12
+ "StartAt": "GetStateMachines",
13
+ "States": {
14
+ "GetStateMachines": {
15
+ "Type": "Task",
16
+ "Resource": "function:schedule_getAvailableStateMachines",
17
+ "ResultPath": "$",
18
+ "Next": "DefaultInput"
19
+ },
20
+ "DefaultInput": {
21
+ "Type": "Pass",
22
+ "ResultSelector": {
23
+ "inputStr": "{}"
24
+ },
25
+ "Next": "View"
26
+ },
27
+ "View": {
28
+ "Type": "Task",
29
+ "Resource": "module:awaitingHumanInput",
30
+ "ResourceConfig": {
31
+ "uiType": "app",
32
+ "uiName": "schedule_createScheduledTask",
33
+ "dataPath": "$"
34
+ },
35
+ "Next": "GenerateKey"
36
+ },
37
+ "GenerateKey": {
38
+ "Type": "Task",
39
+ "InputPath": "$.name",
40
+ "Resource": "function:schedule_generateKey",
41
+ "ResultPath": "$",
42
+ "Next": "CreateScheduledTask"
43
+ },
44
+ "CreateScheduledTask": {
45
+ "Type": "Task",
46
+ "Parameters": {
47
+ "key.$": "$.key",
48
+ "scheduleType.$": "$.scheduleType",
49
+ "datetime.$": "$.datetime",
50
+ "interval.$": "$.interval",
51
+ "stateMachineName.$": "$.stateMachineName",
52
+ "input.$": "$.inputStr"
53
+ },
54
+ "Resource": "module:createScheduledTask",
55
+ "End": true
56
+ }
57
+ },
58
+ "restrictions": [
59
+ {
60
+ "roleId": "schedule_scheduleAdmin",
61
+ "allows": [
62
+ "*"
63
+ ]
64
+ }
65
+ ]
66
+ }
@@ -0,0 +1,74 @@
1
+ {
2
+ "Comment": "Modify a Scheduled State Machine",
3
+ "name": "Modify a Scheduled State Machine",
4
+ "version": "1.0",
5
+ "categories": [
6
+ "schedule"
7
+ ],
8
+ "StartAt": "SetAsEditing",
9
+ "States": {
10
+ "SetAsEditing": {
11
+ "Type": "Pass",
12
+ "Result": {
13
+ "editing": true
14
+ },
15
+ "ResultPath": "$",
16
+ "Next": "FindTask"
17
+ },
18
+ "FindTask": {
19
+ "Type": "Task",
20
+ "InputPath": "$.key",
21
+ "Resource": "module:findingById",
22
+ "ResourceConfig": {
23
+ "modelId": "schedule_task"
24
+ },
25
+ "ResultPath": "$",
26
+ "Next": "GetStateMachines"
27
+ },
28
+ "GetStateMachines": {
29
+ "Type": "Task",
30
+ "Resource": "function:schedule_getAvailableStateMachines",
31
+ "ResultPath": "$",
32
+ "Next": "View"
33
+ },
34
+ "View": {
35
+ "Type": "Task",
36
+ "Resource": "module:awaitingHumanInput",
37
+ "ResourceConfig": {
38
+ "uiType": "app",
39
+ "uiName": "schedule_createScheduledTask",
40
+ "dataPath": "$"
41
+ },
42
+ "Next": "UpdateScheduledTask"
43
+ },
44
+ "UpdateScheduledTask": {
45
+ "Type": "Task",
46
+ "Parameters": {
47
+ "key.$": "$.key",
48
+ "scheduleType.$": "$.scheduleType",
49
+ "datetime.$": "$.datetime",
50
+ "interval.$": "$.interval"
51
+ },
52
+ "Resource": "module:updateScheduledTask",
53
+ "Next": "UpdateScheduledStateMachineConfig"
54
+ },
55
+ "UpdateScheduledStateMachineConfig": {
56
+ "Type": "Task",
57
+ "Parameters": {
58
+ "key.$": "$.key",
59
+ "stateMachineName.$": "$.stateMachineName",
60
+ "input.$": "$.inputStr"
61
+ },
62
+ "Resource": "module:updateScheduledStateMachineConfig",
63
+ "End": true
64
+ }
65
+ },
66
+ "restrictions": [
67
+ {
68
+ "roleId": "schedule_scheduleAdmin",
69
+ "allows": [
70
+ "*"
71
+ ]
72
+ }
73
+ ]
74
+ }
@@ -0,0 +1,36 @@
1
+ {
2
+ "Comment": "Start Scheduled State Machine",
3
+ "name": "Start Scheduled State Machine",
4
+ "version": "1.0",
5
+ "categories": [
6
+ "schedule"
7
+ ],
8
+ "StartAt": "StartScheduledTask",
9
+ "States": {
10
+ "StartScheduledTask": {
11
+ "Type": "Task",
12
+ "InputPath": "$.key",
13
+ "Resource": "module:startScheduledTask",
14
+ "Next": "View"
15
+ },
16
+ "View": {
17
+ "Type": "Task",
18
+ "Parameters": {
19
+ "key.$": "$.key"
20
+ },
21
+ "Resource": "module:runStateMachine",
22
+ "ResourceConfig": {
23
+ "stateMachine": "schedule_viewScheduledTask_1_0"
24
+ },
25
+ "End": true
26
+ }
27
+ },
28
+ "restrictions": [
29
+ {
30
+ "roleId": "schedule_scheduleAdmin",
31
+ "allows": [
32
+ "*"
33
+ ]
34
+ }
35
+ ]
36
+ }
@@ -0,0 +1,36 @@
1
+ {
2
+ "Comment": "Stop Scheduled State Machine",
3
+ "name": "Stop Scheduled State Machine",
4
+ "version": "1.0",
5
+ "categories": [
6
+ "schedule"
7
+ ],
8
+ "StartAt": "StopScheduledTask",
9
+ "States": {
10
+ "StopScheduledTask": {
11
+ "Type": "Task",
12
+ "InputPath": "$.key",
13
+ "Resource": "module:stopScheduledTask",
14
+ "Next": "View"
15
+ },
16
+ "View": {
17
+ "Type": "Task",
18
+ "Parameters": {
19
+ "key.$": "$.key"
20
+ },
21
+ "Resource": "module:runStateMachine",
22
+ "ResourceConfig": {
23
+ "stateMachine": "schedule_viewScheduledTask_1_0"
24
+ },
25
+ "End": true
26
+ }
27
+ },
28
+ "restrictions": [
29
+ {
30
+ "roleId": "schedule_scheduleAdmin",
31
+ "allows": [
32
+ "*"
33
+ ]
34
+ }
35
+ ]
36
+ }