<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Verdana
}
--></style>
</head>
<body class='hmmessage'>
Mike P,<BR>
&nbsp;<BR>
Don't you find it strange though that the new OO Workflow&nbsp;stuff never went as far as creating proper OO Exception instances to work with? I do...<BR>
&nbsp;<BR>
To my mind Workflow lacks something here that&nbsp;SOA&nbsp;has been forced to tackle, namely the OO encapsulation of an exception as a runtime instance. <BR>
&nbsp;<BR>
For our PI stuff that means working with Sub-Types of SAP Standard Class CX_ROOT.<BR>
&nbsp;<BR>
I know that's moving a little off-topic here on this particular thread and doesn't solve Robert's original question (sorry Robert!) but it does strike me as odd that Workflow has dodged dealing with Exceptions in a proper 'OO way'<BR>
&nbsp;<BR>
Regards,<BR>
&nbsp;<BR>
Mike GT<BR>
&nbsp;<BR>&gt; Date: Thu, 20 May 2010 14:17:31 +0100<BR>&gt; Subject: Re: exception in class and passing of parameters<BR>&gt; From: wug@workflowconnections.com<BR>&gt; To: sap-wug@mit.edu<BR>&gt; <BR>&gt; Hi,<BR>&gt; <BR>&gt; Mike's suspicions are entirely correct: The WF engine picks up that an<BR>&gt; exception has occurred and doen't bother binding anything back.<BR>&gt; <BR>&gt; My take on SAP's design is that an exception is an error condition, which <BR>&gt; invalidates return values. A 'business exception' should thus be modeled<BR>&gt; with a return value that gets checked later.<BR>&gt; <BR>&gt; Regarding return parameters in BOR, I've never liked them and almost<BR>&gt; always gotten by without them in the BOR world. In some cases it's a minor<BR>&gt; inconvenience compared to BOR of having to check a parameter in a separate<BR>&gt; condition; but in other cases (if the step is simple and doesn't modify<BR>&gt; any data) it actually simplifies things because you can even skip the step<BR>&gt; completely and plug a functional method straight into a condition.<BR>&gt; <BR>&gt; Cheers,<BR>&gt; Mike<BR>&gt; <BR>&gt; On Thu, May 20, 2010 10:32 am, Robert van den Berg wrote:<BR>&gt; &gt;<BR>&gt; &gt; Hi all,<BR>&gt; &gt; &nbsp;<BR>&gt; &gt; I discovered where the evil is. In the old situation with BOR objects,<BR>&gt; &gt; the method has a return parameter (setting on the method). So the<BR>&gt; &gt; 'exceptions' are not exceptions but return values.<BR>&gt; &gt; &nbsp;<BR>&gt; &gt; Is there a possibility to use this with a Class method?<BR>&gt; &gt; &nbsp;<BR>&gt; &gt; Best regards,<BR>&gt; &gt; Robert<BR>&gt; &gt; On May 20, 2010 10:58 "Robert van den Berg" &lt;wug@bergtop-ict.nl&gt;wrote:<BR>&gt; &gt;&gt; Mike,<BR>&gt; &gt;&gt; &nbsp;<BR>&gt; &gt;&gt; it does not realy need a statement to pass the value, does it?<BR>&gt; &gt;&gt; &nbsp;<BR>&gt; &gt;&gt; The export parameter is set by the normal ABAP statement:<BR>&gt; &gt;&gt; APPEND ls_amr TO amr_reject.<BR>&gt; &gt;&gt; AMR_REJECT is set as exporting parameter.<BR>&gt; &gt;&gt; &nbsp;<BR>&gt; &gt;&gt; Regards,<BR>&gt; &gt;&gt; Robert<BR>&gt; &gt;&gt; On May 20, 2010 10:48 "Mike Gambier" &lt;madgambler@hotmail.com&gt;wrote:<BR>&gt; &gt;&gt; &gt; Jocelyn,<BR>&gt; &gt;&gt; &gt; &nbsp;<BR>&gt; &gt;&gt; &gt; I'm not sure that's entirely accurate anymore.&nbsp;ABAP was adjusted<BR>&gt; &gt;&gt; &gt; some time ago&nbsp;to return EXPORTING, TABLES&nbsp;and CHANGING parameters in<BR>&gt; &gt;&gt; &gt; FMs or ABAP Class Methods&nbsp;even if you raise an exception.<BR>&gt; &gt;&gt; &gt; &nbsp;<BR>&gt; &gt;&gt; &gt; We have several examples of where an Exception is thrown and we can<BR>&gt; &gt;&gt; &gt; still trust the value of an Exporting 'Error' flag or Application<BR>&gt; &gt;&gt; &gt; Log instance&nbsp;as well.<BR>&gt; &gt;&gt; &gt; &nbsp;<BR>&gt; &gt;&gt; &gt; The flaw highlighted by Robert&nbsp;I think is buried in the way the<BR>&gt; &gt;&gt; &gt; value being received is being bound (or not) into the Method<BR>&gt; &gt;&gt; &gt; container.<BR>&gt; &gt;&gt; &gt; &nbsp;<BR>&gt; &gt;&gt; &gt; Mike GT<BR>&gt; &gt;&gt; &gt; &nbsp;<BR>&gt; &gt;&gt; &gt; From: jocelyn.dart@sap.com<BR>&gt; &gt;&gt; &gt; To: sap-wug@mit.edu<BR>&gt; &gt;&gt; &gt; Date: Thu, 20 May 2010 10:30:07 +0200<BR>&gt; &gt;&gt; &gt; Subject: RE: exception in class and passing of parameters<BR>&gt; &gt;&gt; &gt; Hi Robert,<BR>&gt; &gt;&gt; &gt; &nbsp;<BR>&gt; &gt;&gt; &gt; If you raise an exception, the exporting parameters are NOT returned<BR>&gt; &gt;&gt; &gt; to the calling application (not just workflow – all calling<BR>&gt; &gt;&gt; &gt; applications) &nbsp;– exact same behaviour as function modules.&nbsp; The<BR>&gt; &gt;&gt; test<BR>&gt; &gt;&gt; &gt; tool “cheats” a little. &nbsp;<BR>&gt; &gt;&gt; &gt; &nbsp;<BR>&gt; &gt;&gt; &gt; So for a synchronous task either use an additional exporting<BR>&gt; &gt;&gt; &gt; parameter to indicate success/failure or use an exception class to<BR>&gt; &gt;&gt; &gt; update the workflow log with your returned value.<BR>&gt; &gt;&gt; &gt; Or raise an event (with or without parameters) – and make your task<BR>&gt; &gt;&gt; &gt; asynchronous.<BR>&gt; &gt;&gt; &gt; &nbsp;<BR>&gt; &gt;&gt; &gt; Regards,<BR>&gt; &gt;&gt; &gt; Jocelyn<BR>&gt; &gt;&gt; &gt; &nbsp;<BR>&gt; &gt;&gt; &gt; From:sap-wug-bounces@mit.edu [mailto:sap-wug-bounces@mit.edu] On<BR>&gt; &gt;&gt; &gt; Behalf OfRobert van den Berg<BR>&gt; &gt;&gt; &gt; Sent: Thursday, 20 May 2010 6:17 PM<BR>&gt; &gt;&gt; &gt; To: SAP Workflow Users' Group<BR>&gt; &gt;&gt; &gt; Subject: exception in class and passing of parameters<BR>&gt; &gt;&gt; &gt; &nbsp;<BR>&gt; &gt;&gt; &gt; Hi Group,<BR>&gt; &gt;&gt; &gt; &nbsp;<BR>&gt; &gt;&gt; &gt; I have a task which uses a method of a class. This&nbsp;method has export<BR>&gt; &gt;&gt; &gt; parameters and exceptions.<BR>&gt; &gt;&gt; &gt; Before the exception is raised, the export parameter is set.<BR>&gt; &gt;&gt; &gt; &nbsp;<BR>&gt; &gt;&gt; &gt; The problem is that, when the exception is raised, the export<BR>&gt; &gt;&gt; &gt; parameter is empty. When I test the method from the class builder,<BR>&gt; &gt;&gt; &gt; the export parameter contains a value but when I test the workflow,<BR>&gt; &gt;&gt; &gt; the workflow container is empty.<BR>&gt; &gt;&gt; &gt; &nbsp;<BR>&gt; &gt;&gt; &gt; Does anyone have an idea?<BR>&gt; &gt;&gt; &gt; &nbsp;<BR>&gt; &gt;&gt; &gt; Regards,<BR>&gt; &gt;&gt; &gt; Robert<BR>&gt; &gt;&gt; &gt; &nbsp;<BR>&gt; &gt;&gt; &gt; Get a free e-mail account with Hotmail. Sign-up now. &lt;about:blank&gt;<BR>&gt; &gt; _______________________________________________<BR>&gt; &gt; SAP-WUG mailing list<BR>&gt; &gt; SAP-WUG@mit.edu<BR>&gt; &gt; http://mailman.mit.edu/mailman/listinfo/sap-wug<BR>&gt; &gt;<BR>&gt; <BR>&gt; <BR>&gt; _______________________________________________<BR>&gt; SAP-WUG mailing list<BR>&gt; SAP-WUG@mit.edu<BR>&gt; http://mailman.mit.edu/mailman/listinfo/sap-wug<BR>                                               <br /><hr />Get a free e-mail account with Hotmail. Sign-up now. <a href='' target='_new'></a></body>
</html>