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
11 replies
Subscribers
8 subscribers
Views
9834 views
Users
0 members are here
Share
More
Cancel
Related Discussions
Home
»
Discussions
»
AI and Rules
Query Rule execution Error
baghavathit
Certified Senior Developer
over 8 years ago
When I tried to execute the query rule in the expression rule, I got the following error "Expression evaluation error in rule 'mhai_getuploaddatabypid' at function 'queryruleexec': Error evaluating function 'queryruleexec' : Unexpected error executing query (type: [MHAITissueSampleDT15062], query: [MHAI_getUploadDataByPid], order by: [[]], filters:[(pid = TypedValue[it=1,v=1])])" . Does anyone know why this unexpected error occurs. But the same rule works in different environment.
OriginalPostID-243347
Discussion posts and replies are publicly visible
0
Josh
Certified Lead Developer
over 8 years ago
Can you post the application log?
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
Sidhant Behura
over 8 years ago
Could you please attach the code snippet too.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
mayurm896
over 8 years ago
It seems as if there is no data in the table such that query condition may fall true. If that is so, then you have to handle null values. Would you please confirm and let us know what is there in table.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
girikumard
over 8 years ago
Is should not be issue with rule. Pls. check whether are they any date or timestamp fields with improper data in your table in which this query is trying to fetch. Clear all improper date/timestamp fields & then execute.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
bhanuprakashm
over 8 years ago
@baghavathis, Iam also face the same issue in previously..do one thing check the DB and execute the query from db and them figure out the issue..
I thought,there is a data mismatch for retrieving..
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
baghavathit
Certified Senior Developer
over 8 years ago
@bhanuprakasm, I have executed in DB, it was working properly in DB. @giri, From Appian side, It was not about the data, If I give some random data,it should return {}. But it is returning the same error.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
Durgesh
A Score Level 2
over 8 years ago
The same issue at my end too - Please note that, (1) CDT is created for few columns of a database view (2) Data Entity is validated & published successfully in Data Store (3) Query is executed at database end to fetch the data. It works fine (5) There is no Date/Timestamp field ( (4) Did not find an entry in the application log for the error (6) Created an expression rule with QueryEntity to fetch the data but getting an error - "An error occurred while retrieving the data."
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
bhanuprakashm
over 8 years ago
@durgeshk,for your scenario this is view CDT.
1. Can you please check when you are publish the entity it is mapped to view or not.
2. In the view cdt contains primary key or not..if not you are not able to retrieve the data..
Hope it will help to you..
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
baghavathit
Certified Senior Developer
over 8 years ago
Thank you for the response, the issue got resolved, there was mismatch in datatype with the DB table and the cdt
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
Durgesh
A Score Level 2
over 8 years ago
@bhanuprakashm - 1) The entity is getting validated in Appian. No problem at all. 2) Providing primary key in CDT so that would also not a problem.
@baghavathis - Can you add in more details about the mistmatch of datatype between table & cdt? Can you give which data type had an issue and how did you fix that? it will be helpful. Thanks.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
>