AW: Passing a new container or struct to / from WF template.

Rick Sample Rick.Sample at gbe.com
Wed Feb 9 14:58:29 EST 2005


>>If that wasn't an 'expert' answer, I don't know what is :-) Not
because of the amount of suggestion...
Mike,
Just too funny! 

All,
Any way, If SAP Business Objects were truly OO I would not be having
this conversation. 
But I am not going there. SAP 4.6C. It is what it is...

So, with that said, all I need to know is how (if possible) to pass a
container to a container. 
Example: Create a container inside a BO method and pass to the Task to
the WF Template. 
Possible? If so, what is the object name? Any SAP given generic objects
/ structs so I don't 
have to develop from scratch? I can't seem to find what I need. 

If I can pass custom structures or containers around I can leave my WF
Template alone 
and won't have to create new containers in a dozen places, deal the
bindings, 
re-test the entire WF Process, and then clean up in isle 9 for all the
old WFs that do 
not have the same containers and bindings. 

I could always modify my BO or create yet another one but I will still
have the 
issue of data persistence. (Or the lack there of). 
I would still have to create yet another table(s) just to hold temp
data. Not what I want. 

The approach I am looking for is to "touch" the least amount of moving
parts and 
shorten the testing time. It would be a beautiful thing... eh Mike?



>> Have you thought of the implications :  workflow definitions have
versions,
>> a started workflow proceeds until completed within the same
workflow
Not only thought about them but got burned by them. 
Change a Task and it will be picked but in the new AND old WF
templates. 
Change an BO method it will be picked but in the new AND old WF
templates. 
Don't even get me started about the versioning of WF Templates. Not
only totally useless but dangerous. 
This is why I want to pass a struct or container so I won't have to
worry about missing containers 
in a WF that is only partially completed. Change the code, don't worry
about the template. 





>>> workflow at quirky.me.uk 2/9/2005 11:10:21 >>>
If that wasn't an 'expert' answer, I don't know what is :-) Not because
of the
amount of suggestions but also their very sensible nature.

Expert or not, my idea is also to minimize the use of containers
elements. If
you have more than 10 or 15, your design can do with improvements - can
it not
move into an attribute? There are obviously a few exceptions, the most
notable
is with HTML forms - and those are a right PITA. Perhaps consider
small
subflows which contain all the fluff and keep a main flow clean. 

A technique I've used is to build a custom object with tables etc to
hold the
data and reference everything through that. Probably overkill for most
situations, but has been necessary in the past. 

just my 2p's worth, 
Cheers
Mike

--- Workflow <nathanfox at swissinfo.org> wrote:

> It sounds to me like you would be just transfering the complexity of
your
> workflow from the workflow definition into the code of the business
object.
> You'll probably end up with a huge BO method (depending on the size
of your
> workflow) which is split up into a big CASE ENDCASE.  You'll pass a
> parameter to the case with the following values 'INITIALIZE',
BEFORETASK1,
> AFTERTASK1, BEFORETASK2, AFTERTASK2, etc.  You're workflow will look
nicer
> in the wf builder, but won't be very transparent as to what is
happening.
> 
> Have you thought of the implications :  workflow definitions have
versions,
> a started workflow proceeds until completed within the same workflow
> version.  Workbench development objects (i.e.Business Objects) have
their
> own independent versioning system....more complexity.
> 
> What about a second WF using the same business object, you'd have to
create
> another method or extend the case to support multiple WF.
> 
> Sounds pretty sticky.  My gut feeling is don't do it.
> 
> OO starts with good design.
> Whenever creating a variable, flag, container element, attribute,
method
> etc.. I always ask myself a few questions :
> Does this attribute/method really belong here where I'm programming
it? you
> should normally ask this question before starting on the code?
> 
> Does this attribute/method actually belong to a different BO which is
not
> yet instantiated? If the container element is actually an attribute
of
> another BO, I prefer instantiating the BO and keeping it in the
container,
> chances are I'll need something else from the BO later on.
> 
> Think about visibility, who needs to see this attribute.  The method
> locally, the method as import parameters, the task locally/as import
> parameter, the workflow locally/ as import parameter, etc.
> 
> Don't pass unnecessary task container elements back to the workflow
> container.
> 
> Decide whether the container element is import, export, or both
before
> setting both flags without thinking, "only provide what is mandatory,
only
> request what is needed".
> 
> Model always a function module before creating a method,  The
function
> module signature (import/export parameters and exceptions must be
defined
> before creating the BO Method.  Think about whether import parameters
are
> optional and have default values and set the corresponding
attributes.
> 
> Maybe the experts would like to chime in and add some thoughts,
> 
> Nate
> 
> 
> 
> 
> 
> -----Ursprungliche Nachricht-----
> Von: sap-wug-bounces at mit.edu [mailto:sap-wug-bounces at mit.edu]Im
Auftrag
> von Rick Sample
> Gesendet: Mittwoch, 9. Februar 2005 14:56
> An: SAP-WUG at MITVMA.MIT.EDU 
> Betreff: Passing a new container or struct to / from WF template.
> 
> 
> I want to make my WFs a tad more OO. i.e. I want to reduce the amount
of
> 
> container operations from / to business objects and FM to / from WF
> template.
> 
> Right now I have some WFs that I have a lot more containers elements
> being
> passed around than I care to have. The simplest additions are a PIA.
> 
> What I would like to do, if possible, is to pass a struct or
container
> to the CONTAINER
> and inside the BO add, update, remove, etc. a struct / container and
> pass ONE
> container / struct back to the WF container.
> 
> Example:
> WF Activity task to BO method. Create elements inside a struct or
> another container
> and pass back ONE struct or container to the WF CONTAINER.
> 
> I can create a new container inside a BO but I do not know what
Object
> type to pass back
> to the WF CONTAINER. Or a structure?
> 
> Anything in the given WFs, demos, etc. to shed some light on this
> quest?
> 
> Any help is appreciated.
> 4.6C
> 
> Rick Sample
> SAP Workflow / Developer
> Graybar, Inc.
> 11885 Lackland Rd.
> 63146-4208
> 314.573.5822
> Rick.Sample at GBE.com 
> 
> _______________________________________________
> 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 




More information about the SAP-WUG mailing list