Search in sources :

Example 1 with INewTaskNotification

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());
    }
}
Also used : AssignableOp(com.liferay.ide.kaleo.core.op.AssignableOp) Task(com.liferay.ide.kaleo.core.model.Task) Action(com.liferay.ide.kaleo.core.model.Action) INewTaskNotification(com.liferay.ide.kaleo.core.op.NewTaskNode.INewTaskNotification) NewTaskNode(com.liferay.ide.kaleo.core.op.NewTaskNode) ActionNotification(com.liferay.ide.kaleo.core.model.ActionNotification)

Aggregations

Action (com.liferay.ide.kaleo.core.model.Action)1 ActionNotification (com.liferay.ide.kaleo.core.model.ActionNotification)1 Task (com.liferay.ide.kaleo.core.model.Task)1 AssignableOp (com.liferay.ide.kaleo.core.op.AssignableOp)1 NewTaskNode (com.liferay.ide.kaleo.core.op.NewTaskNode)1 INewTaskNotification (com.liferay.ide.kaleo.core.op.NewTaskNode.INewTaskNotification)1