<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:x="urn:schemas-microsoft-com:office:excel" xmlns:p="urn:schemas-microsoft-com:office:powerpoint" xmlns:a="urn:schemas-microsoft-com:office:access" xmlns:dt="uuid:C2F41010-65B3-11d1-A29F-00AA00C14882" xmlns:s="uuid:BDC6E3F0-6DA3-11d1-A2A3-00AA00C14882" xmlns:rs="urn:schemas-microsoft-com:rowset" xmlns:z="#RowsetSchema" xmlns:b="urn:schemas-microsoft-com:office:publisher" xmlns:ss="urn:schemas-microsoft-com:office:spreadsheet" xmlns:c="urn:schemas-microsoft-com:office:component:spreadsheet" xmlns:odc="urn:schemas-microsoft-com:office:odc" xmlns:oa="urn:schemas-microsoft-com:office:activation" xmlns:html="http://www.w3.org/TR/REC-html40" xmlns:q="http://schemas.xmlsoap.org/soap/envelope/" xmlns:rtc="http://microsoft.com/officenet/conferencing" xmlns:D="DAV:" xmlns:Repl="http://schemas.microsoft.com/repl/" xmlns:mt="http://schemas.microsoft.com/sharepoint/soap/meetings/" xmlns:x2="http://schemas.microsoft.com/office/excel/2003/xml" xmlns:ppda="http://www.passport.com/NameSpace.xsd" xmlns:ois="http://schemas.microsoft.com/sharepoint/soap/ois/" xmlns:dir="http://schemas.microsoft.com/sharepoint/soap/directory/" xmlns:ds="http://www.w3.org/2000/09/xmldsig#" xmlns:dsp="http://schemas.microsoft.com/sharepoint/dsp" xmlns:udc="http://schemas.microsoft.com/data/udc" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:sub="http://schemas.microsoft.com/sharepoint/soap/2002/1/alerts/" xmlns:ec="http://www.w3.org/2001/04/xmlenc#" xmlns:sp="http://schemas.microsoft.com/sharepoint/" xmlns:sps="http://schemas.microsoft.com/sharepoint/soap/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:udcs="http://schemas.microsoft.com/data/udc/soap" xmlns:udcxf="http://schemas.microsoft.com/data/udc/xmlfile" xmlns:udcp2p="http://schemas.microsoft.com/data/udc/parttopart" xmlns:wf="http://schemas.microsoft.com/sharepoint/soap/workflow/" xmlns:dsss="http://schemas.microsoft.com/office/2006/digsig-setup" xmlns:dssi="http://schemas.microsoft.com/office/2006/digsig" xmlns:mdssi="http://schemas.openxmlformats.org/package/2006/digital-signature" xmlns:mver="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns:mrels="http://schemas.openxmlformats.org/package/2006/relationships" xmlns:spwp="http://microsoft.com/sharepoint/webpartpages" xmlns:ex12t="http://schemas.microsoft.com/exchange/services/2006/types" xmlns:ex12m="http://schemas.microsoft.com/exchange/services/2006/messages" xmlns:pptsl="http://schemas.microsoft.com/sharepoint/soap/SlideLibrary/" xmlns:spsl="http://microsoft.com/webservices/SharePointPortalServer/PublishedLinksService" xmlns:Z="urn:schemas-microsoft-com:" xmlns:st="&#1;" xmlns="http://www.w3.org/TR/REC-html40">

<head>

<meta name=Generator content="Microsoft Word 12 (filtered medium)">
<!--[if !mso]>
<style>
v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style>
<![endif]-->
<style>
<!--
 /* Font Definitions */
 @font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
 /* Style Definitions */
 p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
tt
        {mso-style-priority:99;
        font-family:"Courier New";}
