Class VariableService

java.lang.Object
com.eurodyn.qlack.fuse.workflow.service.VariableService

@Service @Transactional public class VariableService extends Object
This service provides methods related to the task/process variables of Activiti.
Author:
European Dynamics
  • Constructor Details

    • VariableService

      @Autowired public VariableService(org.activiti.engine.RuntimeService runtimeService)
  • Method Details

    • getVariableInstance

      public Object getVariableInstance(String processInstanceId, String variableKey)
      Given the id of the process instance and the key of the variable, it returns the value of the variable. If the process instance is not found, then an exception is thrown. If the process instance does not have variable with the requested key, a null object is returned.
      Parameters:
      processInstanceId - the id of the process instance
      variableKey - the key of the variable
      Returns:
      the value of the variable
    • setVariableInstance

      public void setVariableInstance(String processInstanceId, String variableKey, Object variableValue)
      Given the id of the process instance, it updates the value of the variable based on the provided key and value. If the process instance is not found, then an exception is thrown. If the process instance does not have variable with the requested key, nothing happens.
      Parameters:
      processInstanceId - the id of the process instance
      variableKey - the key of the variable
      variableValue - the value of the variable