use of org.camunda.bpm.engine.impl.persistence.entity.ExecutionEntity in project camunda-bpm-platform by camunda.
the class ProcessScope method persistVariable.
private void persistVariable(String variableName, Object scopedObject) {
ProcessInstance processInstance = Context.getExecutionContext().getProcessInstance();
ExecutionEntity executionEntity = (ExecutionEntity) processInstance;
Assert.isTrue(scopedObject instanceof Serializable, "the scopedObject is not " + Serializable.class.getName() + "!");
executionEntity.setVariable(variableName, scopedObject);
}
use of org.camunda.bpm.engine.impl.persistence.entity.ExecutionEntity in project camunda-bpm-platform by camunda.
the class CallActivityBehavior method onParseMigratingInstance.
@Override
public void onParseMigratingInstance(MigratingInstanceParseContext parseContext, MigratingActivityInstance migratingInstance) {
ActivityImpl callActivity = (ActivityImpl) migratingInstance.getSourceScope();
// must be maintained throughout migration
if (!callActivity.isScope()) {
ExecutionEntity callActivityExecution = migratingInstance.resolveRepresentativeExecution();
ExecutionEntity calledProcessInstance = callActivityExecution.getSubProcessInstance();
migratingInstance.addMigratingDependentInstance(new MigratingCalledProcessInstance(calledProcessInstance));
}
}
use of org.camunda.bpm.engine.impl.persistence.entity.ExecutionEntity in project camunda-bpm-platform by camunda.
the class CaseCallActivityBehavior method onParseMigratingInstance.
@Override
public void onParseMigratingInstance(MigratingInstanceParseContext parseContext, MigratingActivityInstance migratingInstance) {
ActivityImpl callActivity = (ActivityImpl) migratingInstance.getSourceScope();
// must be maintained throughout migration
if (!callActivity.isScope()) {
ExecutionEntity callActivityExecution = migratingInstance.resolveRepresentativeExecution();
CaseExecutionEntity calledCaseInstance = callActivityExecution.getSubCaseInstance();
migratingInstance.addMigratingDependentInstance(new MigratingCalledCaseInstance(calledCaseInstance));
}
}
use of org.camunda.bpm.engine.impl.persistence.entity.ExecutionEntity in project camunda-bpm-platform by camunda.
the class ActivityExecutionTreeMapping method fetchExecutionsForProcessInstance.
protected List<ExecutionEntity> fetchExecutionsForProcessInstance(ExecutionEntity execution) {
List<ExecutionEntity> executions = new ArrayList<ExecutionEntity>();
executions.addAll(execution.getExecutions());
for (ExecutionEntity child : execution.getExecutions()) {
executions.addAll(fetchExecutionsForProcessInstance(child));
}
return executions;
}
use of org.camunda.bpm.engine.impl.persistence.entity.ExecutionEntity in project camunda-bpm-platform by camunda.
the class ActivityExecutionTreeMapping method assignExecutionsToActivities.
protected void assignExecutionsToActivities(List<ExecutionEntity> leaves) {
for (ExecutionEntity leaf : leaves) {
ScopeImpl activity = leaf.getActivity();
if (activity != null) {
if (leaf.getActivityInstanceId() != null) {
EnsureUtil.ensureNotNull("activity", activity);
submitExecution(leaf, activity);
}
mergeScopeExecutions(leaf);
} else if (leaf.isProcessInstanceExecution()) {
submitExecution(leaf, leaf.getProcessDefinition());
}
}
}
Aggregations