cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Problem in Workflow agent determination

Former Member
0 Likes
3,503

Dear Experts,

I am triggering a workflow for some event and I am determining agents by writing some code in business object and exporting that variable to workflow. But my problem is, when agent is not found that workitem will be displayed in all SAP user id's.

I am not able find out the reason, Please suggest.

I am using Fork step before this workitem activity.

Thanks

M Chaitanya

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Likes

Hello,

If the task (TS) is General Task (which is normal) then it will go to everyone if no agent is determined.

You have to check your code and see why it returns no agents. At the very least put a check at the end that inserts  default agent (e.g. you) if no agents are found.

regards

Rick

Answers (2)

Answers (2)

SandySingh
Active Contributor
0 Likes

Hello

You have set the approval task as "general task" so WF runtime  will determine all users as agents in case no agents are found. You have 2 options to handle this:

  1. All the set a fall back agents in agent determination rule. You can set WF-Admin (User, Position) as fall back agents in case no agents are found.
  2. You can raise an exception in agent determination method and the workitem will go in error and will be picked up the WF admin for error resolution.


Regards

Sandy

Former Member
0 Likes

Hi Chaitanya,

You have to remove general task and have to select the agent determination as 'General forwarding not allowed'. Then you can restrict the agents based on position/Job/Org unit/Role.

In your case Rule is also a best option. If no agents found, rule will be terminated and will set the workflow status as an error.

Thanks,

Vijay.