Persistent vs Runtime handles - development standards?

Mike Pokraka wug at workflowconnections.com
Mon Feb 8 10:41:19 EST 2010


Hi Andy, 

 

Your first scenario is fairly straightforward: the IDOC_PACKET object is not
instantiated yet, that is what the <???> usually indicates. Most likely some
kind of buffering issue since you say that it works fine when you test it
using a breakpoint. Quick test would be to add a requested start or a WAIT
UP TO statement somewhere before the part that fails.

 

The second scenario sounds correct to me that you should be receiving a
persistent reference. What I do find strange is that you are receiving a
run-time version when you test it. Does the ' synchronous' setting in SWUE
make any difference there? I would not rule out a bug in SWUE.

 

Florin's suggestion of using the container interface could help too.

 

Cheers,

Mike

 

 

 

From: sap-wug-bounces at mit.edu [mailto:sap-wug-bounces at mit.edu] On Behalf Of
Catherall, Andy
Sent: 08 February 2010 10:37
To: SAP Workflow Users' Group
Subject: RE: Persistent vs Runtime handles - development standards?

 

Two examples so far:

 

First - Child objects missing in WF & WF log

Workflow is bombing out (in new ECC6 environment) because it cannot
determine the agents... because it cannot find the object-values against
which to interrogate the Responsibility Rule. In this case, this is the
SALES ORG attribute, on the SALES ORG object (BUS0006) which is a custom
attribute of [extended] IDOCALEAUD.

The error message is SWF_EXP001 072 "Error in the evaluation of expression
'&IDOC_PACKET<???>.ZSALESORGANIZATION.SALESORGANIZA' for it". The <???> has
given me a little nugget of doubt as to whether I have a dodgy character or
something, but I can't find it.

In the log, this child object is clearly missing (IDOCALEAUD/IDOCPACKET is
instantiated). Yet, when I test the IDOCALEAUD object in SWO1, the SALES ORG
object does exist.

Stranger yet, if I set a break point in the virtual-attribute code, and open
the log, the code correctly finds the SALES ORG references, and then still
fails to show the object in the log.

 

The variable type is SWC_OBJECT.

I am using SWC_CREATE_OBJECT to instantiate it.

 

 

Second - Event CheckFM throwing exception

When creating a Document Information Record, the DRAW-FULLYCREATED event is
raised. A custom CheckFM is used to interrogate a value held the object. The
error appears to be that my code is expecting a run-time handle, but is
having a persistent handle passed to it. 

Just as I understood this, however, I discovered that if I raise the
DRAW-FULLYCREATED event against the same object via SWUE, the
event-container now holds a run-time object reference, and the entire
operation works!

So, it would appear that my code has to assess whether an object reference
in a container is a run-time or a persistent handle first, and move it to
the correct variable type accordingly. As both CV01N and SWUE were run in my
name as foreground transactions, I was a little surprised that the reference
types in the event-container differed, and this led me to wondering what was
the 'correct' way of handling object references...?

 

I am vaguely aware, from the "Considerations when upgrading SAP Business
Workflow..." document that the handling of SWC_OBJECT and SWOTOBJID has
become stricter, but I am not entirely clear what 'right' looks like.

 

Thanks

Andy

 

  _____  

From: sap-wug-bounces at mit.edu [mailto:sap-wug-bounces at mit.edu] On Behalf Of
Mike Pokraka
Sent: Saturday 06 February 2010 09:11
To: 'SAP Workflow Users' Group'
Subject: RE: Persistent vs Runtime handles - development standards?

Hi Andy, 

 

I don't believe such a document exists, but could you provide an example of
such surprises? 

 

Basic idea is that everything is persistent when it goes outside the current
context. This means binding, container storage. Persistent is converted to
runtime for working with an object and back to persistent for
binding/storage. 

 

Hope that helps, 

Mike

 

 

 

From: sap-wug-bounces at mit.edu [mailto:sap-wug-bounces at mit.edu] On Behalf Of
Catherall, Andy
Sent: 05 February 2010 15:33
To: SAP Workflow Users' Group
Subject: BOR: Persistent vs Runtime handles - development standards?

 

Hi all

 

As I progress through my ECC6 upgrade, I have now started to trip over a few
locations where the runtime/persistent handles are not as rigorous as they
might be. This is having some entertaining effects!

 

Can anyone point me towards some development standards documents that might
exist to make sure I use the correct handle type at the correct time?

 

Thanks

Andy Catherall 
Technical Analyst - SAP Workflow, IXOS & DMS 



Int: 751 0556 
Ext: +44 (0)121 486 0556 
Mobile: +44 (0)7813 025481 

 

 

The Cadbury Cocoa Partnership is working to secure the future of cocoa
farming around the world. Cadbury Dairy Milk bars are now Fairtrade
certified in the UK and Ireland. Visit www.cadbury.com
<http://www.cadbury.com/>  to learn more.

 

Be part of our "Purple Goes Green" commitments and don't print this email.

 

-----------------------------------------

 

This email (including any attachment) is confidential and may contain
privileged information and is intended for the use of the individual(s) to
whom it is addressed. If you are not the intended recipient or receive it in
error, you may not use, distribute, disclose or copy any of the information
contained within it and it may be unlawful to do so. If you are not the
intended recipient please notify us immediately by returning this email to
us at mailerror at cadbury.com and destroy all copies.

Any views expressed by individuals within this email do not necessarily
reflect the views of Cadbury Holdings Ltd or any of its subsidiaries or
affiliates. This email does not constitute a binding offer, acceptance,
amendment, waiver or other agreement, or create any obligation whatsoever,
unless such intention is clearly stated in the body of the email. Whilst we
have taken reasonable steps to ensure that this email and any attachments
are free from viruses, recipients are advised to subject this email to their
own virus checking, in keeping with good computing practice. We accept no
liability for any damage sustained as a result of any viruses. Please note
that email received by Cadbury Holdings Ltd or its subsidiaries or
affiliates may be monitored in accordance with applicable law. 

This email originates from Cadbury Holdings Ltd ("Cadbury") or Cadbury UK
("Cadbury UK") as the case may be.

 

Cadbury Holdings Ltd: registered in England and Wales, registered no. 52457
Registered office address: Cadbury House, Sanderson Road, Uxbridge,
Middlesex, UB8 1DH United Kingdom. Telephone: +44 (0)1895 615000  Fax:+44
(0)1895 615001  
 

Cadbury UK: a partnership of Cadbury UK Ltd, Trebor Bassett Ltd and The Old
Leo Company Ltd. each of which is registered in England and Wales. 

Principal trading address: Cadbury House, Sanderson Road, Uxbridge,
Middlesex, UB8 1DH United Kingdom. Telephone: +44 (0)1895 615000  Fax:+44
(0)1895 615001  



-----------------------------------------

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.mit.edu/pipermail/sap-wug/attachments/20100208/c6d92c25/attachment.htm
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: image/gif
Size: 772 bytes
Desc: not available
Url : http://mailman.mit.edu/pipermail/sap-wug/attachments/20100208/c6d92c25/attachment.gif


More information about the SAP-WUG mailing list