@Transactional public class TemplateChangeServiceImpl extends Object implements TemplateChangeService
Modifier and Type | Field and Description |
---|---|
protected AuditService |
auditService |
protected String |
changeApprovalProcessKey |
protected IdentityService |
identityService |
protected static org.slf4j.Logger |
LOG |
static String |
PRC_BUSINESS_KEY_TEMPLATE_CHANGE |
protected RuntimeService |
runtimeService |
protected 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_NEW_EXTERNAL_ID, 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,
RuntimeService runtimeService,
TaskService taskService,
IdentityService identityService,
AuditService auditService) |
Modifier and Type | Method and Description |
---|---|
protected void |
completeApprovalTask(String templateVariationId,
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.
|
void |
deployTemplateVariationContentChange(String templateVariationId,
String tenantId,
String newVariationContent,
String newVariationContentResource,
String externalId)
Directly changes and deploys the variation content of the given template variation at runtime.
|
protected void |
deployTemplateVariationContentChange(String templateVariationId,
String tenantId,
UpdateTemplateVariationRequest request) |
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 ProcessInstance |
triggerChangeAndApprovalProcess(String templateVariationId,
String tenantId,
TemplateVariationModel variationModel,
UpdateTemplateVariationRequest request) |
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 RuntimeService runtimeService
protected final TaskService taskService
protected final IdentityService identityService
protected final AuditService auditService
public TemplateChangeServiceImpl(TemplateRepositoryService templateRepositoryService, TemplateEngineConfiguration templateEngineConfiguration, RuntimeService runtimeService, TaskService taskService, 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, ProcessInstance approvalPrc, UpdateTemplateVariationRequest updateRequest)
protected ProcessInstance triggerChangeAndApprovalProcess(String templateVariationId, String tenantId, TemplateVariationModel variationModel, UpdateTemplateVariationRequest request)
public 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)public void deployTemplateVariationContentChange(String templateVariationId, String tenantId, String newVariationContent, String newVariationContentResource, String externalId)
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)externalId
- the new external IDprotected void deployTemplateVariationContentChange(String templateVariationId, String tenantId, UpdateTemplateVariationRequest request)
protected TemplateVariationHolder loadAndCheckTemplateVariation(String templateVariationId, String tenantId, boolean throwIfNotEditable)
public String getChangeApprovalProcessKey()
public void setChangeApprovalProcessKey(String changeApprovalProcessKey)