Java Code Examples for org.activiti.engine.impl.persistence.entity.ExecutionEntity#getVariableLocal()
The following examples show how to use
org.activiti.engine.impl.persistence.entity.ExecutionEntity#getVariableLocal() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: GetExecutionVariableCmd.java From activiti6-boot2 with Apache License 2.0 | 5 votes |
public Object execute(CommandContext commandContext) { if (executionId == null) { throw new ActivitiIllegalArgumentException("executionId is null"); } if (variableName == null) { throw new ActivitiIllegalArgumentException("variableName is null"); } ExecutionEntity execution = commandContext.getExecutionEntityManager().findById(executionId); if (execution == null) { throw new ActivitiObjectNotFoundException("execution " + executionId + " doesn't exist", Execution.class); } if (Activiti5Util.isActiviti5ProcessDefinitionId(commandContext, execution.getProcessDefinitionId())) { Activiti5CompatibilityHandler activiti5CompatibilityHandler = Activiti5Util.getActiviti5CompatibilityHandler(); return activiti5CompatibilityHandler.getExecutionVariable(executionId, variableName, isLocal); } Object value; if (isLocal) { value = execution.getVariableLocal(variableName, false); } else { value = execution.getVariable(variableName, false); } return value; }
Example 2
Source File: GetExecutionVariableCmd.java From flowable-engine with Apache License 2.0 | 5 votes |
@Override public Object execute(CommandContext commandContext) { if (executionId == null) { throw new ActivitiIllegalArgumentException("executionId is null"); } if (variableName == null) { throw new ActivitiIllegalArgumentException("variableName is null"); } ExecutionEntity execution = commandContext .getExecutionEntityManager() .findExecutionById(executionId); if (execution == null) { throw new ActivitiObjectNotFoundException("execution " + executionId + " doesn't exist", Execution.class); } Object value; if (isLocal) { value = execution.getVariableLocal(variableName, false); } else { value = execution.getVariable(variableName, false); } return value; }
Example 3
Source File: CounterSignCmd.java From lemon with Apache License 2.0 | 5 votes |
/** * <li>移除一条并行实例 */ private void removeParallelInstance() { List<ExecutionEntity> executions = getActivieExecutions(); for (ExecutionEntity executionEntity : executions) { String executionVariableAssignee = (String) executionEntity .getVariableLocal(collectionElementVariableName); if ((executionVariableAssignee != null) && executionVariableAssignee.equals(assignee)) { executionEntity.remove(); ExecutionEntity parentConcurrentExecution = executionEntity .getParent(); if (getActivity().getProperty("type").equals("subProcess")) { parentConcurrentExecution = parentConcurrentExecution .getParent(); } setLoopVariable(parentConcurrentExecution, "nrOfInstances", (Integer) parentConcurrentExecution .getVariableLocal("nrOfInstances") - 1); setLoopVariable(parentConcurrentExecution, "nrOfActiveInstances", (Integer) parentConcurrentExecution .getVariableLocal("nrOfActiveInstances") - 1); break; } } }