Create a new workflow diagram
Create a workflow diagram. Diagrams can be saved in active or non-active (draft) mode. A diagram cannot be used to create jobs if the diagram is not active. A diagram will be validated when activated. The adminBasic or adminAdvanced privilege is required to create a workflow diagram.
Validation rules include:
- The diagram only has one initial step.
- The diagram cannot have orphan steps.
WorkflowDiagram Parameters:
Parameter | Description | Data Type |
---|---|---|
diagramId | Optional. The unique ID of the diagram to be created. | String |
diagramName | Required. The name of the diagram to be created. | String |
description | Optional. The description of the diagram to be created. | String |
active | Optional. If it is not defined, it is set to false. | Boolean |
steps | Required. The step(s) in the diagram to be created. See details for Step. | Array[Step] |
annotations | Optional. The annotations of the diagram to be created. See details for Annotation. | Array[Annotation] |
displayGrid | Required. If true, the grid is displayed in the diagram to be created. | Boolean |
dataSources | Optional. Spatial data that will be used in the steps of the diagram. See details for DataSources. Note: Data sources are not supported in ArcGIS Online. | Array[DataSources] |
Step:
Parameter | Description | Data Type |
---|---|---|
id | Required. Step ID in the diagram to be created. | String |
name | Required. Step name in the diagram to be created. | String |
description | Optional. Step description in the diagram to be created. | String |
stepTemplateId | Optional. Step template being used for the step. | String |
automatic | Required. If true, the step is run automatically. | Boolean |
canComment | Optional. If true, the user can add comments to the job. | Boolean |
commentRequired | Optional. If true, the user cannot proceed without adding a comment. | Boolean |
proceedNext | Required. If true, the diagram is proceeded to next step automatically. | Boolean |
canSkip | Required. If true, the step can be skipped. | Boolean |
position | Required. The graphical position of the step. | String |
shape | Required. The graphical shape of the step. | Number |
color | Optional. The color of the step displayed in the diagram. | String |
outlineColor | Optional. The outline color of the step. | String |
labelColor | Optional. The color of the step label. | String |
action | Required. The step action including definition of actionType and args. | String |
paths | Required. The step paths to define next step and assignment. See details for StepPath | Array[StepPath] |
helpUrl | Optional. The URL to open step help. Starting at 11.3, this property is deprecated. Use help instead. | String |
helpText | Optional. The help message configured with the step. | String |
helpLink | Optional. The help link configured with the step. Introduced at ArcGIS Enterprise 11.3. | String |
encodeHelpLink | Optional. If true, the step help link will be encoded. | Boolean |
schedule | Optional. If defined, the step is run on a schedule. See details for Schedule. | Object |
StepPath:
Parameter | Description | Data Type |
---|---|---|
nextStep | Required. The next step ID. | String |
expression | Optional. The condition to determine next step if the current step has more than one next step. | String |
label | Optional. The label for the next step. | String |
assignedTo | Optional. The assignment for next step. | String |
assignedType | Optional. The assignment type for next step. Allowed values are Unassigned, User, and Group. Unassigned must be set if assignedTo is empty. | String |
points | Required. The position of path to connect the current step to next step. | Array[Point] |
ports | Required. The port position of path to connect the current step to next step. | Array[String] |
status | Optional. The status of the next step. | String |
notifications | Optional. The notification sent when reaching next step. | Array[String] |
lineColor | Optional. The line color of the path. | String |
labelColor | Optional. The label color of the path. | String |
Schedule:
Parameter | Description | Data Type |
---|---|---|
scheduleType | Optional. The schedule type for the step. Allowed values are Duration, SpecificTime, and Expression. | String |
timeDuration | Required if the scheduleType is Duration. The time duration before running the step. See details for TimeDuration. | Object |
specificTime | Required if the scheduleType is SpecificTime. The specific time to run the step. See details for SpecificTime. | Object |
expression | Required if the scheduleType is Expression. The arcade expression defined for the specific time to run the step. | String |
TimeDuration:
Parameter | Description | Data Type |
---|---|---|
months | Optional. The number of months until running the step. | Integer |
days | Optional. The number of days until running the step. | Integer |
hours | Optional. The number of hours until running the step. | Integer |
minutes | Optional. The number of minutess until running the step. | Integer |
offset | Optional. The buffer offset of the number of minutes allowed to run the step based on scheduled time. | Integer |
SpecificTime:
Parameter | Description | Data Type |
---|---|---|
type | Optional. The type of the specificTime to run the step. Allowed values are HourOfDay, DayOfWeek, DayOfMonth, and MonthOfYear. | String |
dayOfWeek | Optional. Which day of the week to run the step. 1 - Monday to 7 - Sunday | Integer |
dayOfMonth | Optional. Which day of the month to run the step. | Integer |
month | Optional. The month to run the step. 1 - January to 12 - December | Integer |
hour | Optional. The hour to run the step. Allowed values are the integer between 1 and 23 | Integer |
minute | Optional. The minute to run the step. Allowed values are the integer between 0 and 59 | Integer |
offset | Optional. The buffer offset of the number of minutes allowed to run the step based on scheduled time. | Integer |
DataSources:
Parameter | Description | Data Type |
---|---|---|
name | Required. The unique name of the data source to be stored in the diagram. | String |
url | Required. The url of the data source such as the portal item url for a feature service. | String |
sourceType | Required. The type of data source such as branch versioned feature service. | String |
Annotation:
Parameter | Description | Data Type |
---|---|---|
position | Required. Annotation position. | String |
color | Optional. Annotation text color. | String |
outlineColor | Optional. The Outline color of the annotation. | String |
labelColor | Optional. The label color of the annotation. | String |
text | Required. Annotation text. | String |
Body parameter
{
"diagramId": "string",
"diagramName": "string",
"description": "string",
"active": true,
"initialStepId": "string",
"initialStepName": "string",
"steps": [
{
"id": "string",
"name": "string",
"description": "string",
"stepTemplateId": "string",
"automatic": true,
"proceedNext": true,
"canSkip": true,
"position": "string",
"shape": 0,
"color": "string",
"outlineColor": "string",
"labelColor": "string",
"action": {
"actionType": "string",
"args": {}
},
"paths": [
{
"nextStep": "string",
"expression": "string",
"label": "string",
"assignedTo": "string",
"points": [
{
"x": 0,
"y": 0
}
],
"ports": [
"string"
],
"assignedType": "Unassigned",
"status": "string",
"notifications": [
"string"
],
"lineColor": "string",
"labelColor": "string",
"isAssignedToCustomExpression": true,
"forceGroupAssignment": true
}
],
"helpUrl": "string",
"helpText": "string",
"helpLink": "string",
"encodeHelpLink": true,
"schedule": {
"scheduleType": "Duration",
"timeDuration": {
"months": 0,
"days": 0,
"hours": 0,
"minutes": 0,
"offset": 0
},
"specificTime": {
"type": "HourOfDay",
"dayOfWeek": 0,
"dayOfMonth": 0,
"month": 0,
"hour": 0,
"minutes": 0,
"offset": 0
},
"expression": "string"
}
}
],
"dataSources": [
{
"name": "string",
"url": "string",
"sourceType": "string"
}
],
"annotations": [
{
"position": "string",
"color": "string",
"outlineColor": "string",
"labelColor": "string",
"text": "string"
}
],
"displayGrid": true
}
Query parameters
Name | Type | Required |
---|---|---|
|
|
Path parameters
Name | Type | Required |
---|---|---|
|
| |
|
|
Examples
Request
# You can also use wget
curl -X POST /{orgId}/{itemId}/diagrams \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer {access-token}'
Response
200 Response
{
"diagramId": "string"
}
Status | Meaning | Description | Schema |
---|---|---|---|
| success | Inline | |
| invalid diagram |
Response details
Status Code 200
CreateDiagramResponse
Name | Type | Required |
---|---|---|
|
|