Search in sources :

Example 1 with StageClosingResult

use of com.evolveum.midpoint.cases.api.extensions.StageClosingResult in project midpoint by Evolveum.

the class CloseStageAction method executeInternal.

@Override
@Nullable
public Action executeInternal(OperationResult result) {
    StageClosingResult closingInformation;
    if (autoClosingInformation != null) {
        recordAutoCompletionToCaseHistory();
        closingInformation = autoClosingInformation;
    } else {
        closingInformation = getEngineExtension().processStageClosing(operation, result);
    }
    beans.triggerHelper.removeAllStageTriggersForWorkItem(getCurrentCase());
    if (closingInformation.shouldCaseProcessingContinue() && operation.getCurrentStageNumber() < operation.getExpectedNumberOfStages()) {
        return new OpenStageAction(operation);
    } else {
        // Result of the last stage is the result of the whole case
        return new CloseCaseAction(operation, closingInformation.getStageOutcomeUri());
    }
}
Also used : StageClosingResult(com.evolveum.midpoint.cases.api.extensions.StageClosingResult) Nullable(org.jetbrains.annotations.Nullable)

Aggregations

StageClosingResult (com.evolveum.midpoint.cases.api.extensions.StageClosingResult)1 Nullable (org.jetbrains.annotations.Nullable)1