use of com.evolveum.midpoint.cases.api.events.FutureNotificationEvent.CaseOpening in project midpoint by Evolveum.
the class OpenCaseAction method executeInternal.
@Override
@Nullable
public Action executeInternal(OperationResult result) {
CaseType currentCase = operation.getCurrentCase();
CaseState currentState = CaseState.of(currentCase);
if (!currentState.isCreated()) {
LOGGER.debug("Case was already opened; its state is {}", currentState);
return null;
}
auditRecords.addCaseOpening(result);
notificationEvents.add(new CaseOpening(currentCase));
currentCase.setState(SchemaConstants.CASE_STATE_OPEN);
// If there are zero stages, the case will be immediately closed by "open stage" action.
return new OpenStageAction(operation);
}
Aggregations