span.EmailStyle18
        {mso-style-type:personal-reply;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.WordSection1
        {page:WordSection1;}
-->
</style>
<!--[if gte mso 9]><xml>
 <o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
 <o:shapelayout v:ext="edit">
  <o:idmap v:ext="edit" data="1" />
 </o:shapelayout></xml><![endif]-->
</head>

<body lang=EN-AU link=blue vlink=purple>

<div class=WordSection1>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>Don&#8217;t  know them that well sorry Karl&#8230; but yes the scenario you
describe would be what I would expect.<o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>You would need to choose which state to react to. <o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>Regards,<o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>Jocelyn <o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p>&nbsp;</o:p></span></p>

<div style='border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0cm 0cm 0cm'>

<p class=MsoNormal><b><span lang=EN-US style='font-size:10.0pt;font-family:
"Tahoma","sans-serif"'>From:</span></b><span lang=EN-US style='font-size:10.0pt;
font-family:"Tahoma","sans-serif"'> sap-wug-bounces@mit.edu
[mailto:sap-wug-bounces@mit.edu] <b>On Behalf Of </b>Karl Nietz<br>
<b>Sent:</b> Thursday, 21 October 2010 11:32 AM<br>
<b>To:</b> SAP Workflow Users' Group<br>
<b>Subject:</b> WF ProgramExists<o:p></o:p></span></p>

</div>

<p class=MsoNormal><o:p>&nbsp;</o:p></p>

<p class=MsoNormal style='margin-bottom:12.0pt'><br>
<span style='font-size:10.0pt;font-family:"Arial","sans-serif"'>Hi Jocelyn,</span>
<br>
<span style='font-size:10.0pt;font-family:"Arial","sans-serif"'>That was quite
useful but I did notice that when a workitem was executed the event STATE_CHG
was published twice. &nbsp;I wonder whether this is because it occurs when you
first reserve the workitem during execution and then again when you complete
execution. &nbsp;No problem for my application but maybe an issue if you only
want to react once during the LUW. </span><br>
<span style='font-size:10.0pt;font-family:"Arial","sans-serif"'>Karl </span><br>
<br>
<o:p></o:p></p>

<table class=MsoNormalTable border=0 cellpadding=0 width="100%"
 style='width:100.0%'>
 <tr>
  <td valign=top style='padding:.75pt .75pt .75pt .75pt'>
  <p class=MsoNormal><span style='font-size:7.5pt;font-family:"Arial","sans-serif";
  color:#5F5F5F'>From:</span> <o:p></o:p></p>
  </td>
  <td valign=top style='padding:.75pt .75pt .75pt .75pt'>
  <p class=MsoNormal><span style='font-size:7.5pt;font-family:"Arial","sans-serif"'>&quot;Dart,
  Jocelyn&quot; &lt;jocelyn.dart@sap.com&gt;</span> <o:p></o:p></p>
  </td>
 </tr>
 <tr>
  <td valign=top style='padding:.75pt .75pt .75pt .75pt'>
  <p class=MsoNormal><span style='font-size:7.5pt;font-family:"Arial","sans-serif";
  color:#5F5F5F'>To:</span> <o:p></o:p></p>
  </td>
  <td valign=top style='padding:.75pt .75pt .75pt .75pt'>
  <p class=MsoNormal><span style='font-size:7.5pt;font-family:"Arial","sans-serif"'>&quot;SAP
  Workflow Users' Group&quot; &lt;sap-wug@mit.edu&gt;</span> <o:p></o:p></p>
  </td>
 </tr>
 <tr>
  <td valign=top style='padding:.75pt .75pt .75pt .75pt'>
  <p class=MsoNormal><span style='font-size:7.5pt;font-family:"Arial","sans-serif";
  color:#5F5F5F'>Date:</span> <o:p></o:p></p>
  </td>
  <td valign=top style='padding:.75pt .75pt .75pt .75pt'>
  <p class=MsoNormal><span style='font-size:7.5pt;font-family:"Arial","sans-serif"'>19/10/2010
  10:31 AM</span> <o:p></o:p></p>
  </td>
 </tr>
 <tr>
  <td valign=top style='padding:.75pt .75pt .75pt .75pt'>
  <p class=MsoNormal><span style='font-size:7.5pt;font-family:"Arial","sans-serif";
  color:#5F5F5F'>Subject:</span> <o:p></o:p></p>
  </td>
  <td valign=top style='padding:.75pt .75pt .75pt .75pt'>
  <p class=MsoNormal><span style='font-size:7.5pt;font-family:"Arial","sans-serif"'>RE:
  WF ProgramExists</span><o:p></o:p></p>
  </td>
 </tr>
</table>

<p class=MsoNormal><o:p>&nbsp;</o:p></p>

<div class=MsoNormal align=center style='text-align:center'>

<hr size=2 width="100%" noshade style='color:#A0A0A0' align=center>

</div>

<p class=MsoNormal style='margin-bottom:12.0pt'><br>
<br>
<br>
<tt><span style='font-size:10.0pt'>Mike - Try the state change event - Yes that
should be usable when the work item is forwarded, reserved or replaced. </span></tt><span
style='font-size:10.0pt;font-family:"Courier New"'><br>
<tt>Regards,</tt><br>
<tt>Jocelyn </tt><br>
<br>
<tt>-----Original Message-----</tt><br>
<tt>From: sap-wug-bounces@mit.edu [</tt></span><a
href="mailto:sap-wug-bounces@mit.edu"><tt><span style='font-size:10.0pt'>mailto:sap-wug-bounces@mit.edu</span></tt></a><tt><span
style='font-size:10.0pt'>] On Behalf Of Mike Pokraka</span></tt><span
style='font-size:10.0pt;font-family:"Courier New"'><br>
<tt>Sent: Monday, 18 October 2010 9:20 PM</tt><br>
<tt>To: SAP Workflow Users' Group</tt><br>
<tt>Subject: Re: WF ProgramExists</tt><br>
<br>
<tt>Hi Kjetil,</tt><br>
<br>
<tt>Doesn't address the question whether it gets called during forwarding, but</tt><br>
<tt>a much more useful piece of info instead, thanks!</tt><br>
<br>
<tt>Mike</tt><br>
<br>
<tt>On Mon, October 18, 2010 10:21 am, Kjetil Kilhavn wrote:</tt><br>
<tt>&gt; Fredag 15. oktober 2010 09.44.51 skrev Mike Pokraka:</tt><br>
<tt>&gt;&gt; Hi Rick,</tt><br>
<tt>&gt;&gt;</tt><br>
<tt>&gt;&gt; No I haven't played with them, but looks like there's some good
stuff</tt><br>
<tt>&gt;&gt; there. If the forwarding isn't catchable in the WF exit, you could
do a</tt><br>
<tt>&gt;&gt; small enhancement somewhere in the forwarding functionality.</tt><br>
<tt>&gt;</tt><br>
<tt>&gt; It's been a while since I examined IF_SWF_IFS_WORKITEM in order to
find</tt><br>
<tt>&gt; out if</tt><br>
<tt>&gt; I could use this interface to log some information in a solution's WF
log</tt><br>
<tt>&gt; instead of using separate logging tables, but here's my findings about
the</tt><br>
<tt>&gt; sequence of method invocations anyway - for what it is worth:</tt><br>
<tt>&gt;</tt><br>
<tt>&gt; WI type &nbsp; &nbsp; | BC | AR &nbsp; &nbsp; &nbsp; | C &nbsp;| BE
&nbsp;| SC &nbsp; &nbsp;| AE | AA | BR |</tt><br>
<tt>&gt; ---------------------------------------------------------------</tt><br>
<tt>&gt; W (dialog) &nbsp;| 1 &nbsp;| 2 (a) &nbsp; &nbsp;| 3 &nbsp;| &nbsp;
&nbsp; | &nbsp; &nbsp; &nbsp; | &nbsp; &nbsp;| &nbsp; &nbsp;| &nbsp; &nbsp;|</tt><br>
<tt>&gt; B (backgr.) | &nbsp; &nbsp;| &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;|
&nbsp; &nbsp;| 1 &nbsp; | 2 &nbsp; &nbsp; | 3 &nbsp;| &nbsp; &nbsp;| &nbsp;
&nbsp;|</tt><br>
<tt>&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; | &nbsp; &nbsp;| &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp;| &nbsp; &nbsp;| &nbsp; &nbsp; | 4,5 &nbsp; | &nbsp;
&nbsp;| &nbsp; &nbsp;| &nbsp; &nbsp;|</tt><br>
<tt>&gt; F (flow) &nbsp; &nbsp;| 1 &nbsp;| 6,7,8,9, | 2 &nbsp;| 3 &nbsp; | 4,5,
&nbsp;| 10,| &nbsp; &nbsp;| &nbsp; &nbsp;|</tt><br>
<tt>&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; | &nbsp; &nbsp;| 13,14,15,|
&nbsp; &nbsp;| &nbsp; &nbsp; | 11,12 | &nbsp; &nbsp;| &nbsp; &nbsp;| &nbsp;
&nbsp;|</tt><br>
<tt>&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; | &nbsp; &nbsp;| 16,17
&nbsp; &nbsp;| &nbsp; &nbsp;| &nbsp; &nbsp; | &nbsp; &nbsp; &nbsp; | &nbsp;
&nbsp;| &nbsp; &nbsp;| &nbsp; &nbsp;|</tt><br>
<tt>&gt; ---------------------------------------------------------------</tt><br>
<tt>&gt; (a) Not if no agent is found</tt><br>
<tt>&gt;</tt><br>
<tt>&gt; BC - BEF_CREAT</tt><br>
<tt>&gt; AE - AFT_REXEC</tt><br>
<tt>&gt; C &nbsp;- CREATED</tt><br>
<tt>&gt; BE - BEF_EXEC</tt><br>
<tt>&gt; SC - STATE_CHG</tt><br>
<tt>&gt; AE - AFT_EXEC</tt><br>
<tt>&gt; AA - AFT_ASYINV</tt><br>
<tt>&gt; BR - BEF_REMOVE</tt><br>
<tt>&gt;</tt><br>
<tt>&gt; Well, as I can recall it was the *sequence* I made a note of, my
memory</tt><br>
<tt>&gt; may of</tt><br>
<tt>&gt; course be failing ;-)</tt><br>
<tt>&gt;</tt><br>
<tt>&gt;&gt;</tt><br>
<tt>&gt;&gt; Cheers,</tt><br>
<tt>&gt;&gt; Mike</tt><br>
<tt>&gt;&gt;</tt><br>
<tt>&gt;&gt; On Thu, October 14, 2010 4:26 pm, Sample, Rick wrote:</tt><br>
<tt>&gt;&gt; &gt; Mike,</tt><br>
<tt>&gt;&gt; &gt;</tt><br>
<tt>&gt;&gt; &gt; That is sort of what I have right now. Pre/Post BG steps on
these</tt><br>
<tt>&gt;&gt; &gt; approval tasks.</tt><br>
<tt>&gt;&gt; &gt; I have a wee bit of time to play around with these WF Program
Exits</tt><br>
<tt>&gt;&gt; and</tt><br>
<tt>&gt;&gt; &gt; determine if I have valid use 'without' over engineering my
WF.</tt><br>
<tt>&gt;&gt; &gt; It looks doable and some simple container ops seem to work...
mostly</tt><br>
<tt>&gt;&gt; &gt; anyway.</tt><br>
<tt>&gt;&gt; &gt;</tt><br>
<tt>&gt;&gt; &gt; I am hacking some of the class files in the SWF_TST package.
First try</tt><br>
<tt>&gt;&gt; &gt; was the WF Trace.</tt><br>
<tt>&gt;&gt; &gt; That did not work. Won't turn on via the class file.
Annoying, but got</tt><br>
<tt>&gt;&gt; &gt; the container ops</tt><br>
<tt>&gt;&gt; &gt; code and kicking around.</tt><br>
<tt>&gt;&gt; &gt;</tt><br>
<tt>&gt;&gt; &gt; You use this functionality?</tt><br>
<tt>&gt;&gt; &gt;</tt><br>
<tt>&gt;&gt; &gt; I plan to spend a day or two more and see what I can get out
of these</tt><br>
<tt>&gt;&gt; &gt; class files.</tt><br>
<tt>&gt;&gt; &gt;</tt><br>
<tt>&gt;&gt; &gt; As always, thanks for the feedback.</tt><br>
<tt>&gt;&gt; &gt; Rick</tt><br>
<tt>&gt;&gt; &gt;</tt><br>
<tt>&gt;&gt; &gt;&gt; -----Original Message-----</tt><br>
<tt>&gt;&gt; &gt;&gt; From: sap-wug-bounces@mit.edu [</tt></span><a
href="mailto:sap-wug-"><tt><span style='font-size:10.0pt'>mailto:sap-wug-</span></tt></a><span
style='font-size:10.0pt;font-family:"Courier New"'><br>
<tt>&gt;&gt; &gt;&gt; bounces@mit.edu] On Behalf Of Mike Pokraka</tt><br>
<tt>&gt;&gt; &gt;&gt; Sent: Thursday, October 14, 2010 8:03 AM</tt><br>
<tt>&gt;&gt; &gt;&gt; To: SAP Workflow Users' Group</tt><br>
<tt>&gt;&gt; &gt;&gt; Subject: RE: WF ProgramExists</tt><br>
<tt>&gt;&gt; &gt;&gt;</tt><br>
<tt>&gt;&gt; &gt;&gt; Rick,</tt><br>
<tt>&gt;&gt; &gt;&gt;</tt><br>
<tt>&gt;&gt; &gt;&gt; Just a general comment which may not apply, but I find</tt><br>
<tt>&gt;&gt; &gt;&gt; that I tend to do role resolution separately more often</tt><br>
<tt>&gt;&gt; &gt;&gt; than not as it avoids most of these conundrums.</tt><br>
<tt>&gt;&gt; &gt;&gt; To accomplish your scenario I'd use two conditional texts
in</tt><br>
<tt>&gt;&gt; &gt;&gt; my work item and pass in a flag to display one or the
other.</tt><br>
<tt>&gt;&gt; &gt;&gt; It may be possible to catch the forwarding action via a
work</tt><br>
<tt>&gt;&gt; &gt;&gt; item exit (not sure &amp; no time to look into it) and
change</tt><br>
<tt>&gt;&gt; &gt;&gt; the flag in the container - the new text would be
displayed</tt><br>
<tt>&gt;&gt; &gt;&gt; automatically for the new user.</tt><br>
<tt>&gt;&gt; &gt;&gt;</tt><br>
<tt>&gt;&gt; &gt;&gt; Cheers,</tt><br>
<tt>&gt;&gt; &gt;&gt; Mike</tt><br>
<tt>&gt;&gt; &gt;&gt;</tt><br>
<tt>&gt;&gt; &gt;&gt; On Thu, October 14, 2010 1:12 pm, Sample, Rick wrote:</tt><br>
<tt>&gt;&gt; &gt;&gt; &gt; Sorry, dumb question. I know a flag gets set
somewhere,</tt><br>
<tt>&gt;&gt; &gt;&gt;</tt><br>
<tt>&gt;&gt; &gt;&gt; because of the</tt><br>
<tt>&gt;&gt; &gt;&gt;</tt><br>
<tt>&gt;&gt; &gt;&gt; &gt; option</tt><br>
<tt>&gt;&gt; &gt;&gt; &gt;</tt><br>
<tt>&gt;&gt; &gt;&gt; &gt; to fail the role if FM failed. &quot;Terminate if
Rule Resolution</tt><br>
<tt>&gt;&gt; &gt;&gt;</tt><br>
<tt>&gt;&gt; &gt;&gt; has no</tt><br>
<tt>&gt;&gt; &gt;&gt;</tt><br>
<tt>&gt;&gt; &gt;&gt; &gt; Result&quot;.</tt><br>
<tt>&gt;&gt; &gt;&gt; &gt;</tt><br>
<tt>&gt;&gt; &gt;&gt; &gt;</tt><br>
<tt>&gt;&gt; &gt;&gt; &gt;</tt><br>
<tt>&gt;&gt; &gt;&gt; &gt; Most WFs we have a 'Fail Back' option. If role fails
to find</tt><br>
<tt>&gt;&gt; &gt;&gt;</tt><br>
<tt>&gt;&gt; &gt;&gt; next</tt><br>
<tt>&gt;&gt; &gt;&gt;</tt><br>
<tt>&gt;&gt; &gt;&gt; &gt; agent in approval,</tt><br>
<tt>&gt;&gt; &gt;&gt; &gt;</tt><br>
<tt>&gt;&gt; &gt;&gt; &gt; send back to last agent with a changed TEXT to
inform</tt><br>
<tt>&gt;&gt; &gt;&gt;</tt><br>
<tt>&gt;&gt; &gt;&gt; user what to do</tt><br>
<tt>&gt;&gt; &gt;&gt;</tt><br>
<tt>&gt;&gt; &gt;&gt; &gt; next.</tt><br>
<tt>&gt;&gt; &gt;&gt; &gt;</tt><br>
<tt>&gt;&gt; &gt;&gt; &gt; User can manually forward, &nbsp;whatever...</tt><br>
<tt>&gt;&gt; &gt;&gt; &gt;</tt><br>
<tt>&gt;&gt; &gt;&gt; &gt;</tt><br>
<tt>&gt;&gt; &gt;&gt; &gt;</tt><br>
<tt>&gt;&gt; &gt;&gt; &gt; What appears to be a better option is to get last
agent</tt><br>
<tt>&gt;&gt; &gt;&gt;</tt><br>
<tt>&gt;&gt; &gt;&gt; and compare to</tt><br>
<tt>&gt;&gt; &gt;&gt;</tt><br>
<tt>&gt;&gt; &gt;&gt; &gt; the current agent.</tt><br>
<tt>&gt;&gt; &gt;&gt; &gt;</tt><br>
<tt>&gt;&gt; &gt;&gt; &gt; The event AFT_REXEC &quot;after rule executed&quot;,
looks like it is</tt><br>
<tt>&gt;&gt; &gt;&gt;</tt><br>
<tt>&gt;&gt; &gt;&gt; what I want.</tt><br>
<tt>&gt;&gt; &gt;&gt;</tt><br>
<tt>&gt;&gt; &gt;&gt; &gt; Will forward findings if anyone cares...</tt><br>
<tt>&gt;&gt; &gt;&gt; &gt;</tt><br>
<tt>&gt;&gt; &gt;&gt; &gt;</tt><br>
<tt>&gt;&gt; &gt;&gt; &gt;</tt><br>
<tt>&gt;&gt; &gt;&gt; &gt; Thanks,</tt><br>
<tt>&gt;&gt; &gt;&gt; &gt;</tt><br>
<tt>&gt;&gt; &gt;&gt; &gt; Rick</tt><br>
<tt>&gt;&gt; &gt;&gt; &gt;</tt><br>
<tt>&gt;&gt; &gt;&gt; &gt;</tt><br>
<tt>&gt;&gt; &gt;&gt; &gt; From: sap-wug-bounces@mit.edu [</tt></span><a
href="mailto:sap-wug-"><tt><span style='font-size:10.0pt'>mailto:sap-wug-</span></tt></a><span
style='font-size:10.0pt;font-family:"Courier New"'><br>
<tt>&gt;&gt; &gt;&gt;</tt><br>
<tt>&gt;&gt; &gt;&gt; bounces@mit.edu] On</tt><br>
<tt>&gt;&gt; &gt;&gt;</tt><br>
<tt>&gt;&gt; &gt;&gt; &gt; Behalf Of Steffen Schloenvoigt</tt><br>
<tt>&gt;&gt; &gt;&gt; &gt; Sent: Thursday, October 14, 2010 4:58 AM</tt><br>
<tt>&gt;&gt; &gt;&gt; &gt; To: SAP Workflow Users' Group</tt><br>
<tt>&gt;&gt; &gt;&gt; &gt; Subject: Re: WF ProgramExists</tt><br>
<tt>&gt;&gt; &gt;&gt; &gt;</tt><br>
<tt>&gt;&gt; &gt;&gt; &gt; Hmm no, but you could try to use FM</tt><br>
<tt>&gt;&gt; &gt;&gt;</tt><br>
<tt>&gt;&gt; &gt;&gt; 'SAP_WAPI_WORKITEM_RECIPIENTS' and</tt><br>
<tt>&gt;&gt; &gt;&gt;</tt><br>
<tt>&gt;&gt; &gt;&gt; &gt; check if the result is empty...</tt><br>
<tt>&gt;&gt; &gt;&gt; &gt;</tt><br>
<tt>&gt;&gt; &gt;&gt; &gt; Best regards,</tt><br>
<tt>&gt;&gt; &gt;&gt; &gt; Steffen Schlönvoigt</tt><br>
<tt>&gt;&gt; &gt;&gt; &gt; 2010/10/13 Sample, Rick</tt><br>
<tt>&gt;&gt; &gt;&gt;</tt><br>
<tt>&gt;&gt; &gt;&gt; &lt;Rick.Sample@graybar.com&lt;</tt></span><a
href="mailto:Rick.Sample@graybar.c"><tt><span style='font-size:10.0pt'>mailto:Rick.Sample@graybar.c</span></tt></a><span
style='font-size:10.0pt;font-family:"Courier New"'><br>
<tt>&gt;&gt; &gt;&gt; om&gt;&gt;</tt><br>
<tt>&gt;&gt; &gt;&gt;</tt><br>
<tt>&gt;&gt; &gt;&gt; &gt; Update,</tt><br>
<tt>&gt;&gt; &gt;&gt; &gt; I figured out how to update the WI_TEXT with some
code</tt><br>
<tt>&gt;&gt; &gt;&gt;</tt><br>
<tt>&gt;&gt; &gt;&gt; in</tt><br>
<tt>&gt;&gt; &gt;&gt;</tt><br>
<tt>&gt;&gt; &gt;&gt; &gt; CL_SWL_ADM_COMMAND-WITEXT_CHANGE.</tt><br>
<tt>&gt;&gt; &gt;&gt; &gt;</tt><br>
<tt>&gt;&gt; &gt;&gt; &gt; Now, I would like to change this WI_TEXT on failure
of the</tt><br>
<tt>&gt;&gt; &gt;&gt;</tt><br>
<tt>&gt;&gt; &gt;&gt; role res.</tt><br>
<tt>&gt;&gt; &gt;&gt;</tt><br>
<tt>&gt;&gt; &gt;&gt; &gt; Example, if</tt><br>
<tt>&gt;&gt; &gt;&gt; &gt; role res fails, set the WI_TEXT to &quot;Error, bla
bla bla you</tt><br>
<tt>&gt;&gt; &gt;&gt;</tt><br>
<tt>&gt;&gt; &gt;&gt; received</tt><br>
<tt>&gt;&gt; &gt;&gt;</tt><br>
<tt>&gt;&gt; &gt;&gt; &gt; this because could not find next agent... &quot;</tt><br>
<tt>&gt;&gt; &gt;&gt; &gt; Right now, I have to execute the role res in a
background</tt><br>
<tt>&gt;&gt; &gt;&gt;</tt><br>
<tt>&gt;&gt; &gt;&gt; task just to</tt><br>
<tt>&gt;&gt; &gt;&gt;</tt><br>
<tt>&gt;&gt; &gt;&gt; &gt; figure out if next agent is found, set the message
if not,</tt><br>
<tt>&gt;&gt; &gt;&gt;</tt><br>
<tt>&gt;&gt; &gt;&gt; etc. Then,</tt><br>
<tt>&gt;&gt; &gt;&gt;</tt><br>
<tt>&gt;&gt; &gt;&gt; &gt; execute the Decision task (which executes the role
res</tt><br>
<tt>&gt;&gt; &gt;&gt;</tt><br>
<tt>&gt;&gt; &gt;&gt; again) and send</tt><br>
<tt>&gt;&gt; &gt;&gt;</tt><br>
<tt>&gt;&gt; &gt;&gt; &gt; to last agent.</tt><br>
<tt>&gt;&gt; &gt;&gt; &gt;</tt><br>
<tt>&gt;&gt; &gt;&gt; &gt; Question: Is there a flag in Work Item container that
is set</tt><br>
<tt>&gt;&gt; &gt;&gt;</tt><br>
<tt>&gt;&gt; &gt;&gt; if role</tt><br>
<tt>&gt;&gt; &gt;&gt;</tt><br>
<tt>&gt;&gt; &gt;&gt; &gt; fails?</tt><br>
<tt>&gt;&gt; &gt;&gt; &gt;</tt><br>
<tt>&gt;&gt; &gt;&gt; &gt;</tt><br>
<tt>&gt;&gt; &gt;&gt; &gt;</tt><br>
<tt>&gt;&gt; &gt;&gt; &gt; From: Sample, Rick</tt><br>
<tt>&gt;&gt; &gt;&gt; &gt; Sent: Wednesday, October 13, 2010 8:53 AM</tt><br>
<tt>&gt;&gt; &gt;&gt; &gt; To: SAP Workflow Users' Group</tt><br>
<tt>&gt;&gt; &gt;&gt; &gt; Subject: WF ProgramExists</tt><br>
<tt>&gt;&gt; &gt;&gt; &gt;</tt><br>
<tt>&gt;&gt; &gt;&gt; &gt;</tt><br>
<tt>&gt;&gt; &gt;&gt; &gt; Hi all,</tt><br>
<tt>&gt;&gt; &gt;&gt; &gt;</tt><br>
<tt>&gt;&gt; &gt;&gt; &gt;</tt><br>
<tt>&gt;&gt; &gt;&gt; &gt;</tt><br>
<tt>&gt;&gt; &gt;&gt; &gt; I have a need for a WF &quot;Program Exit&quot; to
dynamically</tt><br>
<tt>&gt;&gt; &gt;&gt;</tt><br>
<tt>&gt;&gt; &gt;&gt; change the Task</tt><br>
<tt>&gt;&gt; &gt;&gt;</tt><br>
<tt>&gt;&gt; &gt;&gt; &gt; Text at runtime.</tt><br>
<tt>&gt;&gt; &gt;&gt; &gt;</tt><br>
<tt>&gt;&gt; &gt;&gt; &gt;</tt><br>
<tt>&gt;&gt; &gt;&gt; &gt;</tt><br>
<tt>&gt;&gt; &gt;&gt; &gt; Currently, if I need to change a task text at
runtime, I</tt><br>
<tt>&gt;&gt; &gt;&gt;</tt><br>
<tt>&gt;&gt; &gt;&gt; create a</tt><br>
<tt>&gt;&gt; &gt;&gt;</tt><br>
<tt>&gt;&gt; &gt;&gt; &gt; container element and</tt><br>
<tt>&gt;&gt; &gt;&gt; &gt;</tt><br>
<tt>&gt;&gt; &gt;&gt; &gt; place it in the WI_TEXT. I then have a background
task</tt><br>
<tt>&gt;&gt; &gt;&gt;</tt><br>
<tt>&gt;&gt; &gt;&gt; determine what</tt><br>
<tt>&gt;&gt; &gt;&gt;</tt><br>
<tt>&gt;&gt; &gt;&gt; &gt; the task text should be and</tt><br>
<tt>&gt;&gt; &gt;&gt; &gt;</tt><br>
<tt>&gt;&gt; &gt;&gt; &gt; pass it in before the Decision step is executed.
Kludgy, but</tt><br>
<tt>&gt;&gt; &gt;&gt;</tt><br>
<tt>&gt;&gt; &gt;&gt; it works</tt><br>
<tt>&gt;&gt; &gt;&gt;</tt><br>
<tt>&gt;&gt; &gt;&gt; &gt; and fairly simple to understand.</tt><br>
<tt>&gt;&gt; &gt;&gt; &gt;</tt><br>
<tt>&gt;&gt; &gt;&gt; &gt;</tt><br>
<tt>&gt;&gt; &gt;&gt; &gt;</tt><br>
<tt>&gt;&gt; &gt;&gt; &gt; Now, I want to dynamically change this value using a</tt><br>
<tt>&gt;&gt; &gt;&gt;</tt><br>
<tt>&gt;&gt; &gt;&gt; Program Exit.</tt><br>
<tt>&gt;&gt; &gt;&gt;</tt><br>
<tt>&gt;&gt; &gt;&gt; &gt; So I added the SAP standard</tt><br>
<tt>&gt;&gt; &gt;&gt;</tt><br>
<tt>&gt;&gt; &gt;&gt; CL_SWF_TST_PE_GETDESCRIPTION class to a</tt><br>
<tt>&gt;&gt; &gt;&gt;</tt><br>
<tt>&gt;&gt; &gt;&gt; &gt; new task and</tt><br>
<tt>&gt;&gt; &gt;&gt; &gt;</tt><br>
<tt>&gt;&gt; &gt;&gt; &gt; it gets the Desc text and sets a container. Fine.</tt><br>
<tt>&gt;&gt; &gt;&gt; &gt;</tt><br>
<tt>&gt;&gt; &gt;&gt; &gt; Next, I modified this class to just get/set a Work
Item</tt><br>
<tt>&gt;&gt; &gt;&gt;</tt><br>
<tt>&gt;&gt; &gt;&gt; container.</tt><br>
<tt>&gt;&gt; &gt;&gt;</tt><br>
<tt>&gt;&gt; &gt;&gt; &gt; This also works fine.</tt><br>
<tt>&gt;&gt; &gt;&gt; &gt;</tt><br>
<tt>&gt;&gt; &gt;&gt; &gt;</tt><br>
<tt>&gt;&gt; &gt;&gt; &gt;</tt><br>
<tt>&gt;&gt; &gt;&gt; &gt; Now, I tried to get this to change the Task Text
with this</tt><br>
<tt>&gt;&gt; &gt;&gt;</tt><br>
<tt>&gt;&gt; &gt;&gt; new</tt><br>
<tt>&gt;&gt; &gt;&gt;</tt><br>
<tt>&gt;&gt; &gt;&gt; &gt; container element but no luck.</tt><br>
<tt>&gt;&gt; &gt;&gt; &gt;</tt><br>
<tt>&gt;&gt; &gt;&gt; &gt; This changes the container element, but does not
change</tt><br>
<tt>&gt;&gt; &gt;&gt;</tt><br>
<tt>&gt;&gt; &gt;&gt; the Work Item</tt><br>
<tt>&gt;&gt; &gt;&gt;</tt><br>
<tt>&gt;&gt; &gt;&gt; &gt; text.</tt><br>
<tt>&gt;&gt; &gt;&gt; &gt;</tt><br>
<tt>&gt;&gt; &gt;&gt; &gt;</tt><br>
<tt>&gt;&gt; &gt;&gt; &gt;</tt><br>
<tt>&gt;&gt; &gt;&gt; &gt; Anyone use these WF program exits?</tt><br>
<tt>&gt;&gt; &gt;&gt; &gt;</tt><br>
<tt>&gt;&gt; &gt;&gt; &gt; Any thoughts, examples, assistance is greatly
appreciated.</tt><br>
<tt>&gt;&gt; &gt;&gt; &gt;</tt><br>
<tt>&gt;&gt; &gt;&gt; &gt;</tt><br>
<tt>&gt;&gt; &gt;&gt; &gt;</tt><br>
<tt>&gt;&gt; &gt;&gt; &gt;</tt><br>
<tt>&gt;&gt; &gt;&gt; &gt;</tt><br>
<tt>&gt;&gt; &gt;&gt; &gt; ==================================</tt><br>
<tt>&gt;&gt; &gt;&gt; &gt;</tt><br>
<tt>&gt;&gt; &gt;&gt; &gt; METHOD change_cont_element.</tt><br>
<tt>&gt;&gt; &gt;&gt; &gt;</tt><br>
<tt>&gt;&gt; &gt;&gt; &gt;</tt><br>
<tt>&gt;&gt; &gt;&gt; &gt;</tt><br>
<tt>&gt;&gt; &gt;&gt; &gt; &nbsp; DATA:</tt><br>
<tt>&gt;&gt; &gt;&gt; &gt;</tt><br>
<tt>&gt;&gt; &gt;&gt; &gt; &nbsp; &nbsp;container TYPE REF TO
if_swf_cnt_container,</tt><br>
<tt>&gt;&gt; &gt;&gt; &gt;</tt><br>
<tt>&gt;&gt; &gt;&gt; &gt; &nbsp; &nbsp;lh_wihandle TYPE REF TO
if_swf_run_wim_internal,</tt><br>
<tt>&gt;&gt; &gt;&gt; &gt;</tt><br>
<tt>&gt;&gt; &gt;&gt; &gt; &nbsp; &nbsp;l_exception TYPE REF TO
cx_swf_cnt_container,</tt><br>
<tt>&gt;&gt; &gt;&gt; &gt;</tt><br>
<tt>&gt;&gt; &gt;&gt; &gt; &nbsp; &nbsp;l_wiid TYPE sww_wiid.</tt><br>
<tt>&gt;&gt; &gt;&gt; &gt;</tt><br>
<tt>&gt;&gt; &gt;&gt; &gt;</tt><br>
<tt>&gt;&gt; &gt;&gt; &gt;</tt><br>
<tt>&gt;&gt; &gt;&gt; &gt; &nbsp; BREAK-POINT ID zexits.</tt><br>
<tt>&gt;&gt; &gt;&gt; &gt;</tt><br>
<tt>&gt;&gt; &gt;&gt; &gt;</tt><br>
<tt>&gt;&gt; &gt;&gt; &gt;</tt><br>
<tt>&gt;&gt; &gt;&gt; &gt; &nbsp; l_wiid = me-&gt;m_ctx-&gt;get_workitem_id( ).</tt><br>
<tt>&gt;&gt; &gt;&gt; &gt;</tt><br>
<tt>&gt;&gt; &gt;&gt; &gt;</tt><br>
<tt>&gt;&gt; &gt;&gt; &gt;</tt><br>
<tt>&gt;&gt; &gt;&gt; &gt; &nbsp; TRY.</tt><br>
<tt>&gt;&gt; &gt;&gt; &gt;</tt><br>
<tt>&gt;&gt; &gt;&gt; &gt; &nbsp; &nbsp; &nbsp; lh_wihandle =</tt><br>
<tt>&gt;&gt; &gt;&gt;</tt><br>
<tt>&gt;&gt; &gt;&gt; cl_swf_run_wim_factory=&gt;find_by_wiid( l_wiid ).</tt><br>
<tt>&gt;&gt; &gt;&gt;</tt><br>
<tt>&gt;&gt; &gt;&gt; &gt; &nbsp; &nbsp; &nbsp; container =
lh_wihandle-&gt;get_wi_container( ).</tt><br>
<tt>&gt;&gt; &gt;&gt; &gt;</tt><br>
<tt>&gt;&gt; &gt;&gt; &gt; &nbsp; &nbsp; CATCH cx_swf_run_wim.</tt><br>
<tt>&gt;&gt; &gt;&gt; &gt;</tt><br>
<tt>&gt;&gt; &gt;&gt; &gt; &nbsp; ENDTRY.</tt><br>
<tt>&gt;&gt; &gt;&gt; &gt;</tt><br>
<tt>&gt;&gt; &gt;&gt; &gt;</tt><br>
<tt>&gt;&gt; &gt;&gt; &gt;</tt><br>
<tt>&gt;&gt; &gt;&gt; &gt; &nbsp; TRY.</tt><br>
<tt>&gt;&gt; &gt;&gt; &gt;</tt><br>
<tt>&gt;&gt; &gt;&gt; &gt; &nbsp; &nbsp; &nbsp; CALL METHOD
container-&gt;element_get</tt><br>
<tt>&gt;&gt; &gt;&gt; &gt;</tt><br>
<tt>&gt;&gt; &gt;&gt; &gt; &nbsp; &nbsp; &nbsp; &nbsp; EXPORTING</tt><br>
<tt>&gt;&gt; &gt;&gt; &gt;</tt><br>
<tt>&gt;&gt; &gt;&gt; &gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; name =
'ZWI_TEXT'.</tt><br>
<tt>&gt;&gt; &gt;&gt; &gt;</tt><br>
<tt>&gt;&gt; &gt;&gt; &gt;</tt><br>
<tt>&gt;&gt; &gt;&gt; &gt;</tt><br>
<tt>&gt;&gt; &gt;&gt; &gt; &nbsp; &nbsp; &nbsp; CALL METHOD
container-&gt;element_set</tt><br>
<tt>&gt;&gt; &gt;&gt; &gt;</tt><br>
<tt>&gt;&gt; &gt;&gt; &gt; &nbsp; &nbsp; &nbsp; &nbsp; EXPORTING</tt><br>
<tt>&gt;&gt; &gt;&gt; &gt;</tt><br>
<tt>&gt;&gt; &gt;&gt; &gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; name &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; = 'ZWI_TEXT'</tt><br>
<tt>&gt;&gt; &gt;&gt; &gt;</tt><br>
<tt>&gt;&gt; &gt;&gt; &gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; value &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;= 'New_Text'</tt><br>
<tt>&gt;&gt; &gt;&gt; &gt;</tt><br>
<tt>&gt;&gt; &gt;&gt; &gt; &nbsp; &nbsp; &nbsp; &nbsp; IMPORTING</tt><br>
<tt>&gt;&gt; &gt;&gt; &gt;</tt><br>
<tt>&gt;&gt; &gt;&gt; &gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; exception_return
= l_exception.</tt><br>
<tt>&gt;&gt; &gt;&gt; &gt;</tt><br>
<tt>&gt;&gt; &gt;&gt; &gt;</tt><br>
<tt>&gt;&gt; &gt;&gt; &gt;</tt><br>
<tt>&gt;&gt; &gt;&gt; &gt; &nbsp; &nbsp; CATCH cx_swf_tst_introspection_error.</tt><br>
<tt>&gt;&gt; &gt;&gt; &gt;</tt><br>
<tt>&gt;&gt; &gt;&gt; &gt; &nbsp; &nbsp; CATCH cx_swf_cnt_container.</tt><br>
<tt>&gt;&gt; &gt;&gt; &gt;</tt><br>
<tt>&gt;&gt; &gt;&gt; &gt; &nbsp; ENDTRY.</tt><br>
<tt>&gt;&gt; &gt;&gt; &gt;</tt><br>
<tt>&gt;&gt; &gt;&gt; &gt;</tt><br>
<tt>&gt;&gt; &gt;&gt; &gt;</tt><br>
<tt>&gt;&gt; &gt;&gt; &gt; ENDMETHOD.</tt><br>
<tt>&gt;&gt; &gt;&gt; &gt;</tt><br>
<tt>&gt;&gt; &gt;&gt; &gt;</tt><br>
<tt>&gt;&gt; &gt;&gt; &gt;</tt><br>
<tt>&gt;&gt; &gt;&gt; &gt;</tt><br>
<tt>&gt;&gt; &gt;&gt; &gt; Rick Sample | SAP Workflow Analyst/Developer</tt><br>
<tt>&gt;&gt; &gt;&gt; &gt; 11885 Lackland Road | Maryland Heights, MO 63146 |</tt><br>
<tt>&gt; --</tt><br>
<tt>&gt; Kjetil Kilhavn (+47 40220607)</tt><br>
<tt>&gt; Blue Consulting AS (</tt></span><a href="http://www.bluec.no/"><tt><span
style='font-size:10.0pt'>http://www.bluec.no</span></tt></a><tt><span
style='font-size:10.0pt'>)</span></tt><span style='font-size:10.0pt;font-family:
"Courier New"'><br>
<tt>&gt;</tt><br>
<tt>&gt; _______________________________________________</tt><br>
<tt>&gt; SAP-WUG mailing list</tt><br>
<tt>&gt; SAP-WUG@mit.edu</tt><br>
<tt>&gt; </tt></span><a href="http://mailman.mit.edu/mailman/listinfo/sap-wug"><tt><span
style='font-size:10.0pt'>http://mailman.mit.edu/mailman/listinfo/sap-wug</span></tt></a><span
style='font-size:10.0pt;font-family:"Courier New"'><br>
<tt>&gt;</tt><br>
<br>
<br>
<tt>_______________________________________________</tt><br>
<tt>SAP-WUG mailing list</tt><br>
<tt>SAP-WUG@mit.edu</tt><br>
</span><a href="http://mailman.mit.edu/mailman/listinfo/sap-wug"><tt><span
style='font-size:10.0pt'>http://mailman.mit.edu/mailman/listinfo/sap-wug</span></tt></a><span
style='font-size:10.0pt;font-family:"Courier New"'><br>
<br>
<tt>_______________________________________________</tt><br>
<tt>SAP-WUG mailing list</tt><br>
<tt>SAP-WUG@mit.edu</tt><br>
</span><a href="http://mailman.mit.edu/mailman/listinfo/sap-wug"><tt><span
style='font-size:10.0pt'>http://mailman.mit.edu/mailman/listinfo/sap-wug</span></tt></a><span
style='font-size:10.0pt;font-family:"Courier New"'><br>
<br>
</span><o:p></o:p></p>

</div>

</body>

</html>