Details
Description
The current WorkflowPersistenceManagerImpl class still uses and exposes the now deprecated ReviewedActionsWorkflow (and friends).
Because it is currently impossible to determine from the usage of the WorkflowPersistenceManager to know if either (still) the deprecated workflow or the new DocumentWorkflow should be used and exposed (through the WorkflowCallbackHandler), a new QualifiedWorkflowCallbackHandler interface (extending WorkflowCallbackHandler) will be provided and the current WorkflowCallbackHandler deprecated.
The new QualifiedWorkflowCallbackHandler will add one method: Class<? extends> Workflow getWorkflowType(), which then can be used by the WorkflowPersistenceManager to determine if it should use the DocumentWorkflow or not.
Projects using the HST WorkflowPersistenceManager still can use the current solution but will be advised to upgrade their usage with the new QualifiedWorkflowCallbackHandler.
As a convenience, an abstract BaseWorkflowCallbackHandler class will be provided which will automatically take care of implementing the above getWorkflowType() method,
and the (minimal) upgrade then only requires extending this class instead of implementing the now deprecated WorkflowCallbackHandler.
Of course, a proper upgrade when currently using ReviewedActionsWorkflow or related deprecated 'friends', also should update the requested Workflow (type) to DocumentWorkflow.
We have examples of these WorkflowCallbackHandlers in gogreen and the testsuite: I will fully upgrade the gogreen usages (separate issue), but leave the testsuite as 'assurance' that the old usages also remain working.
Attachments
Issue Links
- causes
-
GOGREEN-1244 Make use of the DocumentWorkflow through the WorkflowPersistenceManager
- Closed