1
0
-1

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

    CommentAdd your comment...

    1 answer

    1.  
      1
      0
      -1

      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!

        CommentAdd your comment...