Is it possible to Call Stored Procedure to get some data in SAIL Interface or Expression Rule?

Certified Senior Developer

Hi,

Currently we are using Views to get the data in SAIL/Expressions Rules using Query Entity. now we are trying to do the same thing with the help of Stored Procedure.

is it possible to call the Stored procedure in  SAIL/Expression rule. if not possible what are the other options to get the data from SP to bind it to the grid.

Provide some options to get this done. let me know the pros and cons with this approach.

Thanks in Advance.

  Discussion posts and replies are publicly visible

Parents
  • Hi - Yes, you can invoke a Stored Procedure directly from a SAIL interface, as well as from in Process. You'll need to install the following plug-in if you haven't already:

    https://community.appian.com/b/appmarket/posts/execute-stored-procedure

    You will then have access to fn!executestoredprocedure() which you can call within a SAIL interface.

    Pros:

    • you do not have to leave the SAIL interface (e.g. call a Process Model) to conduct transactions with a Database

    Cons:

    • depending on the complexity and risks associated with your database integration you may end up writing some complex logic (which ends up looking very process-like) in your SAIL interface to handle "non-happy-path" results (i.e. exceptions/errors) - for example: how are you going to notify your Support team that there's been an error? How is that error surfaced to the End User?

    Other schools of thought exist, but I would err towards using Stored procs for read-only purposes AND very simple updates (e.g. toggling the value of a Boolean field), where there are no down-stream implications of the transaction failing.

Reply
  • Hi - Yes, you can invoke a Stored Procedure directly from a SAIL interface, as well as from in Process. You'll need to install the following plug-in if you haven't already:

    https://community.appian.com/b/appmarket/posts/execute-stored-procedure

    You will then have access to fn!executestoredprocedure() which you can call within a SAIL interface.

    Pros:

    • you do not have to leave the SAIL interface (e.g. call a Process Model) to conduct transactions with a Database

    Cons:

    • depending on the complexity and risks associated with your database integration you may end up writing some complex logic (which ends up looking very process-like) in your SAIL interface to handle "non-happy-path" results (i.e. exceptions/errors) - for example: how are you going to notify your Support team that there's been an error? How is that error surfaced to the End User?

    Other schools of thought exist, but I would err towards using Stored procs for read-only purposes AND very simple updates (e.g. toggling the value of a Boolean field), where there are no down-stream implications of the transaction failing.

Children
No Data