Class CommonUserTask

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

public class CommonUserTask extends 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
  • Constructor Details

    • CommonUserTask

      public CommonUserTask()
  • Method Details

    • handleCreate

      public void handleCreate(UserTaskCreationContext context) throws 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 UserTask
      Parameters:
      context - the context for work items creation
      Throws:
      OperationException - if any problem occurs; in this case, the user task is set to an error state.
    • handleWorkItemCompletion

      public void handleWorkItemCompletion(UserTaskWorkItemCompletionContext context) throws 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 UserTask
      Parameters:
      context - the context for work item completion
      Throws:
      OperationException - if any problem occurs; in this case, the user task is set to an error state.