Methods AFTER work item execution - how-to?

Sheldon Oxenberg soxenber at csc.com
Fri Apr 22 11:48:31 EDT 2005





Hello Rick,

I believe you can successfully change workflow container elements with
Methods AFTER work item execution.

The key information to be aware on page 470 in Practical Workflow for SAP
are:
- You can only use automated binding, i.e. the method container of the
step's task-based method is passed to the after method.
- After methods are called modally, i.e. as if they were extra steps in the
same session as the work item.
- After methods can be used to manipulate the method container if you wish,
to influence the main task-based method.
- After methods can be used for such activities as:  Converting values
returned by the work item.

So, if your main Task-based method were programmed to export 'zMyValue' to
the Task container (method to Task binding),
and if your Task were defined to export 'zMyValue' to the Workflow
container (Task to Workflow binding),
then you have configured the main task-based method container to pass an
initial 'zMyValue' (regardless of the value passed).
If you test this configuration, you should see this initial 'zMyValue' if
you inspect the WF Template container after execution.

Then, if you configure your After method, at execution time it will receive
the main task-based method container with 'zMyValue'
(regardless of the value initially passed from the main task-based method),
and then your line of code
SWC_SET_ELEMENT CONTAINER 'zMyValue' 'Y' should successfully change the
value passed to the Workflow Container.
If you test this configuration, you should see the changed 'zMyValue' if
you inspect the WF Template container after execution.

Good luck.  Have a nice day!

Regards,
Sheldon



                                                                                                                                      
                      Mark Pyc                                                                                                        
                      <mark.pyc                To:      "SAP Workflow Users' Group" <sap-wug at mit.edu>                                 
                      @gmail.com>              cc:                                                                                    
                      Sent by:                 Subject: Re: Methods AFTER work item execution - how-to?                               
                      sap-wug-bounces                                                                                                 
                                                                                                                                      
                                                                                                                                      
                      04/22/2005 10:21                                                                                                
                      AM                                                                                                              
                      Please respond                                                                                                  
                      to "SAP Workflow                                                                                                
                      Users' Group"                                                                                                   
                                                                                                                                      
                                                                                                                                      




G'day Rick,

I'm willing to be blown out of the water on this one, but I'll reply
since it's Friday arvo and you might not get many other responses.

I don't think you can reliably use import or export parameters on
secondary methods. They are intended really only for display methods
as far as I'm aware. This is another one of those cases where ugliness
in the builder can't be avoided.

Again, I'm far from confident on this one....

Have fun,
Mark

On 4/22/05, Rick Sample <Rick.Sample at gbe.com> wrote:
> I never used "Methods AFTER work item execution" but I have a case
> where I think I may be able to use but need some assistance.
>
> Here is what I have and what I want to do:
> I have a task with several Outcomes.
> I need to update a Workflow template container to a simple value after
> every outcome.
> Different outcomes execute different background methods after the task
> is called and may
> change the value. Depends on what outcome.
> What I am trying to avoid is putting the same Container Operation on
> every outcome except one.
>
> So, I have my business object with a method called SetMyValue with
> a parm same as the WF Template container and a simple one line of code
>
> SWC_SET_ELEMENT CONTAINER 'zMyValue' 'Y'.
> I have the task container same as WF Template container and all binding
> set.
>
> When I inspect the WF Template container after execution of the task,
> the Wf Template
> container is missing. Which tells me that the binding is set correct
> but not being set
> by the called method. i.e. any time binding are defined and no values
> are set the
> WF containers get blown out. At least this is what I notice in 4.6c.
>
> I read page 470 In Practical Workflow for Sap but no examples and not a
> real in depth topic.
> I want to know how to use the "Method After execution" call so don't
> get hung up on the logic.
>
> 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