« Back

Applying workflow on custom assets in Liferay 6 through plugins

General Blogs August 23, 2010 By Jonas Yuan

As you know, Liferay 6 integrates workflow system like jBPM or Kaleo on any assets finally. By this feature, users are able to manage the content creation process with a workflow. Out-of-the-box, liferay 6 provides the ability to enable workflow for core assets:

  • Blogs Entry
  • Comments
  • Document Library Document
  • Message Boards Message
  • Web Content
  • Wiki Page

Logically, worklow is available for any assets (Out of box entities).For more details, you can refer to blogs Liferay Workflow In Action and Applying workflow on any assets in Liferay 6.

Asset here refers to Liferay core content entities (generated by Service-Builder in portal core) and custom entities (generated by Service-Builder in plugins): like Document Library document, Image Gallery image, Message Boards message, Web Content, Wiki page, comments, Blogs entry. Logically, workflow should be available for any assets like Image Gallery image, Calendar event, layout page, Bookmarks entry, user, organization, etc. (Abstracted from the book: Liferay Portal 6 Enterprise Intranets)

Most importantly, you can apply workflow systems on custom assets in Liferay 6 through plugins. This article will show you how to apply workflow on custom assets (generated by Service-Builder) in Liferay 6 through plugins. Here I use custom assets knowledge base articles as examples in Liferay Portal 6.0.5 GA3.

How does it work?

You can simply download WAR from

knowledge-base-portlet-6.0.6.1.war

and deploy it

Configure workflow on any custom assets

Now you can configure workflow now. I use custom asset Knowledge base Article as an example.

Create two users: David Berger – a content creator; Lotti Stein – a content reviewer. And assign them as members of community Guest.

Login as admin and go to Control panel | Liferay.com| Workflow Configuration

Locate Knowledge Base Artcile and select “Single Approver” workflow and save it.

Go to Control panel | Portal| Communities and assign user roles of community guest; note that you can apply workflow on any assets of any groups (communities and organizations). Here I use the group Guest as an example.

Assign roles (community or organization content reviewer – Auto-generated role from workflow definition) to users (David Berger and Lotti Stein).

Go through workflow

Assign proper permissions to users David Berger and Lotti Stein that they can manage pages and create Knowledge Base articles in community Guest;

Login as David Berger and create Knowledge Base article called “Liferay Portal 6 Enterprise Intranets”; you would see that the asset Knowledge Base article goes workflow and it states as “Pending”;

 Login as Lotti Stein and go to Control Panel | Lotti Stein | My Workflow Tasks; you would see tabs: Assigned to Me, Assigned to My Roles, My Completed Tasks. Under the tab Assigned to My Roles, you would see the workflow task “Liferay Portal 6 Enterprise Intranets” with Asset Title “Liferay Portal 6 Enterprise Intranets” and Asset Type “Knowledge Base Article”.

Now you can review task or assign task to somebody. Click on the workflow task and assign this to yourself “Lotti Stein”; and add comment “Please review”; as you can see, the workflow task is moved to the tab “Assigned to Me”;

 Click on the workflow task under the tab “Assigned to Me”; and you can either reject it or approve it; you can click on “Approve Asset” and add comment “looks good” as well;

As you can see, the workflow task is move to the tab “My Completed Tasks”. In the detail view of the task, you can view and edit the content, read the recent activity of the task, view the status and change its status, add comments, etc.

After approved, Knowledge Base  article“Liferay Portal 6 Enterprise Intranets” would be visible for end users.

Summary

As you can see, you could be able to apply workflow on any custom assets generated by Service-Builder in Liferay 6. The asset Knowledge Base article is one of them (custom assets).

Your comments or suggestions?

How to make it?

You should be able to apply workflow on any custom assets in Liferay 6 or above version. How to make it through plugins? I will address programatic details in next blogs post. 

