Calling a stored procedure in process flow

 2 Replies
 0 Subscribed to this topic
 52 Subscribed to this forum
Sort:
Author
Messages
Ludy
Basic Member
Posts: 21
Basic Member

    I need to create a process flow that will make a call to a stored procedure (which calls an AS/400 RPGLE program to get back a value for an invoice group).  This procedure will pass a blank parameter and will expect to get back a group value.

     

    To test, I created a simple flow that has an SQLUPD node where I do -- call  .LSS6235 ().  Then I have a branch node to test if the call was successful.  If yes, sends an email showing the invoice group value that was retrieved; if not, an email showing the reason why the call failed.

     

    When I run the flow, I get this error –

     

                Executing Sql ..... call  LAWMOD9QA.LSS6235 ()     

                ErrorLog in Process : DesignerTest Workunit : 3005, ActivityType=SQLUP,

    ActivityName =GetInvoiceGrp, ActivityId=SQLUP2 Date:03/21/2014 Time:08:49:23.324

    SQLException: undefined                            

     

    What is the “undefined” referring  to?  The stored procedure as well as the RPGLE program were tested outside of PF and it works.

    Any help on this is greatly appreciated.

    Thanks,
    Ludy

    Woozy
    Veteran Member
    Posts: 709
    Veteran Member
      Hi Ludy,

      I haven't tried to call an SP from pflow, but it should work. The "undefined" could mean a number of things, but generally it means that either the connection or the drivers are not configured correctly.

      There are a number of possibilities, but here are some questions to consider:
      - It appears that you are testing this in the Designer rather than on the server, is that correct?
      - Have you specified the appropriate SQL drivers in the "External JARs" section of the designer preferences?
      - Are you able to run other "regular" SQL queries in Designer?
      - Have you confirmed that the SQL user that Pflow is using has execute rights for that sp?
      - Have you double- and triple-checked the username and password?

      Some of these are probably obvious, but they've all bit me at one time or another.

      Good Luck.

      Kelly
      Kelly Meade
      J. R. Simplot Company
      Boise, ID
      Ludy
      Basic Member
      Posts: 21
      Basic Member
        Kelly,

        Thanks for your response.

        I've done all the things you mentioned. In fact, I have another flow that does a call to a stored procedure and it's been working. The only difference between the 2 flows is in the one that's currently working, I'm passing a value to be used in the program that my stored procedure is calling. In this flow that I'm having a problem with, I'm passing a blank parameter, expecting a value in return.

        Thanks,
        Ludy