Schema details (20220727.2 edition)

main schema

nametyperequiredDescription
workflow_namestringYESname of workflow
versionnumberNOdefault is 1
create_access_rolesstring[]NOuser roles that access to create process from this workflow (default: ['_all_'])
read_access_rolesstring[]NOuser roles that access to read process from this workflow (default: ['_all_'])
process_init_checkWorkflowProcessOnInitNOcheck when a process wants to start
auto_delete_after_endbooleanNOdelete process after enter to end state
start_statestringYESstart state of process
end_statestringYESend state of process
fieldsWorkflowFieldNOworkflow fields
statesWorkflowStateYESworkflow states

WorkflowProcessOnInit schema

nametyperequiredDescription
typestringYEScan be local or api
local_checkstringNOcheck in local mode by workflow engine. options: just_one_user_running_process: every user can only create one running process
api_urlstringNOapi url can only response boolean or a error string like 'you can not create new process'

WorkflowField schema

nametyperequiredDescription
namestringYESfield name
typestringNO'string' or 'number' or 'boolean' or 'file' (default: string)
metaobjectNOany data useful for client
validationWorkflowFieldValidation[]NOyou can set more validations on field

WorkflowState schema

nametyperequiredDescription
namestringYESstate name
access_rolestring[]NOroles to view this state (default: ['_all_'])
metaobjectNOany data useful for client
actionsWorkflowStateAction[]NOactions of state
eventsWorkflowStateEvent[]NOyou can define events on state

WorkflowStateAction schema

for more information about state actions, continue from here

nametyperequiredDescription
namestringYESaction name
access_rolestring[]NOroles to execute this action (default: ['_all_'])
required_fieldsstring[]NOfields must get from client
optional_fieldsstring[]NOfields that client can send
send_fieldsstring[]NOfields that must be send to app server 1
typestringNO'hook_url' or 'redis' or 'local'
alias_namestringNOname of an alias 2
metaobjectNOany data useful for client
message_requiredbooleanNOclient must send a message or not
set_fieldsobjectNOfields that can set hardcoded
urlstringNOcan be a url like http://sample.com/hook. used for 'hook_url' type
methodstringNOcan be a request method like 'get' or 'post'. used for 'hook_url' type
headersstring[]NOheaders that can be set on hook request. used for 'hook_url' type
channelstringNOpublish channel name. used for 'redis' type
response_channelstringNOsubscribe channel name. used for 'redis' type
redis_instancestringNOa redis instance name. used for 'redis' type. (default is first instance defined on configs)
next_statestringNOnext state to be go. used for 'local' type

2 added in 20220727.1

1 added in 20220727.2