public interface TemplateService
TemplateDefinition.
The management of template definitions is done through the TemplateRepositoryService.| Modifier and Type | Method and Description |
|---|---|
default TemplateProcessingResult |
processTemplate(String templateKey,
Map<String,Object> variant,
Map<String,Object> payload)
Processes a template referenced through its key and variant data which is then looked up within the repository and represented by a
TemplateVariationModel. |
TemplateProcessingResult |
processTemplate(String templateKey,
String tenantId,
Map<String,Object> variant,
Map<String,Object> payload) |
default TemplateProcessingResult |
processTemplate(String templateKey,
org.flowable.common.engine.api.variable.VariableContainer variableContainer) |
TemplateProcessingResult |
processTemplate(String templateKey,
org.flowable.common.engine.api.variable.VariableContainer variableContainer,
Map<String,Object> payload)
Simplified method to render a template based on a
VariableContainer instance such as a process or case instance. |
default TemplateProcessingResult processTemplate(String templateKey, Map<String,Object> variant, Map<String,Object> payload)
TemplateVariationModel. The payload is used for the placeholders within the template content and must
be valid according the TemplateVariationModel.getParameters() definition.
DON'T USE THIS METHOD in a multi-tenant environment, use processTemplate(String, String, Map, Map) instead to provide the tenant-id.templateKey - the key of the template to processvariant - the variant of the template needed (according the variation definitions
TemplateModel.getVariationDefinitions()), might be null or empty if the template only has
one single variation)payload - the optional payload, if the template is using placeholders to render properly (must be valid according the parameter definition)TemplateProcessingResult processTemplate(String templateKey, String tenantId, Map<String,Object> variant, Map<String,Object> payload)
default TemplateProcessingResult processTemplate(String templateKey, org.flowable.common.engine.api.variable.VariableContainer variableContainer)
TemplateProcessingResult processTemplate(String templateKey, org.flowable.common.engine.api.variable.VariableContainer variableContainer, Map<String,Object> payload)
VariableContainer instance such as a process or case instance.
The variable container is used to
- determine the tenantId
- determine the variant variables
- used as payload to render the templatetemplateKey - the key of the template to processvariableContainer - an instance that has variables such as a task, process or case instance.Copyright © 2019. All rights reserved.