public class ProcessTemplateCmd extends Object implements org.flowable.common.engine.impl.interceptor.Command<TemplateProcessingResult>
Modifier and Type | Field and Description |
---|---|
protected Map<String,Object> |
payload |
protected String |
templateKey |
protected String |
tenantId |
protected org.flowable.common.engine.api.variable.VariableContainer |
variableContainer |
protected Map<String,Object> |
variant |
Constructor and Description |
---|
ProcessTemplateCmd(String templateKey,
String tenantId,
Map<String,Object> variant,
Map<String,Object> payload) |
ProcessTemplateCmd(String templateKey,
org.flowable.common.engine.api.variable.VariableContainer variableContainer,
Map<String,Object> payload) |
Modifier and Type | Method and Description |
---|---|
protected void |
checkPayloadParameters(TemplateHolder template,
Map<String,Object> payload)
Checks the payload to contain at least the mandatory parameter values according the template variation model.
|
protected String |
composeVariationKey(TemplateModel templateModel,
Map<String,Object> variant)
Creates the variation key which is a combination of all variant values or 'none' for none-existing ones to compose a single and unique variation key.
|
protected String |
composeVariationKey(TemplateModel templateModel,
Map<String,Object> variant,
boolean forceDefault)
Creates the variation key which is a combination of all variant values or 'none' for none-existing ones to compose a single and unique variation key.
|
TemplateProcessingResult |
execute(org.flowable.common.engine.impl.interceptor.CommandContext commandContext) |
protected org.flowable.common.engine.impl.el.ExpressionManager |
getExpressionManager(org.flowable.common.engine.api.variable.VariableContainer variableContainer) |
protected TemplateVariationDefinition |
getTemplateVariationDefinition(TemplateRepositoryService templateRepositoryService,
TemplateModel templateModel,
String tenantIdToUse) |
TemplateProcessingResult |
processTemplate(org.flowable.common.engine.impl.interceptor.CommandContext commandContext,
TemplateHolder template,
Map<String,Object> payload) |
protected String templateKey
protected String tenantId
protected org.flowable.common.engine.api.variable.VariableContainer variableContainer
public ProcessTemplateCmd(String templateKey, String tenantId, Map<String,Object> variant, Map<String,Object> payload)
public TemplateProcessingResult execute(org.flowable.common.engine.impl.interceptor.CommandContext commandContext)
execute
in interface org.flowable.common.engine.impl.interceptor.Command<TemplateProcessingResult>
protected TemplateVariationDefinition getTemplateVariationDefinition(TemplateRepositoryService templateRepositoryService, TemplateModel templateModel, String tenantIdToUse)
protected String composeVariationKey(TemplateModel templateModel, Map<String,Object> variant)
templateModel
- the template definition model used to get the available and necessary variation keysvariant
- the variant holding variation values to compose the key fromprotected String composeVariationKey(TemplateModel templateModel, Map<String,Object> variant, boolean forceDefault)
templateModel
- the template definition model used to get the available and necessary variation keysvariant
- the variant holding variation values to compose the key fromforceDefault
- forces the use of default values if truepublic TemplateProcessingResult processTemplate(org.flowable.common.engine.impl.interceptor.CommandContext commandContext, TemplateHolder template, Map<String,Object> payload)
protected void checkPayloadParameters(TemplateHolder template, Map<String,Object> payload)
template
- the template information where the parameters are describedpayload
- the payload with the necessary parameter values to be checkedorg.flowable.common.engine.api.FlowableIllegalArgumentException
- is thrown if at least one mandatory parameter is missingprotected org.flowable.common.engine.impl.el.ExpressionManager getExpressionManager(org.flowable.common.engine.api.variable.VariableContainer variableContainer)
Copyright © 2019. All rights reserved.