Update an existing workflow definition

put/workflows/{workflowId}
Internal-Use Only

Updates an existing workflow definition. When a workflow is updated, a new version of the workflow definition is created. This ensures that existing processes working tasks against the previous versions of this workflow have access to the data needed and can continue. A workflow is not versioned if the updated properties are shared by all workflow versions (label, description, enabled, and useForAutoStart).

Request Samples

1

Response Samples

1{
2 "links": [
3 {
4 "method": "GET",
5 "rel": "self",
6 "href": "/workflows/workflows/intel_report_workflow:1:f17ee9e4-a5ff-11e8-9397-0242ac110013",
7 "uri": "/workflows/workflows/intel_report_workflow:1:f17ee9e4-a5ff-11e8-9397-0242ac110013",
8 "type": "application/vnd.sas.investigation.workflow.workflow",
9 "responseType": "application/vnd.sas.investigation.workflow.workflow+json"
10 },
11 {
12 "method": "PUT",
13 "rel": "create new version",
14 "href": "/workflows/workflows/intel_report_workflow:1:f17ee9e4-a5ff-11e8-9397-0242ac110013",
15 "uri": "/workflows/workflows/intel_report_workflow:1:f17ee9e4-a5ff-11e8-9397-0242ac110013",
16 "type": "application/vnd.sas.investigation.workflow.workflow",
17 "responseType": "application/vnd.sas.investigation.workflow.workflow+json"
18 }
19 ],
20 "version": 1,
21 "entityId": 100515,
22 "entityName": "intel_report",
23 "entityLabel": "Intel Report",
24 "id": "intel_report_workflow:1:f17ee9e4-a5ff-11e8-9397-0242ac110013",
25 "labelResource": "svi.workflow.intel_report.1534937931623.label.txt",
26 "descriptionResource": "svi.workflow.intel_report.1534937931623.description.txt",
27 "graphicalModel": "{\"linkFromPortIdProperty\":\"fromPort\",\"linkToPortIdProperty\":\"toPort\",\"modelData\":{\"version\":10.21,\"entityIdsUpdated\":true},\"nodeDataArray\":[{\"key\":\"StartEvent1534937812963\",\"category\":\"event\",\"text\":\"Start\",\"textResource\":\"svi.workflow.intel_report.1534937931623.StartEvent1534937812963.name.txt\",\"item\":\"StartEvent\",\"descriptionResource\":\"svi.workflow.intel_report.1534937931623.StartEvent1534937812963.description.txt\",\"loc\":\"0 0\"},{\"key\":\"UserTask1534937831345\",\"category\":\"activity\",\"text\":\"User Task\",\"textResource\":\"svi.workflow.intel_report.1534937931623.UserTask1534937831345.name.txt\",\"item\":\"UserTask\",\"descriptionResource\":\"svi.workflow.intel_report.1534937931623.UserTask1534937831345.description.txt\",\"participants\":[{\"id\":\"user2\",\"type\":\"USER\",\"name\":\"Test user2\"},{\"id\":\"sviusrs\",\"type\":\"GROUP\",\"name\":\"Visual Investigator Users\"}],\"loc\":\"0.5 105\",\"size\":{\"width\":200,\"height\":70,\"class\":\"go.Size\"},\"taskActions\":[{\"id\":\"taskOption1534937831345\",\"name\":\"Completed\",\"processVariables\":[],\"entityFieldVariables\":[],\"nameResource\":\"svi.workflow.intel_report.1534937931623.UserTask1534937831345.action.taskOption1534937831345.name.txt\",\"value\":\"taskOption1534937831345\"}]},{\"key\":\"EndEvent1534937834926\",\"category\":\"event\",\"text\":\"End\",\"textResource\":\"svi.workflow.intel_report.1534937931623.EndEvent1534937834926.name.txt\",\"item\":\"EndEvent\",\"descriptionResource\":\"svi.workflow.intel_report.1534937931623.EndEvent1534937834926.description.txt\",\"loc\":\"0.5 335\"}],\"linkDataArray\":[{\"from\":\"StartEvent1534937812963\",\"to\":\"UserTask1534937831345\",\"visible\":true,\"fromPort\":\"bottomPort\",\"toPort\":\"topPort\",\"points\":[0,25,0,55,0,55,0,42,0,42,0,72],\"text\":\"\",\"textResource\":\"svi.workflow.intel_report.1534937931623.StartEvent1534937812963_UserTask1534937831345.name.txt\",\"descriptionResource\":\"svi.workflow.intel_report.1534937931623.StartEvent1534937812963_UserTask1534937831345.description.txt\"},{\"from\":\"UserTask1534937831345\",\"to\":\"EndEvent1534937834926\",\"fromPort\":\"bottomPort\",\"toPort\":\"topPort\",\"points\":[0,137,0,167,0,224,1,224,1,282,1,312],\"textResource\":\"svi.workflow.intel_report.1534937931623.UserTask1534937831345_EndEvent1534937834926.name.txt\",\"key\":\"UserTask1534937831345_EndEvent1534937834926\",\"descriptionResource\":\"svi.workflow.intel_report.1534937931623.UserTask1534937831345_EndEvent1534937834926.description.txt\"}],\"class\":\"go.GraphLinksModel\"}",
28 "userDefinedProcessVariables": [
29 {
30 "id": "WorkflowVariable1",
31 "name": "AUTO_ASSIGN_VAR",
32 "label": "AUTO_ASSIGN_VAR",
33 "defaultValue": "[{\"id\":\"user2\",\"type\":\"user\"}]",
34 "type": "USER_GROUP",
35 "isEntity": false,
36 "userSelectionStrategy": "USERS",
37 "allowMultipleSelections": false
38 },
39 {
40 "id": "WorkflowVariable2",
41 "name": "GET_RUNNING_TASK_USER",
42 "label": "GET_RUNNING_TASK_USER",
43 "defaultValue": "[]",
44 "type": "USER_GROUP",
45 "isEntity": false,
46 "userSelectionStrategy": "USERS",
47 "allowMultipleSelections": false
48 },
49 {
50 "id": "WorkflowVariable3",
51 "name": "STATUS",
52 "label": "STATUS",
53 "defaultValue": "",
54 "defaultValueResource": "svi.workflow.intel_report.1534937931623.WorkflowVariable3.defaultValue.txt",
55 "type": "STRING",
56 "isEntity": false
57 }
58 ],
59 "entityDefinedProcessVariables": [
60 "svi_first_name",
61 "svi_last_name"
62 ],
63 "startOnNewEntityInstance": false,
64 "createAt": "2018-08-22T11:38:52.236Z",
65 "createBy": "videmo",
66 "lastUpdateAt": "2018-08-22T11:38:52.236Z",
67 "lastUpdateBy": "videmo",
68 "name": "intel_report_workflow",
69 "label": "Intel Report Workflow",
70 "workflowVersion": 1
71}

