|
54 | 54 | }, |
55 | 55 | "title": "DummyAction", |
56 | 56 | "type": "object" |
| 57 | + }, |
| 58 | + "StartWorkflowAction": { |
| 59 | + "properties": { |
| 60 | + "name": { |
| 61 | + "const": "start_workflow", |
| 62 | + "default": "start_workflow", |
| 63 | + "title": "Name", |
| 64 | + "type": "string" |
| 65 | + }, |
| 66 | + "id": { |
| 67 | + "anyOf": [ |
| 68 | + { |
| 69 | + "type": "string" |
| 70 | + }, |
| 71 | + { |
| 72 | + "type": "null" |
| 73 | + } |
| 74 | + ], |
| 75 | + "default": null, |
| 76 | + "title": "Id" |
| 77 | + }, |
| 78 | + "template_id": { |
| 79 | + "description": "ID of the workflow template to start", |
| 80 | + "title": "Template Id", |
| 81 | + "type": "string" |
| 82 | + }, |
| 83 | + "cdb_project_id": { |
| 84 | + "anyOf": [ |
| 85 | + { |
| 86 | + "type": "string" |
| 87 | + }, |
| 88 | + { |
| 89 | + "type": "null" |
| 90 | + } |
| 91 | + ], |
| 92 | + "default": null, |
| 93 | + "description": "ID of the project in which the workflow should be started", |
| 94 | + "title": "Cdb Project Id" |
| 95 | + }, |
| 96 | + "title": { |
| 97 | + "description": "Title of the workflow", |
| 98 | + "title": "Title", |
| 99 | + "type": "string" |
| 100 | + }, |
| 101 | + "attachment_ids": { |
| 102 | + "description": "List of cdb_object_ids to attach to the workflow", |
| 103 | + "items": { |
| 104 | + "type": "string" |
| 105 | + }, |
| 106 | + "title": "Attachment Ids", |
| 107 | + "type": "array" |
| 108 | + }, |
| 109 | + "global_briefcase_object_ids": { |
| 110 | + "description": "List of cdb_object_ids to attach to the global briefcase", |
| 111 | + "items": { |
| 112 | + "type": "string" |
| 113 | + }, |
| 114 | + "title": "Global Briefcase Object Ids", |
| 115 | + "type": "array" |
| 116 | + }, |
| 117 | + "task_configurations": { |
| 118 | + "description": "List of task configurations", |
| 119 | + "items": { |
| 120 | + "$ref": "#/$defs/TaskConfiguration" |
| 121 | + }, |
| 122 | + "title": "Task Configurations", |
| 123 | + "type": "array" |
| 124 | + } |
| 125 | + }, |
| 126 | + "required": [ |
| 127 | + "template_id", |
| 128 | + "title" |
| 129 | + ], |
| 130 | + "title": "StartWorkflowAction", |
| 131 | + "type": "object" |
| 132 | + }, |
| 133 | + "Subject": { |
| 134 | + "properties": { |
| 135 | + "subject_id": { |
| 136 | + "description": "ID of the subject, eg. a role name or personalnummer", |
| 137 | + "title": "Subject Id", |
| 138 | + "type": "string" |
| 139 | + }, |
| 140 | + "subject_type": { |
| 141 | + "description": "Type of the subject: Person, PCS Role or Common Role", |
| 142 | + "enum": [ |
| 143 | + "Person", |
| 144 | + "PCS Role", |
| 145 | + "Common Role" |
| 146 | + ], |
| 147 | + "title": "Subject Type", |
| 148 | + "type": "string" |
| 149 | + } |
| 150 | + }, |
| 151 | + "required": [ |
| 152 | + "subject_id", |
| 153 | + "subject_type" |
| 154 | + ], |
| 155 | + "title": "Subject", |
| 156 | + "type": "object" |
| 157 | + }, |
| 158 | + "TaskConfiguration": { |
| 159 | + "properties": { |
| 160 | + "task_id": { |
| 161 | + "description": "Identifier for the task", |
| 162 | + "title": "Task Id", |
| 163 | + "type": "string" |
| 164 | + }, |
| 165 | + "responsible": { |
| 166 | + "anyOf": [ |
| 167 | + { |
| 168 | + "$ref": "#/$defs/Subject" |
| 169 | + }, |
| 170 | + { |
| 171 | + "type": "null" |
| 172 | + } |
| 173 | + ], |
| 174 | + "default": null, |
| 175 | + "description": "Responsible subject for the task" |
| 176 | + }, |
| 177 | + "recipients": { |
| 178 | + "description": "List of recipients for the task (only used by information tasks)", |
| 179 | + "items": { |
| 180 | + "$ref": "#/$defs/Subject" |
| 181 | + }, |
| 182 | + "title": "Recipients", |
| 183 | + "type": "array" |
| 184 | + } |
| 185 | + }, |
| 186 | + "required": [ |
| 187 | + "task_id" |
| 188 | + ], |
| 189 | + "title": "TaskConfiguration", |
| 190 | + "type": "object" |
57 | 191 | } |
58 | 192 | }, |
59 | 193 | "properties": { |
|
73 | 207 | "discriminator": { |
74 | 208 | "mapping": { |
75 | 209 | "abort_and_show_error": "#/$defs/AbortAndShowErrorAction", |
76 | | - "dummy": "#/$defs/DummyAction" |
| 210 | + "dummy": "#/$defs/DummyAction", |
| 211 | + "start_workflow": "#/$defs/StartWorkflowAction" |
77 | 212 | }, |
78 | 213 | "propertyName": "name" |
79 | 214 | }, |
|
83 | 218 | }, |
84 | 219 | { |
85 | 220 | "$ref": "#/$defs/DummyAction" |
| 221 | + }, |
| 222 | + { |
| 223 | + "$ref": "#/$defs/StartWorkflowAction" |
86 | 224 | } |
87 | 225 | ] |
88 | 226 | }, |
|
0 commit comments