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.


