cancel
Showing results for 
Search instead for 
Did you mean: 

Default Rule in Standard Task is not working in Workflow

vishesh_malik
Participant
0 Kudos

Agent Determination Issue in Workflow

Hi Experts,

I'm using an activity step and where I am assigning agent using a workflow container element. I have also assigned a default rule to task of step in case workflow does not fetch any agent for that step. While running the workflow the default rule is not working, workflow log shows below error :

Agent determination for step '0000000023' failed;

Result of agent resolution does not agree with agents of task;

When I tested task alone through SWUS, rule worked fine and proper agent got assigned from the rule. But when testing it through workflow, rule doesn't seem to work. I seached on SCN and found similar issue in below mentioned thread

http://scn.sap.com/thread/1929785

I tried but couldn't find out the solution.If anyone has faced such issue earlier then please let me know what could be the possible reason.

Rule works fine in Simulation and Standalone run of task but does not work in workflow.

Thanks,

Vishesh

Accepted Solutions (1)

Accepted Solutions (1)

Pyc
Participant
0 Kudos

G'day,

To the best of my knowledge a Default Rule at Task (TS) level only applies if no other responsible agent determination is used. Typically it's for TS tasks that run independently outside of a Workflow. If you include the Task in a WF and don't specify any agent determination at the Step level it will also be invoked.

In your case you have a container based Agent expression at the step so the default rule is never invoked.

If you want a fallback if the expression agent isn't valid you'll need a Function module rule that accepts the Expression agent as an import parameter (and in such cases i normally bind in the Task number so i can code validation against possible agents) and then validates it. If its valid the FM just returns the same agent, otherwise it calls the fallback rule that you're currently trying to use as the default rule.

Have fun,

Mark

vishesh_malik
Participant
0 Kudos

Thanks a ton Mark!

It took me almost 2 years to understand reason!! .. 

To all who are looking for solution. Here is the clue :

"In your case you have a container based Agent expression at the step so the default rule is never invoked."

Regards,

Vishesh

Answers (3)

Answers (3)

anjan_paul
Active Contributor
0 Kudos

Hi,

   Default Rule will only execute , if you are not maintain any responsible agent in the step.

former_member217176
Participant
0 Kudos

Hi Vishesh,

Try using a static user id for the task like 'USTESTUSER' where TESTUSER is the user id and check if its working fine. If it still not find the agent correct the task properties and make general task,Check any excluded agents are there etc.

If it work then check your rule for finding the agent. It has to return user id concatenated with US or else check the workflow container values in SWIA  passing to agents, or check binding between rule container and workflow container.

Regards,

Jayaraj

former_member185167
Active Contributor
0 Kudos

Hello,

In that thread, the problem was that he was returning CP values (instead of S or US).

What are you returning?

Have you tried setting it to General task?

" I have also assigned a default rule to task of step in case workflow does not fetch any agent for that step"

In which scenario does it fail - is it using the default rule?

regards

Rick Bakker / hanabi technology