Search in sources :

Example 1 with SetTaskVariablesCmd

use of org.activiti.engine.impl.cmd.SetTaskVariablesCmd in project Activiti by Activiti.

the class TaskServiceImpl method setVariable.

public void setVariable(String taskId, String variableName, Object value) {
    if (variableName == null) {
        throw new ActivitiIllegalArgumentException("variableName is null");
    }
    Map<String, Object> variables = new HashMap<String, Object>();
    variables.put(variableName, value);
    commandExecutor.execute(new SetTaskVariablesCmd(taskId, variables, false));
}
Also used : SetTaskVariablesCmd(org.activiti.engine.impl.cmd.SetTaskVariablesCmd) HashMap(java.util.HashMap) ActivitiIllegalArgumentException(org.activiti.engine.ActivitiIllegalArgumentException)

Example 2 with SetTaskVariablesCmd

use of org.activiti.engine.impl.cmd.SetTaskVariablesCmd in project Activiti by Activiti.

the class TaskServiceImpl method setVariableLocal.

public void setVariableLocal(String taskId, String variableName, Object value) {
    if (variableName == null) {
        throw new ActivitiIllegalArgumentException("variableName is null");
    }
    Map<String, Object> variables = new HashMap<String, Object>();
    variables.put(variableName, value);
    commandExecutor.execute(new SetTaskVariablesCmd(taskId, variables, true));
}
Also used : SetTaskVariablesCmd(org.activiti.engine.impl.cmd.SetTaskVariablesCmd) HashMap(java.util.HashMap) ActivitiIllegalArgumentException(org.activiti.engine.ActivitiIllegalArgumentException)

Aggregations

HashMap (java.util.HashMap)2 ActivitiIllegalArgumentException (org.activiti.engine.ActivitiIllegalArgumentException)2 SetTaskVariablesCmd (org.activiti.engine.impl.cmd.SetTaskVariablesCmd)2