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

WORKFLOW

Former Member
0 Likes
1,619

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.

16 REPLIES 16
Read only

Former Member
0 Likes
1,592

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

Read only

Former Member
0 Likes
1,592

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.

Read only

0 Likes
1,592

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..

Read only

Former Member
0 Likes
1,592

Where can we create the Rule for the agent?

Can you tell me the procedure?

Read only

0 Likes
1,592

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

Read only

0 Likes
1,592

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.

Read only

Former Member
0 Likes
1,592

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?

Read only

0 Likes
1,592

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

Read only

0 Likes
1,592

after the activity check your user using condition and assign it in the notification mail.

Read only

Former Member
0 Likes
1,592

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>

Read only

Former Member
0 Likes
1,592

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??

Read only

0 Likes
1,592

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>

Read only

Former Member
0 Likes
1,592

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.

Read only

Former Member
0 Likes
1,592

Please help!!!!!!!!!!!!!!

Read only

Former Member
0 Likes
1,592

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?

Read only

0 Likes
1,592

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