留言板

Applying advanced workflow to Category asset in Liferay 6

thumbnail
Puneet Upadhyay,修改在12 年前。

Applying advanced workflow to Category asset in Liferay 6

Regular Member 帖子: 234 加入日期: 11-10-22 最近的帖子
THere are already six assets in workflow.
1.Page Revision
2.Blogs Entry
3.Web Content
4.Comments
5.Message Boards Message
6.Wiki Page

I want to add Category as one such asset.
My queries is :

1.Do i need to use ext or portlet for this ?

2.The category asset has its own service.xml .Will making a new servcie.xml for this category asset not conflict with each other ?
thumbnail
Puneet Upadhyay,修改在12 年前。

RE: Applying advanced workflow to Category asset in Liferay 6

Regular Member 帖子: 234 加入日期: 11-10-22 最近的帖子
What needs to be done for already existing asset like Asset Category(Category which is in categories link in control panel of administrator) ???
thumbnail
Ravi Kumar Gupta,修改在12 年前。

RE: Applying advanced workflow to Category asset in Liferay 6

Liferay Legend 帖子: 1302 加入日期: 09-6-24 最近的帖子
In that case I guess ext will surely help. I am doubtful about hooks.. since to override service you can use hooks and in this case when you want to add workflow capabilities, you need to add methods to service.. emoticon
thumbnail
Puneet Upadhyay,修改在12 年前。

RE: Applying advanced workflow to Category asset in Liferay 6

Regular Member 帖子: 234 加入日期: 11-10-22 最近的帖子
But I cannot use ext to build services as we get error on building services in ext env .Liferay does not support building services in ext env
thumbnail
Ravi Kumar Gupta,修改在12 年前。

RE: Applying advanced workflow to Category asset in Liferay 6

Liferay Legend 帖子: 1302 加入日期: 09-6-24 最近的帖子
Hmm.. building services will be deprecated soon... emoticon Then I guess my previous answer as ext will not work in this case.. building the source with new service can help though.. emoticon

I am just wondering and waiting for some expert comments on what can be the possible solution here.. hook+expando, ext, new service with different ns and then use these classes to override using hook... emoticon
thumbnail
Puneet Upadhyay,修改在12 年前。

RE: Applying advanced workflow to Category asset in Liferay 6

Regular Member 帖子: 234 加入日期: 11-10-22 最近的帖子
yup.... i am also waiting for the expert comments.
Thanks for giving the time.
thumbnail
Thiago Leão Moreira,修改在12 年前。

RE: Applying advanced workflow to Category asset in Liferay 6

Liferay Legend 帖子: 1449 加入日期: 07-10-10 最近的帖子
Hi Puneet,

This customization is very intrusive! I never walked through this path but I would throw some ideas. I think you should use a mix of hook and ext.
You should use hook for create a wrapper entity/service for MBCategory, let's say MyMBCategory and this new entity will have workflow enabled as described in Jonas' blog post. A hook will be also used to replace JSPs that make reference to MBCategory. Don't forget to escalate the my-hook-service.jar of your hook to the global classloader of your application sever.
An ext plugin will be needed to replace core classes that makes reference to MBCategory.

Hope this helps
thumbnail
Jay Patel,修改在12 年前。

RE: Applying advanced workflow to Category asset in Liferay 6

Regular Member 帖子: 118 加入日期: 10-2-24 最近的帖子
Hi Thiago,

I want to implement exact same scenario for "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".

The problem I am facing is I don't know what would be the best approach for this. For just POC purpose, I changed the following files of Portal source code directly.

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.


Thiago Leão Moreira:
Hi Puneet,

This customization is very intrusive! I never walked through this path but I would throw some ideas. I think you should use a mix of hook and ext.
You should use hook for create a wrapper entity/service for MBCategory, let's say MyMBCategory and this new entity will have workflow enabled as described in Jonas' blog post. A hook will be also used to replace JSPs that make reference to MBCategory. Don't forget to escalate the my-hook-service.jar of your hook to the global classloader of your application sever.
An ext plugin will be needed to replace core classes that makes reference to MBCategory.

Hope this helps
thumbnail
Jay Patel,修改在11 年前。

RE: Applying advanced workflow to Category asset in Liferay 6

Regular Member 帖子: 118 加入日期: 10-2-24 最近的帖子
Hi All,

Even though old problem, still throwing it once again.

What would be the best approach to enable Work-flow on Out-of-the-Box entities like User, MBCategory etc. which are not by default work-flow enabled?

-Jay.
thumbnail
Nagendra Kumar Busam,修改在12 年前。

RE: Applying advanced workflow to Category asset in Liferay 6

Liferay Master 帖子: 678 加入日期: 09-7-7 最近的帖子
For me atleast it is not making any sense to attach a workflow for Asset Category - which is simple Entity with one form field name (generally what we will be using).

Can brief a bit more about your use case
thumbnail
Thiago Leão Moreira,修改在12 年前。

RE: Applying advanced workflow to Category asset in Liferay 6

Liferay Legend 帖子: 1449 加入日期: 07-10-10 最近的帖子
Puneet, are you trying to enable workflow for MBCategory or AssetCategory class?
thumbnail
Nagendra Kumar Busam,修改在12 年前。

RE: Applying advanced workflow to Category asset in Liferay 6

Liferay Master 帖子: 678 加入日期: 09-7-7 最近的帖子
Hi Thiago,

Check the 4th message in this message chain - he mentioned clearly Asset Category
thumbnail
Puneet Upadhyay,修改在12 年前。

RE: Applying advanced workflow to Category asset in Liferay 6

Regular Member 帖子: 234 加入日期: 11-10-22 最近的帖子
I am doing for AssetCategory Class. will it help for me???
thumbnail
Thiago Leão Moreira,修改在12 年前。

RE: Applying advanced workflow to Category asset in Liferay 6

Liferay Legend 帖子: 1449 加入日期: 07-10-10 最近的帖子
I would say that you can still use the ideas that I threw.