Java Code Examples for org.camunda.bpm.engine.impl.persistence.entity.ExecutionEntity#isEventScope()

The following examples show how to use org.camunda.bpm.engine.impl.persistence.entity.ExecutionEntity#isEventScope() . 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: CompensationInstanceHandler.java    From camunda-bpm-platform with Apache License 2.0 6 votes vote down vote up
@Override
public void handle(MigratingInstanceParseContext parseContext, EventSubscriptionEntity element) {

  MigratingProcessElementInstance migratingInstance;
  if (element.getConfiguration() != null) {
    migratingInstance = createMigratingEventScopeInstance(parseContext, element);
  }
  else {
    migratingInstance = createMigratingEventSubscriptionInstance(parseContext, element);
  }


  ExecutionEntity owningExecution = element.getExecution();
  MigratingScopeInstance parentInstance = null;
  if (owningExecution.isEventScope()) {
    parentInstance = parseContext.getMigratingCompensationInstanceByExecutionId(owningExecution.getId());
  }
  else {
    parentInstance = parseContext.getMigratingActivityInstanceById(owningExecution.getParentActivityInstanceId());
  }
  migratingInstance.setParent(parentInstance);
}
 
Example 2
Source File: ActivityExecutionTreeMapping.java    From camunda-bpm-platform with Apache License 2.0 5 votes vote down vote up
/**
 * event-scope executions are not considered in this mapping and must be ignored
 */
protected boolean isLeaf(ExecutionEntity execution) {
  if (CompensationBehavior.isCompensationThrowing(execution)) {
    return true;
  }
  else {
    return !execution.isEventScope() && execution.getNonEventScopeExecutions().isEmpty();
  }
}
 
Example 3
Source File: GetActivityInstanceCmd.java    From camunda-bpm-platform with Apache License 2.0 5 votes vote down vote up
protected List<ExecutionEntity> filterNonEventScopeExecutions(List<ExecutionEntity> executionList) {
  List<ExecutionEntity> nonEventScopeExecutions = new ArrayList<ExecutionEntity>();
  for (ExecutionEntity execution : executionList) {
    if (!execution.isEventScope()) {
      nonEventScopeExecutions.add(execution);
    }
  }
  return nonEventScopeExecutions;
}