Application Development 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: 

Result of agent resolution does not agree with agents of task

atharva21k
Explorer
0 Kudos

I am using a standard workflow WS20000077 and when i am creating a Purchase requisition in the SWEL transaction i am getting the following log

And when i checked the SWIA transaction i got this error

For the Standard TASK 20000159 and RULE 20000026 i have set the agent assignment attributes as general task

Can you please help me with this error

12 REPLIES 12

Sandra_Rossi
Active Contributor
0 Kudos

In the screenshot of your step, I see that you forgot to select a "responsible agent".

Remember the rule (see SAP doc/blog posts, etc.):

selected agents = intersection( possible agents , responsible agents ) - excluded agent

NB: "general task" means that "possible agents" = "all agents"

atharva21k
Explorer
0 Kudos

So if i am understanding this right i should change the attributes to *general forwarding not allowed*

And i am also getting confused of how do I do the agent assignment as in should I use JOB, ROLE, USER

Sandra_Rossi
Active Contributor
0 Kudos

No, I said that in your workflow step (number 0004), there is no responsible agent.

(for instance, indicate yourself)

Read the SAP documentation and search the forum, it has been explained a lot how it works.

(especially the definitions of the terms "possible agents", "responsible agents", "excluded agent", "selected agents"; these are official terms in SAP Business Workflow)

atharva21k
Explorer
0 Kudos

sandra.rossi

I am getting this in the workflow log

This is the agent assignment i have done for OVERALL RELEASE OF REQUISITION

atharva21k
Explorer
0 Kudos

Can You please check where i am going wrong

Sandra_Rossi
Active Contributor
0 Kudos

Difficult to answer anything. I don't know what you did. I guess you have a question still about agent resolution.

Click Agent button on the step. What do you have?

So, as I can see, you didn't define the standard task as general task, you defined a list of 3 functions (C 50000076, etc.). So, these are the Potential Agents.

If the Responsible Agent defined in the workflow step is not part of these Potential Agents, then you won't have any Selected Agent, so failing.

Before defining Potential Agents, try with General Task (Potential Agents = anyone), and try with your own user.

atharva21k
Explorer
0 Kudos

When i am doing a rule simulation test i am getting as agent found

Now how do i use it in my workflow ?

Sandra_Rossi
Active Contributor
0 Kudos

Look: your responsible agent is C 500000575, but the potential agents are C 500000576, C 500000577, C 500000578. So there's no Selected Agent. Simple as that.

atharva21k
Explorer
0 Kudos

sandra.rossi thanks for the clarification,

So for this agent 50000075 there can be multiple user id which are maintained in a z* table so what should I do so that the notification is sent to the that correct userid

In the user exit i have written the following code

Actor_tab-otype = 'US'

Actor_tab-objid = sy-uname

Sandra_Rossi
Active Contributor
0 Kudos

Why do you have a Z* table to define the users? How does it work?

I don't really understand, you are now talking about responsible agent being the current user (workflow user!?) and not C 50000575 anymore? Please stop changing your data and context all the time. First try to understand the concept (by practicing of course), and when you understand simple things then you can practice more complex things.

As you are learning workflow and organizational management, better play in the sandbox system or hardcode the responsible user (don't need a user exit) and don't define any responsible agent (general task classification).

NB: you should not use SY-UNAME, it will be understood as the workflow user.

atharva21k
Explorer

sandra.rossi

Thanks For you answers

i was getting confused between possible agents and actual agents,

I have solved my query.

Sandra_Rossi
Active Contributor
0 Kudos

Just to say, the term Actual Agent means something else.

actual agent = user among the selected agents, who ran the work item

Don't forget the formula/other official terms:

selected agents = intersection( possible agents , responsible agents ) - excluded agent

NB: "general task" means that "possible agents" = "all agents"

See SAP Library for more information.