Stored procedure return value in process builder

Confluence User - 30 May, 2024

I am calling a stored procedure in SQL query tool in process builder. How to save the stored procedure OUT variable value or return value in process builder variable

process

1


30 May, 2024
confluenceUser
confluenceUser

To save the stored procedure OUT variable value in a Joget process variable:

  1. Create Process Variable:

    • Create a process variable named procOutput in your Process Builder.
  2. Configure JDBC Tool:

    • In your form, add a JDBC Form Binder.
    • Write SQL to call the stored procedure:
      sql
      {? = call my_stored_procedure(?, ?)}
  3. Map Output to Process Variable:

    • Use a BeanShell script to set the process variable with the stored procedure’s OUT value:
      java
      # Assuming 'outputValue' holds the OUT parameter value workflowAssignment = workflowManager.getAssignment(activityId); workflowManager.activityVariable(workflowAssignment.getActivityId(), "procOutput", outputValue);

This sets the procOutput variable with the value from the stored procedure.

A documentation on this in the KB for you to read too : Call Stored Procedure - MySQL#CallingthestoredprocedureinJogetWorkflow

Hope this helps!

RELATED QUESTIONS

Your answer


To answer a question you'll need an account.

Print