State Action Response

when you use hook_url or redis types for state action, your server receive an object that contains:

nametypeDescription
state_namestringstate name
state_action_namestringstate action name
workflow_namestringworkflow name
workflow_versionnumberworkflow version
process_idnumbercurrent process id
user_idnumberuser that call this action
messagestringmessage that user send on call this action
required_fieldsWorkflowProcessField[]all required fields that user send them
optional_fieldsWorkflowProcessField[]all optional fields that user send them
send_fieldsWorkflowProcessField[]all fields that before set

in hook_url type, if no response or error response receive, then failed action.

when you set state action as hook_url or redis, you must response to complete action:

string response

you can send just next state as string

object response

nametyperequiredDescription
state_namestringYESthe state that go on, if null, then failed state
response_messagestringNOmessage of responsible server
fieldsobjectNOupdate some fields of process

after a timeout (defined in server configs), if no receive any response, failed action.