Search in sources :

Example 1 with PvmAtomicOperation

use of org.camunda.bpm.engine.impl.pvm.runtime.operation.PvmAtomicOperation in project camunda-bpm-platform by camunda.

the class AsyncContinuationJobHandler method execute.

@Override
public void execute(AsyncContinuationConfiguration configuration, ExecutionEntity execution, CommandContext commandContext, String tenantId) {
    LegacyBehavior.repairMultiInstanceAsyncJob(execution);
    PvmAtomicOperation atomicOperation = findMatchingAtomicOperation(configuration.getAtomicOperation());
    ensureNotNull("Cannot process job with configuration " + configuration, "atomicOperation", atomicOperation);
    // reset transition id.
    String transitionId = configuration.getTransitionId();
    if (transitionId != null) {
        PvmActivity activity = execution.getActivity();
        TransitionImpl transition = (TransitionImpl) activity.findOutgoingTransition(transitionId);
        execution.setTransition(transition);
    }
    Context.getCommandInvocationContext().performOperation(atomicOperation, execution);
}
Also used : TransitionImpl(org.camunda.bpm.engine.impl.pvm.process.TransitionImpl) PvmAtomicOperation(org.camunda.bpm.engine.impl.pvm.runtime.operation.PvmAtomicOperation) PvmActivity(org.camunda.bpm.engine.impl.pvm.PvmActivity)

Aggregations

PvmActivity (org.camunda.bpm.engine.impl.pvm.PvmActivity)1 TransitionImpl (org.camunda.bpm.engine.impl.pvm.process.TransitionImpl)1 PvmAtomicOperation (org.camunda.bpm.engine.impl.pvm.runtime.operation.PvmAtomicOperation)1