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());
}
}
Aggregations