public class ProcessVariableHandlingService extends BaseVariableHandlingService
This class is a utility service for initializing / setting variables within a process through a service task.
allowVariableReferencesInInitVariableTask
Constructor and Description |
---|
ProcessVariableHandlingService(boolean propagateError) |
Modifier and Type | Method and Description |
---|---|
void |
expandReferencedVariables(org.flowable.engine.delegate.DelegateExecution execution,
String... variableNames)
Use this method to expand variables with a referenced work item id.
|
void |
initQueryListVariablesFromProperties(org.flowable.engine.delegate.DelegateExecution execution)
Use this method to initialize variables on a result list of work objects given by a query string and variable properties.
|
void |
initVariables(org.flowable.engine.delegate.DelegateExecution execution,
Object... variableNamesAndValues)
Use this method to initialize variables, if they have not yet been set on the process scope.
|
void |
initVariablesFromProperties(org.flowable.engine.delegate.DelegateExecution execution)
Use this method to initialize variables through the specific init Variable service task.
|
void |
setVariables(org.flowable.engine.delegate.DelegateExecution execution,
Object... variableNamesAndValues)
Use this method to set variables, even if they have been set on the process scope already, they will be overwritten.
|
extractDate, extractPriority, extractSet, handleVariableInitialization
setApplicationContext
public ProcessVariableHandlingService(boolean propagateError)
public void initVariablesFromProperties(org.flowable.engine.delegate.DelegateExecution execution)
Use this method to initialize variables through the specific init Variable service task. It assumes the configuration to be part of the service task definition requested through the execution provided. Both variable names and values might be EL expressions and if so, will be evaluated before initializing the variable
execution
- the activity execution contextpublic void initQueryListVariablesFromProperties(org.flowable.engine.delegate.DelegateExecution execution)
Use this method to initialize variables on a result list of work objects given by a query string and variable properties. This method is similar to #initVariablesFromProperties, however, instead of the current process instance context, the work objects to apply the variables to, are taken from executing a query.
execution
- the activity execution contextpublic void initVariables(org.flowable.engine.delegate.DelegateExecution execution, Object... variableNamesAndValues)
Use this method to initialize variables, if they have not yet been set on the process scope. Use the following expression within a service task in the process: ` #{processVariables.initVariables(execution,"variableName1","fixedVariable1Value","variableName1",owner.id.value)} `
execution
- the activity execution contextvariableNamesAndValues
- the variable names and values.public void setVariables(org.flowable.engine.delegate.DelegateExecution execution, Object... variableNamesAndValues)
Use this method to set variables, even if they have been set on the process scope already, they will be overwritten. Use the following expression within a service task in the process: ` #{processVariables.setVariables(execution,"variableName1","fixedVariable1Value","variableName1",owner.id.value)} `
execution
- the activity execution contextvariableNamesAndValues
- the variable names and values.public void expandReferencedVariables(org.flowable.engine.delegate.DelegateExecution execution, String... variableNames)
Use this method to expand variables with a referenced work item id. Use the following expression within a service task in the process: ` #{processVariables.expandReferencedVariables(execution,"workItemRefId1","targetVariableName1","propertyNameOnRef1","workItemRefId2","targetVariableName2", "propertyNameOnRef2")} `
execution
- the activity execution contextvariableNames
- the variable names.Copyright © 2010 - 2019 edorasware ag. All Rights Reserved.