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
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 -
Method Summary
Modifier and TypeMethodDescriptiongetUser()Gets owner of the work item.voidhandleCreate(com.orchestranetworks.workflow.UserTaskCreationContext context) Executes thehandleCreatemethod of the superclass while sending a notification mail for the work item owner.voidSets the owner of the work item.Methods inherited from class com.apgar.common.lib.workflow.usertask.CommonUserTask
handleWorkItemCompletionMethods inherited from class com.orchestranetworks.workflow.UserTask
checkBeforeWorkItemCompletion, getUsersForAllocation
-
Constructor Details
-
AffectationUserTask
public AffectationUserTask()
-
-
Method Details
-
handleCreate
public void handleCreate(com.orchestranetworks.workflow.UserTaskCreationContext context) throws com.orchestranetworks.service.OperationException Executes thehandleCreatemethod 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:
handleCreatein classCommonUserTask- 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
Gets owner of the work item.- Returns:
- the unique identifier of the user (usually its login)
-
setUser
Sets the owner of the work item.- Parameters:
user- the unique identifier of the user (usually its login)
-