/
workflow_actions.yaml
120 lines (89 loc) · 3.11 KB
/
workflow_actions.yaml
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
114
115
116
117
118
119
120
# List of loggable service actions
resource: automation:workflow
service: workflow
import:
- github.com/cortezaproject/corteza/server/automation/types
# Default sensitivity for actions
defaultActionSeverity: notice
# default severity for errors
defaultErrorSeverity: error
props:
- name: workflow
type: "*types.Workflow"
fields: [ handle, ID ]
- name: new
type: "*types.Workflow"
fields: [ handle, ID ]
- name: update
type: "*types.Workflow"
fields: [ handle, ID ]
- name: trigger
type: "*types.Trigger"
fields: [ eventType, resourceType, ID, stepID, ]
- name: filter
type: "*types.WorkflowFilter"
actions:
- action: search
log: "searched for matching workflows"
severity: info
- action: lookup
log: "looked-up for a {{workflow}}"
severity: info
- action: create
log: "created {{workflow}}"
- action: update
log: "updated {{workflow}}"
- action: delete
log: "deleted {{workflow}}"
- action: undelete
log: "undeleted {{workflow}}"
- action: execute
# NOTE: only explicitly triggered workflow execution is logged
log: "{{workflow}} executed"
errors:
- error: notFound
message: "workflow not found"
- error: invalidID
message: "invalid ID"
- error: disabled
message: "disabled workflow or trigger"
- error: invalidHandle
message: "invalid handle"
- error: missingName
message: "missing name"
- error: staleData
message: "stale data"
severity: warning
- error: notAllowedToRead
message: "not allowed to read this workflow"
log: "failed to read {{workflow.handle}}; insufficient permissions"
- error: notAllowedToSearch
message: "not allowed to search or list workflows"
log: "failed to search or list workflow; insufficient permissions"
- error: notAllowedToCreate
message: "not allowed to create workflows"
log: "failed to create workflow; insufficient permissions"
- error: notAllowedToUpdate
message: "not allowed to update this workflow"
log: "failed to update {{workflow}}; insufficient permissions"
- error: notAllowedToDelete
message: "not allowed to delete this workflow"
log: "failed to delete {{workflow}}; insufficient permissions"
- error: notAllowedToUndelete
message: "not allowed to undelete this workflow"
log: "failed to undelete {{workflow}}; insufficient permissions"
- error: notAllowedToExecute
message: "not allowed to execute this workflow"
log: "failed to execute {{workflow}}; insufficient permissions"
- error: unknownWorkflowStep
message: "unknown workflow step"
log: "failed to execute {{workflow}}; unknown workflow step"
- error: handleNotUnique
message: "workflow handle not unique"
log: "duplicate handle used for workflow ({{workflow}})"
- error: notAllowedToExecuteCorredorStep
message: "not allowed to run corredorExec function, corredor is disabled"
log: "failed to execute {{workflow}} with corredorExec function step; corredor is disabled"
- error: maximumCallStackSizeExceeded
message: "maximum call stack size exceeded"
log: "maximum call stack size exceeded"