Interface TemplateChangeService

  • All Known Implementing Classes:
    TemplateChangeServiceImpl

    public interface TemplateChangeService
    This service handles the runtime change of a template or template definition with an optional change / approval process to be triggered.
    Author:
    Micha Kiener
    • Field Detail

      • PRC_VAR_NAME_TPL_DEF_ID

        static final java.lang.String PRC_VAR_NAME_TPL_DEF_ID
        See Also:
        Constant Field Values
      • PRC_VAR_NAME_NEW_CONTENT

        static final java.lang.String PRC_VAR_NAME_NEW_CONTENT
        See Also:
        Constant Field Values
      • PRC_VAR_NAME_NEW_CONTENT_RESOURCE

        static final java.lang.String PRC_VAR_NAME_NEW_CONTENT_RESOURCE
        See Also:
        Constant Field Values
      • PRC_VAR_NAME_TRIGGERING_USER_ID

        static final java.lang.String PRC_VAR_NAME_TRIGGERING_USER_ID
        See Also:
        Constant Field Values
      • PRC_VAR_NAME_APPROVED

        static final java.lang.String PRC_VAR_NAME_APPROVED
        See Also:
        Constant Field Values
      • PRC_VAR_NAME_TRIGGERING_USER_NAME

        static final java.lang.String PRC_VAR_NAME_TRIGGERING_USER_NAME
        See Also:
        Constant Field Values
      • AUDIT_ENTRY_TYPE_DEPLOYMENT

        static final java.lang.String AUDIT_ENTRY_TYPE_DEPLOYMENT
        See Also:
        Constant Field Values
      • AUDIT_ENTRY_SUB_TYPE_TEMPLATE_VARIATION

        static final java.lang.String AUDIT_ENTRY_SUB_TYPE_TEMPLATE_VARIATION
        See Also:
        Constant Field Values
      • AUDIT_ENTRY_VAR_NAME_CHANGE_USER_ID

        static final java.lang.String AUDIT_ENTRY_VAR_NAME_CHANGE_USER_ID
        See Also:
        Constant Field Values
      • AUDIT_ENTRY_VAR_NAME_APPROVAL_USER_ID

        static final java.lang.String AUDIT_ENTRY_VAR_NAME_APPROVAL_USER_ID
        See Also:
        Constant Field Values
      • AUDIT_ENTRY_VAR_OLD_VERSION_TIMESTAMP

        static final java.lang.String AUDIT_ENTRY_VAR_OLD_VERSION_TIMESTAMP
        See Also:
        Constant Field Values
    • Method Detail

      • triggerTemplateVariationContentChange

        void triggerTemplateVariationContentChange​(java.lang.String templateVariationId,
                                                   java.lang.String tenantId,
                                                   UpdateTemplateVariationRequest updateRequest)
        Changes and deploys the variation content of the given template variation at runtime. This will start a change / approval process, if configured. And if that's the case, the change and deploy does not happen immediately, but will be done as part of the process. If there is no such process in place, this method will directly invoke deployTemplateVariationContentChange(String, String, String, String).
        Parameters:
        templateVariationId - the id of the template variation to change its variation content
        updateRequest - the update request containing the necessary data (e.g. new variation content, etc) for the update
      • deployTemplateVariationContentChange

        void deployTemplateVariationContentChange​(java.lang.String templateVariationId,
                                                  java.lang.String tenantId,
                                                  java.lang.String newVariationContent,
                                                  java.lang.String newVariationContentResource)
        Directly changes and deploys the variation content of the given template variation at runtime. This method is either invoked by triggerTemplateVariationContentChange(String, String, UpdateTemplateVariationRequest) or as part of the change / approval process to eventually deploy the changed content.
        Parameters:
        templateVariationId - the id of the template variation to change and deploy its content
        tenantId - the optional id of the tenant
        newVariationContent - the new variation content to change and deploy (can be null if newVariationContentResource is passed)
        newVariationContentResource - the new variation content resource to change and deploy (can be null if newVariationContent is passed)
      • findApprovalProcessInstance

        org.flowable.engine.runtime.ProcessInstance findApprovalProcessInstance​(java.lang.String combinedTemplateVariationKey,
                                                                                java.lang.String tenantId)
        Find a running approval / change process for the specified template variation.
        Parameters:
        combinedTemplateVariationKey - the combined id of the template and variation key (as being returned by TemplateVariationModel.getKey()
        Returns:
        the optional, running approval process, if any found, null otherwise