Results Processing step not working in Workflow - Resolved!!

Sue Doughty Sue.Doughty at odfl.com
Tue Mar 11 09:44:19 EDT 2008


I found the problem!!!  It was something I did like I thought it would
be.

After the workflow task using method CHECKEMPFORA2IMAGE checks for the
stored image, I had a container operation step to execute if the
condition step indicated that it had failed to find the image which
would add 1 to a counter.  I wanted to check it 10 times before
quitting.  Evidently, I did not have that container operation set up
correctly.

I found this by eliminating the container operation and then the
workflow would continue down the right path with either a T or a F.

Once I got the container operation corrected, the workflow now works
fine.  It was the first time I used a container operation as a counter,
so didn't know how to do it.  The workflow did not indicate any errors
in the container operation step even though it was not correct - it
generated with no errors.

Thanks for everyone's help!!

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 Sue Doughty
Sent: Friday, February 29, 2008 1:57 PM
To: SAP Workflow Users' Group
Subject: RE: Results Processing step not working in Workflow

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


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




More information about the SAP-WUG mailing list