Workflow_Transitions_configuration - kwantu/platformconfiguration GitHub Wiki
back to workflow configuration
Configuring workflow transitions
"transition": [
{
"name": {
"i18n": {
"en": "Refer back",
"_id": "uuid"
}
},
"transitionAction": {
"goToStepId": {
"stepId": "captureFormBulkUplaod",
"type": ""
}
},
"_id": "toReferBackOnError",
"showAlways": true
},
{
"default":true,
"name": {
"style": "prominent",
"i18n": {
"en": "Proceed to review",
"_id": "uuid"
}
},
"transitionAction": {
"goToStepId": {
"stepId": "authoriseForm",
"type": ""
}
},
"_id": "toAuthoriseForm",
"condition": {
"operator": "==",
"subject": {
"subProcess": {
"elementPath": "spStatus"
}
},
"value": {
"data": {
"value": {
"datatype": "string",
"data": "success"
}
}
}
}
}
],
Special attributes
- Make the transition button show in red
"name": {
"style": "prominent",
...
}
- Make the transition happen automatically, specify the following attribute in the transition object
"default": true
- Make the transition available even if the workflow has not been submitted. This is primarily for referring back without saving and should be used with caution.
"showAlways": true
Conditional transitions
- Example based on the value of a field in one of the SDOs in the current context
"condition": {
"operator": "==",
"subject": {
"indicator": {
"elementPath": "UploadYesNo",
"modelScope": "pending",
"context": "subProcess",
"setId": "EPWPMonthlyAttendanceBulkUpload"
}
},
"value": {
"data": {
"value": {
"datatype": "string",
"data": "No"
}
}
}
- Example based on the value of an element in the workflow transition
"condition": {
"operator": "==",
"subject": {
"subProcess": {
"elementPath": "spStatus"
}
},
"value": {
"data": {
"value": {
"datatype": "string",
"data": "success"
}
}
}
}