Results Processing step not working in Workflow

Sample, Rick Rick.Sample at gbe.com
Fri Feb 29 16:23:48 EST 2008


Sheldon,

And Sue, correct me if I miss state anything.

The original issue (before creating test flow,task,method)

When the Task completes, for even a simple literal 'F' set in container,

it is setting the Task container value but NOT the WF container. 

The kicker is when she executes with sending the value 'T', it sets the
Task AND WF container 
after the task completes. 

So, all MUST be set correctly in bindings, data type, etc. Otherwise, 
the value 'T' would not be passed back to and set the WF container.

At this point, we are just evaluating what is getting set (or not set) 
from the completion of the task and binding back to the WF Template.

I created the same type scenario on both 4.6c and ECC6 and works for me.


Rick Sample
SAP Business Workflow Developer
Graybar, Inc.






-----Original Message-----
From: sap-wug-bounces at mit.edu [mailto:sap-wug-bounces at mit.edu] On Behalf
Of Sheldon Oxenberg
Sent: Friday, February 29, 2008 1:53 PM
To: SAP Workflow Users' Group
Subject: RE: Results Processing step not working in Workflow

Hi Sue,

1. If you are just trying to send a 'T' or 'F' to the next step of the
workflow, then you do not need a Condition Step.  You only need to
Configure the next step of the workflow to receive the 'T' or 'F'
element
in the binding.

2. If you want the workflow to have two different routes, one for 'T'
and
one for 'F', then you only need a simple Condition Step with the
condition
logic checking for one of the values (e.g. 'T'), and with the Outcomes
True
and False providing the two different workflow routes.

Then try this to define your Condition - When you Create the new
Condition
Logic, try defining the Constant (e.g. 'T') as Expression 2 by clicking
on
the drop-down arrow at the far right of the Constant entry box, clicking
Enter on the Information box "The system cannot display possible entries
here", enter your Constant (e.g. T) and click Enter, then hit Enter, so
Expression 2 contains T.

3. If you are using the Multiple Condition Step, then you will have at
least three different routes, one for 'T', one for 'F', and the Other
values default.

Then try this to define your Condition - When you define the Comparison
values Constant (e.g. 'T', 'F') as Val., try clicking on the drop-down
arrow at the far right of the Val. entry box, double-clicking on
Constant/fixed value, clicking Enter on the Information box "The system
cannot display possible entries here", enter your Constant (e.g. T) and
click Enter, so Val. contains T.  Then enter an Outcome name for each
Val.
and enter an Outcome name for Other values.

Note1:  If you do not enter Constants using the drop-down steps,
sometimes
the routing does not work.
Note2:  Also be sure that your workflow container element definition for
ImageFound is only defined as 1 Character in length.  Otherwise you may
get
into problems with leading or trailing spaces when filling the element
and
when workflow is reading the element.

Regards,
Sheldon C. Oxenberg

Computer Sciences Corporation
Registered Office: 2100 East Grand Avenue, El Segundo California 90245,
USA
Registered in USA No: C-489-59

------------------------------------------------------------------------
------------------------------------------------------------------------
----------------------------------------------------------------

This is a PRIVATE message. If you are not the intended recipient, please
delete without copying and kindly advise us by e-mail of the mistake in
delivery.
NOTE: Regardless of content, this e-mail shall not operate to bind CSC
to
any order or other contract unless pursuant to explicit written
agreement
or government initiative expressly permitting the use of e-mail for such
purpose.
------------------------------------------------------------------------
------------------------------------------------------------------------
----------------------------------------------------------------




 

             "Sue Doughty"

             <Sue.Doughty at odfl

             .com>
To 
             Sent by:                  "SAP Workflow Users' Group"

             sap-wug-bounces at m         <sap-wug at mit.edu>

             it.edu
cc 
 

 
Subject 
             02/29/2008 01:57          RE: Results Processing step not

             PM                        working in Workflow

 

 

             Please respond to

               "SAP Workflow

               Users' Group"

             <sap-wug at mit.edu>

 

 





Hi Rick,

Thank you for your response and your help.

It is a bare bones test workflow, only the task and then a condition
checking for T or F.

For the Results processing, I sent you a separate email with screen
prints of what I'm talking about.  Let me know if you did not get it.

The task is set up like you detail below...SWC_SET_ELEMENT...The task
says that it is completed for the 'F', but will not go to the next step.
It will go to next step if the output from the task is 'T'.

