Search in sources :

Example 1 with PvmScope

use of org.activiti.engine.impl.pvm.PvmScope in project Activiti by Activiti.

the class AbstractBpmnActivityBehavior method createCompensateEventSubscription.

protected void createCompensateEventSubscription(ActivityExecution execution) {
    String compensationHandlerId = (String) execution.getActivity().getProperty(BpmnParse.PROPERTYNAME_COMPENSATION_HANDLER_ID);
    ExecutionEntity executionEntity = (ExecutionEntity) execution;
    ActivityImpl compensationHandlder = executionEntity.getProcessDefinition().findActivity(compensationHandlerId);
    PvmScope scopeActivitiy = compensationHandlder.getParent();
    ExecutionEntity scopeExecution = ScopeUtil.findScopeExecutionForScope(executionEntity, scopeActivitiy);
    CompensateEventSubscriptionEntity compensateEventSubscriptionEntity = CompensateEventSubscriptionEntity.createAndInsert(scopeExecution);
    compensateEventSubscriptionEntity.setActivity(compensationHandlder);
}
Also used : PvmScope(org.activiti.engine.impl.pvm.PvmScope) ExecutionEntity(org.activiti.engine.impl.persistence.entity.ExecutionEntity) ActivityImpl(org.activiti.engine.impl.pvm.process.ActivityImpl) CompensateEventSubscriptionEntity(org.activiti.engine.impl.persistence.entity.CompensateEventSubscriptionEntity)

Aggregations

CompensateEventSubscriptionEntity (org.activiti.engine.impl.persistence.entity.CompensateEventSubscriptionEntity)1 ExecutionEntity (org.activiti.engine.impl.persistence.entity.ExecutionEntity)1 PvmScope (org.activiti.engine.impl.pvm.PvmScope)1 ActivityImpl (org.activiti.engine.impl.pvm.process.ActivityImpl)1