Class CommonUserTask

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

public class CommonUserTask extends com.orchestranetworks.workflow.UserTask
Represents a user task extension.

This extension handles the creation of the work item by checking the configuration of the User Task. It also handles its completion by propagating the owner and comment of this work item to the next item if the corresponding variables are created in the data context.

  • lastComment
  • lastUser

To utilize this user task, the following rule should be added in the work item configuration under Extension: com.apgar.common.lib.workflow.usertask.CommonUserTask

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
    void
    handleCreate(com.orchestranetworks.workflow.UserTaskCreationContext context)
    Executes the handleCreate method of the superclass if profiles are defined in the User Task configuration.
    void
    handleWorkItemCompletion(com.orchestranetworks.workflow.UserTaskWorkItemCompletionContext context)
    Executes the handleWorkItemCompletion method of the superclass while passing along the comment and owner of this work item.

    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

    • CommonUserTask

      public CommonUserTask()
  • Method Details

    • handleCreate

      public void handleCreate(com.orchestranetworks.workflow.UserTaskCreationContext context) throws com.orchestranetworks.service.OperationException
      Executes the handleCreate method of the superclass if profiles are defined in the User Task configuration.

      This method ensures that the work items are allocated or offered correctly.

      Overrides:
      handleCreate in class com.orchestranetworks.workflow.UserTask
      Parameters:
      context - the context for work items creation
      Throws:
      com.orchestranetworks.service.OperationException - if any problem occurs; in this case, the user task is set to an error state.
    • handleWorkItemCompletion

      public void handleWorkItemCompletion(com.orchestranetworks.workflow.UserTaskWorkItemCompletionContext context) throws com.orchestranetworks.service.OperationException
      Executes the handleWorkItemCompletion method of the superclass while passing along the comment and owner of this work item.

      This method writes the comment and owner of this work item to the lastComment and lastUser data context variables, respectively, if created.

      Overrides:
      handleWorkItemCompletion in class com.orchestranetworks.workflow.UserTask
      Parameters:
      context - the context for work item completion
      Throws:
      com.orchestranetworks.service.OperationException - if any problem occurs; in this case, the user task is set to an error state.