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

Workflow nathanfox at swissinfo.org
Thu Feb 10 05:05:14 EST 2005


Hi Rick and Mike

Well I appreciate the compliment and am glad you got through my lengthy
suggestions, I sense from your contributions to this forum that you two know
what you're doing.
I sense, however, from a lot of other contributions to this forum that many
"workflowers" need some pretty basic training not only in workflow as such
but in basic OO design concepts. It makes me cringe sometimes to think of
the work-arounds that are implemented to rectify a flawed concept.

keep up the good work
contributors like you make this forum interesting and worthwhile
Nate

-----Ursprungliche Nachricht-----
Von: sap-wug-bounces at mit.edu [mailto:sap-wug-bounces at mit.edu]Im Auftrag
von Michael Pokraka
Gesendet: Donnerstag, 10. Februar 2005 10:44
An: SAP Workflow Users' Group
Betreff: Re: AW: Passing a new container or struct to / from WF
template.


Hi Rick,
I totally agree with the 'least amount of moving parts' theory, a rather
nice
way to put it.
To answer your question, a container is just a table. So you can create a
multiline element 'Container' and pass this around to your heart's content.
I've a feeling this is too simple an answer - am I missing the question?

To add another completely inexpert 2p's worth, I still don't agree that this
is
really necessary (in most cases). Have a look at note 125400. It's a small
matter of thinking before each change and copying into a new flow if
appropriate - or if in doubt :-)  After a while it becomes automatic, and
I'm
quite happy for most part with the way versioning works.

Our biggest flows at my current site have 10-15 elements, most of them flags
used internally. The real data lives in attributes. Bindings are generally
in
the order of 1-3 elements and rarely change once set. All a matter of design
really :-) And there are a lot of flows throughout many areas. One notable
exception I've already mentioned is HTML forms - ESS Leave request!!! (Oh,
and
a SAP standard QM rule with over 200 elements). I've thought about modding
leave requests, but it's a very finnicky beast with umpteen notes and best
left
as close to the original as possible (got burnt here).

Cheers
Mike

--- Rick Sample <Rick.Sample at gbe.com> wrote:

> >>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
>
=== message truncated ===

_______________________________________________
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