Workflow Row Control

 

     Workflows consist of a sequence of steps where are defined a series of tasks to produce a final outcome. Liferay supports workflows from long ago,  and its portlet is installed by default.

    By integrating XMLPortletFactory with Liferay Workflows we are able to pass an insertion, update or removal of a row through a simple or complex bussines processes to achive a final outcome of success or failure.  If you want to broaden your knowledge about how Liferay does it, go to Liferay Portal 6.1 - User Guide / Workflow with Kaleo.

     The implementation of workflows on the XML definition file, could not be more simple, just insert a <workflow>true</workflow> tag inside de <classDef> definition. It will automatically will do all the work for you. 

     When you deploy the portlet, with one or many <applications> containing the <workflow> tag you will see in the workflow definitions area of the control panel that now there are new resources to add workflow definitions.

      A simple example will be to add the <workflow> tag to the To-do list example of the wiki, just put the <workflow> inside  the classDef tag like this:

<classDef>
<name>Todo</name>
<title>To do List</title>
<workflow>true</workflow>
</classDef>
 
   Generate and deploy portlet as usual. Easy, right?  Now lets see what happened.
 
   First we notice a change in the workflow configuration resource list of the control panel:
 
  
 
    Lets select the "Single Approver (Version1) workflow for the "To do List" resource. (Remember to press "Save")
 
  
 
    Now lets go to the portlet and see to Add a row to the list:
 
 
    As you see, now "Submit" button is "Submit for Publication", and when you press it, says everything went well but, where is my row?
 
 
      To see what happened to your row, you have to go to the Control Panel --> My Workflow Tasks, you will find a Review Task of a "To do List" pending assignment, just assign it to you. Make any comment, if you want.
 
 
     You see now the task assigned to you, and now, lets approve it:
 
 
 
      And magic!!!, our row is here, 
 
 
 
I hope you all enjoy this feature, I want to give special thanks to Juan González del Pino, who made all the coding for me to translate to the velocity templates. Thanks Juan!!!.
 
 

Saludos, Jack.