cancel
Showing results for 
Search instead for 
Did you mean: 

Handling decision step when no agents found

Former Member
0 Kudos

Hi Experts,

I have copied the standard decision step and also made it as a General Task. As in few scenarios, the users can have multiple managers, I have used multiline container element in the agent assignment under 'Expression'. This all works fine if atleast one agent is found.

Though not normal, I need to handle scenario where no agent is found.

Currently my workflow is sending workitem to all users whenever no user is found which is not ideal.

I expected the workflow would stop saying no agents found, but curently the workflow doesnot stop at decision step.

Is there any possibility where we can hold the workflow at decision step when no agents is found.

Please help.

Note: we have cleanup reports run by administrator to complete all the workflows with no agents.

Thanks in advance,

Cay.

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi Caycay,

I think if you remove the "General Task" and assign your task to a Position,Role etc... your problem would be solved. This way when you have no agent assigned to the work item, mail will go to only those users assigned to Position, Role etc.

Or the other way around, do not specify anything( no General Task etc..) and the workflow will go in "No Agent found" mode and the same will appear in Administrator report SWI2_ADM1.

Regards

Gautam

Former Member
0 Kudos

Hi,

My suggestion as follows....

Please create a Workflow container element say No_Agent_Found.

Now this will be 'X' if there is no agent determinded.

I hope that you multiline container ( which holds the agent values ) is populating by a method.

In that method please update the value No_Agent_Found that means if agent found the No_Agent_Found will be initial else No_Agent_Found will be 'X'.

Now create a condition step to check whether the No_Agent_Found have the value of 'X'. Now if the value No_Agent_Found.

is not X then call your decesion step in your branch.

Thanks and regards,

SNJY

Former Member
0 Kudos

Hi Rick & Sanju,

Thanks for your quick reply.

Actually we need the workflow to be seen as one of the pending workflows in the cleanup reports for the administrator.

So I want to know if it is possible in any way to hold the workflow at decision step without skipping the decision step or erroring out the workflow.

Thanks,

Cay.

Edited by: caycay_wf on Jul 6, 2011 3:13 PM

Former Member
0 Kudos

Hi,

If no agent found then decision step will go in error status.

If no agent found the you can pupulate the multiline container by a background user say WF-BATCH.

Now if any dialog user is not found then workflow will be sent to background user. Then workflow will hold and you can cleanup reports for the administrator.

Or

You can make the decesion task as "General Task".

Workitem will not be in all sap users. Workflow will not be in error status.

( I am not sure about this option ).

Thanks and regards,

SNJY

former_member185167
Active Contributor
0 Kudos

Hello,

"So I want to know if it is possible in any way to hold the workflow at decision step without skipping the decision step or erroring out the workflow"

There is nothing wrong with having it go into error status - that would alert the workflow admin that something has to be done, and it's easy to locate the workitem (with SWI2_DIAG). You can also easily set up the system to mail the workflow admin when this happens.

But anyway, if that's what you really want, you could change the task so that it's not a General Task and define the possible agents more restrictively so that it will just end up under the category "workitems without agents". You'll have to research how to do this, I almost always use General Task.

regards

Rick Bakker

hanabi technology

former_member185167
Active Contributor
0 Kudos

Hello,

One way to do this is make your own AC rule which simply passes back the agents passed to it, and set it to 'Terminate if no result'. Then, the workflow will go into error instead of sending the workitem to everyone.

regards

Rick Bakker

hanabi technology