@Override public void onWorkItemCustomEvent(ObjectReferenceType assignee, @NotNull WorkItemType workItem, @NotNull WorkItemNotificationActionType notificationAction, WorkItemEventCauseInformationType cause, Task wfTask, OperationResult result) { WorkItemEvent event = new WorkItemCustomEvent(identifierGenerator, ChangeType.ADD, workItem, SimpleObjectRefImpl.create(functions, assignee), new WorkItemOperationSourceInfo(null, cause, notificationAction), wfTask.getWorkflowContext(), wfTask.getTaskType(), notificationAction.getHandler()); initializeWorkflowEvent(event, wfTask); processEvent(event, result); }
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); }
WorkItemAllocationChangeOperationInfo operationInfoBefore = new WorkItemAllocationChangeOperationInfo(operationKind, assigneesAndDeputiesBefore, null); WorkItemOperationSourceInfo sourceInfo = new WorkItemOperationSourceInfo(initiator, causeInformation, null); wfTaskController.notifyWorkItemAllocationChangeCurrentActors(workItem, operationInfoBefore, sourceInfo, null, wfTask, result);
WorkItemAllocationChangeOperationInfo operationInfo = new WorkItemAllocationChangeOperationInfo(operationKind, assigneesAndDeputies, null); WorkItemOperationSourceInfo sourceInfo = new WorkItemOperationSourceInfo(userRef, cause, null); if (workItem.getAssigneeRef().isEmpty()) { notifyWorkItemDeleted(null, workItem, operationInfo, sourceInfo, wfTask, result);