@opuscapita/fsm-workflow-editor
v3.0.1
Published
Fsm workflow crud editor
Downloads
33
Readme
Usage
Editor demo (showroom) - see example schema in props
Actions & conditions paramsSchema definition and usage
i18n
UI labels for states
, conditions
, actions
and params
can be translated.
To add translations register
an object of the following structure within i18nManager in context of your app:
de: { // locale
fsmWorkflowEditor: {
actions: { // here you define translations for actions
testAction: { // action name like in workflow.actions
label: 'Test Action', // this text is a UI label for this action
params: {
nickname: { // param name in this action's schema
label: 'Nickname' // UI label for this param
},
fullName: {
label: 'Full Name'
}
}
},
sendMail: {
label: 'Send Email',
params: {
fromAddress: {
label: "Sender' address"
}
}
},
...
},
conditions: { // like in workflow.conditions
userHasRoles: {
label: 'User Has Roles',
params: {
restrictedRoles: {
label: 'Only these roles are allowed'
}
}
},
...
},
states: {
approved: {
label: 'Approved'
},
inspectionRequired: {
label: "Inspection Required"
},
...
}
}
},
fi: {
...same structure
}
Plain objects are also ok:
de: {
'fsmWorkflowEditor.states.approved.label': 'Approved',
'fsmWorkflowEditor.actions.testAction.label': 'Test action',
'fsmWorkflowEditor.actions.testAction.params.nickname.label': 'Nickname',
...
}