com.semarchy.mdm.runtime.activity
Interface IActivityService


public interface IActivityService


Nested Class Summary
static interface IActivityService.ITaskCompletionResult
           
static class IActivityService.Severity
           
 
Method Summary
 void cancel(UUID pTaskID, String pCompletionComments)
          Deprecated. use completeTask(UUID, String, String, CompletionOptions) instead
 void claimTask(UUID pTaskID)
          Claim the IActivityTask with provided ID
 IActivityService.ITaskCompletionResult completeTask(UUID pTaskID, IWorkflowTransition transition, String pCompletionComments, CompletionOptions options)
           
 IActivityTask completeTask(UUID pTaskID, String pCompletionComments, String pTransitionToTaskName, boolean pClaimTask, boolean pNotifyAssignee, Locale pNotificationLocale)
          Deprecated. use completeTask(UUID, String, String, CompletionOptions) instead
 IActivityService.ITaskCompletionResult completeTask(UUID pTaskID, String transitionName, String pCompletionComments, CompletionOptions options)
          Complete a Task by following a workflow transition
 long countTasks(String pApplicationName, TaskFilterType pFilter)
          Count the number of IActivityTask matching the TaskFilterType
 IActivity getActivity(UUID pActivityUUID)
          Load IActivity with task history
 IActivityTask getTask(UUID pTaskUUID)
          Load IActivityTask with the given UUID.
 List<IActivityTask> listTasks(String pApplicationName, TaskFilterType pFilter, PageCriteria pPageCriteria)
          Get the list of IActivityTask matching the TaskFilterType
 IActivityTask startActivity(IHumanTask pStartTask, String pActivityLabel, String pStartComments, ActivityPriority pPriority, boolean pClaimTask, boolean pNotifyAssignee, Locale pNotificationLocale)
          Start an activity based on a IHumanWorkflow.
 long submit(UUID pTaskID, String pCompletionComments)
          Deprecated. use completeTask(UUID, String, String, CompletionOptions) instead
 void unclaimTask(UUID pCurrentTask, boolean pNotifyAssignee, Locale pNotificationLocale)
          Un-Claim the IActivityTask.
 

Method Detail

startActivity

IActivityTask startActivity(IHumanTask pStartTask,
                            String pActivityLabel,
                            String pStartComments,
                            ActivityPriority pPriority,
                            boolean pClaimTask,
                            boolean pNotifyAssignee,
                            Locale pNotificationLocale)
                            throws ActivityPermissionDeniedException
Start an activity based on a IHumanWorkflow.

Parameters:
pStartTask - the task from which to start. This task has to be a start task see IHumanTask.isStartTask()
pActivityLabel - the label of the activity instance
pStartComments - the start comments of the activity
pPriority - the ActivityPriority priority
pClaimTask - indicates whether the start task should be claimed immediately by current user. (current user should have the permission to do so).
pNotifyAssignee - indicates whether start task role assignee should be notified. This is ignored if #isNotificationSupported() returns false
pNotificationLocale - TODO
Returns:
the new activity task
Throws:
ActivityPermissionDeniedException - if current user has not the permission to start the IHumanWorkflow or if pClaimTask is true and user does not have the permission to claim the IHumanTask

completeTask

IActivityService.ITaskCompletionResult completeTask(UUID pTaskID,
                                                    String transitionName,
                                                    String pCompletionComments,
                                                    CompletionOptions options)
                                                    throws ActivityIllegalStateException,
                                                           ActivityPermissionDeniedException
Complete a Task by following a workflow transition

Parameters:
pTaskID - the ID of the IActivityTask to complete.
transitionName - the name of the outgoing IWorkflowTransition to follow
pCompletionComments - The comment used for completion
options - Additional options on the transition (Not used if transition is submit or cancel), or null if no options
Returns:
Throws:
ActivityIllegalStateException - when :
  • The task with the provided ID does not exist (or have been deleted).
  • The task with the provided ID is not an active task of the activity (it has already been completed or workflow has been canceled)
  • The task with the provided ID is not claimed by current user.
  • The transition specified does not exist for the task with the provided ID

completeTask

IActivityService.ITaskCompletionResult completeTask(UUID pTaskID,
                                                    IWorkflowTransition transition,
                                                    String pCompletionComments,
                                                    CompletionOptions options)
                                                    throws ActivityIllegalStateException,
                                                           ActivityPermissionDeniedException
Throws:
ActivityIllegalStateException
ActivityPermissionDeniedException

submit

long submit(UUID pTaskID,
            String pCompletionComments)
            throws ActivityIllegalStateException
