Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Agent Assignment in Workflow

Former Member
0 Likes
1,332

If anyone had worked on customizing the WF for Changed Sub profile, WS1200124, please tell me how to configure the role for the standard task: 1200191, Abbreviation: PDVDispProfi .

I need to use this task for two purposes, one to show to the owner of the profile and second to the manager of the owner of the profile.

I tried giving the rules 01200025 for Employee and 01200024 for the manager in agent assignment for the tasks, but the workflow hangs at these tasks.

If I hardcode the agent to some user, it works fine.

Any suggestion on what would have gone wrong?

Is something to be activated at the rule level?

Thanks in Advance.

Suryakiran

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,216

Hi Suryakiran,

what system are you on? What error are you getting? I checked this on a 6.40 system and what you need to do is to fill the wf multiline container element EMPLOYEE with the agents you need to send the work item to.

Then on the task level, you need to set up the possible agents of the task. Assigning a rule I however believe is not however possible there.

-Mikko

7 REPLIES 7
Read only

Former Member
0 Likes
1,217

Hi Suryakiran,

what system are you on? What error are you getting? I checked this on a 6.40 system and what you need to do is to fill the wf multiline container element EMPLOYEE with the agents you need to send the work item to.

Then on the task level, you need to set up the possible agents of the task. Assigning a rule I however believe is not however possible there.

-Mikko

Read only

0 Likes
1,216

Hi Mikko,

I work on ECC5 system.

Your answer solves half of my issue.

I assign an Expression with &EMPLOYEE& as the agent to task and this sends the mail to the employee.

the Work Item Subject says "Your Dev. Profile has been change".

Now, I also need to send the same mail to the supervisor of the employee.

Here, The workitem text should be "Dev. Profile has been changed for the Employee<b> XYZ</b>".

So, I cloned the task TS01200191 to TS900001,

changed the text accordingly and

created a container element "PERSON"

inserted this element as a variable in the text.

I need to pass this PERSON to the task in the binding from workflow.

This PERSON should be created in the workflow container and filled.

Please confirm if this procedure works or if there is a better one.

Thanks.

Read only

0 Likes
1,216

Hi Suryakiran,

if you wish to send the item to both the employee and the manager, the EMPLOYEE wf container element you have must contain both the employee and the manager user ID:s. Check the miscellaneous tab of the step for more reference.

In addition, if you have a single task, you can't have different work item texts, only the variables can change for receivers.

What is it actually that you would like to have in the work item text variable XYZ? Is it the user ID of the employee or the employee number or for example the value of the EMPLOYEE element's first row?

If you have the value already in a workflow container element, then you just need to bind the element to the task container element PERSON. Then it will show the value in the work item text, too.

Best regards,

MIkko

Read only

0 Likes
1,216

I need to have the Employee Name in the workitem text for the manager.

And, your answer now raises one more doubt for me.

Is there a scenario where this EMPLOYEE multiline container gets filled with more than 1 Employee?

If thats the case, I should send only the relevant notifications to the managers, not the whole list.

Is there a way to segregate them and process individually?

Read only

0 Likes
1,216

Hi,

by default the workflow step supports multiple agents, so you just need to add all the agents to the EMPLOYEE multiline container element and they will all receive one item. With regards to its usage, I however am not that familiar with this workflow so I really can't tell...

If you would like to send the work item only to a single receiver, then I suggest to change the workflow (make a copy first) and the appropriate step so that only single receivers are supported.

Regards,

Mikko

Read only

0 Likes
1,216

Thanks,

I cloned the task and used a different workitem text for the manager.

For the employee, I am using the standard task.

For the manager, I created a container element 'EMP_NO' which I am filling with the first line of the WF container 'EMPLOYEE'.

The text now is coming as "Dev. Profile has been changed for P 00001012". I hope this makes some sensible meaning in the workitem.

Thanks for your suggestions.

Read only

0 Likes
1,216

Hi,

Yes, this is the person number from HR. If you would like to dig up the user name or similar, you'd need to modify the container element types and add an element with an attribute for the name.

Another option would be to add another step which would then retrieve the user/employee name based on the employee number. Bapi to be used would be e.g. BAPI_EMPLOYEE_GETDATA.

Nice to hear you got it working and thank you for the points,

-Mikko