Using the Workflow Portlet

(Redirecionado de 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 Anexo
    62338 Visualizações
    Média (0 Votos)
    A média da avaliação é 0.0 estrelas de 5.
    Comentários
    Respostas do tópico Autor Data
    thanks for this help .... Manuel Victor Ariel Rodriguez Coria 14 de Outubro de 2008 08:21
    Can you attached your compiled WF-portlet also,... Oliver Lauer 24 de Outubro de 2008 14:17
    is anyone willing to attach the compiled... Daniel D. Barciela 27 de Abril de 2009 09:05
    You used swimlane with roles or user/name of... Solo Imr 28 de Outubro de 2008 06:49
    I used the userId for getting it working using... Ganesh Ram 31 de Outubro de 2008 05:02
    When I use user/userId, it works fine. When I... Solo Imr 31 de Outubro de 2008 06:33
    It's very good.I think it is very helpfull to... Sohui Gu 2 de Novembro de 2008 18:35
    I guess this worked once upon a time but with... Arturo Vazquez 19 de Dezembro de 2008 19:14
    Just FYI i managed to build it with r 23105 Arturo Vazquez 19 de Dezembro de 2008 19:35
    I am also getting same problem when i deploy... devaki s 10 de Fevereiro de 2009 02:39
    I have the same problem "[javac]... Samer A Salameh 10 de Fevereiro de 2009 07:25
    Hi Arturo, I need the workflow war for V5.1.2,... yassir houmame 18 de Setembro de 2009 07:14
    Dear, i follow the tutorial but i cant deploy... Khoa Dang TU 21 de Janeiro de 2009 19:40
    I cannot build either jbpm-web or mule-web.... Bruce Altner 20 de Fevereiro de 2009 05:19
    Sorry, I jumped the gun...the svn checkout... Bruce Altner 20 de Fevereiro de 2009 06:27
    Hi I tried to get svn 5.1.x branch but I wasn't... Sly Ge 8 de Maio de 2009 14:25
    Hi Sly, Could you manage to get the... yassir houmame 18 de Setembro de 2009 07:20
    hey !! I wanted help regarding how to display... Abhay Kumar 23 de Setembro de 2009 04:22
    This process still work in LF 5.2 ? I can't... Lucas Roberto Thomaz 29 de Setembro de 2009 07:06
    This process can not work in 5.1.2 z d l 5 de Abril de 2010 17:32
    how to use workflow on liferay 6.+? think you! arron wu 7 de Julho de 2010 19:54

    thanks for this help ....
    Postado em 14/10/08 08:21.
    Can you attached your compiled WF-portlet also, it save some time :-)
    Thx
    Oliver
    Postado em 24/10/08 14:17.
    You used swimlane with roles or user/name of Liferay.
    Postado em 28/10/08 06:49.
    I used the userId for getting it working using the holiday_defintion.xml.
    Had sometime back tried with roles. It worked fine.
    Postado em 31/10/08 05:02 em resposta 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 ;-)
    Postado em 31/10/08 06:33 em resposta a Ganesh Ram.
    It's very good.I think it is very helpfull to users.
    Postado em 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$
    Postado em 19/12/08 19:14.
    Just FYI i managed to build it with r 23105
    Postado em 19/12/08 19:35 em resposta 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!
    Postado em 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
    Postado em 10/02/09 02:39 em resposta a Arturo Vazquez.
    I have the same problem " DLServiceUtil.addFile(" even in 23105 version!
    Can you post the workflow-portlet war file?
    Postado em 10/02/09 07:25 em resposta 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?
    Postado em 20/02/09 05:19.
    Sorry, I jumped the gun...the svn checkout hadn't finished yet. The projects do build normally.
    Postado em 20/02/09 06:27 em resposta a Bruce Altner.
    is anyone willing to attach the compiled WF-portlet, please?
    Postado em 27/04/09 09:05 em resposta 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?
    Postado em 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
    Postado em 18/09/09 07:14 em resposta 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
    Postado em 18/09/09 07:20 em resposta 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
    Postado em 23/09/09 04:22.
    This process still work in LF 5.2 ? I can't configure for this.
    Someone can help me?
    Postado em 29/09/09 07:06 em resposta a Abhay Kumar.
    This process can not work in 5.1.2
    Postado em 05/04/10 17:32.
    how to use workflow on liferay 6.+?
    think you!
    Postado em 07/07/10 19:54.