I need to develop Application into Appian platform.
Our UI is having many dropdowns around 20 for search criteria.
1. What is best way to get data from database? using REST service or direct connection.
2. Does all different dropdowns should call different stored procedure or any other way?
3. Does Appian provides Caching so we can define caching policy. otherwise everytime i refresh page then it will hit database to get data.
Your point no.3 solution I am looking.
Since i have many fields on UI. some data changes daily, some are very frequent but unpredictable. So I need deterministic approach that i should be able to define caching policy such that let's say every 5 hours cache should be refreshed. Does Appian provides such feature? If not then what's alternative.
I may not have read the discussion closely enough, but so far, I understand that your scenario is regarding a user potentially having a task that has many dropdown fields where the task may or may not be completed in a short amount of time.
In which case, you would like to retrieve the most current/latest data without constantly querying the DB (in your case, REST API) if enough time has passed by.
If the above is correct, would the following steps be a possible solution?
Some drawbacks are user interaction is required and the data refresh is not as automatic as you would like. I don't recall there being a way, in Appian, to automatically trigger data refresh without some level of user interaction though so I believe this to be a constraint no matter what.
Additionally, where you store the retrieved data can vary, but my typical rule of thumb is if I'm not going to use the data later on in the given workflow or for monitoring/debugging purposes, keep it on form. Selections users have made, however, should be kept in process variables if users will be able to leave & return back to the task unless this would cause potential conflict with the updated data that is retrieved.
I'm sure I didn't think thru everything possible, but if you have questions and/or you found this helpful, let me know!
I do not think there is any way to Cache a value to be stored in the system to be used other places. I do have a few suggestions.
1.just do additional query every time the screen is loaded to get most up to date value if possible.
2. Get access to a DB to persistent this data some where. Then run a process model on a normal basis to update the values.
3. Now is where it gets interesting. If you can't get ahold of a DB you could have a process that gets the values every x amount of time and this process stays active untill the next pull. This way you will allways have an active process with the updated values. Then you could use a process report with a query to the report to get the values.
4. When you do you pull for the data you could take the data and store it to a constant. Then your drop downs would just be built from the constants.
I would caution though that if your values used to populate the drop down are changing regularly then you end up in a situation where the value loaded into the form is not in the options array. You may want to wrap your drop down with a checker to ensure your sail does not break in this situation.
Discussion posts and replies are publicly visible
© 2019 Appian. All rights reserved.