Interface ActionTemplateService

All Known Implementing Classes:
ActionTemplateServiceImpl

@Deprecated(since="3.17", forRemoval=true) public interface ActionTemplateService
Deprecated, for removal: This API element is subject to removal in a future version.
since 3.17, use the TemplateService if you need something similar
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.
Author:
Micha Kiener, Filip Hrisafov
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final String
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    static final String
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    static final String
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    static final String
    Deprecated, for removal: This API element is subject to removal in a future version.
     
  • Method Summary

    Modifier and Type
    Method
    Description
    getMessage(String templateKey, String tenantId, String code, String language, ActionDefinitionModel actionDefinitionModel, Object scopedObject)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Get the message for the given templateKey.
  • Field Details

    • VARIANT_KEY_CODE

      static final String VARIANT_KEY_CODE
      Deprecated, for removal: This API element is subject to removal in a future version.
      See Also:
    • VARIANT_KEY_LANGUAGE

      static final String VARIANT_KEY_LANGUAGE
      Deprecated, for removal: This API element is subject to removal in a future version.
      See Also:
    • PAYLOAD_PARAM_NAME_SCOPED_OBJECT

      static final String PAYLOAD_PARAM_NAME_SCOPED_OBJECT
      Deprecated, for removal: This API element is subject to removal in a future version.
      See Also:
    • PAYLOAD_PARAM_NAME_ACTION

      static final String PAYLOAD_PARAM_NAME_ACTION
      Deprecated, for removal: This API element is subject to removal in a future version.
      See Also:
  • Method Details

    • getMessage

      String getMessage(String templateKey, String tenantId, String code, String language, ActionDefinitionModel actionDefinitionModel, Object scopedObject)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Get the message for the given templateKey. The code and language are used as variants for the template engine and the actionDefinitionModel and scopedObject are used as the payload.
      Parameters:
      templateKey - the key for the template
      tenantId - the tenant id that should be used when resolving the message
      code - the optional code (defaults to "default" if not provided)
      language - the optional language (defaults to "en" if not provided)
      actionDefinitionModel - the action definition model that is passed as part of the payload for the template service
      scopedObject - the optional object under scoped if the message should be created with a scoped object (it is passed to the template service as part of the payload)
      Returns:
      the generated message