@Transactional public class TemplateChangeServiceImpl extends Object implements TemplateChangeService
Modifier and Type | Field and Description |
---|---|
protected AuditService |
auditService |
protected String |
changeApprovalProcessKey |
protected org.flowable.engine.IdentityService |
identityService |
protected static org.slf4j.Logger |
LOG |
static String |
PRC_BUSINESS_KEY_TEMPLATE_CHANGE |
protected org.flowable.engine.RuntimeService |
runtimeService |
protected org.flowable.engine.TaskService |
taskService |
protected TemplateEngineConfiguration |
templateEngineConfiguration |
protected TemplateRepositoryService |
templateRepositoryService |
protected static DateTimeFormatter |
VERSION_DATETIME_FORMAT |
AUDIT_ENTRY_SUB_TYPE_TEMPLATE_VARIATION, AUDIT_ENTRY_TYPE_DEPLOYMENT, AUDIT_ENTRY_VAR_NAME_APPROVAL_USER_ID, AUDIT_ENTRY_VAR_NAME_CHANGE_USER_ID, AUDIT_ENTRY_VAR_OLD_VERSION_TIMESTAMP, PRC_VAR_NAME_APPROVED, PRC_VAR_NAME_NEW_CONTENT, PRC_VAR_NAME_NEW_CONTENT_RESOURCE, PRC_VAR_NAME_TPL_DEF_ID, PRC_VAR_NAME_TRIGGERING_USER_ID, PRC_VAR_NAME_TRIGGERING_USER_NAME
Constructor and Description |
---|
TemplateChangeServiceImpl(TemplateRepositoryService templateRepositoryService,
TemplateEngineConfiguration templateEngineConfiguration,
org.flowable.engine.RuntimeService runtimeService,
org.flowable.engine.TaskService taskService,
org.flowable.engine.IdentityService identityService,
AuditService auditService) |
Modifier and Type | Method and Description |
---|---|
protected void |
completeApprovalTask(String templateVariationId,
org.flowable.engine.runtime.ProcessInstance approvalPrc,
UpdateTemplateVariationRequest updateRequest) |
void |
deployTemplateVariationContentChange(String templateVariationId,
String tenantId,
String newVariationContent,
String newVariationContentResource)
Directly changes and deploys the variation content of the given template variation at runtime.
|
org.flowable.engine.runtime.ProcessInstance |
findApprovalProcessInstance(String combinedTemplateVariationKey,
String tenantId)
Find a running approval / change process for the specified template variation.
|
String |
getChangeApprovalProcessKey() |
protected TemplateVariationHolder |
loadAndCheckTemplateVariation(String templateVariationId,
String tenantId,
boolean throwIfNotEditable) |
void |
setChangeApprovalProcessKey(String changeApprovalProcessKey) |
protected org.flowable.engine.runtime.ProcessInstance |
triggerChangeAndApprovalProcess(String templateVariationId,
String tenantId,
TemplateVariationModel variationModel,
String newVariationContent,
String newVariationContentResource) |
void |
triggerTemplateVariationContentChange(String templateVariationId,
String tenantId,
UpdateTemplateVariationRequest updateRequest)
Changes and deploys the variation content of the given template variation at runtime.
|
protected static final org.slf4j.Logger LOG
protected static final DateTimeFormatter VERSION_DATETIME_FORMAT
public static final String PRC_BUSINESS_KEY_TEMPLATE_CHANGE
@Value(value="${flowable.template.changeApprovalProcessKey:TM_P01_templateChangeApprovalProcess}") protected String changeApprovalProcessKey
protected final TemplateRepositoryService templateRepositoryService
protected final TemplateEngineConfiguration templateEngineConfiguration
protected final org.flowable.engine.RuntimeService runtimeService
protected final org.flowable.engine.TaskService taskService
protected final org.flowable.engine.IdentityService identityService
protected final AuditService auditService
public TemplateChangeServiceImpl(TemplateRepositoryService templateRepositoryService, TemplateEngineConfiguration templateEngineConfiguration, org.flowable.engine.RuntimeService runtimeService, org.flowable.engine.TaskService taskService, org.flowable.engine.IdentityService identityService, AuditService auditService)
public void triggerTemplateVariationContentChange(String templateVariationId, String tenantId, UpdateTemplateVariationRequest updateRequest)
TemplateChangeService
TemplateChangeService.deployTemplateVariationContentChange(String, String, String, String)
.triggerTemplateVariationContentChange
in interface TemplateChangeService
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 updateprotected void completeApprovalTask(String templateVariationId, org.flowable.engine.runtime.ProcessInstance approvalPrc, UpdateTemplateVariationRequest updateRequest)
protected org.flowable.engine.runtime.ProcessInstance triggerChangeAndApprovalProcess(String templateVariationId, String tenantId, TemplateVariationModel variationModel, String newVariationContent, String newVariationContentResource)
public org.flowable.engine.runtime.ProcessInstance findApprovalProcessInstance(String combinedTemplateVariationKey, String tenantId)
TemplateChangeService
findApprovalProcessInstance
in interface TemplateChangeService
combinedTemplateVariationKey
- the combined id of the template and variation key (as being returned by TemplateVariationModel.getKey()
public void deployTemplateVariationContentChange(String templateVariationId, String tenantId, String newVariationContent, String newVariationContentResource)
TemplateChangeService
TemplateChangeService.triggerTemplateVariationContentChange(String, String, UpdateTemplateVariationRequest)
or as part of the change / approval process
to eventually deploy the changed content.deployTemplateVariationContentChange
in interface TemplateChangeService
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 if newVariationContentResource
is passed)newVariationContentResource
- the new variation content resource to change and deploy (can be null if newVariationContent
is passed)protected TemplateVariationHolder loadAndCheckTemplateVariation(String templateVariationId, String tenantId, boolean throwIfNotEditable)
public String getChangeApprovalProcessKey()
public void setChangeApprovalProcessKey(String changeApprovalProcessKey)
Copyright © 2019. All rights reserved.