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

Workflow nathanfox at swissinfo.org
Wed Feb 9 10:27:36 EST 2005


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






More information about the SAP-WUG mailing list