Path Parameters

NameTypeRequiredDescription
workflowId
string
true

The ID of the workflow.

Header Parameters

NameTypeRequiredDescription
Content-Type
string
false

The version of the workflow in the body.

If-Unmodified-Since
integer<int64>
false

The time at which this workflow definition was last modified.

Request Body

The representation of the workflow definition.

A representation of a workflow definition view.

NameTypeRequiredDescription
entityLabel
string
false

The label of the entity.

xmlModel
string
false

The Business Process Model and Notation (BPMN) XML model representation of the workflow.

entityInstances
array [workflowInstanceContextRep]
false

The list of entities running with this template.

lastUpdatedAt
string<date-time>
false

The timestamp for the last updated time.

description
string
false

The description of the workflow.

useForAutoStart
boolean
false

A flag indicating that this workflow should be used on entity creation.

Example:
false
enabled
boolean
false

A flag indicating that this workflow can be run.

Example:
false
descriptionResource
string
false

The resource key for the workflow.

createdAt
string<date-time>
false

The timestamp for the creation time.

entityName
string
false

The name of the entity.

links
array [Link]
false

The links that apply to this resource.

id
string
false

The ID of the workflow.

entityDefinedProcessVariables
array [string]
false

The workflow variables derived from the entity.

userDefinedProcessVariables
array [variableRep]
false

The workflow variables defined by users.

labelResource
string
false

The resource key for the workflow label.

entityId
integer<int64>
false

The ID of the entity.

label
string
false

The label of the workflow.

version
integer<int32>
false

This media type's schema version number. This representation is version 2.

graphicalModel
string
false

The GoJS model representation of the workflow.

createdBy
string
false

The string for the creator's user name.

name
string
false

The name of the workflow.

resourceStrings
object
false

A collection of resource keys and strings for the translatable strings in the workflow.

workflowVersion
integer<int32>
false

The version of the workflow.

startOnNewEntityInstance
boolean
false

A flag for starting on entity creation.

Example:
false
lastUpdatedBy
string
false

The string for the user name of the last person to update this definition.

Responses

StatusMeaningDescription
200OKThe request succeeded.HeadersSchema
400Bad RequestThe request was invalid.Schema
404Not FoundNo workflow definition exists at the requested path.Schema
412Precondition FailedThe If-Match request header did not match the resource's entity tag, or the If-Unmodified-Since request header did not match the resource's last modified timestamp.Schema
428Precondition RequiredThe request headers did not include an If-Match or If-Unmodified-Since precondition.Schema