Class ProcessTemplateCmd
- java.lang.Object
-
- com.flowable.template.engine.impl.cmd.AbstractNeedsTemplateDefinitionCmd
-
- com.flowable.template.engine.impl.cmd.ProcessTemplateCmd
-
- All Implemented Interfaces:
Command<TemplateProcessingResult>
public class ProcessTemplateCmd extends AbstractNeedsTemplateDefinitionCmd implements Command<TemplateProcessingResult>
-
-
Field Summary
Fields Modifier and Type Field Description protected TemplateProcessingBuilderImpltemplateProcessingBuilder
-
Constructor Summary
Constructors Constructor Description ProcessTemplateCmd(TemplateProcessingBuilderImpl templateProcessingBuilder)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidcheckPayloadParameters(TemplateHolder template, Map<String,Object> payload)Checks the payload to contain at least the mandatory parameter values according the template variation model.protected StringcomposeVariationKey(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 StringcomposeVariationKey(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.TemplateProcessingResultexecute(CommandContext commandContext)protected TemplateVariationDefinitionfindTemplateVariationDefinition(TemplateRepositoryService templateRepositoryService, String templateKey, String parentDeploymentId, String variationKey, String tenantId)protected ExpressionManagergetExpressionManager(VariableContainer variableContainer)protected TemplateVariationDefinitiongetTemplateVariationDefinition(TemplateEngineConfiguration templateEngineConfiguration, TemplateModel templateModel, String tenantIdToUse)TemplateProcessingResultprocessTemplate(CommandContext commandContext, TemplateHolder template, Map<String,Object> payload)-
Methods inherited from class com.flowable.template.engine.impl.cmd.AbstractNeedsTemplateDefinitionCmd
createTemplateDefinitionQuery, getTemplateDefinition
-
-
-
-
Field Detail
-
templateProcessingBuilder
protected TemplateProcessingBuilderImpl templateProcessingBuilder
-
-
Constructor Detail
-
ProcessTemplateCmd
public ProcessTemplateCmd(TemplateProcessingBuilderImpl templateProcessingBuilder)
-
-
Method Detail
-
execute
public TemplateProcessingResult execute(CommandContext commandContext)
- Specified by:
executein interfaceCommand<TemplateProcessingResult>
-
getTemplateVariationDefinition
protected TemplateVariationDefinition getTemplateVariationDefinition(TemplateEngineConfiguration templateEngineConfiguration, TemplateModel templateModel, String tenantIdToUse)
-
findTemplateVariationDefinition
protected TemplateVariationDefinition findTemplateVariationDefinition(TemplateRepositoryService templateRepositoryService, String templateKey, String parentDeploymentId, String variationKey, String tenantId)
-
composeVariationKey
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.- 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 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.- 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(CommandContext commandContext, TemplateHolder template, Map<String,Object> payload)
-
checkPayloadParameters
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.- Parameters:
template- the template information where the parameters are describedpayload- the payload with the necessary parameter values to be checked- Throws:
FlowableIllegalArgumentException- is thrown if at least one mandatory parameter is missing
-
getExpressionManager
protected ExpressionManager getExpressionManager(VariableContainer variableContainer)
-
-