Query Returning Results but Assign Node assigns Null Values

 22 Replies
 0 Subscribed to this topic
 52 Subscribed to this forum
Sort:
Author
Messages
Shari
Veteran Member Send Private Message
Posts: 78
Veteran Member
Hello!

Have a question...this is occuring in our test environment with one of our RSS flows (for expenses).

We recently refreshed the data in our test environment from a backup of our production environment - and then applied the latest and greatest patches for LSF9 SP6 (we are LSF9 SP6 / Apps 8.0.3 MSP11 / Windows / SQL / LS).  Now, the first two nodes in my PFlow don't function normally (it functions perfectly in our production environment - same minus the new patches which we are testing). 

It's a query of the REQHEADER table followed by an assign node.  The query returns results and makes the appropriate assignments in the assign node when run from the designer.  However, when I run it on the server, I see the following errors in the debugger once it gets to the assign node:

Exception while evaluating expression: REQTOTAL = Query1450_APPROVAL_VAL;

ReferenceError: "Query1450_APPROVAL_VAL" is not defined. (threadScript#1)

Anyone see this before?  I'm stumped - I have a case open with GSC but they haven't been able to reproduce it.  A subsequent query/assign node works fine.  However, the rest of the flow relies on the variables assigned in this failing query/assign.

Any replies are much appreciated!  Thanks!

-Shari

Deleted User
New Member Send Private Message
Posts: 0
New Member

If you a using the ReqApproval delivered flow then that is actually a workunit variable already being passed, you don't have to query the REQHEADER table to get that value, reference the workunit variable RQH_APPROVAL_VAL instead.

As far as the error, I have seen this in the past where it was security and 0 records get returned so it doesn't recognize the value of the field returned from the DME.    is there a value larger than 0 in Query1450_RECORD_COUNT?

David Williams
Veteran Member Send Private Message
Posts: 1127
Veteran Member
What are the results of your Query when run on the server? If could be that your Query is not working correctly on the server and so the variable can't be defined from the Query.
David Williams
Shari
Veteran Member Send Private Message
Posts: 78
Veteran Member

Gary - This was just an example.  I'm trying to get other variables that are not already global variables.  Thanks.

David - If I run the query in the buider (on the test API screen), this is the result I get:

Is there another way to run it?  Here is the entire message, for the query and assign node, in the debug log:




Executed activity : Type=START, ActivityName=Start, ActivityId=START84, Workunit=64532 Date:07/22/2009 Time:10:53:55

COMPANY~REQ-NUMBER~REQUESTER~REQ-LOCATION~REQ-DEL-DATE~BUYER-CODE~VENDOR~APPROVAL-VAL~REQUESTER.NAME~ACTIVITY~FROM-LOCATION~PURCH-FR-LOC

10~40774~23387~10IT~~6~ 1330~10.00~SHARI TRANTAS~~10IT~

Executing activity : Type=QUERY, ActivityName=Query1450, ActivityId=QUERY85, Workunit=64532 Date:07/22/2009 Time:10:53:55

Executing Process Query Activity Query1450.....

Executed activity : Type=QUERY, ActivityName=Query1450, ActivityId=QUERY85, Workunit=64532 Date:07/22/2009 Time:10:53:56

Executing activity : Type=ASSGN, ActivityName=Assign8320, ActivityId=ASSGN87, Workunit=64532 Date:07/22/2009 Time:10:53:56

Exception while evaluating expression: REQTOTAL = Query1450_APPROVAL_VAL;

ReferenceError: "Query1450_APPROVAL_VAL" is not defined. (threadScript#1)

Exception while evaluating expression: REQUESTER = Query1450_REQUESTER;

ReferenceError: "Query1450_REQUESTER" is not defined. (threadScript#1)

Exception while evaluating expression: REQCO = Query1450_COMPANY;

ReferenceError: "Query1450_COMPANY" is not defined. (threadScript#1)

Exception while evaluating expression: REQNUM = Query1450_REQ_NUMBER;

ReferenceError: "Query1450_REQ_NUMBER" is not defined. (threadScript#1)

Exception while evaluating expression: REQNAME = Query1450_REQUESTER_NAME;

ReferenceError: "Query1450_REQUESTER_NAME" is not defined. (threadScript#1)

Variables in Process : DesignerTest Workunit : 64532, ActivityType=ASSGN, ActivityName=Assign8320, ActivityId=ASSGN87 Date:07/22/2009 Time:10:53:56

REQTOTAL(Type=Double) = null

REQUESTER(Type=String) = null

REQCO(Type=String) = null

REQNUM(Type=Integer) = null

REQNAME(Type=String) = null



Shari
Veteran Member Send Private Message
Posts: 78
Veteran Member
Ok - I think that posted in wrong!

Query Results:

COMPANY~REQ-NUMBER~REQUESTER~REQ-LOCATION~REQ-DEL-DATE~BUYER-CODE~VENDOR~APPROVAL-VAL~REQUESTER.NAME~ACTIVITY~FROM-LOCATION~PURCH-FR-LOC
10~40774~23387~10IT~~6~ 1330~10.00~SHARI TRANTAS~~10IT~


Debug Log:

Executed activity : Type=START, ActivityName=Start, ActivityId=START84, Workunit=64532 Date:07/22/2009 Time:10:53:55
Executing activity : Type=QUERY, ActivityName=Query1450, ActivityId=QUERY85, Workunit=64532 Date:07/22/2009 Time:10:53:55
Executing Process Query Activity Query1450.....
Executed activity : Type=QUERY, ActivityName=Query1450, ActivityId=QUERY85, Workunit=64532 Date:07/22/2009 Time:10:53:56
Executing activity : Type=ASSGN, ActivityName=Assign8320, ActivityId=ASSGN87, Workunit=64532 Date:07/22/2009 Time:10:53:56
Exception while evaluating expression: REQTOTAL = Query1450_APPROVAL_VAL;
ReferenceError: "Query1450_APPROVAL_VAL" is not defined. (threadScript#1)
Exception while evaluating expression: REQUESTER = Query1450_REQUESTER;
ReferenceError: "Query1450_REQUESTER" is not defined. (threadScript#1)
Exception while evaluating expression: REQCO = Query1450_COMPANY;
ReferenceError: "Query1450_COMPANY" is not defined. (threadScript#1)
Exception while evaluating expression: REQNUM = Query1450_REQ_NUMBER;
ReferenceError: "Query1450_REQ_NUMBER" is not defined. (threadScript#1)
Exception while evaluating expression: REQNAME = Query1450_REQUESTER_NAME;
ReferenceError: "Query1450_REQUESTER_NAME" is not defined. (threadScript#1)
Variables in Process : DesignerTest Workunit : 64532, ActivityType=ASSGN, ActivityName=Assign8320, ActivityId=ASSGN87 Date:07/22/2009 Time:10:53:56
REQTOTAL(Type=Double) = null
REQUESTER(Type=String) = null
REQCO(Type=String) = null
REQNUM(Type=Integer) = null
REQNAME(Type=String) = null

Executed activity : Type=ASSGN, ActivityName=Assign8320, ActivityId=ASSGN87, Workunit=64532 Date:07/22/2009 Time:10:53:56
Executing activity : Type=END, ActivityName=End, ActivityId=END88, Workunit=64532 Date:07/22/2009 Time:10:53:56
Executing Stop Activity .....
Executed activity : Type=END, ActivityName=End, ActivityId=END88, Workunit=64532 Date:07/22/2009 Time:10:53:56
Completed executing Process : DesignerTest Workunit : 64532 Date:07/22/2009 Time:10:53:56
Deleted User
New Member Send Private Message
Posts: 0
New Member
Try putting a branch to an email to yourself if Query1450_RECORD_COUNT == 0, Then you will know if it is an issue getting the record, again probably security setup if that is the case.  Are you logged into the Designer as the userid that runs processflow? if not that may be why you see different results when you run the query vs. the server.
Shari
Veteran Member Send Private Message
Posts: 78
Veteran Member
Yep - I'm logged in as the userid that runs process flow.  Instead of email I used another assign node - the query is returning zero records when run from the server, but actually returns results when run from the designer.
Deleted User
New Member Send Private Message
Posts: 0
New Member
Is the product line correct on the query.
Shari
Veteran Member Send Private Message
Posts: 78
Veteran Member
yep - it's actually a variable
Shari
Veteran Member Send Private Message
Posts: 78
Veteran Member
!appProdline
Shari
Veteran Member Send Private Message
Posts: 78
Veteran Member
with the brackets around it - couldn't post!
Deleted User
New Member Send Private Message
Posts: 0
New Member

Is that the only query that doesn't work, or do all queries return 0 records on the server?

Shari
Veteran Member Send Private Message
Posts: 78
Veteran Member
no - the next query works...the one right after it.
David Williams
Veteran Member Send Private Message
Posts: 1127
Veteran Member
Please upload a copy of your flow so we can look at it
David Williams
Deleted User
New Member Send Private Message
Posts: 0
New Member
If other queries work, and it works on another box I would say you need to review your security setup.   The not defined error is because you are not getting a record returned.
David Williams
Veteran Member Send Private Message
Posts: 1127
Veteran Member
You said earlier that you left off the brackets when referencing the appProdline variable? The angle brackets with ! are required and that could be why your query is failing.
David Williams
Shari
Veteran Member Send Private Message
Posts: 78
Veteran Member
no - i just left off the angle brackets when posting the message here. When I tried to post it it left a blank message....

Shari
Veteran Member Send Private Message
Posts: 78
Veteran Member
probaby has something to do with HTML or something ""
Deleted User
New Member Send Private Message
Posts: 0
New Member
Posted By ConsultDavidW on 07/22/2009 12:03 PM
You said earlier that you left off the brackets when referencing the appProdline variable? The angle brackets with ! are required and that could be why your query is failing.

What was said:

with the brackets around it - couldn't post!


Shari
Veteran Member Send Private Message
Posts: 78
Veteran Member
I just tried to put in between those quotes and it doesn't work. I know I have the variable defined appropriately. How do i upload the flow here?
Shari
Veteran Member Send Private Message
Posts: 78
Veteran Member
Figured it out - here is a copy - it's not the same flow - just the query and assign nodes...GSC wasn't able to reproduce it.  Just change the ext to .xml
Attachments
David Williams
Veteran Member Send Private Message
Posts: 1127
Veteran Member

You say if you run your query within PF Designer then it works but not when you run it on the server?

David Williams
David Williams
Veteran Member Send Private Message
Posts: 1127
Veteran Member
If you change REQTOTAL to a string variable, will it work?
David Williams