Using the Workflow Portlet

(从 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 附件
    62348 查看
    平均 (0 票)
    满分为 5,平均得分为 0.0。
    评论
    讨论主题回复 作者 日期
    thanks for this help .... Manuel Victor Ariel Rodriguez Coria 2008年10月14日 上午8:21
    Can you attached your compiled WF-portlet also,... Oliver Lauer 2008年10月24日 下午2:17
    is anyone willing to attach the compiled... Daniel D. Barciela 2009年4月27日 上午9:05
    You used swimlane with roles or user/name of... Solo Imr 2008年10月28日 上午6:49
    I used the userId for getting it working using... Ganesh Ram 2008年10月31日 上午5:02
    When I use user/userId, it works fine. When I... Solo Imr 2008年10月31日 上午6:33
    It's very good.I think it is very helpfull to... Sohui Gu 2008年11月2日 下午6:35
    I guess this worked once upon a time but with... Arturo Vazquez 2008年12月19日 下午7:14
    Just FYI i managed to build it with r 23105 Arturo Vazquez 2008年12月19日 下午7:35
    I am also getting same problem when i deploy... devaki s 2009年2月10日 上午2:39
    I have the same problem "[javac]... Samer A Salameh 2009年2月10日 上午7:25
    Hi Arturo, I need the workflow war for V5.1.2,... yassir houmame 2009年9月18日 上午7:14
    Dear, i follow the tutorial but i cant deploy... Khoa Dang TU 2009年1月21日 下午7:40
    I cannot build either jbpm-web or mule-web.... Bruce Altner 2009年2月20日 上午5:19
    Sorry, I jumped the gun...the svn checkout... Bruce Altner 2009年2月20日 上午6:27
    Hi I tried to get svn 5.1.x branch but I wasn't... Sly Ge 2009年5月8日 下午2:25
    Hi Sly, Could you manage to get the... yassir houmame 2009年9月18日 上午7:20
    hey !! I wanted help regarding how to display... Abhay Kumar 2009年9月23日 上午4:22
    This process still work in LF 5.2 ? I can't... Lucas Roberto Thomaz 2009年9月29日 上午7:06
    This process can not work in 5.1.2 z d l 2010年4月5日 下午5:32
    how to use workflow on liferay 6.+? think you! arron wu 2010年7月7日 下午7:54

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