Container Persistence

Mike Pokraka wug.replies at workflowconnections.com
Tue Aug 30 06:38:12 EDT 2005


Hi Alon,
Remember that you can always switch container persistence on and off in
the WF template definition.
So if you're working on different sites then you may encounter different
default behaviour as this also changed across the versions.

It makes sense to convert everything to persistent, do the binding and
then back again, since a memory pointer (as Ram explained it) or object
handle wouldn't survive any binding via an XML document or RFC connection
between systems. Thus persistence has become the default at any point
where system boundaries COULD be crossed.

Also, what may be confusing is that if you're not be accessing any
object's attributes but merely looking at flat container elements then
persistence is irrelevant and you can just do the job without
bothering.... I suspect if you go back over your scenarios that's your
most likely answer.

HTH,
Cheers
Mike

Alon Raskin wrote:
> Hi Ram,
>
> I think you are right. I just wonder why sometimes I don't have to do the
> conversion in the alternate binding FM and sometimes I do. Why does the
> SAP
> Workflow engine pass in different representations? Perhaps it has
> something
> to do with whether there is a WAIT step (and hence the container must be
> persisted) or whether the task is executed automatically (even then I
> would
> have thought the task was persisted)... Hmmm.. Not sure.
>
> Thanks Ram for your input....
>
> Alon Raskin
> e: araskin at 3i-consulting.com
> p: +61 3 9625 2189 (Head Office)
> f:  +61 3 8610 1239
> c:  +1 207 756 0370
> w: http://www.3i-consulting.com
>
> -----Original Message-----
> From: sap-wug-bounces at mit.edu [mailto:sap-wug-bounces at mit.edu] On Behalf
> Of
> Tiwari, Rammanohar
> Sent: Tuesday, August 30, 2005 6:01 AM
> To: SAP Workflow Users' Group
> Subject: RE: Container Persistence
>
> Just some more thoughts..
>
> Runtime container used to have the runtime handle ( Hexadecimal number )
> of
> the program-memory for the object.
> So you can't identify an object in database using this runtime handle. It
> can only reference the object till the workflow program is in-charge.
>
> Now I think SAP has implemented the auto conversion from Workflow to Task
> (
> Method calls ) but the same is not done for Function Modules used in
> alternate binding.
>
> Inside the workflow engine program the runtime handle is used for object
> identification but that will not make any sense for the function module
> and
> has to be converted into persistent object first( that can be used to
> refer
> the object in db ).
>
> I think you need to first convert the container to persistent state in
> case
> of ( workflow --> task transfer of data in the function module binding ).
> While returning the values, you can make it runtime again and even if you
> won't , workflow will automatically convert it to runtime as soon as
> container goes back to the workflow program.
>
> Thanks,
> Ram
>
>
> -----Original Message-----
> From: sap-wug-bounces at mit.edu [mailto:sap-wug-bounces at mit.edu]On Behalf Of
> Alon Raskin
> Sent: Tuesday, August 30, 2005 3:03 PM
> To: 'SAP Workflow Users' Group'
> Subject: RE: Container Persistence
>
>
> Hi Mark,
>
> Appreciate the response. My experience has been similar to yours.
> Sometimes
> when you do a swc_get_elmenet it comes back with an error message saying
> that there is no object with the particular run time definition (or
> something like that) and that's when I know its time to dust off the
> persistence conversion macros.
>
> Problem is I don't really have a good understand of why this occurs? I
> understand that SAP has various representations of the objects in a
> container but what I don't understand is why I need to worry about it. I
> would have expected SAP to shield us from the various 'internal'
> representations of the container.
>
> One other related observation. When you look at the container you will see
> that the data type is either in upper or lower case. This represents
> persistent and run time references - though don't ask me which is which.
> As
> Mark said, if it is persistent you will see the key of the object. If it
> is
> run time you will see just a number (that makes no sense).
>
> Would be interested to see if others have any further input on this...
>
> Thanks again Mark.
>
> Alon Raskin
> e: araskin at 3i-consulting.com
> w: http://www.3i-consulting.com
>
> -----Original Message-----
> From: sap-wug-bounces at mit.edu [mailto:sap-wug-bounces at mit.edu] On Behalf
> Of
> Mark Pyc
> Sent: Tuesday, August 30, 2005 4:59 AM
> To: SAP Workflow Users' Group
> Subject: Re: Container Persistence
>
> G'day Alon,
>
> You don't need to use them too often at all. I've done it productively
> maybe
> twice?? If you debug you can see if the container is persistent or not.
> Persistent means it's in a state ready to be stored in the DB, so objects
> are listed with Object Type and Key. When it's in runtime mode objects
> will
> have an instance ID rather than a key.
>
> There is only one place that I did it (receiver type FM or maybe the
> Change
> Doc object key adjustment FM) and it was in an older release.
> Basically you needed to convert from Persistent to Runtime, fiddle the
> contents and then convert back to Persistent.
>
> Have fun,
> Mark
>
>
>
> On 8/30/05, Alon Raskin <araskin at 3i-consulting.com> wrote:
>> Hi Everyone,
>>
>> I was wondering if anyone has any experience with the container
>> persistence macros. I have seen them used in Alternate Binding FMs but
>> never truly understood when is the right time to use them. And in
>> which direction I should be converting (ie. To runtime or to
>> persistent).
>>
>> I would appreciate anyone's input....
>>
>> Alon
>>
>> _______________________________________________
>> SAP-WUG mailing list
>> SAP-WUG at mit.edu
>> http://mailman.mit.edu/mailman/listinfo/sap-wug
>>
>
> _______________________________________________
> SAP-WUG mailing list
> SAP-WUG at mit.edu
> http://mailman.mit.edu/mailman/listinfo/sap-wug
>
> _______________________________________________
> SAP-WUG mailing list
> SAP-WUG at mit.edu
> http://mailman.mit.edu/mailman/listinfo/sap-wug
>
>
> This e-mail and any attachment is for authorised use by the intended
> recipient(s) only. It may contain proprietary material, confidential
> information and/or be subject to legal privilege. It should not be copied,
> disclosed to, retained or used by, any other party. If you are not an
> intended recipient then please promptly delete this e-mail and any
> attachment and all copies and inform the sender. Thank you.
>
> _______________________________________________
> SAP-WUG mailing list
> SAP-WUG at mit.edu
> http://mailman.mit.edu/mailman/listinfo/sap-wug
>
> _______________________________________________
> SAP-WUG mailing list
> SAP-WUG at mit.edu
> http://mailman.mit.edu/mailman/listinfo/sap-wug
>


Mike Pokraka
Senior Consultant
Workflow Connections Ltd.
Mobile: +44 (0)7786 910 855


More information about the SAP-WUG mailing list