Condition step not working in Workflow

Sample, Rick Rick.Sample at gbe.com
Thu Feb 28 10:29:50 EST 2008


Hi Sue (a.k.a. Ms. Befuddled. LOL)

This is interesting. Before you through in the towel do you mind
checking a few things?

1: 
Try changing your data to just CHAR1 type for all values in your test WF
/ method, 
GET_ELEMENT_CONTAINER the values to same data type in method at
beginning of method, (inspect that you can actually get values)
SET_ELEMENT_CONTAINER to same on export, (inspect you are actually
setting the values)
ensure all bindings are setup.

2:
You are in ECC6? If so, the below may be a long shot, but worth
remembering anyway. Because I had a similar sounding issue on conversion
from 4.6c to ECC6. Bindings have new options. (Nice to know after the
fact eh!)

4.6c by default, if you have bindings setup for task->WF but DO NOT do a
SET_ELEMENT_CONTAINER in method it will NOT overwrite your WF values
even though the binding are setup. 
* This, in my option, is the way it should have worked in the first
place! You have a binding with null value...it should set null values!
Period!
Developers job to explicitly GET/SET in the code. (Not bindings!) Just
my .02 worth. 

ECC6, by default, WILL overwrite empty / initial values unless you
change the bindings to ignore empty/initial values.

I do not like the extra options on bindings. Just a personal preference
I suppose. So, what I now do is GET/SET all values in/out of
task-method. 
That way, I don't have to squirrel through code AND bindings to figure
out what is getting passed back if empty / initial values. If I want to
pass back an empty value, I set the value to empty in the method. I find
it more confusing to use the extra binding options. (Also, you can't add
a "comment" on binding to remind yourself as to the whys, as you can in
code)

3:
If using ECC6, verify you are have all same data types for the values
you are passing around. 
I know in 4.6c you can create the containers to a data type, but it
always pass char 255 strings no matter what. i.e. if you import via
GET_ELEMENT_CONTAINER, you got a string. Not a type data value you set
in WF or Task. (Can't remember if ECC6 does this. Don't have it in front
of me at the moment!)

4:
Verify that the method is not terminating on your F condition before it
gets a chance to set the value. 

If these are not the issue, and you would like more assistance, feel
free to ask. (I have an inch of breathing room to spare today!)

Rick Sample
SAP Business Workflow Developer
Graybar, Inc.
11885 Lackland Dr.
St. Louis, MO. 63146
314-573-5822

-----Original Message-----
From: sap-wug-bounces at mit.edu [mailto:sap-wug-bounces at mit.edu] On Behalf
Of Sue Doughty
Sent: Thursday, February 28, 2008 8:53 AM
To: SAP Workflow Users' Group
Subject: RE: Condition step not working in Workflow

Hi Mike,

I tried creating the dummy method that just takes in the T or F and
returns the T or F that was sent in like you said....got same results.

I tried creating a new workflow with the new dummy task and a new
condition step (that reads the workflow container that is updated from
the method looking for the T or F)....got same results.

I tried change T and F to Y and N....got same results.

I can see the output container from the method in the workflow log.
But, if the condition is false, the output container from the method is
not returned to the workflow container and the condition step is not
executed.  If the condition is true, the output container from the
method is returned to the workflow container and the condition step is
executed.  

I have an OSS note open with SAP.  I can see where they have come into
the system and tested it, but as of yet, have not gotten a response from
them.

I am totally befuddled!!!

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: Thursday, February 28, 2008 7:54 AM
To: SAP Workflow Users' Group
Subject: RE: Condition step not working in Workflow

Just to confirm the obvious: Does the step actually complete? (Status
Completed)
If it just completes and the next step doesn't start then your WF
definition couldbe corrupt. Put the two steps into a test WF and see if
that works.

On Wed, February 27, 2008 6:20 pm, Sue Doughty wrote:
> Hi Mike,
>
> I changed the data type to SY-INPUT and still get the same results.
>
> Thank you for the suggestion though.  I'm willing to try anything.  I
> hope that it is not something so simple that I'll feel really stupid
> when I find it.   :-)
>
> 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: Wednesday, February 27, 2008 12:13 PM
> To: SAP Workflow Users' Group
> Subject: RE: Condition step not working in Workflow
>
> Hmm, not too sure then. I thought I'd mention as it would be worth
> checking. Also make sure your data type is valid for the values. Try
> changing it to SY-INPUT just to make sure.
>
> On Wed, February 27, 2008 4:11 pm, Sue Doughty wrote:
>> Hi Mike,
>>
>> Thanks for your reply.
>>
>> I am not using a result parameter even though I tried that when it
did
>> not work the way I had it at first.  Neither way works.  I can see in
>> the workflow log that my export parameter (ImageFound) is being
>> populated with the correct 'T' or 'F' value, but the Results
> processing
>> step is not being executed with an F value - it only executes when
the
>> export parameter contains a 'T' value.
>>
>> I can't use a virtual attribute because the input parameters to the
>> method change with each call to the method (i.e., doctype and
>> imagedate).
>>
>> 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: Wednesday, February 27, 2008 10:44 AM
>> To: SAP Workflow Users' Group
>> Subject: Re: Condition step not working in Workflow
>>
>> Hi Sue,
>> Are you using a standard return parameter or a result parameter?
>> ("Result
>> parameter" checkbox on your method properties).
>> Result parameters behave differently, T/F must be defined within the
>> data
>> dictionary and become separate outcomes of the method.
>> Also, perhaps a virtual attribute might be easier if this is all that
>> the
>> method does...
>>
>> Cheers,
>> Mike
>>
>> On Tue, February 26, 2008 5:06 pm, Sue Doughty wrote:
>>> We are on 4.7, ECC 6.0
>>>
>>>
>>>
>>> I have a sub-workflow that executes a loop until a result flag is
set
>> to
>>> T.  It executes a method that reads a table with some information.
> If
>>> the record is found, the result is set to T, if not it is set to F
> and
>>> the result container is set in the method.  The next step is a
>> condition
>>> to check the result.  If T, the loop and sub-workflow are completed,
>> if
>>> F, it waits and tries again after five minutes.
>>>
>>>
>>>
>>> My problem:  If the method executes and the result is T, the
workflow
>>> works as designed.  If the method returns a result of F, the
workflow
>>> stops at that step and does not move to the condition step to check
>> the
>>> result.
>>>
>>>
>>>
>>> I can see that the method is returning the result container.  If the
>>> Result = T, I can see that the Result container is sent back to the
>>> sub-workflow.  When I look at the step in the log, it says that the
>>> background item was created, started, work item processing is
> complete
>>> and the result processing is done with no errors.
>>>
>>>
>>>
>>> If the Result is F, I can see that the method is returning the
result
>>> container, but the workflow container does NOT get set to the
Result.
>>> When I look at the step in the log, it says that the background item
>> was
>>> created; started and work item processing is complete with no
errors,
>>> BUT the Result Processing is NOT done.
>>>
>>>
>>>
>>> What am I missing?  Why is the Result processing being done for one
>>> result but not the other?
>>>
>>>
>>>
>>> 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
>>>
>>>
>>>
>>> ****************************
>>> 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
>
>
> ****************************
> 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




More information about the SAP-WUG mailing list