<html>
<head>
<style>
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
FONT-SIZE: 10pt;
FONT-FAMILY:Tahoma
}
</style>
</head>
<body class='hmmessage'>
Andy,<BR>
&nbsp;<BR>
Your WF is going into error because the Agent Determination Rule has the 'Terminate if no result' option set (HRS1203-ENFORCE).<BR><BR>
If this wasn't a SAP object,&nbsp;a cheap option, although not recommended,&nbsp;might be to remove the flag setting and allow all of the Task Assignments to become valid by default (i.e. the Work Item would be routed to all agents who are listed against the Task Assignments). This wouldn't be a good idea if the Task was a General one though, of course.<BR>
&nbsp;<BR>
If&nbsp;you owned the PFAC Rule and still wanted to keep the flag setting as it is and therefore&nbsp;always error the Workflow, then you could try creating a 'Catch-All' responsibility (i.e. a fallback condition if no agent can be determined)&nbsp;provided you are confient you can always pick out this particular scenario somehow (e.g.&nbsp;by the value of a specific&nbsp;parameter like userid).<BR>
&nbsp;<BR>
In your case, you might try the Function Module PFAC Rule approach where you can define your own PFAC Rule that invokes&nbsp;a wrapper FM that calls your current PFAC Rule&nbsp;and catches the exception. This way,&nbsp;if no Agent is determined, you can always default&nbsp;something in to the container at runtime. Once you have defined your own Rule you can simply change your WF Definition to use this new Rule instead. <BR>
&nbsp;<BR>
Or you could simply write a PFAC&nbsp;Rule that calls the same FM SWX_GET_MANAGER and handles the exception NOBODY_FOUND in a manner of your choosing.<BR>
&nbsp;<BR>
We tend to prefer the FM approach with a config table lurking around&nbsp;so that the defaults can be changed from time to time without disturbing the code.<BR>
&nbsp;<BR>
Regards,<BR>
&nbsp;<BR>
Mike GT<BR><BR>

<HR>
<BR>
Date: Wed, 8 Oct 2008 12:41:21 +0100<BR>From: abcurtis@gmail.com<BR>To: sap-wug@mit.edu<BR>Subject: Agent determination AC00000168<BR><BR><BR>
<DIV dir=ltr>
<DIV>We use rule AC00000168 to find a Chief to Approve expenses, so when the 'top chief' (the big chief), submits expenses the wf goes into error as he does not have a chief!&nbsp; Anyone got a novel/innovative solution for this?</DIV>
<DIV>&nbsp;</DIV>
<DIV>Andy</DIV></DIV><br /><hr />Get Hotmail on your mobile from Vodafone  <a href='http://clk.atdmt.com/UKM/go/111354028/direct/01/' target='_new'>Try it Now</a></body>
</html>