Class AffectationUserTask

java.lang.Object
com.orchestranetworks.workflow.UserTask
com.apgar.common.lib.workflow.usertask.CommonUserTask
com.apgar.common.lib.workflow.usertask.AffectationUserTask
Direct Known Subclasses:
CheckUpdatedRecordsValidationReportUserTask, CheckValidationReportUserTask

public class AffectationUserTask extends CommonUserTask
Represents a common user task extension.

This extension handles the creation of the work item by checking if a user is defined for this work item. If defined, the work item is allocated to this user and an allocation notification is sent. Else, a "No user has been defined" error is thrown.

The following should be added in the work item configuration under Extension:

  • Rule: com.apgar.common.lib.workflow.usertask.AffectationUserTask
  • Parameter name: user (e.g., ${user})
Author:
APGAR Consulting
  • Nested Class Summary

    Nested classes/interfaces inherited from class com.orchestranetworks.workflow.UserTask

    com.orchestranetworks.workflow.UserTask.CompletionStrategy, com.orchestranetworks.workflow.UserTask.UserTaskMode, com.orchestranetworks.workflow.UserTask.WorkItem
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    Gets owner of the work item.
    void
    handleCreate(com.orchestranetworks.workflow.UserTaskCreationContext context)
    Executes the handleCreate method of the superclass while sending a notification mail for the work item owner.
    void
    Sets the owner of the work item.

    Methods inherited from class com.apgar.common.lib.workflow.usertask.CommonUserTask

    handleWorkItemCompletion

    Methods inherited from class com.orchestranetworks.workflow.UserTask

    checkBeforeWorkItemCompletion, getUsersForAllocation

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • AffectationUserTask

      public AffectationUserTask()
  • Method Details

    • handleCreate

      public void handleCreate(com.orchestranetworks.workflow.UserTaskCreationContext context) throws com.orchestranetworks.service.OperationException
      Executes the handleCreate method of the superclass while sending a notification mail for the work item owner.

      This method checks whether a user exists for work item allocation. If a user exists, an allocation notification is sent. Else, an exception is thrown.

      Overrides:
      handleCreate in class CommonUserTask
      Parameters:
      context - the context for work items creation
      Throws:
      com.orchestranetworks.service.OperationException - if a user for this work item is not set; in this case, the user task is set to an error state.
    • getUser

      public String getUser()
      Gets owner of the work item.
      Returns:
      the unique identifier of the user (usually its login)
    • setUser

      public void setUser(String user)
      Sets the owner of the work item.
      Parameters:
      user - the unique identifier of the user (usually its login)