@Override public void detachState() { variable.getExecution().removeVariableInternal(variable); }
evt.setUserOperationId(Context.getCommandContext().getOperationId()); ExecutionEntity execution = variableInstance.getExecution(); if (execution != null) { ProcessDefinitionEntity definition = execution.getProcessDefinition();
@Override public void detachState() { variable.getExecution().removeVariableInternal(variable); }
evt.setUserOperationId(Context.getCommandContext().getOperationId()); ExecutionEntity execution = variableInstance.getExecution(); if (execution != null) { ProcessDefinitionEntity definition = execution.getProcessDefinition();
protected VariableScope getVariableScope() { if (taskId != null) { return getTask(); } else if (executionId != null) { return getExecution(); } else if (caseExecutionId != null) { return getCaseExecution(); } else { return null; } }
evt.setUserOperationId(Context.getCommandContext().getOperationId()); ExecutionEntity execution = variableInstance.getExecution(); if (execution != null) { ProcessDefinitionEntity definition = execution.getProcessDefinition();
protected VariableScope getVariableScope() { if (taskId != null) { return getTask(); } else if (executionId != null) { return getExecution(); } else if (caseExecutionId != null) { return getCaseExecution(); } else { return null; } }
protected ProcessApplicationReference getContextProcessApplication() { if (taskId != null) { return ProcessApplicationContextUtil.getTargetProcessApplication(getTask()); } else if (executionId != null) { return ProcessApplicationContextUtil.getTargetProcessApplication(getExecution()); } else if (caseExecutionId != null) { return ProcessApplicationContextUtil.getTargetProcessApplication(getCaseExecution()); } else { return null; } }
protected ProcessApplicationReference getContextProcessApplication() { if (taskId != null) { return ProcessApplicationContextUtil.getTargetProcessApplication(getTask()); } else if (executionId != null) { return ProcessApplicationContextUtil.getTargetProcessApplication(getExecution()); } else if (caseExecutionId != null) { return ProcessApplicationContextUtil.getTargetProcessApplication(getCaseExecution()); } else { return null; } }
@Override public void onImplicitValueUpdate(final TypedValue updatedValue) { // note: this implementation relies on the // behavior that the variable scope // of variable value can never become null ProcessApplicationReference targetProcessApplication = getContextProcessApplication(); if (targetProcessApplication != null) { Context.executeWithinProcessApplication(new Callable<Void>() { @Override public Void call() throws Exception { getVariableScope().setVariableLocal(name, updatedValue); return null; } }, targetProcessApplication, new InvocationContext(getExecution())); } else { if (!isTransient) { getVariableScope().setVariableLocal(name, updatedValue); } } }
@Override public void onImplicitValueUpdate(final TypedValue updatedValue) { // note: this implementation relies on the // behavior that the variable scope // of variable value can never become null ProcessApplicationReference targetProcessApplication = getContextProcessApplication(); if (targetProcessApplication != null) { Context.executeWithinProcessApplication(new Callable<Void>() { @Override public Void call() throws Exception { getVariableScope().setVariableLocal(name, updatedValue); return null; } }, targetProcessApplication, new InvocationContext(getExecution())); } else { if (!isTransient) { getVariableScope().setVariableLocal(name, updatedValue); } } }
@Override public void handle(MigratingInstanceParseContext parseContext, MigratingProcessElementInstance owningInstance, List<VariableInstanceEntity> variables) { ExecutionEntity representativeExecution = owningInstance.resolveRepresentativeExecution(); for (VariableInstanceEntity variable : variables) { parseContext.consume(variable); boolean isConcurrentLocalInParentScope = (variable.getExecution() == representativeExecution.getParent() && variable.isConcurrentLocal()) || representativeExecution.isConcurrent(); owningInstance.addMigratingDependentInstance(new MigratingVariableInstance(variable, isConcurrentLocalInParentScope)); } } }
@Override public void handle(MigratingInstanceParseContext parseContext, MigratingProcessElementInstance owningInstance, List<VariableInstanceEntity> variables) { ExecutionEntity representativeExecution = owningInstance.resolveRepresentativeExecution(); for (VariableInstanceEntity variable : variables) { parseContext.consume(variable); boolean isConcurrentLocalInParentScope = (variable.getExecution() == representativeExecution.getParent() && variable.isConcurrentLocal()) || representativeExecution.isConcurrent(); owningInstance.addMigratingDependentInstance(new MigratingVariableInstance(variable, isConcurrentLocalInParentScope)); } } }
@Override public void detachState() { variable.getExecution().removeVariableInternal(variable); }
protected VariableScope getVariableScope() { if (taskId != null) { return getTask(); } else if (executionId != null) { return getExecution(); } else if (caseExecutionId != null) { return getCaseExecution(); } else { return null; } }
protected ProcessApplicationReference getContextProcessApplication() { if (taskId != null) { return ProcessApplicationContextUtil.getTargetProcessApplication(getTask()); } else if (executionId != null) { return ProcessApplicationContextUtil.getTargetProcessApplication(getExecution()); } else if (caseExecutionId != null) { return ProcessApplicationContextUtil.getTargetProcessApplication(getCaseExecution()); } else { return null; } }
@Override public void onImplicitValueUpdate(final TypedValue updatedValue) { // note: this implementation relies on the // behavior that the variable scope // of variable value can never become null ProcessApplicationReference targetProcessApplication = getContextProcessApplication(); if (targetProcessApplication != null) { Context.executeWithinProcessApplication(new Callable<Void>() { @Override public Void call() throws Exception { getVariableScope().setVariableLocal(name, updatedValue); return null; } }, targetProcessApplication, new InvocationContext(getExecution())); } else { if (!isTransient) { getVariableScope().setVariableLocal(name, updatedValue); } } }
@Override public void handle(MigratingInstanceParseContext parseContext, MigratingProcessElementInstance owningInstance, List<VariableInstanceEntity> variables) { ExecutionEntity representativeExecution = owningInstance.resolveRepresentativeExecution(); for (VariableInstanceEntity variable : variables) { parseContext.consume(variable); boolean isConcurrentLocalInParentScope = (variable.getExecution() == representativeExecution.getParent() && variable.isConcurrentLocal()) || representativeExecution.isConcurrent(); owningInstance.addMigratingDependentInstance(new MigratingVariableInstance(variable, isConcurrentLocalInParentScope)); } } }