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 Summary
Fields Modifier and Type Field Description static java.lang.String
AUDIT_ENTRY_SUB_TYPE_TEMPLATE_VARIATION
static java.lang.String
AUDIT_ENTRY_TYPE_DEPLOYMENT
static java.lang.String
AUDIT_ENTRY_VAR_NAME_APPROVAL_USER_ID
static java.lang.String
AUDIT_ENTRY_VAR_NAME_CHANGE_USER_ID
static java.lang.String
AUDIT_ENTRY_VAR_OLD_VERSION_TIMESTAMP
static java.lang.String
PRC_VAR_NAME_APPROVED
static java.lang.String
PRC_VAR_NAME_NEW_CONTENT
static java.lang.String
PRC_VAR_NAME_NEW_CONTENT_RESOURCE
static java.lang.String
PRC_VAR_NAME_TPL_DEF_ID
static java.lang.String
PRC_VAR_NAME_TRIGGERING_USER_ID
static java.lang.String
PRC_VAR_NAME_TRIGGERING_USER_NAME
-
Method Summary
Modifier and Type Method Description 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.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.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.
-
Field Details
-
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 Details
-
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 invokedeployTemplateVariationContentChange(String, String, String, String)
.- Parameters:
templateVariationId
- the id of the template variation to change its variation contentupdateRequest
- 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 bytriggerTemplateVariationContentChange(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 contenttenantId
- the optional id of the tenantnewVariationContent
- the new variation content to change and deploy (can be null ifnewVariationContentResource
is passed)newVariationContentResource
- the new variation content resource to change and deploy (can be null ifnewVariationContent
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 byTemplateVariationModel.getKey()
- Returns:
- the optional, running approval process, if any found, null otherwise
-