Deprecated. use completeTask(UUID, String, String, CompletionOptions) instead

Complete the IActivity instance by submitting from the IActivityTask with provided UUID.

If one of the following condition is NOT matched a ActivityIllegalStateException will be raised:

Parameters:
pTaskID - the ID of the task to submit. This task has to be IHumanTask.isSubmitEnabled()
pCompletionComments - the task completion comments
Returns:
the ID of the Integration Batch created to process the submit data
Throws:
ActivityIllegalStateException - if the task with given ID is not the current task or is not claimed by current user.

cancel

void cancel(UUID pTaskID,
            String pCompletionComments)
            throws ActivityIllegalStateException
Deprecated. use completeTask(UUID, String, String, CompletionOptions) instead

Complete the IActivity instance by canceling from the IActivityTask with provided UUID.

If one of the following condition is not matched a ActivityIllegalStateException will be raised:

Parameters:
pTaskID - the current task ID. This task has to be IHumanTask.isCancelEnabled()
pCompletionComments - the task completion comments
Throws:
ActivityIllegalStateException - if the task with given ID is not the current task or is not claimed by current user.

completeTask

@Deprecated
IActivityTask completeTask(UUID pTaskID,
                                      String pCompletionComments,
                                      String pTransitionToTaskName,
                                      boolean pClaimTask,
                                      boolean pNotifyAssignee,
                                      Locale pNotificationLocale)
                           throws ActivityIllegalStateException,
                                  ActivityPermissionDeniedException
Deprecated. use completeTask(UUID, String, String, CompletionOptions) instead

Complete the IActivityTask with provided ID by transitioning to the provided IHumanTask.

If one of the following condition is not matched a ActivityIllegalStateException will be raised:

Parameters:
pTaskID - the current task.
pCompletionComments - completion comments for current task
pTransitionToTaskName - the name of the IWorkflowTransition to use for transition
pClaimTask - claim task immediately
pNotifyAssignee - notify new task assignee role. This is ignored if #isNotificationSupported() returns false
pNotificationLocale - TODO
Returns:
the newly created IActivityTask
Throws:
ActivityIllegalStateException - if the task with given ID is not the current task or is not claimed by current user.
ActivityPermissionDeniedException - if pClaimTask is true and if current user does not have permission to claim pTransitionToTask

claimTask

void claimTask(UUID pTaskID)
               throws ActivityIllegalStateException,
                      ActivityPermissionDeniedException
Claim the IActivityTask with provided ID

If one of the following condition is not matched a ActivityIllegalStateException will be raised:

Parameters:
pTaskID - the current task.
Throws:
ActivityIllegalStateException - if the task with given ID is not the current task or is already claimed.
ActivityPermissionDeniedException - if current user does not have enough permission to claim currentTask

unclaimTask

void unclaimTask(UUID pCurrentTask,
                 boolean pNotifyAssignee,
                 Locale pNotificationLocale)
                 throws ActivityIllegalStateException,
                        ActivityPermissionDeniedException
Un-Claim the IActivityTask.

An ActivityIllegalStateException will be raised if under any of the following condition:

Parameters:
pCurrentTask - the current task.
pNotifyAssignee - indicates if assignee should be notified that the task is to be processed. This is ignored if #isNotificationSupported() returns false
pNotificationLocale - The locale used for notification messages
Throws:
ActivityIllegalStateException - if the task with given ID is not the current task or is not claimed by current user.
ActivityPermissionDeniedException - if current user does not have enough permission to claim currentTask

getActivity

IActivity getActivity(UUID pActivityUUID)
Load IActivity with task history

Parameters:
pActivityUUID -
Returns:
the acitivty with full history or null if no activity with such id

getTask

IActivityTask getTask(UUID pTaskUUID)
Load IActivityTask with the given UUID.

Parameters:
pTaskUUID -
Returns:
the IActivityTask with the given UUID or null if none matches

listTasks

List<IActivityTask> listTasks(String pApplicationName,
                              TaskFilterType pFilter,
                              PageCriteria pPageCriteria)
Get the list of IActivityTask matching the TaskFilterType

Parameters:
pApplicationName -
pFilter -
pPageCriteria - define the first records to return and the number of IActivityTask to return. If null all IActivityTask are returned.
Returns:

countTasks

long countTasks(String pApplicationName,
                TaskFilterType pFilter)
Count the number of IActivityTask matching the TaskFilterType

Parameters:
pApplicationName -
pFilter -
pPageCriteria -
Returns:


Copyright © 2015. All Rights Reserved.