Threaded Replies Author Date
What makes it nice is that, from workflow... Frank Yu August 23, 2010 12:34 PM
Thanks, Jonas.I am looking forward to your next... Sohui Gu August 23, 2010 8:27 PM
Thanks Jonas for the update. Looking forward to... Pius Onobhayedo August 24, 2010 5:21 AM
Very interesting article, indeed! Xinsheng Robert Chen August 25, 2010 12:59 PM
Nice article. Has anyone tried to decipher how... Sandeep Nair September 6, 2010 4:10 AM
Hello Jonas, Thanks once more. Are we... Pius Onobhayedo September 6, 2010 9:34 AM
@Pius @Gu, Thanks. Yes, the next blog on... Jonas Yuan September 6, 2010 10:14 AM
Thanks, looking forward to it. Meanwhile, may I... Pius Onobhayedo September 7, 2010 2:38 AM
Hi Pius, Thanks. The new blog is here:... Jonas Yuan September 7, 2010 7:51 AM
Thanks Jonas. I will take a close look at the... Pius Onobhayedo September 7, 2010 8:56 AM
Thank you, Pius. Current workflow systems in... Jonas Yuan September 20, 2010 3:41 PM
Thanks for the feedback. Looking forward to... Pius Onobhayedo September 21, 2010 9:27 AM
nice article. one question is how can we difine... Sandhya A September 19, 2010 11:39 PM
Hi Geervani, Thanks. the workflow feature (with... Jonas Yuan September 20, 2010 12:14 PM
Hi Jonas, Thanks for the quick response. My... Sandhya A September 21, 2010 4:49 AM
Hi Geervani, Thanks You may take two-step... Jonas Yuan September 28, 2010 8:45 AM
Thanks Jonas, I have a question. Is it possible... Sandhya A October 6, 2010 3:54 AM
Hi Geervani, see this: ... unai alba October 18, 2010 2:41 AM
Hi Geervani, sorry to come back to you late. ... Jonas Yuan October 18, 2010 12:17 PM
Hi Jonas, I am testing the Kaleo workflow... Pius Onobhayedo February 8, 2011 3:51 AM
Nice! thank you Pius. Jonas Yuan February 8, 2011 6:51 AM
Thanks for the feedback. One more... Pius Onobhayedo February 9, 2011 3:44 AM
Good catch, thanks Pius! Jonas Yuan February 9, 2011 11:28 AM
hi, I am a beginner in the world of Liferay ... Bradai Salma February 17, 2011 12:10 AM
hi, I am a beginner in the world of Liferay ... Bradai Salma February 17, 2011 12:10 AM
Hi Bradai, you can simply drop the WAR file... Jonas Yuan February 18, 2011 7:21 AM
Hi Jonas, Do you know where can I find a guide... unai alba October 18, 2010 2:45 AM
Hi Unai, you may use another workflow: Workflow... Jonas Yuan October 18, 2010 12:24 PM
Hi Jonas, I created a custom portlet and added... Sandhya A October 30, 2010 6:57 PM
Hi, I am using liferay workflow 6.0.5. When I... Sandhya A November 2, 2010 7:45 AM
Hi Sandhya, Would you be able to share your... Jonas Yuan November 2, 2010 11:27 PM
Thanks jonas for the reply. I am using the... Sandhya A November 2, 2010 11:35 PM
Hi Sandya, Thanks. Does workflow work well in... Jonas Yuan November 3, 2010 6:56 AM
Hi Jonas, Glad to here from you back. I had... Sandhya A November 3, 2010 8:38 AM
Hi Sandhya, No sure about issue you got. You... Jonas Yuan November 4, 2010 12:08 AM
Thank you, i logged in to your demo site and... Sandhya A November 3, 2010 11:52 PM
HI Sandya, sorry that the server has null issue... Jonas Yuan November 4, 2010 12:09 AM
No We dont have EE. We chose Liferay because if... Sandhya A November 4, 2010 12:24 AM
Hi Sandhya, you may use 6.1 trunk version,... Jonas Yuan November 4, 2010 4:56 PM
Hi Juan, finally got that working. I was... Sandhya A November 27, 2010 9:47 AM
Hi Jonas, One thing i find out while debugging... Sandhya A November 29, 2010 5:04 PM
Hi Sandhya, sorry to come back to you late. ... Jonas Yuan January 7, 2011 10:41 PM
Thanks Jonas, Yes Its working now. But I still... Sandhya A January 10, 2011 8:49 PM
Hi Sandhya, thanks. Are you able to paste your... Jonas Yuan January 12, 2011 11:06 AM
Hi Jonas, configurations in... Sandhya A January 12, 2011 8:54 PM
Hi Sandhya, thanks. Sorry to come back to you... Jonas Yuan February 8, 2011 6:50 AM
Hi Jonas, I am using LR tomcat bundle 6.0.5. I... Sandhya A February 19, 2011 10:15 PM
One more question, Present we are using role... Sandhya A February 20, 2011 6:39 AM
Not in need. Current workflow is defined as... Jonas Yuan February 21, 2011 10:28 PM
Hi Jonas, Just wondering if Kaleo workflow... Pius Onobhayedo March 9, 2011 1:04 AM
Hi Pius, thanks. It seems that these two... Jonas Yuan March 10, 2011 11:58 AM
No. I am using the Community version Pius Onobhayedo March 11, 2011 12:14 AM
Hi Sandhya, thanks. You can customize it as a... Jonas Yuan February 21, 2011 10:26 PM
Hi Yuan, I have multiple web assets and I want... Deepak Poyilil March 20, 2011 11:24 PM
Hi Deepak, sorry to find your question late. ... Jonas Yuan July 26, 2011 3:27 PM
Hi Jonas, This article is a very easy &useful... Mahendra Mahakle October 10, 2011 12:14 AM
HI, And my portlet configuration in... Mahendra Mahakle October 10, 2011 12:17 AM
Hi madendra, check your code like Caused by:... Jonas Yuan October 11, 2011 9:04 AM
Hi Jonas, What can be the solution if I want... Ravi Kumar Gupta November 22, 2011 12:39 AM
Hi Ravi, It is possible that you can leverage... Jonas Yuan November 28, 2011 11:42 AM
Thanks Jonas for sharing this.. I have... Jay Patel December 5, 2011 6:57 AM
HI jonas I assigned single approver workflow to... vasudha karri September 23, 2012 6:10 AM
I In the select box that appear on My Workflow... Enrico Maria Rossi February 13, 2013 3:37 AM

What makes it nice is that, from workflow integration perspective, there is no difference between Liferay core asset and custom asset. You can also define your own workflow process and apply it to Liferay core assets or your custom assets.
Posted on 8/23/10 12:34 PM.
Thanks, Jonas.I am looking forward to your next blogs post of programatic details.
Posted on 8/23/10 8:27 PM.
Thanks Jonas for the update. Looking forward to the next blog post for the programatic details. Can't wait to try it out!
Posted on 8/24/10 5:21 AM.
Very interesting article, indeed!
Posted on 8/25/10 12:59 PM in reply to Pius Onobhayedo.
Nice article. Has anyone tried to decipher how single-workflow-definition.xml work? how to interprete the flow in xml itself so that new workflow.xml can be created.
Posted on 9/6/10 4:10 AM.
Hello Jonas,

Thanks once more. Are we expecting your next blog on workflow programatic details soon. Eager to try it out.
Posted on 9/6/10 9:34 AM.
@Pius @Gu,
Thanks. Yes, the next blog on workflow programmatic details - "How to add workflow capabilities on Knowledge Base articles or any custom assets in plugins" - is on the way. It should be ready tomorrow.
Posted on 9/6/10 10:14 AM in reply to Pius Onobhayedo.
Thanks, looking forward to it. Meanwhile, may I ask two quick question:
1. In the workflow, can the approval process be routed to another user (e.g. the immediate manager of the originating user) apart from the routing to people that have roles indicated in the workflow definition?
2. Is there escalation support yet?

Thanks.
Posted on 9/7/10 2:38 AM in reply to Jonas X. Yuan.
Hi Pius, Thanks.

The new blog is here: http://www.liferay.com/web/jonas.yuan/blog/-/blogs/how-to-add-workflow-capabilit­ies-on-knowledge-base-articles-or-any-custom-assets-in-plugins.

>> 1. In the workflow, can the approval process be routed to another user (e.g. the immediate manager of the originating user) apart from the routing to people that have roles indicated in the workflow definition?

Yes, you can.

>> 2. Is there escalation support yet?

The users can withdraw the tasks of workflow process anytime. Does it answer your question?
Posted on 9/7/10 7:51 AM in reply to Pius Onobhayedo.
Thanks Jonas. I will take a close look at the new blog.

Regarding my first question, it's good to know that specifying users instead of roles is supported. Kindly send a quick example of assigning tasks to users rather than roles. The sample workflow definitions so far use roles (community, organization, regular) .

The second question has to do with timing of tasks. If a given user assigned a task does not execute it within a given period, it should be transferred automatically to another indicated user if the period of grace expires.

Thanks once more.
Posted on 9/7/10 8:56 AM in reply to Jonas X. Yuan.
nice article. one question is how can we difine new definitions adn use it on custom protlets. Is there any article on this. Can you please send the link?

Also the defintions in liferay 5.2.3 wont work here (Eg. Holiday definition). How can that be achived? Please help
Posted on 9/19/10 11:39 PM.
Hi Geervani, Thanks. the workflow feature (with jBPM or Kaleo) is used for 6.0 or above version only. 5.2 has different workflow architecture integration.

We do need doc for new workflow definition. Hope that I could post another article shortly.
Posted on 9/20/10 12:14 PM in reply to Geervani BS.
Thank you, Pius. Current workflow systems in Liferay 6 should cover these two features in nature. But I do not think this kind of workflow definition exist at moment.

Let me go back, check capabilities of workflow specification and definition, and come back to you as early as possible.
Posted on 9/20/10 3:41 PM in reply to Pius Onobhayedo.
Hi Jonas,

Thanks for the quick response.
My actual requirement is something like this.

I need to develop a portlet for employee leave management. Employee details is obtained from SAP BAPI's. I need to integrate Liferay workflow for leave approval. Once approved the SAP bapi function should be called to update other details. can this be achieved with Liferay 6.0 workflow? can you please share some reference/links to work on this. Any help will highly appreciated.

Thanks in advance

Geervani
Posted on 9/21/10 4:49 AM in reply to Jonas X. Yuan.
Thanks for the feedback. Looking forward to further information.
Posted on 9/21/10 9:27 AM in reply to Jonas X. Yuan.
Hi Geervani, Thanks

You may take two-step approach
1) create a SAP portlelt with custom content model
2) apply workflow on custom content model.

