Search in sources :

Example 1 with CmmnCompositeActivityBehavior

use of org.camunda.bpm.engine.impl.cmmn.behavior.CmmnCompositeActivityBehavior in project camunda-bpm-platform by camunda.

the class AbstractAtomicOperationCaseExecutionComplete method postTransitionNotification.

protected void postTransitionNotification(CmmnExecution execution) {
    if (!execution.isCaseInstanceExecution()) {
        execution.remove();
    } else {
        CmmnExecution superCaseExecution = execution.getSuperCaseExecution();
        PvmExecutionImpl superExecution = execution.getSuperExecution();
        if (superCaseExecution != null) {
            TransferVariablesActivityBehavior behavior = (TransferVariablesActivityBehavior) getActivityBehavior(superCaseExecution);
            behavior.transferVariables(execution, superCaseExecution);
            superCaseExecution.complete();
        } else if (superExecution != null) {
            SubProcessActivityBehavior behavior = (SubProcessActivityBehavior) getActivityBehavior(superExecution);
            try {
                behavior.passOutputVariables(superExecution, execution);
            } catch (RuntimeException e) {
                LOG.completingSubCaseError(execution, e);
                throw e;
            } catch (Exception e) {
                LOG.completingSubCaseError(execution, e);
                throw LOG.completingSubCaseErrorException(execution, e);
            }
            // set sub case instance to null
            superExecution.setSubCaseInstance(null);
            try {
                behavior.completed(superExecution);
            } catch (RuntimeException e) {
                LOG.completingSubCaseError(execution, e);
                throw e;
            } catch (Exception e) {
                LOG.completingSubCaseError(execution, e);
                throw LOG.completingSubCaseErrorException(execution, e);
            }
        }
        execution.setSuperCaseExecution(null);
        execution.setSuperExecution(null);
    }
    CmmnExecution parent = execution.getParent();
    if (parent != null) {
        CmmnActivityBehavior behavior = getActivityBehavior(parent);
        if (behavior instanceof CmmnCompositeActivityBehavior) {
            CmmnCompositeActivityBehavior compositeBehavior = (CmmnCompositeActivityBehavior) behavior;
            compositeBehavior.handleChildCompletion(parent, execution);
        }
    }
}
Also used : CmmnCompositeActivityBehavior(org.camunda.bpm.engine.impl.cmmn.behavior.CmmnCompositeActivityBehavior) TransferVariablesActivityBehavior(org.camunda.bpm.engine.impl.cmmn.behavior.TransferVariablesActivityBehavior) CmmnActivityBehavior(org.camunda.bpm.engine.impl.cmmn.behavior.CmmnActivityBehavior) PvmExecutionImpl(org.camunda.bpm.engine.impl.pvm.runtime.PvmExecutionImpl) CmmnExecution(org.camunda.bpm.engine.impl.cmmn.execution.CmmnExecution) SubProcessActivityBehavior(org.camunda.bpm.engine.impl.pvm.delegate.SubProcessActivityBehavior)

Example 2 with CmmnCompositeActivityBehavior

use of org.camunda.bpm.engine.impl.cmmn.behavior.CmmnCompositeActivityBehavior in project camunda-bpm-platform by camunda.

the class AbstractAtomicOperationCaseExecutionTerminate method notifyParent.

protected void notifyParent(CmmnExecution parent, CmmnExecution execution) {
    CmmnActivityBehavior behavior = getActivityBehavior(parent);
    if (behavior instanceof CmmnCompositeActivityBehavior) {
        CmmnCompositeActivityBehavior compositeBehavior = (CmmnCompositeActivityBehavior) behavior;
        compositeBehavior.handleChildTermination(parent, execution);
    }
}
Also used : CmmnCompositeActivityBehavior(org.camunda.bpm.engine.impl.cmmn.behavior.CmmnCompositeActivityBehavior) CmmnActivityBehavior(org.camunda.bpm.engine.impl.cmmn.behavior.CmmnActivityBehavior)

Example 3 with CmmnCompositeActivityBehavior

use of org.camunda.bpm.engine.impl.cmmn.behavior.CmmnCompositeActivityBehavior in project camunda-bpm-platform by camunda.

the class AtomicOperationCaseExecutionDisable method preTransitionNotification.

protected void preTransitionNotification(CmmnExecution execution) {
    CmmnExecution parent = execution.getParent();
    if (parent != null) {
        CmmnActivityBehavior behavior = getActivityBehavior(parent);
        if (behavior instanceof CmmnCompositeActivityBehavior) {
            CmmnCompositeActivityBehavior compositeBehavior = (CmmnCompositeActivityBehavior) behavior;
            compositeBehavior.handleChildDisabled(parent, execution);
        }
    }
}
Also used : CmmnCompositeActivityBehavior(org.camunda.bpm.engine.impl.cmmn.behavior.CmmnCompositeActivityBehavior) CmmnActivityBehavior(org.camunda.bpm.engine.impl.cmmn.behavior.CmmnActivityBehavior) CmmnExecution(org.camunda.bpm.engine.impl.cmmn.execution.CmmnExecution)

Example 4 with CmmnCompositeActivityBehavior

use of org.camunda.bpm.engine.impl.cmmn.behavior.CmmnCompositeActivityBehavior in project camunda-bpm-platform by camunda.

the class AbstractAtomicOperationCaseExecutionSuspend method notifyParent.

protected void notifyParent(CmmnExecution parent, CmmnExecution execution) {
    CmmnActivityBehavior behavior = getActivityBehavior(parent);
    if (behavior instanceof CmmnCompositeActivityBehavior) {
        CmmnCompositeActivityBehavior compositeBehavior = (CmmnCompositeActivityBehavior) behavior;
        compositeBehavior.handleChildSuspension(parent, execution);
    }
}
Also used : CmmnCompositeActivityBehavior(org.camunda.bpm.engine.impl.cmmn.behavior.CmmnCompositeActivityBehavior) CmmnActivityBehavior(org.camunda.bpm.engine.impl.cmmn.behavior.CmmnActivityBehavior)

Aggregations

CmmnActivityBehavior (org.camunda.bpm.engine.impl.cmmn.behavior.CmmnActivityBehavior)4 CmmnCompositeActivityBehavior (org.camunda.bpm.engine.impl.cmmn.behavior.CmmnCompositeActivityBehavior)4 CmmnExecution (org.camunda.bpm.engine.impl.cmmn.execution.CmmnExecution)2 TransferVariablesActivityBehavior (org.camunda.bpm.engine.impl.cmmn.behavior.TransferVariablesActivityBehavior)1 SubProcessActivityBehavior (org.camunda.bpm.engine.impl.pvm.delegate.SubProcessActivityBehavior)1 PvmExecutionImpl (org.camunda.bpm.engine.impl.pvm.runtime.PvmExecutionImpl)1