Using the Workflow Portlet

(Redirezionato da Using the LR-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 Allegato
    62347 Visualizzazioni
    Media (0 Voti)
    La media del punteggio è 0.0 stelle su 5.
    Commenti
    Commenti Autore Data
    thanks for this help .... Manuel Victor Ariel Rodriguez Coria 14 ottobre 2008 8.21
    Can you attached your compiled WF-portlet also,... Oliver Lauer 24 ottobre 2008 14.17
    is anyone willing to attach the compiled... Daniel D. Barciela 27 aprile 2009 9.05
    You used swimlane with roles or user/name of... Solo Imr 28 ottobre 2008 6.49
    I used the userId for getting it working using... Ganesh Ram 31 ottobre 2008 5.02
    When I use user/userId, it works fine. When I... Solo Imr 31 ottobre 2008 6.33
    It's very good.I think it is very helpfull to... Sohui Gu 2 novembre 2008 18.35
    I guess this worked once upon a time but with... Arturo Vazquez 19 dicembre 2008 19.14
    Just FYI i managed to build it with r 23105 Arturo Vazquez 19 dicembre 2008 19.35
    I am also getting same problem when i deploy... devaki s 10 febbraio 2009 2.39
    I have the same problem "[javac]... Samer A Salameh 10 febbraio 2009 7.25
    Hi Arturo, I need the workflow war for V5.1.2,... yassir houmame 18 settembre 2009 7.14
    Dear, i follow the tutorial but i cant deploy... Khoa Dang TU 21 gennaio 2009 19.40
    I cannot build either jbpm-web or mule-web.... Bruce Altner 20 febbraio 2009 5.19
    Sorry, I jumped the gun...the svn checkout... Bruce Altner 20 febbraio 2009 6.27
    Hi I tried to get svn 5.1.x branch but I wasn't... Sly Ge 8 maggio 2009 14.25
    Hi Sly, Could you manage to get the... yassir houmame 18 settembre 2009 7.20
    hey !! I wanted help regarding how to display... Abhay Kumar 23 settembre 2009 4.22
    This process still work in LF 5.2 ? I can't... Lucas Roberto Thomaz 29 settembre 2009 7.06
    This process can not work in 5.1.2 z d l 5 aprile 2010 17.32
    how to use workflow on liferay 6.+? think you! arron wu 7 luglio 2010 19.54

    thanks for this help ....
    Inviato il 14/10/08 8.21.
    Can you attached your compiled WF-portlet also, it save some time :-)
    Thx
    Oliver
    Inviato il 24/10/08 14.17.
    You used swimlane with roles or user/name of Liferay.
    Inviato il 28/10/08 6.49.
    I used the userId for getting it working using the holiday_defintion.xml.
    Had sometime back tried with roles. It worked fine.
    Inviato il 31/10/08 5.02 in risposta a 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 ;-)
    Inviato il 31/10/08 6.33 in risposta a Ganesh Ram.
    It's very good.I think it is very helpfull to users.
    Inviato il 02/11/08 18.35.
    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$
    Inviato il 19/12/08 19.14.
    Just FYI i managed to build it with r 23105
    Inviato il 19/12/08 19.35 in risposta a 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!
    Inviato il 21/01/09 19.40.
    I am also getting same problem when i deploy workflow portlet. Can you please tell in detail how u resolved this issue.

    Thanks
    devaki
    Inviato il 10/02/09 2.39 in risposta a Arturo Vazquez.
    I have the same problem " DLServiceUtil.addFile(" even in 23105 version!
    Can you post the workflow-portlet war file?
    Inviato il 10/02/09 7.25 in risposta a 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?
    Inviato il 20/02/09 5.19.
    Sorry, I jumped the gun...the svn checkout hadn't finished yet. The projects do build normally.
    Inviato il 20/02/09 6.27 in risposta a Bruce Altner.
    is anyone willing to attach the compiled WF-portlet, please?
    Inviato il 27/04/09 9.05 in risposta a 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?
    Inviato il 08/05/09 14.25.
    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
    Inviato il 18/09/09 7.14 in risposta a 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
    Inviato il 18/09/09 7.20 in risposta a 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
    Inviato il 23/09/09 4.22.
    This process still work in LF 5.2 ? I can't configure for this.
    Someone can help me?
    Inviato il 29/09/09 7.06 in risposta a Abhay Kumar.
    This process can not work in 5.1.2
    Inviato il 05/04/10 17.32.
    how to use workflow on liferay 6.+?
    think you!
    Inviato il 07/07/10 19.54.