Liferay 6 would be able to satisfy this requirement.
Posted on 9/28/10 8:45 AM in reply to Geervani BS.
Thanks Jonas,
I have a question. Is it possible to add/display 'My Workflow task' in a normal page(rather than control panel)? 'My Workflow task' portlet in found in portlet-display.xml in the hidden category. I changed it to admin category. But unable to see that in admin category. Please help.
Thanks
geervani
Posted on 10/6/10 3:54 AM in reply to Jonas X. Yuan.
Hi Geervani,

see this:

http://www.liferay.com/community/forums/-/message_boards/message/6089631

The­re is the answer.

Bye
Posted on 10/18/10 2:41 AM in reply to Geervani BS.
Hi Jonas,

Do you know where can I find a guide or any doc about the possibilities of Kaleo?

I would like to add a conditional node to my workflow def, but I have no Idea how and I can't find any information about it...

Thanks in advance
Posted on 10/18/10 2:45 AM in reply to Jonas X. Yuan.
Hi Geervani, sorry to come back to you late.

By default, portlets: 150 - Workflow Tasks and 153 - My Workflow Tasks are hidden.

You can make them visible by removing them from category category.hidden in liferay-display.xml.

Thanks to Unai, you can find the same at
http://www.liferay.com/community/forums/-/message_boards/message/6089631

