Search in sources :

Example 1 with TaskAction

use of cern.modesti.workflow.task.TaskAction in project modesti by jlsalmon.

the class CoreWorkflowServiceTest method claimCurrentTask.

/**
 * @param requestId
 * @param taskName
 * @param user
 */
private void claimCurrentTask(String requestId, String taskName, User user) {
    TaskInfo task = taskService.getTask(requestId, taskName);
    taskService.execute(requestId, task.getName(), new TaskAction(ASSIGN, user.getUsername()), user);
}
Also used : TaskInfo(cern.modesti.workflow.task.TaskInfo) TaskAction(cern.modesti.workflow.task.TaskAction)

Example 2 with TaskAction

use of cern.modesti.workflow.task.TaskAction in project modesti by jlsalmon.

the class CoreWorkflowServiceTest method completeCurrentTask.

/**
 * @param requestId
 * @param taskName
 * @param user
 */
private void completeCurrentTask(String requestId, String taskName, User user) {
    TaskInfo task = taskService.getTask(requestId, taskName);
    taskService.execute(requestId, task.getName(), new TaskAction(COMPLETE, user.getUsername()), user);
}
Also used : TaskInfo(cern.modesti.workflow.task.TaskInfo) TaskAction(cern.modesti.workflow.task.TaskAction)

Example 3 with TaskAction

use of cern.modesti.workflow.task.TaskAction in project modesti by jlsalmon.

the class BaseIntegrationTest method doAction.

public void doAction(String requestId, TaskInfo task, TaskAction.Action action) {
    assertNotNull(task);
    User user = userService.getCurrentUser();
    taskService.execute(requestId, task.getName(), new TaskAction(action, user.getUsername()), user);
}
Also used : User(cern.modesti.user.User) TaskAction(cern.modesti.workflow.task.TaskAction)

Example 4 with TaskAction

use of cern.modesti.workflow.task.TaskAction in project modesti by jlsalmon.

the class BaseIntegrationTest method doAction.

public void doAction(String requestId, TaskInfo task, TaskAction.Action action) {
    assertNotNull(task);
    User user = userService.getCurrentUser();
    taskService.execute(requestId, task.getName(), new TaskAction(action, user.getUsername()), user);
}
Also used : User(cern.modesti.user.User) TaskAction(cern.modesti.workflow.task.TaskAction)

Aggregations

TaskAction (cern.modesti.workflow.task.TaskAction)4 User (cern.modesti.user.User)2 TaskInfo (cern.modesti.workflow.task.TaskInfo)2