Nothing shows up in ST22, no events are triggered.  Consistency checks
are fine.  No FMs are being called...it is just reading a table.  Here's
the code in the method:

BEGIN_METHOD CHECKEMPFORA2IMAGE CHANGING CONTAINER.

DATA:  DOCTYPE(10),
       IMAGEDATE LIKE SY-DATUM,
       IMAGEFOUND(1).
*TABLES:  TOA01.

SWC_GET_ELEMENT CONTAINER 'DocType' DOCTYPE.
SWC_GET_ELEMENT CONTAINER 'ImageDate' IMAGEDATE.

SELECT * FROM TOA01
  WHERE SAP_OBJECT = 'PREL'
    AND OBJECT_ID  =  OBJECT-KEY
    AND AR_OBJECT  =  DOCTYPE
    AND AR_DATE    >= IMAGEDATE.
ENDSELECT.
IF SY-SUBRC = 0.
  SWC_SET_ELEMENT CONTAINER 'ImageFound' 'T'.
ELSE.
  SWC_SET_ELEMENT CONTAINER 'ImageFound' 'F'.
ENDIF.


END_METHOD.




Regards,
Sue T. Doughty
SAP Workflow Specialist
Old Dominion Freight Line, Inc.
500 Old Dominion Way
Thomasville, NC 27360
Phone:  (336) 822-5189
Toll Free (800 ) 432-6335, ext. 5189
Email:  sue.doughty at odfl.com

-----Original Message-----
From: sap-wug-bounces at mit.edu [mailto:sap-wug-bounces at mit.edu] On Behalf
Of Sample, Rick
Sent: Friday, February 29, 2008 12:34 PM
To: SAP Workflow Users' Group
Subject: RE: Results Processing step not working in Workflow

Hi Sue,

More suggestions and thoughts. (Ignore if you already put it aside)

Is this the 'bare bones' test WF you are speaking of, or
an existing Wf with other possible tasks executing in another fork,
events triggering - passing values into the WF via event listeners
(wiping out the value), etc.?
At this point, I would drop back and create the 'simplest' possible
scenario to test. Then, start adding in logic.

I keep reading "the Result processing does not get executed in the log".
What processing?
If you have your simple test WF/Task/Method, you don't need anything but
the WF/Task/Method.
When the task completes, it will or will not set the WF container with
the values.

You don't even need to create Export prams on your method because the
SET_ will do it.
(I know of some developers, that don't unit test their work very well,
that
never use Import/Export prams on the methods) But in this case,
don't create prams on method so we can keep it as simple as possible.

Just have one new test Task in your new test WF.
Simple method to pass back literal 'T' or 'F' per a one line
SWC_SET_ELEMENT CONTAINER 'ImageFound' 'F'. (and same test with 'T')
If that works, start adding in the other pieces until you hit your
issue.

Stuff to look at if this don't work: (Because I am stumped if it does
not!)
- Anything show up in st22?
- SWEL Event Trace to see what if any events are triggering for that BOR
that could be setting that WF value.
- Turn on WF Debugging / Tracing
- Run consistency check to see what if any errors that are in the
template / tasks
- Run extended Checks on FMs called from the Method

Rick Sample
SAP Business Workflow Developer
Graybar, Inc.
rick.sample at gbe.com

-----Original Message-----
From: sap-wug-bounces at mit.edu [mailto:sap-wug-bounces at mit.edu] On Behalf
Of Sue Doughty
Sent: Friday, February 29, 2008 10:15 AM
To: SAP Workflow Users' Group
Subject: RE: Results Processing step not working in Workflow

Well, something interesting.

I created another method in the BOR and copied the code from the other
method, added the parameters and generated it.  Created a new task for
the new method...set up the same way as the other task.  Took out the
old task in the WF and put in the new Task.  Now, when I execute it,
NEITHER the T or F will work (the Result processing does not get
executed in the log).  It does not get to the next step in the workflow.
I can still see the method has the T or F in Imagefound, but it does not
get returned to the workflow (the binding from the task back to the
workflow container).

SAP did respond back that the message has been sent to the developers
for analysis.

Regards,
Sue T. Doughty
SAP Workflow Specialist
Old Dominion Freight Line, Inc.
500 Old Dominion Way
Thomasville, NC 27360
Phone:  (336) 822-5189
Toll Free (800 ) 432-6335, ext. 5189
Email:  sue.doughty at odfl.com

