Forums

Home » Liferay Portal » English » 3. Development

Combination View Flat View Tree View
Threads [ Previous | Next ]
toggle
Hery Sutanto
Kaleo workflow scripted assignment..
July 31, 2012 9:04 PM
Answer

Hery Sutanto

Rank: Junior Member

Posts: 81

Join Date: June 3, 2012

Recent Posts

Hi....

I want to do custom assignment through workflow script... anyone can show me how to achieve this?

My current requirement for the workflow :
the content that published by one department should be only assign to content approver within that department...

Right now I list out all the assignment to all department content reviewer..

<assignments>
<roles>
<role>
<role-type>regular</role-type>
<name>IT Content Reviewer</name>
</role>
<role>
<role-type>regular</role-type>
<name>HR Content Reviewer</name>
</role>
</roles>
</assignments>

So right now if one user from the HR department publish something... the IT Content reviewer still can do the assignment process..
how can I achieve the condition where content published by HR user can only be reviewed and assigned to HR content Reviewer and so as
for the IT user....

Regards,

Hery
rino alias
RE: Kaleo workflow scripted assignment..
September 20, 2012 3:16 AM
Answer

rino alias

Rank: New Member

Posts: 3

Join Date: August 21, 2012

Recent Posts

Any updates on this?
Vishal Panchal
RE: Kaleo workflow scripted assignment..
September 20, 2012 9:52 AM
Answer

Vishal Panchal

Rank: Expert

Posts: 277

Join Date: May 20, 2012

Recent Posts

rino alias:
Any updates on this?



All you can do for achieving this is by creating different tasks for IT and HR.
for example,

<task>
<name>IT Content Reviewer</name>
<assignments>
<roles>
<role>
<role-type>regular</role-type>
<name>IT Content Reviewer</name>
</role>
</roles>
</assignments>

<transitions>
</transitions>
</task>


<task>
<name>HR Content Reviewer</name>
<assignments>
<roles>
<role>
<role-type>regular</role-type>
<name>HR Content Reviewer</name>
</role>
</roles>
</assignments>

<transitions>
</transitions>
</task>

now you can forward your workflow accordingly to either IT Content Reviewer or HR Content Reviewer.
Thats it..!

please let me know if any further inputs require.

Thanks & Regards,
Vishal R. Panchal
Arcane Huang
RE: Kaleo workflow scripted assignment..
October 18, 2012 12:12 AM
Answer

Arcane Huang

Rank: Junior Member

Posts: 29

Join Date: April 13, 2010

Recent Posts

Sure, you have some choices to match this need.

One is as Vishal Panchal post. You can design some process nodes to deal with it.
Another is to use scripted-assignment
You can refer to the sample 'single-approver-definition-scripted-assignment.xml' on kaleo-web-portlet
Specify the assignee Dynamically with conditional logic.
 1<assignments>
 2  <scripted-assignment>
 3    <script>
 4      <![CDATA[
 5// assign roles with Class java.util.List
 6roles = ...;
 7// or assign user with Class com.liferay.portal.model.User
 8user = ...;
 9      ]]>
10    </script>
11    <script-language>groovy</script-language>
12</scripted-assignment>
Sreeja Surendranath
RE: Kaleo workflow scripted assignment..
January 30, 2014 9:50 PM
Answer

Sreeja Surendranath

Rank: New Member

Posts: 11

Join Date: January 8, 2014

Recent Posts

Any updaes on this? I too have the same problem