‎2007 Aug 02 10:53 AM
Hi ,
I have created as workflow to be triggered when a sales order is created.
I have 2 different users.User1 and User2.When User1 creates the sales order the workitem must go to the User2 and when the User2 creates the sales order the Workitem must go to the User1.
But here what is happening is that ,irrespective who is creating the sales order it is going to the User1.Is it because the Agent assgned is the User1??
Thanks,
Supriya Manik.
‎2007 Aug 02 11:16 AM
Hi
Create a User group for all the people whoever creates a sales order and attach to the task.
and in the Excluder objects give the name WF_initiator, so that when a sales order is created except that created person a work item is sent when the USER GROUP is attached to the task.
<b>Reward points for useful Answers</b>
Regards
Anji
‎2007 Aug 02 11:20 AM
I am storing the sales orders in a custom table when i am creating the sales orders.
When I store the sales orders in the table I have a user assigned to it who has to get the work item.
When the workflow is initiated this user is taken and he has to get the workitem.
But thats not happening even i take the username variable in the expression.C
Help please.
‎2007 Aug 02 12:18 PM
hi ,
you re store your sales order in the custom table which ve username where the sales order created right?
steps.
1. you triggered the workflows at start event.
2.in activity you use the responsible agent as rule.
In rule u get the user name according your sales order no. in the custom table..
‎2007 Aug 02 12:34 PM
Where can we create the Rule for the agent?
Can you tell me the procedure?
‎2007 Aug 02 12:36 PM
Hi
From the TASK Screen (from PFTC Tcode) from menu
ADDITIONAL DATA-> AGENET ASSIGNMENT-> MAINTAIN
you can assign the agent to the task, such that wehn the WF triggered notification goes to that agent.
rEGARDS
‎2007 Aug 02 12:38 PM
you go for the transaction <b>PFAC</b>
in that you ve create option you create.
in category as-agent determination -function module to be executed.
in your function module you give all the conditions.
‎2007 Aug 02 12:39 PM
I cannot hard code the agent.The agant is variable here.
The user who creates the sales order must get the notification.
There could n number of users isnt it?
‎2007 Aug 02 12:41 PM
Rule can be created/maintained in transaction PFAC.
Check out this /people/ravishankar.rajan/blog/2007/01/13/how-to-create-your-own-rules-in-workflow
‎2007 Aug 02 12:50 PM
after the activity check your user using condition and assign it in the notification mail.
‎2007 Aug 02 1:25 PM
Hi Supriya,
Put a <b>condition step</b> in the workflow.
Check if the sales order creater is user1. there can be two outcomes: true or false.
if <b>true</b> : set the agent of the workitem as User2.
if <b>False</b> : set the agent of the workitem as User1.
This should resolve your problem.
Regards,
Sonal
<b>Reward points if useful</b>
‎2007 Aug 02 1:30 PM
I am using an <b>activity</b> associated with the <b>method</b> for getting the correct user.But the <b>WORKITEM</b> is still going to the <b>USER who created the WORKFLOW.</b>
What could be done about this??
‎2007 Aug 02 2:06 PM
you are getting the correct user from a method??
In any case, are u explicitly assigning this user to the workitem.
check the following two things:
1) whether u are assigning the agent properly
2) If u are passing any values, check your container binding also
Regards,
Sonal
<b>Reward points if helpful</b>
‎2007 Aug 02 2:38 PM
I am taking the <b>user</b> from the <b>activity and assgning as a experssion</b> in the <b>User Decision</b>.I am getting the<b> correct</b> user from the activity.
But still the <b>WORKITEM</b> is going to the <b>developer of the workflow</b>.
Please help.
‎2007 Aug 02 3:15 PM
‎2007 Aug 02 3:45 PM
When I am assingning agent to the Task,I am assigning it as a USER.Is that the problem??
If it is so,whats the remedy?
‎2007 Aug 03 5:20 AM
Hi Supriya,
Change the attributes of your task to <b>'general task'</b>.
In the activity, there is a block for task properties.
there is a red button next to agent assignment.
click on that and yo will get the screen- 'Satndard Task: Maintain agent assignment'.
there is an attributes button. click on that and set the task as a general tak.
transfer and save.
This should solve the problem.
<b>reward points if helpful</b>
Regards,
Sonal