How to use executeStoredProcedureForQuery in an interface

Any help will be appreciated. See error on the right.

Thanks

  Discussion posts and replies are publicly visible

Parents Reply Children
  • 0
    Certified Lead Developer
    in reply to nicholaso0002

    In this example the stored procedure is run when the Submit button is pressed, as part of its SaveInto list - and the button becomes active only upon entry of a date.  The stored procedure output is saved into a Rule Input variable such that it can be passed out to your process instance.

    If this doesn't sound like what you're after then you might need to provide some additional clarification as to what exactly you're trying to do with the result of your Stored Procedure call - since up until now I was under the assumption that you were trying to get the result of a stored procedure query to be used in some way in your process.

  • The stored proc simply clears a log on the DB based on the date; I am not expecting to get any result from the stored proc, other than success or failure.

    Also, the date is saved in a process variable and it's used by other process nodes in the process model.

    Thanks

  • 0
    Certified Lead Developer
    in reply to nicholaso0002

    The original rule you'd asked about was ExecuteStoredProcedureForQuery hence the confusion - this rule is designed to execute a stored procedure for data querying purposes and is restricted against executing any stored procedures that cause data changes, AFAIK.

    You probably want to use the old Execute Stored Procedure process node (the one included in the plug-in since your appian version doesn't yet support the new smart service).  You would still require the user to enter the date in an interface and save it into a PV, and then you would use that date in the procedure inputs in the in-process node.

    For this node, the configuration is just done (as far as I remember) by just adding node inputs named exactly after the procedure input (with the same data type) and passing your process value.