Hope that it helps,

Thanks

Jonas
Posted on 10/18/10 12:17 PM in reply to Geervani BS.
Hi Unai, you may use another workflow: Workflow assets must be approved first by Marketing and then by Legal.

http://www.liferay.com/c/document_library/get_file?p_l_id=5624309&groupId=­31578&folderId=6185795&name=DLFE-76603.xml

For somehow details, you may refer to online doc.
http://www.liferay.com/documentation/liferay-portal/6.0/administration/-/ai/­workflow-with-kaleo

Hope that it helps,

Thanks,

Jonas
Posted on 10/18/10 12:24 PM in reply to unai unai.
Hi Jonas,

I created a custom portlet and added workflow capabilities for that. It got added. I have configured to use Single Level Approver Workflow. When I submit data from the portlet it is showing in 'My Submissions' in 'Control Panel'. I assigned to 'Content Reviewer' and 'Content Reviewer' is able to see in 'My Workflow Task'. Problem is when I click on 'Review', nothing happens. I page will just get refreshed. Its not getting redirected to Review Screen. Am I missing something.
Also the asset Title in 'My Workflow Task' is displaying as null and in Asset Type I can see class name.

Please help on this. How to display review screen on click on Review link?

I followed the steps in http://www.liferay.com/web/jonas.yuan/blog/-/blogs/5786756/maximized

Thanks & Regards
Sandhya
Posted on 10/30/10 6:57 PM.
Hi,

I am using liferay workflow 6.0.5. When I configure a worflow for a custom portlet I am getting screen like this. The Asset Tile is null. Also When I click on review it is redirecting to a blank page and i am not able to see content of the portlet.




please help. Its very urgent

Thanks
Posted on 11/2/10 7:45 AM.
Hi Sandhya, Would you be able to share your settings or configuration of Workflow on your custom portlet?

It would help if you could narrow down the issue.
Posted on 11/2/10 11:27 PM in reply to Sandhya A.
Thanks jonas for the reply. I am using the default 'Single Approver' workflow for the portlet. I created the normal portlet and added workflow for that. I followed Knowledge Base.
Posted on 11/2/10 11:35 PM in reply to Jonas X. Yuan.
Hi Sandya, Thanks.

Does workflow work well in your Konwledge base portlet?
Posted on 11/3/10 6:56 AM in reply to Sandhya A.
Hi Jonas,

Glad to here from you back. I had almost started feeling liferay 6.0.5 workflow was a wrong choice.

Ny the way answer to your question is No. When i try to use KB it says temporarily unavailable.
I am not able to add KB article portlet.
Is the review click event somehow related to Workflow asset type title? Where to set that? For me its null. my portlet is for an 'HRMS module leave approval' and doesn't have a title field. But to check i just hard coded title.

Waiting for your response.

Thanks
Posted on 11/3/10 8:38 AM in reply to Jonas X. Yuan.
Hi Sandhya, No sure about issue you got. You may use Liferay 6.0 EE. Here you may test workflow on KB of Liferay 6.0 EE,
at http://xxx.xxx.com/

jonas/jonas

Please let me know your test,

Thanks

Jonas
Posted on 11/4/10 12:08 AM in reply to Sandhya A.
Thank you,

i logged in to your demo site and tried to add article in Control panel , KB Admin. It is rediring to http://ldapds.cignex.com/group/control_panel/null and giing not found error.

One more thing is with the exising CE i am able to work with Wiki, blog etc even if i configure workflow.
I think i am missing something.

regards
Sandhya
Posted on 11/3/10 11:52 PM in reply to Jonas X. Yuan.
HI Sandya, sorry that the server has null issue -emoticon (I am planning to fix it later).

Anyway, the workflow works in my side for 6.0 EE. If possible, you may try workflow in 6.0 EE. 6.0.5 CE should work with bugs.

Thanks
Posted on 11/4/10 12:09 AM in reply to Sandhya A.
No We dont have EE. We chose Liferay because if free.

Anyway thanks for you reply.
Posted on 11/4/10 12:24 AM in reply to Jonas X. Yuan.
Hi Sandhya, you may use 6.1 trunk version, where a set of bugs related to workflow got fixed.
Posted on 11/4/10 4:56 PM in reply to Sandhya A.
Hi Juan,

finally got that working. I was missing adding to "assetEntry". I have one more question. In a leave request approval, i want to assign the workflow task directly to the manager of the applying employee (instead of a role called manager). I tried something like this in my localserviceimpl:

WorkflowInstanceLink wfinl;
wfinl = workflowInstanceLinkLocalService.getWorkflowInstanceLink(user.getCompanyId(), groupId, LeaveDetails.class.getName(), leavedetails.getResourcePrimKey());

long wfinstanceid = wfinl.getWorkflowInstanceId();
List<WorkflowTask> lstwft;
int end = WorkflowTaskManagerUtil.getWorkflowTaskCountByRole(user.getCompanyId(), 17503, Boolean.FALSE);
lstwft = WorkflowTaskManagerUtil.getWorkflowTasksByRole(user.getCompanyId(), 17503, Boolean.FALSE, 0, end, null);
for (int i = 0; i < lstwft.size(); i++) {
WorkflowTask wft = lstwft.get(i);
long wftid = wft.getWorkflowTaskId();
WorkflowTaskManagerUtil.assignWorkflowTaskToUser(user.getCompanyId(), 10892, wftid, 10892, "Assign", null, null);
}

but getting some exception in the last line while calling the method assignWorkflowTaskToUser . can you please help on this.

Thanks
Sandhya
Posted on 11/27/10 9:47 AM in reply to Jonas X. Yuan.
Hi Jonas,

One thing i find out while debugging is, If I login as "Bruno Admin", the above code works perfectly. Other wise i is throwing some permission exception. while reading your blog I found the following lines "Assign proper permissions to users David Berger and Lotti Stein that they can manage pages and create Knowledge Base articles in community Guest;". Where do do this?

regards
sandhya
Posted on 11/29/10 5:04 PM in reply to Sandhya A.
Hi Sandhya, sorry to come back to you late.

Do you get your questions answered?
Posted on 1/7/11 10:41 PM in reply to Sandhya A.
Thanks Jonas, Yes Its working now. But I still have a problem with liferay workflow. If I include <asset-renderer-factory> or <workflow-handler> tags in liferay-portlet.xml (which is a must for implementing LR workflow)for the custom portlets that i have developed, I am getting the Null pointer exception when deploying the portlet. Error says: "Error Registering portlet". There is already issues logged in JIRA for this. But I dont knw how to resolve. I am using Tomcat Bundle.

Please advise
Posted on 1/10/11 8:49 PM in reply to Jonas X. Yuan.
Hi Sandhya, thanks. Are you able to paste your configuration here? Thus you would get helps in time.
Posted on 1/12/11 11:06 AM in reply to Sandhya A.
Hi Jonas,

configurations in liferay-portlet.xml is as follows

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE liferay-portlet-app PUBLIC "-//Liferay//DTD Portlet Application 6.0.0//EN" "http://www.liferay.com/dtd/liferay-portlet-app_6_0_0.dtd">
<liferay-portlet-app>­
<portlet>
<portlet-name>TimeAccount</portlet-name>
<asset-renderer-factory>com.liferay.portlet.hrms.asset.LeaveAssetRendererFactory­</asset-renderer-factory>
<workflow-handler>com.liferay.portlet.hrms.workflow.LeaveWorkflowHandler</workfl­ow-handler>
<instanceable>true</instanceable>
<ajaxable>true</ajaxable>
</portlet>
</liferay-portlet-app>


and config in portlet xml is

<?xml version='1.0' encoding='UTF-8' ?>
<portlet-app xmlns='http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xsi:schemaLocation='http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd' version='2.0'>
<portlet>
<description>TimeAccount</description>
<portlet-nam­e>TimeAccount</portlet-name>
<display-name>TimeAccount</display-name>
<portl­et-class>com.liferay.portlet.hrms.TimeAccount</portlet-class>
<expiration-cach­e>0</expiration-cache>
<supports>
<mime-type>text/html</mime-type>
<­portlet-mode>VIEW</portlet-mode>
<portlet-mode>EDIT</portlet-mode>
<po­rtlet-mode>HELP</portlet-mode>
</supports>
<resource-bundle>com.liferay.port­let.hrms.messages</resource-bundle>
<portlet-info>
<title>TimeAccount</ti­tle>
<short-title>TimeAccount</short-title>
</portlet-info>
</portlet>
</p­ortlet-app>


Please advise.

thanks
sandhya
Posted on 1/12/11 8:54 PM in reply to Jonas X. Yuan.
Hi Jonas,

I am testing the Kaleo workflow available in the public repository (branch). There is an important bug which I have flagged (http://issues.liferay.com/browse/LPS-15197). I think it will be better to fix that bug which is not currently listed in the todo list before the imminent release.

Thanks,
Pius
Posted on 2/8/11 3:51 AM in reply to Jonas X. Yuan.
Hi Sandhya, thanks. Sorry to come back to you late. The XML files look good in general. you may disable following two lines.

<instanceable>true</instanceable>
<ajaxable>true</ajaxable>

Hope that it helps.
Posted on 2/8/11 6:50 AM in reply to Sandhya A.
Nice! thank you Pius.
Posted on 2/8/11 6:51 AM in reply to Pius Onobhayedo.
Thanks for the feedback. One more observation...

I get the impression that additional portal instances are neglected in testing as development on workflow proceeds both for the 6.0.6 branch (http://issues.liferay.com/browse/LPS-15197) as well as for the trunk (http://issues.liferay.com/browse/LPS-15101) . Does this imply that the multi-instance feature of Liferay is not given due consideration? In my opinion, it is a major distinguishing feature of Liferay and therefore, new major features like workflow ought to be tested continuously on additional portal instances as development proceeds just as it is done with the default instance. Kindly convey the message.

Thanks.
Pius
Posted on 2/9/11 3:44 AM in reply to Jonas X. Yuan.
Good catch, thanks Pius!
Posted on 2/9/11 11:28 AM in reply to Pius Onobhayedo.
hi,
I am a beginner in the world of Liferay
how to deploy knowledge-base-portlet-6.0.6.1.war,
I know it's a stupid question but please help me
Posted on 2/17/11 12:10 AM in reply to Jonas Yuan.
hi,
I am a beginner in the world of Liferay
how to deploy knowledge-base-portlet-6.0.6.1.war,
I know it's a stupid question but please help me
Posted on 2/17/11 12:10 AM in reply to Jonas Yuan.
Hi Bradai, you can simply drop the WAR file into the folder ${liferay.home}/deploy.

Hope that it helps.
Posted on 2/18/11 7:21 AM in reply to Bradai Salma.
Hi Jonas,

I am using LR tomcat bundle 6.0.5. I have developed few custom portlets and enabled workflow for that. everything's fine till now. I want to display records in 'my workflow task' and 'my submission' in descending order(i.e. recent most record on top). How can I do this without changing the source(as I am using tomcat bundle). Can we change something in jsp or jspf to achieve this? Please advise.

Thanks in advance
Regards,
Sandhya
Posted on 2/19/11 10:15 PM.
One more question,

Present we are using role based workflow with manager and employee roles. If we have to use user-based workflow, is it necessary to hard-code the screen-name, email-id etc. in the workflow definition XML or can that be generalized. Is there any doc. on user based workflow definition for LR 6.0.5?
Please advise

Thanks
Sandhya
Posted on 2/20/11 6:39 AM in reply to Sandhya A.
Hi Sandhya, thanks.

You can customize it as a fix patch. :-)

Hope that it helps.

Jonas
Posted on 2/21/11 10:26 PM in reply to Sandhya A.
Not in need. Current workflow is defined as role-based workflow, but the UI is user-based. Is this what you are looking for?
Posted on 2/21/11 10:28 PM in reply to Sandhya A.
Hi Jonas,

Just wondering if Kaleo workflow works well for other people in additional portal instances with shard enabled. The bugs I earlier flagged for 6.0.6 (http://issues.liferay.com/browse/LPS-15197) and 6.1.0 (http://issues.liferay.com/browse/LPS-15101) still persist and there seem to be nobody else interested in the issues I raised. Is it something you can try out?

Thanks.

Pius
Posted on 3/9/11 1:04 AM in reply to Jonas Yuan.
Hi Pius, thanks. It seems that these two tickets didn't get reviewed in time. Sorry about this bad news.

These two issues may get fixed in EE version - need to test it out.

By the way, do you use EE version?

Jonas
Posted on 3/10/11 11:58 AM in reply to Pius Onobhayedo.
No. I am using the Community version
Posted on 3/11/11 12:14 AM in reply to Jonas Yuan.
Hi Yuan,
I have multiple web assets and I want to assign different type of workflow for each.Can you please mention how to achieve it.
Posted on 3/20/11 11:24 PM.
Hi Deepak, sorry to find your question late.

Anyway this feature will get supported in 6.1. This is good news indeed.
Posted on 7/26/11 3:27 PM in reply to Deepak P.
Hi Jonas,
This article is a very easy &useful for me to achieve the workflow feature on my custom assets.I have implemented it on our portlet.
But one small problem is that when I am going to add <asset-renderer-factory>com.aikon.workflow.assets.XXXAssetRendererFactory</asse­t-renderer-factory> this element in liferay-portlet.xml then it gives me the following exception.............................................................

06:52:35,2­98 INFO [PortletHotDeployListener:220] Registering portlets for aikon-portlet
06:52:35,826 ERROR [HotDeployUtil:112] com.liferay.portal.kernel.deploy.hot.HotDeployException: Error registering portlets for

aikon-por
com.liferay.portal.kernel.deploy.hot.HotDeployException: Error registering portlets for aikon-portlet
at com.liferay.portal.kernel.deploy.hot.BaseHotDeployListener.throwHotDeployExcepti­on(BaseHotDeployListener.java:45)
at com.liferay.portal.deploy.hot.PortletHotDeployListener.invokeDeploy(PortletHotDe­ployListener.java:104)
at com.liferay.portal.kernel.deploy.hot.HotDeployUtil._doFireDeployEvent(HotDeployU­til.java:109)
at com.liferay.portal.kernel.deploy.hot.HotDeployUtil._fireDeployEvent(HotDeployUti­l.java:182)
at com.liferay.portal.kernel.deploy.hot.HotDeployUtil.fireDeployEvent(HotDeployUtil­.java:38)
at com.liferay.portal.kernel.servlet.PortletContextListener.doPortalInit(PortletCon­textListener.java:99)
at com.liferay.portal.kernel.util.BasePortalLifecycle.portalInit(BasePortalLifecycl­e.java:42)
at com.liferay.portal.kernel.util.PortalLifecycleUtil.register(PortalLifecycleUtil.­java:52)
at com.liferay.portal.kernel.util.BasePortalLifecycle.registerPortalLifecycle(BaseP­ortalLifecycle.java:50)
at com.liferay.portal.kernel.servlet.PortletContextListener.contextInitialized(Port­letContextListener.java:55)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4135­)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4630)
at org.apache.catalina.startup.HostConfig.checkResources(HostConfig.java:1244)
at org.apache.catalina.startup.HostConfig.check(HostConfig.java:1342)
at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:303)
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.ja­va:119)
at org.apache.catalina.core.ContainerBase.backgroundProcess(ContainerBase.java:1337­)
at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChild­ren(ContainerBase.java:1601)
at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChild­ren(ContainerBase.java:1610)
at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.run(Containe­rBase.java:1590)
at java.lang.Thread.run(Thread.java:619)
Caused by: java.lang.NoClassDefFoundError: Could not initialize class com.liferay.util.portlet.PortletProps
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.jav­a:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at com.liferay.portal.kernel.util.MethodHandler.invoke(MethodHandler.java:81)
at com.liferay.portal.kernel.util.MethodHandler.invoke(MethodHandler.java:75)
at com.liferay.portlet.PortletBagFactory.getPluginPropertyValue(PortletBagFactory.j­ava:324)
at com.liferay.portlet.PortletBagFactory.newAssetRendererFactoryInstances(PortletBa­gFactory.java:452)
at com.liferay.portlet.PortletBagFactory.create(PortletBagFactory.java:196)
at com.liferay.portal.deploy.hot.PortletHotDeployListener.initPortlet(PortletHotDep­loyListener.java:456)
at com.liferay.portal.deploy.hot.PortletHotDeployListener.doInvokeDeploy(PortletHot­DeployListener.java:253)
at com.liferay.portal.deploy.hot.PortletHotDeployListener.invokeDeploy(PortletHotDe­ployListener.java:101)
... 19 more

please help me for this problem because I am at peak point of success.

Thanks
Mahendra.
Posted on 10/10/11 12:14 AM in reply to Jonas Yuan.
HI,
And my portlet configuration in liferay-portlet.xml is looking like this............
<portlet-name>postideaportlet</portlet-name>
<icon>/images/po­rtleticons/idea.png</icon>
<asset-renderer-factory>com.aikon.workflow.assets.I­deaSubmissionAssetRendererFactory</asset-renderer-factory>
<workflow-handler>c­om.aikon.workflow.handler.IdeaSubmissionWorkflowHandler</workflow-handler>
<!-- <instanceable>false</instanceable> -->
<header-portlet-css>/css/portlet.css</header-portlet-css>
<footer-portle­t-javascript>
/js/javascript.js
</footer-portlet-javascript>
<css-class­-wrapper>postideaportlet-portlet</css-class-wrapper>
</portlet>
Thanks
Mahendra.
Posted on 10/10/11 12:17 AM in reply to Mahendra Mahakle.
Hi madendra,

check your code like

Caused by: java.lang.NoClassDefFoundError: Could not initialize class com.liferay.util.portlet.PortletProps

Good luck!
Posted on 10/11/11 9:04 AM in reply to Mahendra Mahakle.
Hi Jonas,

What can be the solution if I want to add workflow on an entity already present in Liferay core.. modifying the service using ext is not an option since it wont allow me to build service, using hook I can add methods to service but will that work..??

Thanks and Regards
Ravi
Posted on 11/22/11 12:39 AM.
Hi Ravi,

It is possible that you can leverage hooks. But It would be better to use latest version like 6.1 - capability to apply workflow on any portal core assets.

Hope that it helps

Jonas
Posted on 11/28/11 11:42 AM in reply to Ravi Kumar Gupta.
Thanks Jonas for sharing this..

I have downloaded very latest tomcat-liferay bundle LR-6.1.0-CE-Beta4, still I don't find proper way to implement Workflow on any OOB asset for example "User" model.

Assume that I want to implement Workflow on "User" asset. Meaning when new user is created, it should be assigned to some Work-flow definition e.g. single-approver definition. Then when it is approved by approver then only status may be changed to "Approved".

What I have learned as of now is, in order to have WF on any asset service.xml & liferay-portlet.xml should be changed..correct me if I am wrong.

And I don't find any proper way to modify/override these service.xml & liferay-portlet.xml.

Still for just POC purpose, I changed the following files in Portal source code directly to have work-flow on User asset:

1. service.xml to add columns & reference package path for Work-flow
2. liferay-portlet.xml to add UserWorkflowHandler

Now the problem is after changing this service.xml, portal does not allow me to build services again saying that "Could not find com.liferay.portal.tools.servicebuilder.ServiceBuilder. Make sure you have it in your classpath", though ServiceBuilder class is available under the same package.

What can be root cause here?

Also can you also suggest some other better way for above kind of requirement when Liferay's OOB asset needs to be customized to apply Workflow on it?

Thanks in advance,
Jay.
Posted on 12/5/11 6:57 AM in reply to Jonas Yuan.
HI jonas
I assigned single approver workflow to a folder in document and media and then uploaded a document.Now i logged in as another user who has role as portalcontent reviewer.This guy assigned the task to himself and then edited the document..but he is getting the same task again in "Assigned to my roles ".. why is he getting the same task to review that document again when he edited the document.please provide some solution for not getting the same task again when edited that document in wokflow task tab..

Thanks & Regards
K.Vasudha

Thanks &
Posted on 9/23/12 6:10 AM.
I In the select box that appear on My Workflow Tasks page (assign-to, assign-to-me, publish, reject..) how can I assign a task to a list of users? I see that I can select only one user from extinsting users. From xml i don't manage it. Can you help me?
Posted on 2/13/13 3:37 AM.