-----Original Message-----
From: sap-wug-bounces at mit.edu [mailto:sap-wug-bounces at mit.edu] On Behalf
Of Mike Pokraka
Sent: Friday, February 29, 2008 8:35 AM
To: SAP Workflow Users' Group
Subject: RE: Results Processing step not working in Workflow

Hi Sue,
Do your values come from outside the object? If they are available in
your
object, you'd be better off using a virtual attribute here. Otherwise
there's nowt wrong with your code.

GET_PROPERTY IMAGEEXISTS.
  if object-imageexists is initial. "Only read once
    select....
     if found object-imageexists = X else ' '
  endif.
  swc_set_element container 'ImageExists' object-imageexists.
END_PROPERTY.

On Fri, February 29, 2008 12:46 pm, Sue Doughty wrote:
> Hi Mike,
>
> It is just a regular parameter NOT a result parameter.  I tried using
> the result parameter, but got the same results.  It is called
> 'ImageFound'.
>
> Hi Rick,
>
> I don't have a 4.6c system to reproduce it.  Thank you for trying to
> help me.  At this point, I don't know what else to do.  I've recreated
> the method in the BOR, recreated the task, and recreated the workflow.
> I've tried using the Result parameter and tried just sending out the
> ImageFound parameter.  I've tried using Y and N instead of T and F.
>
> Below is the code in the method.  Please remember that I'm NOT an
ABAPer
> so I only do simple code :-).  There might be a better way to do this.
> I just don't know why a T would work and an F does not work  :-(
>
> BEGIN_METHOD CHECKEMPFORA2IMAGE CHANGING CONTAINER.
>
> DATA:  DOCTYPE(10),
>        IMAGEDATE LIKE SY-DATUM,
>        IMAGEFOUND(1).
> TABLES:  TOA01.
>
> SWC_GET_ELEMENT CONTAINER 'DocType' DOCTYPE.
> SWC_GET_ELEMENT CONTAINER 'ImageDate' IMAGEDATE.
>
> SELECT * FROM TOA01
>   WHERE SAP_OBJECT = 'PREL'
>     AND OBJECT_ID  =  OBJECT-KEY
>     AND AR_OBJECT  =  DOCTYPE
>     AND AR_DATE    >= IMAGEDATE.
> ENDSELECT.
> IF SY-SUBRC = 0.
>   IMAGEFOUND = 'T'.
> ELSE.
>   IMAGEFOUND = 'F'.
> ENDIF.
>
> SWC_SET_ELEMENT CONTAINER 'ImageFound' IMAGEFOUND.
>
> END_METHOD.
>
> Regards,
> Sue T. Doughty
> SAP Workflow Specialist
> Old Dominion Freight Line, Inc.
> 500 Old Dominion Way
> Thomasville, NC 27360
> Phone:  (336) 822-5189
> Toll Free (800 ) 432-6335, ext. 5189
> Email:  sue.doughty at odfl.com


_______________________________________________
SAP-WUG mailing list
SAP-WUG at mit.edu
http://mailman.mit.edu/mailman/listinfo/sap-wug


****************************
CONFIDENTIALITY NOTICE: The information contained in this message may be
confidential, privileged, proprietary, or otherwise legally exempt from
disclosure. If the reader of this message is not the intended recipient,
or an employee or agent responsible for delivering this message to the
intended recipient, you are hereby notified that you are not authorized
to read, print, retain, copy or disseminate this message, any part of
it, or any attachments. If you have received this message in error,
please delete this message and any attachments from your system without
reading the content and notify the sender immediately of the inadvertent
transmission. Thank you for your cooperation.

_______________________________________________
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


****************************
CONFIDENTIALITY NOTICE: The information contained in this message may be
confidential, privileged, proprietary, or otherwise legally exempt from
disclosure. If the reader of this message is not the intended recipient,
or
an employee or agent responsible for delivering this message to the
intended recipient, you are hereby notified that you are not authorized
to
read, print, retain, copy or disseminate this message, any part of it,
or
any attachments. If you have received this message in error, please
delete
this message and any attachments from your system without reading the
content and notify the sender immediately of the inadvertent
transmission.
Thank you for your cooperation.

_______________________________________________
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