Foros de discusión

Workflow: bypass assign to me

thumbnail
Sébastien Nadeau, modificado hace 12 años.

Workflow: bypass assign to me

New Member Mensajes: 18 Fecha de incorporación: 6/03/12 Mensajes recientes
Hi,

Using single approver workflow, I'd like to be able to bypass the "Assign to me" button and approve directly when there's a workflow task assigned to my role. Is this in any way possible?

Thanks!
thumbnail
Ravi Kumar Gupta, modificado hace 12 años.

RE: Workflow: bypass assign to me

Liferay Legend Mensajes: 1302 Fecha de incorporación: 24/06/09 Mensajes recientes
The workflow is already a single approver.. and even for that you want to bypass.. then just remove the workflow.. .. ??
thumbnail
Sébastien Nadeau, modificado hace 12 años.

RE: Workflow: bypass assign to me

New Member Mensajes: 18 Fecha de incorporación: 6/03/12 Mensajes recientes
Ravi,

If my role gives me the possibility to approve a content, why should I have to assign it to me before doing so? I understand the importance to be able to assign it to someone else sometimes, but when I can do it right away, why waste two clicks?

Those two clicks might not seem important when approving a single content, but when you,re in a large production environment where, hundreds of contents will get edited everyday (which is the case with us actually), you really want to avoid these 2 extra clicks.

Your idea is very good nonetheless, I will simply disable the workflow while we are in heavy editing mode and enable it back again once we are back in a more stable mode.

As for the other idea of messing with the Kaleo source code, I don't feel comfortable at all doing so. I examined it quickly yesterday and it seems very big and complicated when seen by eyes of someone who didn't program it. I bet that must be something I could change in a .jsp file, but which one?

Thanks anyway!
thumbnail
Juan Gonzalez P, modificado hace 12 años.

RE: Workflow: bypass assign to me

Liferay Legend Mensajes: 3089 Fecha de incorporación: 28/10/08 Mensajes recientes
What I tried to say before is that this can be done changing kaleo workflow definition xml files, not source code:

http://www.liferay.com/documentation/liferay-portal/6.0/administration/-/ai/workflow-with-kal-2
thumbnail
Sébastien Nadeau, modificado hace 12 años.

RE: Workflow: bypass assign to me

New Member Mensajes: 18 Fecha de incorporación: 6/03/12 Mensajes recientes
Hi Juan,

I have read this documentation and I worked out a new xml file to fit my needs, but I cannot find the way to customize this. I'm used to Workflow, I understand the concepts, but I'm unable to configure this fine grained need without a more precise documentation.

Take a look at the screenshot I'm attaching to this message to see exactly what I need and, if you can give me a practical tip on how to do that in the kaleo xml file, it would be much appreciated.

I would like to add the "Approve" choice to the Actions menu for the "Assigned to my Roles" tasks.
thumbnail
Juan Gonzalez P, modificado hace 12 años.

RE: Workflow: bypass assign to me (Respuesta)

Liferay Legend Mensajes: 3089 Fecha de incorporación: 28/10/08 Mensajes recientes
In that case guess you'd have to modify workflow jsp...
thumbnail
Sébastien Nadeau, modificado hace 12 años.

RE: Workflow: bypass assign to me

New Member Mensajes: 18 Fecha de incorporación: 6/03/12 Mensajes recientes
Thanks Juan.

Anyone has a hint on what file to modify? There's absolutely no documentation on that and opening the jsp files one by one is a task I can't afford and won't "assign to me"!
vasudha karri, modificado hace 11 años.

RE: Workflow: bypass assign to me

New Member Mensajes: 17 Fecha de incorporación: 3/05/12 Mensajes recientes
Hi sebastien nadeau..

Did u find solution for this?if yes then please post here ..i too have the same requirement

Thanks and regards
k.vasudha
Rashmi Agnihotri, modificado hace 11 años.

RE: Workflow: bypass assign to me

Junior Member Mensajes: 89 Fecha de incorporación: 13/09/11 Mensajes recientes
I also have the same problem.. If u have solved , please help us also

Thanks,
Rashmi Agnihotri
thumbnail
Subhash Pavuskar, modificado hace 11 años.

RE: Workflow: bypass assign to me

Regular Member Mensajes: 234 Fecha de incorporación: 13/03/12 Mensajes recientes
Hello Everyone,

If you want to modify the approval of user define you can do this by modifying "liferay-portal-6.1.0-ce-ga1/tomcat-7.0.23/temp/7-kaleo-web/WEB-INF/classes/META-INF/definitions/single-approver-definition.xml " here you need to modify.
<assignments>
			<roles>
				<role>
					<role-type>Regular</role-type>
					<name>User Define Role</name>
				</role>
				
			</roles>
		</assignments>



save this file and restart your server.
->Now create a new account in role you can assign user define role.
Sorry If i am wrong.
thumbnail
Sébastien Nadeau, modificado hace 11 años.

RE: Workflow: bypass assign to me

New Member Mensajes: 18 Fecha de incorporación: 6/03/12 Mensajes recientes
Hi again folks,

No, I havent found a solution yet and I have other problems that have higher priority to solve right now. All I can say is that I don't want to modify the workflow logic, only the interface behavior.

The fact that you need to assign a task to yourself before approving it is, in my book, a waste of time.

Understand me: I'm not saying this feature is uninteresting, I'm just saying you should be able to approve directly when you have the right to do so.

