Class CheckUpdatedRecordsValidationReportUserTask

java.lang.Object
com.orchestranetworks.workflow.UserTask
com.apgar.common.lib.workflow.usertask.CommonUserTask
com.apgar.common.lib.workflow.usertask.AffectationUserTask
com.apgar.common.lib.workflow.usertask.CheckUpdatedRecordsValidationReportUserTask

public class CheckUpdatedRecordsValidationReportUserTask extends AffectationUserTask
Blocks the work item completion if the created/modified records, in the same table, contain errors.

This extension performs a validation report check on the newly created and modified records when the user clicks the 'accept' or the 'reject' button. If any of those records are in error, the work item completion is blocked and the specified error message is reported.

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

  • Rule: com.apgar.common.lib.workflow.usertask.CheckUpdatedRecordsValidationReportUserTask
  • Parameters:
    • Parameter name: user (e.g., ${user})
    • Parameter name: message (e.g., "Please correct the errors before submitting.")

This also requires three data context variables to be defined in the workflow to retrieve the table to validate.

  • workSpace
  • dataSet
  • table
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
    checkBeforeWorkItemCompletion(com.orchestranetworks.workflow.UserTaskBeforeWorkItemCompletionContext context)
    Performs a blocking validation report check on the created/modified records.
    void
    setMessage(String message)
    Sets the error message displayed if the created/modified records have errors.

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

    getUser, handleCreate, setUser

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

    handleWorkItemCompletion

    Methods inherited from class com.orchestranetworks.workflow.UserTask

    getUsersForAllocation

    Methods inherited from class java.lang.Object

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

    • CheckUpdatedRecordsValidationReportUserTask

      public CheckUpdatedRecordsValidationReportUserTask()
  • Method Details

    • checkBeforeWorkItemCompletion

      public void checkBeforeWorkItemCompletion(com.orchestranetworks.workflow.UserTaskBeforeWorkItemCompletionContext context)
      Performs a blocking validation report check on the created/modified records.

      This method reports an error in case the created/modified records contain errors.

      Overrides:
      checkBeforeWorkItemCompletion in class com.orchestranetworks.workflow.UserTask
      Parameters:
      context - the context to perform checks on before the work item is actually completed.
    • setMessage

      public void setMessage(String message)
      Sets the error message displayed if the created/modified records have errors.
      Parameters:
      message - the error message to be displayed