The guestbook project’s service layer is now updated to handle workflow. It now
properly sets the status fields for guestbooks and guestbook entries, gets
entities by their statuses, and sends entities to Liferay DXP’s workflow framework
whenever the addGuestbook
or addGuestbookEntry
methods are called. Recall
that you still have an uncalled service method, updateStatus
, for both
entities. Now you’ll implement workflow handlers, classes that interact with
Liferay DXP’s workflow framework and your service layer (by calling updateStatus
on the appropriate entity).
There’s a handy abstract class you can extend to make the job easier, called
BaseWorkflowHandler
. You’ll do this next for both entities of the guestbook
project, starting with guestbooks.