use of com.liferay.ide.kaleo.core.op.NewTaskNode.INewTaskNotification in project liferay-ide by liferay.
the class TaskNodeAddActionHandler method postDiagramNodePartAdded.
@Override
public void postDiagramNodePartAdded(NewNodeOp op, CanTransition newNodeFromWizard, CanTransition newNode) {
Task newTask = newNode.nearest(Task.class);
NewTaskNode newTaskFromWizard = newNodeFromWizard.nearest(NewTaskNode.class);
KaleoModelUtil.changeTaskAssignments(newTask, op.nearest(AssignableOp.class));
for (Action taskAction : newTaskFromWizard.getTaskActions()) {
ElementList<Action> action = newTask.getTaskActions();
Action insertAction = action.insert();
insertAction.copy(taskAction);
}
for (INewTaskNotification taskNotification : newTaskFromWizard.getNewTaskNotifications()) {
ActionNotification newTaskNotification = newTask.getTaskNotifications().insert();
newTaskNotification.setName(taskNotification.getName().content());
newTaskNotification.setExecutionType(taskNotification.getExecutionType().content());
newTaskNotification.setTemplateLanguage(taskNotification.getTemplateLanguage().content());
}
}
Aggregations