Since my first post I have written a couple of hooks in other projects. Now I will probably be able to do so with the workflow. If I ever find something interesting, I will share it with the folks here.

Sébastien
thumbnail
Hery Sutanto, modificado hace 11 años.

RE: Workflow: bypass assign to me

Junior Member Mensajes: 81 Fecha de incorporación: 4/06/12 Mensajes recientes
Hi,

I run into the same issue... is there anyone know how to implement this??
how to skip the assignment process? Can I just skip this and directly assigned the task to all member who has the corresponding role that is defined within the xml file?

I might use multi-tier approval... and this will be very troublesome, if Need to assign the task one at each time...

Thanks,

Hery
krishna jami, modificado hace 7 años.

RE: Workflow: bypass assign to me

New Member Mensajes: 4 Fecha de incorporación: 30/09/15 Mensajes recientes
Did it get solved, if yes can you help me
thumbnail
Juan Gonzalez P, modificado hace 12 años.

RE: Workflow: bypass assign to me

Liferay Legend Mensajes: 3089 Fecha de incorporación: 28/10/08 Mensajes recientes
You can investigate kaleo scripts to get that working.
thumbnail
Arcane Huang, modificado hace 11 años.

RE: Workflow: bypass assign to me

Junior Member Mensajes: 38 Fecha de incorporación: 13/04/10 Mensajes recientes
refer to liferay workflow definition

for 6.0.x
you can assign task to someone user directly instead of roles.
and user can be specified with "user-id", "screen-name" and "email-address"
<assignments>
  <user>
    <screen-name>user1</screen-name>
  </user>
</assignments>


for 6.1.x
besides to roles and user, task can be assigned with resource-actions, scripted-assignment.
thumbnail
Vishal Panchal, modificado hace 11 años.

RE: Workflow: bypass assign to me

Expert Mensajes: 289 Fecha de incorporación: 20/05/12 Mensajes recientes
Hi all,

Basically while creating workflow definition we are assign the task to particular ROLE for approval/rejection.

So , because of that in My Workflow Tasks portlet we will get the task under Assigned to my Roles category but not under Assigned to me.

Ultimately what happens when the task is created it will be assigned to all the users who are assigned the specific role.

So now all your solution is you can assign the task not to a specific ROLE rather you may assigned task to specific userId , screen-name , emailId.

Please modify your workflow-definition.xml file by following tags.

Instead of below tag..

<assignments>
            <roles>
                <role>
                    <role-type>Regular</role-type>
                    <name>User Define Role</name>
                </role>
                
            </roles>
        </assignments>


Try to use either of the following tags.

<assignments>
<user>
<user-id>user id</user-id>
</user>
</assignments>

OR

<assignments>
<user>
<screen-name>screen name</screen-name>
</user>
</assignments>

OR

<assignments>
<user>
<email-address>email address</email-address>
</user>
</assignments>.

By doing this as the task is created it will be directly listed in the Assigned to me and you will have directly approve button as well.

please let me know if any further inputs require from my side.emoticon

Thanks & Regards,
Vishal R. Panchal
satish chandra, modificado hace 11 años.

RE: Workflow: bypass assign to me

New Member Mensajes: 3 Fecha de incorporación: 7/12/12 Mensajes recientes
Hey..


The JSP that displays the My Workflow Tasks it workflow_tasks.jspf.
one need to override the JSP, to add custom defined functionalities.
you need to add a fixer JAR for all the required Java files or add a hook to capture the request and process with your local files.
Manoj Prasad, modificado hace 10 años.

RE: Workflow: bypass assign to me

New Member Mensajes: 14 Fecha de incorporación: 20/03/13 Mensajes recientes
I am using Activiti workflow plugin from emforge.
I am able to route work based on Roles. It demands that i click twice, once to "Assign to me" and then to take action on assigned tasks. How to configure such that the work gets routed directly to a person/user

Currently i have a User Task with
Assignee: <blank>
Candidate Users: <blank>
Candidate Groups: HR Manager

and work gets routed to the HR Manager role.

When I tried putting Assignee as "hr1" which is the "Screen Name" of the user belonging to "HR Manager" role.
Assignee: hr1
Candidate Users: <blank>
Candidate Groups: <blank>

The the work does not get routed to the assignee.

Please help me route work to a individual without getting assigned to a role.

regards
Manoj
ALEX KEIL, modificado hace 4 años.

RE: Workflow: bypass assign to me

New Member Mensajes: 23 Fecha de incorporación: 23/05/19 Mensajes recientes
I had a similar issue to this. In the end i wrote up some custom code to do the job, and then put that in my workflow file.
In the assiging part of the workflow xml you can assign to a user or a role

if you want to assign to a role, you put user = null and role = <the role>. If you want to assign to a user, you put User= <user> and role  = null.

Working from this, i made two functions
AssignToUser
AssignToRole
In both cases i pass in the role name (and some other things)

For the User function, it will check the role that i passed in and count how many users are in the role. If there is more than one user in the role it will jsut return NULL (so it doesn't assign to a user). If there is only one person in the role, it will assign just to that user

For the Role function, it does much the same, checks how many people are in the role. If there is more than one person in the role, it will return that role (and assign to that role). If there is only one person in the role, it will return NULL (and not assign to the role)

The combination of the two ensures that the task is either assigned to a single user (if there is only one user in the role) or to a role (if there is more than one person in the role). This way, if there is only one person in a role, they don't have to do the 'Assign to Me' part.

Hope this helps