Using the Workflow Portlet
Table of Contents [-]
There were lots of questions on the LR-Forums on how to get the workflow-portlet running. So in this wiki, I shall explain how to get this portlet running using mule-web and jbpm-web.
To run the workflow-portlet using saw-web, see here.
Step 1: Get the plugins source. The workflow portlet was previously part of the LR-core, but since 5.1.x it has been moved to the plguins directory. So firstly we need to get the LR source. Do an svn co on https://lportal.svn.sourceforge.net/svnroot/lportal/plugins This would get all the stuff from the LR plugins. Modify the build.properties appropriately.
Step 2: Modify jbpm-web Modify jbpm-web\docroot\WEB-INF\src\hibernate.cfg.xml to make it point to the appropriate Database. By default it points to hypersonic. Make sure all the entries are correct.
Step 3: Deploy jbpm-web Now run "ant" on the <liferay-plugins>\trunk\webs\jbpm-web. This default target compiles, wars and deploys the jbpm-web.
Step 4: Deploy mule-web Now run "ant" on <liferay-plugins>\trunk\webs\mule-web This default ant target compiles, wars and deploys the mule-web
- Note: Ensure that the value for "jbi.workflow.url" key in portal.properties is http://localhost:8080/mule-web/workflow. This ensures that we use mule as the ESB.
- Note: LR workflow Portlet does not work when servicemix esb is used. It works with Mule. See here for details.
Step 5: Deploy workflow portlet Now run "ant" on <liferay-plugins>\trunk\portlets\workflow-portlet This default ant target compiles, wars and deploys the workflow-portlet.
Step 6: Add workflow portlet to the portal page. Access the portal page and login as the admin. Goto dock -> Add Application -> search for workflow portlet -> Add the portlet to the page.
Step 7: Deploy a business process Assume that you want to deploy the holiday_Definition business process that is available in <liferay-plugins>\trunk\webs\jbpm-web\docroot\WEB-INF\definitions. Modify it appropriately by giving correct values for the companyId and id. Paste it in the space provided and click on "Add Definition" The Business process has now been added. Click on Search Definitions and you would see the business process that you just deployed.
Dont want to build from source If you dont want to build from the source, then you can do the following. Download the jbpm-web-188.8.131.52.war, mule-web-184.108.40.206.war from http://sourceforge.net/project/showfiles.php?group_id=49260&package_id=243192 Modify the hibernate.cfg.xml in the jbpm-web-xx.war. Deploy both the wars. The workflow-portlet.war is not available in the above mentioned location. (not sure why !!) So for this, you might have to build from source only. Deploy the workflowportlet. The remaining steps are the same.