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

Michael Pokraka workflow at quirky.me.uk
Wed Feb 9 12:10:21 EST 2005


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
> 
> 



More information about the SAP-WUG mailing list