Best architecture - To populate dropdown values

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.

  Discussion posts and replies are publicly visible

  • Hi Reggie,
    There is some gap in understanding my question.

    Does Appian provides Caching so I can cache the data it can be large in size i.e. say 100 rows to 10000 rows. This data i need frequently to use so want to cache. But also i want to get latest copy of this data after some interval (configurable) say 4 hours, 24 hours etc.
  • Certified Lead Developer
    in reply to Pravin Sawant

    Pravin,

    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.

  • on the appian documentation you have the guidelines

    community.appian.com/.../managing-reference-data

    On the DOs and DONTs, you have this:

    Allow users to make changes to existing data as this will impact older data. Instead, allow users deactivate the old name and create a new name using effective dates and end dates.

    Effective dating and end dating is also useful as an alternative for deleting data.


    So, additionally, i would suggest that if you want "real time data" of your configs, use a with variable instead of a load and perhaps some configuration flags if you want the same settings to be alive in your whole process (i.e. use effective dates )