cancel
Showing results for 
Search instead for 
Did you mean: 

Fork

Former Member
0 Kudos
54

Hi All,

I am using fork to send the work item to two diffrent agents. As soon as an agent process the work item in his inbox, automatically it is going to delete in the another agent inbox.

My question is how we know the agent name who processed the workitem at runtime.

my requirement is i need to send an email, once the agent is processed the work item with his first & last names.

Regards

Rao

Accepted Solutions (0)

Answers (4)

Answers (4)

Former Member
0 Kudos

Hi Venkat,

I am not sure how you are assigning agents to your Approval steps. If you are doing that by expressions then you can add a send mail step in both the branches (immediately following the approval step). Now when the approval is done the send mail step following the currently executed step is processed and sends out the mail to the initiator. The other parallel workitem is logically deleted and hence does not send out a mail.

This would be fine if you want to send the user id of the approver but if you want to send the first name and last name then you will have to use a BG step to determine their names.

Thanks,

Prasath N

Former Member
0 Kudos

try the following , hope it will resolve the question

1. create a workflow element to hold the actual agent id with reference to WFSYST-ACT_AGENT.

2.Bind this WF element to your WF task container element WIActual_Agent.(you mgiht need to click the 'show all lines' icon).

3. based on the actualy agent ID in WF element, find first and last name and put them in the mail.

Former Member
0 Kudos

Looks like you are sending two workitems to those two different agents. I don't think via this way, when one agent process the workitem in his own inbox,it will delete in the other agent's inbox. Because those are two different items.

You might need to send one workitem to both of them as the task agent. Then same workitem will appear in the their inbox. And when executed, it will disappear from all inboxes.

Former Member
0 Kudos

Hi Wang,

I am sending same work item to two diffrent agents. and it is deleting from the agent inbox as soon as another agent proecess the work item.

Now i want the person who processed the work item out of two agents.

Regards

Rao.

Former Member
0 Kudos

Venkat,

In agent determination u can select the epression and against that u can put the variable name and you can fill this variable with any no. of agents.

I m not getting why u are using fork over here(because fork will create two work item), may be i am missing your question, but if u want to send to more than one user the same work item , In dialog task u can use expression.

Also when work item is executed by some one then it will disappear automtically from some one else's inbox, to keep the integrity.

to find out the agent u can use the container wiactual_agent as mentioned earlier in this post.

Hope that it will help.

Nitish

Former Member
0 Kudos

Hi Nitish,

Thanks for your replay. My requirement is, i need to send the same work item to two diffrent users only.Once it is porcessed by any one of those two agents i need to send an email to the workflow creator with the first & last name of the agents.

So i am using fork and using the same task but i am giving diffrent agents in the expression of the task.

Regards

Rao.

Former Member
0 Kudos

Hi Venkat,

In this case,

U can add a Background activity step before the Send mail step and where the fork ends.

In this background activity

Using "_WI_Actual_Agent" find out the Employee code of the actual agent from IT 105. and then with the employee code , find out the employee name from PA0001 and store it in a container element.

and Use this container element, in the Subject of the Send mail step

Hope this solves ur problem

Raj

Former Member
0 Kudos

In your workitem task container, element'_WI_Actual_Agent' stores the actual agent id. From this user ID, you can look for first & last name.

Former Member
0 Kudos

Hi Wang,

Thanks for u r quick reply.in fork i am using the same task for both branches. I am chaning only agent name.

in this case in the element WIActual_Agent which agent it will store? i mean is it contains the processed agent.

Regards

Rao.