private void executeNotifications(Duration timeBeforeAction, AbstractWorkItemActionType action, WorkItemType workItem, Task wfTask, OperationResult result) throws SchemaException { WorkItemOperationKindType operationKind = WfContextUtil.getOperationKind(action); WorkItemEventCauseInformationType cause = WfContextUtil.createCause(action); List<ObjectReferenceType> assigneesAndDeputies = wfTaskController.getAssigneesAndDeputies(workItem, wfTask, result); WorkItemAllocationChangeOperationInfo operationInfo = new WorkItemAllocationChangeOperationInfo(operationKind, assigneesAndDeputies, null); WorkItemOperationSourceInfo sourceInfo = new WorkItemOperationSourceInfo(null, cause, action); wfTaskController.notifyWorkItemAllocationChangeCurrentActors(workItem, operationInfo, sourceInfo, timeBeforeAction, wfTask, result); }
new WorkItemAllocationChangeOperationInfo(operationKind, assigneesAndDeputiesBefore, null); WorkItemOperationSourceInfo sourceInfo = new WorkItemOperationSourceInfo(initiator, causeInformation, null); wfTaskController.notifyWorkItemAllocationChangeCurrentActors(workItem, operationInfoBefore, sourceInfo, null, wfTask, result); List<ObjectReferenceType> assigneesAndDeputiesAfter = wfTaskController.getAssigneesAndDeputies(workItemAfter, opTask, result); WorkItemAllocationChangeOperationInfo operationInfoAfter = new WorkItemAllocationChangeOperationInfo(operationKind, assigneesAndDeputiesBefore, assigneesAndDeputiesAfter); wfTaskController.notifyWorkItemAllocationChangeNewActors(workItemAfter, operationInfoAfter, sourceInfo, wfTaskAfter, result); } catch (SecurityViolationException | RuntimeException | ObjectNotFoundException | SchemaException | CommunicationException | ConfigurationException e) {
new WorkItemAllocationChangeOperationInfo(null, Collections.emptyList(), assigneesAndDeputies); notifyWorkItemAllocationChangeNewActors(workItem, operationInfo, null, wfTask.getTask(), result); } catch (SchemaException e) { List<ObjectReferenceType> assigneesAndDeputies = getAssigneesAndDeputies(workItem, wfTask, result); WorkItemAllocationChangeOperationInfo operationInfo = new WorkItemAllocationChangeOperationInfo(operationKind, assigneesAndDeputies, null); WorkItemOperationSourceInfo sourceInfo = new WorkItemOperationSourceInfo(userRef, cause, null); if (workItem.getAssigneeRef().isEmpty()) {