Class ProcessTemplateCmd
java.lang.Object
com.flowable.template.engine.impl.cmd.AbstractNeedsTemplateDefinitionCmd
com.flowable.template.engine.impl.cmd.ProcessTemplateCmd
- All Implemented Interfaces:
org.flowable.common.engine.impl.interceptor.Command<TemplateProcessingResult>
public class ProcessTemplateCmd extends AbstractNeedsTemplateDefinitionCmd implements org.flowable.common.engine.impl.interceptor.Command<TemplateProcessingResult>
-
Field Summary
Fields Modifier and Type Field Description protected TemplateProcessingBuilderImpl
templateProcessingBuilder
-
Constructor Summary
Constructors Constructor Description ProcessTemplateCmd(TemplateProcessingBuilderImpl templateProcessingBuilder)
-
Method Summary
Modifier and Type Method Description protected void
checkPayloadParameters(TemplateHolder template, java.util.Map<java.lang.String,java.lang.Object> payload)
Checks the payload to contain at least the mandatory parameter values according the template variation model.protected java.lang.String
composeVariationKey(TemplateModel templateModel, java.util.Map<java.lang.String,java.lang.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 java.lang.String
composeVariationKey(TemplateModel templateModel, java.util.Map<java.lang.String,java.lang.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 TemplateVariationDefinition
findTemplateVariationDefinition(TemplateRepositoryService templateRepositoryService, java.lang.String templateKey, java.lang.String parentDeploymentId, java.lang.String variationKey, java.lang.String tenantId)
protected org.flowable.common.engine.impl.el.ExpressionManager
getExpressionManager(org.flowable.common.engine.api.variable.VariableContainer variableContainer)
protected TemplateVariationDefinition
getTemplateVariationDefinition(TemplateEngineConfiguration templateEngineConfiguration, TemplateModel templateModel, java.lang.String tenantIdToUse)
TemplateProcessingResult
processTemplate(org.flowable.common.engine.impl.interceptor.CommandContext commandContext, TemplateHolder template, java.util.Map<java.lang.String,java.lang.Object> payload)
Methods inherited from class com.flowable.template.engine.impl.cmd.AbstractNeedsTemplateDefinitionCmd
createTemplateDefinitionQuery, getTemplateDefinition
-
Field Details
-
Constructor Details
-
Method Details
-
execute
public TemplateProcessingResult execute(org.flowable.common.engine.impl.interceptor.CommandContext commandContext)- Specified by:
execute
in interfaceorg.flowable.common.engine.impl.interceptor.Command<TemplateProcessingResult>
-
getTemplateVariationDefinition
protected TemplateVariationDefinition getTemplateVariationDefinition(TemplateEngineConfiguration templateEngineConfiguration, TemplateModel templateModel, java.lang.String tenantIdToUse) -
findTemplateVariationDefinition
protected TemplateVariationDefinition findTemplateVariationDefinition(TemplateRepositoryService templateRepositoryService, java.lang.String templateKey, java.lang.String parentDeploymentId, java.lang.String variationKey, java.lang.String tenantId) -
composeVariationKey
protected java.lang.String composeVariationKey(TemplateModel templateModel, java.util.Map<java.lang.String,java.lang.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.- Parameters:
templateModel
- the template definition model used to get the available and necessary variation keysvariant
- the variant holding variation values to compose the key from- Returns:
- the composed variation key
-
composeVariationKey
protected java.lang.String composeVariationKey(TemplateModel templateModel, java.util.Map<java.lang.String,java.lang.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.- Parameters:
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 true- Returns:
- the composed variation key
-
processTemplate
public TemplateProcessingResult processTemplate(org.flowable.common.engine.impl.interceptor.CommandContext commandContext, TemplateHolder template, java.util.Map<java.lang.String,java.lang.Object> payload) -
checkPayloadParameters
protected void checkPayloadParameters(TemplateHolder template, java.util.Map<java.lang.String,java.lang.Object> payload)Checks the payload to contain at least the mandatory parameter values according the template variation model.- Parameters:
template
- the template information where the parameters are describedpayload
- the payload with the necessary parameter values to be checked- Throws:
org.flowable.common.engine.api.FlowableIllegalArgumentException
- is thrown if at least one mandatory parameter is missing
-
getExpressionManager
protected org.flowable.common.engine.impl.el.ExpressionManager getExpressionManager(org.flowable.common.engine.api.variable.VariableContainer variableContainer)
-