Appian Community
Site
Search
Sign In/Register
Site
Search
User
DISCUSS
LEARN
SUCCESS
SUPPORT
Documentation
AppMarket
More
Cancel
I'm looking for ...
State
Not Answered
Replies
6 replies
Subscribers
9 subscribers
Views
3877 views
Users
0 members are here
Share
More
Cancel
Related Discussions
Home
»
Discussions
»
General
Fetch Data From View Using Query Rule
pavanik
Certified Senior Developer
over 8 years ago
Hi,
I am fetching employee data from view using query rule .. I am facing fallowing error.
-----------------------------------------
Expression evaluation error in rule 'kp_ial_getempdetailsfromview' at function 'queryruleexec': Error evaluating function 'queryruleexec' : Error converting query output (rule: [KP_IAL_getEmpDetailsFromView], type: [KPIALSearchForEmployeeDT8936], objects successfully converted: [9])
If I used query entity its working fine. Any suggestions to get this to work?
Please find following screenshot.
Thanks in advance
OriginalPostID-258404
Discussion posts and replies are publicly visible
0
Margaret Haymann
Appian Employee
over 8 years ago
3 things to review
a) the log files to see if they offer more information
b) the cdt relationships in the view to ensure they are defined correctly
c) how much data is being returned
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
Sathya Srinivasan
Appian Employee
over 8 years ago
In addition to Margaret's comment, you may also want to make sure that your Data types are up to date. the DT8936 that's I see here indicates that its an older version of the Data Type. Was the type recently changed? Is the Rule input or output still mapped to the correct version of the CDT? Check this as well.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
priyankasabankar
over 8 years ago
Sometimes there is problem in "queryruleexec" because of JDBC server connection issues, may be,you need to check that.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
pavanik
Certified Senior Developer
over 8 years ago
Thanks everyone. It was view contain null value as a primary key causing the issue. Corrected it and the error is gone.
I want to know, why query entity works in the same scenario when view contain null as a primary key ?
Glad to know your solutions and thoughts!
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
chetany
A Score Level 1
over 8 years ago
I think you have a View based on some table(s). The primary key in a table cannot be null. But, in the CDT used for the view - you have mapped some column as @Id. And somehow a row for that column (which is annotated with @Id) turned out to be null.. You will need some more time to debug why that happened
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
pavanik
Certified Senior Developer
over 8 years ago
@chetany, Thanks for your response..I removed the view and wrote it again now its working..the problem might be mapping between CDT and view..
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel