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-5.1.1.1.war, mule-web-5.1.1.1.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.

    1 Attachment
    43990 Views
    Average (0 Votes)
    The average rating is 0.0 stars out of 5.
    Comments
    Threaded Replies Author Date
    thanks for this help .... Manuel Victor Ariel Rodriguez Coria October 14, 2008 8:21 AM
    Can you attached your compiled WF-portlet also,... Oliver Lauer October 24, 2008 2:17 PM
    is anyone willing to attach the compiled... Daniel D. Barciela April 27, 2009 9:05 AM
    You used swimlane with roles or user/name of... Solo Imr October 28, 2008 6:49 AM
    I used the userId for getting it working using... Ganesh Ram October 31, 2008 5:02 AM
    When I use user/userId, it works fine. When I... Solo Imr October 31, 2008 6:33 AM
    It's very good.I think it is very helpfull to... Sohui Gu November 2, 2008 6:35 PM
    I guess this worked once upon a time but with... Arturo Vazquez December 19, 2008 7:14 PM
    Just FYI i managed to build it with r 23105 Arturo Vazquez December 19, 2008 7:35 PM
    I am also getting same problem when i deploy... devaki s February 10, 2009 2:39 AM
    I have the same problem "[javac]... Samer A Salameh February 10, 2009 7:25 AM
    Hi Arturo, I need the workflow war for V5.1.2,... yassir houmame September 18, 2009 7:14 AM
    Dear, i follow the tutorial but i cant deploy... Khoa Dang TU January 21, 2009 7:40 PM
    I cannot build either jbpm-web or mule-web.... Bruce Altner February 20, 2009 5:19 AM
    Sorry, I jumped the gun...the svn checkout... Bruce Altner February 20, 2009 6:27 AM
    Hi I tried to get svn 5.1.x branch but I wasn't... Sly Ge May 8, 2009 2:25 PM
    Hi Sly, Could you manage to get the... yassir houmame September 18, 2009 7:20 AM
    hey !! I wanted help regarding how to display... Abhay Kumar September 23, 2009 4:22 AM
    This process still work in LF 5.2 ? I can't... Lucas Roberto Thomaz September 29, 2009 7:06 AM
    This process can not work in 5.1.2 z d l April 5, 2010 5:32 PM
    how to use workflow on liferay 6.+? think you! arron wu July 7, 2010 7:54 PM

    thanks for this help ....
    Posted on 10/14/08 8:21 AM.
    Can you attached your compiled WF-portlet also, it save some time :-)
    Thx
    Oliver
    Posted on 10/24/08 2:17 PM.
    You used swimlane with roles or user/name of Liferay.
    Posted on 10/28/08 6:49 AM.
    I used the userId for getting it working using the holiday_defintion.xml.
    Had sometime back tried with roles. It worked fine.
    Posted on 10/31/08 5:02 AM in reply to Solo Imr.
    When I use user/userId, it works fine.
    When I use role/roleId not work for me.

    Thanks for this post ... good work ;-)
    Posted on 10/31/08 6:33 AM in reply to Ganesh Ram.
    It's very good.I think it is very helpfull to users.
    Posted on 11/2/08 6:35 PM.
    I guess this worked once upon a time but with the current head is broken can you post the revision in which this works for 5.1.2

    BTW what wouldl really help to us newbies is to post the plugin in the official repository (or any other place)

    Below is the output from my attempt to build with r24073
    vaz@varda:~/java/plugins/branches/5.1.x/portlets/workflow-portlet$ ant
    Buildfile: build.xml

    compile:

    merge:
    Compiling 26 source files to /home/vaz/java/plugins/branches/5.1.x/portlets/workflow-portlet/docroot/WEB-INF/­classes
    /home/vaz/java/plugins/branches/5.1.x/portlets/workflow-portlet/docroot/WEB-INF/­src/com/liferay/workflow/service/base/WorkflowComponentServiceBaseImpl.java:25: package com.liferay.portal.kernel.annotation does not exist
    import com.liferay.portal.kernel.annotation.BeanReference;
    ^
    /home/vaz/java/plugins/branches/5.1.x/portlets/workflow-portlet/docroot/WEB-INF/­src/com/liferay/workflow/service/base/WorkflowDefinitionServiceBaseImpl.java:25:­ package com.liferay.portal.kernel.annotation does not exist
    import com.liferay.portal.kernel.annotation.BeanReference;
    ^
    /home/vaz/java/plugins/branches/5.1.x/portlets/workflow-portlet/docroot/WEB-INF/­src/com/liferay/workflow/service/base/WorkflowInstanceServiceBaseImpl.java:25: package com.liferay.portal.kernel.annotation does not exist
    import com.liferay.portal.kernel.annotation.BeanReference;
    ^
    /home/vaz/java/plugins/branches/5.1.x/portlets/workflow-portlet/docroot/WEB-INF/­src/com/liferay/workflow/service/base/WorkflowTaskServiceBaseImpl.java:25: package com.liferay.portal.kernel.annotation does not exist
    import com.liferay.portal.kernel.annotation.BeanReference;
    ^

    BUILD FAILED
    /home/vaz/java/plugins/branches/5.1.x/build-common-plugin.xml:145: Compile failed; see the compiler error output for details.

    Total time: 1 second
    vaz@varda:~/java/plugins/branches/5.1.x/portlets/workflow-portlet$ cd
    vaz@varda:~$ cd java/plugins/
    branches/ shelves/ .svn/ trunk/
    vaz@varda:~$ cd java/plugins/trunk/webs/jbpm-web/
    vaz@varda:~/java/plugins/trunk/webs/jbpm-web$ ant
    Buildfile: build.xml

    war:
    Loading jar:file:/home/vaz/java/liferay-portal-tomcat-5.5-5.1.2/webapps/ROOT/WEB-INF/lib­/portal-impl.jar!/system.properties
    Loading jar:file:/home/vaz/java/liferay-portal-tomcat-5.5-5.1.2/webapps/ROOT/WEB-INF/lib­/portal-impl.jar!/portal.properties
    Loading file:/home/vaz/java/liferay-portal-tomcat-5.5-5.1.2/webapps/ROOT/WEB-INF/classes­/portal-ext.properties
    Loading jar:file:/home/vaz/java/liferay-portal-tomcat-5.5-5.1.2/webapps/ROOT/WEB-INF/lib­/portal-impl.jar!/com/liferay/portal/tools/dependencies/portal-tools.properties
    01:30:33,078 INFO [PortalImpl:228] Portal lib directory /home/vaz/java/liferay-portal-tomcat-5.5-5.1.2/webapps/ROOT/WEB-INF/lib/
    Moving 2 files to /home/vaz/java/plugins/trunk/webs/jbpm-web/docroot/WEB-INF/sql

    compile:

    merge:
    Copying 5 files to /home/vaz/java/plugins/trunk/webs/jbpm-web/docroot/WEB-INF/lib

    merge:

    build-common­-plugin.war:
    Deleting: /home/vaz/java/plugins/trunk/dist/jbpm-web-5.2.0.1.war

    clean-portal-dependencies:­
    Building zip: /home/vaz/java/plugins/trunk/dist/jbpm-web-5.2.0.1.war

    deploy:
    Copying 1 file to /home/vaz/liferay/deploy

    BUILD SUCCESSFUL
    Total time: 5 seconds
    vaz@varda:~/java/plugins/trunk/webs/jbpm-web$ cd ../mule-web/
    vaz@varda:~/java/plugins/trunk/webs/mule-web$ ant
    Buildfile: build.xml

    compile:

    merge:
    Copying 5 files to /home/vaz/java/plugins/trunk/webs/mule-web/docroot/WEB-INF/lib

    merge:
    Copying 5 files to /home/vaz/java/plugins/trunk/webs/mule-web/tmp

    war:
    Deleting: /home/vaz/java/plugins/trunk/dist/mule-web-5.2.0.1.war

    clean-portal-dependencies:­
    Building zip: /home/vaz/java/plugins/trunk/dist/mule-web-5.2.0.1.war

    deploy:
    Copying 1 file to /home/vaz/liferay/deploy

    BUILD SUCCESSFUL
    Total time: 3 seconds
    vaz@varda:~/java/plugins/trunk/webs/mule-web$ cd ../../portlets/workflow-portlet/
    vaz@varda:~/java/plugins/trunk/portlets/workflow­-portlet$ ant
    Buildfile: build.xml

    compile:

    merge:
    Compiling 6 source files to /home/vaz/java/plugins/trunk/portlets/workflow-portlet/docroot/WEB-INF/classes
    /home/vaz/java/plugins/trunk/portlets/workflow-portlet/docroot/WEB-INF/src/com/l­iferay/workflow/service/impl/WorkflowDefinitionServiceImpl.java:101: cannot find symbol
    symbol : method addFile(long,java.lang.String,long,long,java.lang.String,long,java.lang.String,j­ava.lang.String[],byte[])
    location: class com.liferay.documentlibrary.service.DLServiceUtil
    DLServiceUtil.addFile(
    ^
    1 error

    BUILD FAILED
    /home/vaz/java/plugins/trunk/build-common-plugin.xml:150: Compile failed; see the compiler error output for details.

    Total time: 1 second
    vaz@varda:~/java/plugins/trunk/portlets/workflow-portlet$
    Posted on 12/19/08 7:14 PM.
    Just FYI i managed to build it with r 23105
    Posted on 12/19/08 7:35 PM in reply to Arturo Vazquez.
    Dear, i follow the tutorial but i cant deploy it, there are many errors

    the jbpm deployment can not find the table in statement. i dont know why.

    Can i contact to you by email? Ganesh, i really need your help!
    Posted on 1/21/09 7:40 PM.
    I am also getting same problem when i deploy workflow portlet. Can you please tell in detail how u resolved this issue.

    Thanks
    devaki
    Posted on 2/10/09 2:39 AM in reply to Arturo Vazquez.
    I have the same problem " DLServiceUtil.addFile(" even in 23105 version!
    Can you post the workflow-portlet war file?
    Posted on 2/10/09 7:25 AM in reply to Arturo Vazquez.
    I cannot build either jbpm-web or mule-web. Both return an error that says "Cannot find ../build-common-plugin.xml imported from /Users/baltner/eclipseWorkspace/LR/plugins/trunk/webs/build-common-web.xml".

    ../b­uild-common-web.xml is there but the ../build-common-plugin.xml that it imports does not.

    I suspect that all the plugins in the repo would retun the same error. What's up with this?
    Posted on 2/20/09 5:19 AM.
    Sorry, I jumped the gun...the svn checkout hadn't finished yet. The projects do build normally.
    Posted on 2/20/09 6:27 AM in reply to Bruce Altner.
    is anyone willing to attach the compiled WF-portlet, please?
    Posted on 4/27/09 9:05 AM in reply to Oliver Lauer.
    Hi
    I tried to get svn 5.1.x branch but I wasn't able to get a compiling version of the workflow-portlet because there is no tag to extract the correct version. I need it for Liferay 5.1.2. How can I get the correct version?
    Posted on 5/8/09 2:25 PM.
    Hi Arturo,

    I need the workflow war for V5.1.2, but unfortunately I could rebuild it with the r24306 provided. Could you please send me the link to r 23105 or the war file ?

    Thank you
    Posted on 9/18/09 7:14 AM in reply to Arturo Vazquez.
    Hi Sly,

    Could you manage to get the workflow-portlet war file? If so can you please post it or ndicate the link to the svn source files.

    Thank you
    Posted on 9/18/09 7:20 AM in reply to Sly Ge.
    hey !! I wanted help regarding how to display userid making holiday request while approver tries to approve the request (ref: holiday request definition)


    Thanks
    Posted on 9/23/09 4:22 AM.
    This process still work in LF 5.2 ? I can't configure for this.
    Someone can help me?
    Posted on 9/29/09 7:06 AM in reply to Abhay Kumar.
    This process can not work in 5.1.2
    Posted on 4/5/10 5:32 PM.
    how to use workflow on liferay 6.+?
    think you!
    Posted on 7/7/10 7:54 PM.