Custom Form
You may wish to introduce custom properties that flow along with your workflow. These properties are tracked as your workflow transitions from state to state. They may comprise things like due dates, notes, parameters for the workflow or anything else you'd like.
You can use the form
capability to define a form that lets users editing and modify these properties.
Global Form
The global
form can be defined once and it will be used for all places within the workflow where a form can be interacted with. This includes the start of a workflow or any of the participant states.
{
"id": "custom-form1",
"title": "Sample Custom Form",
"nodes": {
"start": {
"type": "start",
"transitions": {
"start": "node1"
}
},
"node1": {
"type": "participant",
"title": "Step One",
"swimlane": "main",
"transitions": {
"approve": "end",
"reject": "end"
}
},
"end": {
"type": "end"
}
},
"swimlanes": {
"main": {
"principals": []
}
},
"forms": {
"global": {
"schema": {
"type": "object",
"properties": {
"dueDate": {
"type": "string",
"title": "Due Date"
}
}
},
"options": {
"fields": {
"dueDate": {
"type": "text"
}
}
}
}
}
}
Participant State Forms
You can also introduce forms that are targeted to participant
states.
{
"id": "custom-form2",
"title": "Sample Custom Form",
"nodes": {
"start": {
"type": "start",
"transitions": {
"start": "node1"
}
},
"node1": {
"type": "participant",
"title": "Step One",
"description": "Step One Description",
"form": "form1",
"swimlane": "main",
"transitions": {
"approve": "end",
"reject": "end"
}
},
"end": {
"type": "end"
}
},
"swimlanes": {
"main": {
"principals": []
}
},
"forms": {
"form1": {
"schema": {
"type": "object",
"properties": {
"price": {
"type": "number"
}
}
}
}
}
}
Forms
Forms are defined using the Cloud CMS forms engine. The schema
you provide consists of JSON Schema and the options
provides layout and field control overrides.
For more information on this, please check out the Cloud CMS Forms Engine.