The action template service supports the handling of message generation in the scope of the Action engine. It is for configured within
ActionDefinitionModel
by using the template engine if to render the content.
For example it can be used to to generate a confirmation or title message from the
ActionDefinitionModel.getConfirmationMessageCode()
and
ActionDefinitionModel.getConfirmationTitleCode()
If you want to create your own confirmation message or title template:
- add message template as a JSON resource in `com/flowable/template/default/` with name `confirmationMessage-{yourMessageCode}_en.tplvariation`
- add message template as a JSON resource in `com/flowable/template/default/` with name `confirmationTitle-{yourMessageCode}_en.tplvariation`
- optionally add message template as a JSON resource in `com/flowable/template/default/` with name `confirmationMessage-{yourMessageCode}_{languageCode}.tplvariation` for any further languages you want to support
- optionally add message template as a JSON resource in `com/flowable/template/default/` with name `confirmationTitle-{yourMessageCode}_{languageCode}.tplvariation` for any further languages you want to support
If the action definition is requested in the context of a scoped object (e.g. a conversation or a user, etc), this object is made available within the
payload when using the template engine and can be accessed using
scope
(e.g.
'${scope.name}'
). The action model is exposed as well, so for
instance you can use
'${action.name}'
to render the name of the selected action.