Querrying External Datasource

 9 Replies
 0 Subscribed to this topic
 52 Subscribed to this forum
Sort:
Author
Messages
Sanford Barton
Basic Member
Posts: 10
Basic Member
    I know that ProcessFlow Integrator would be the best option to do this, but we don't have it, and aren't likely to get it anytime soon.

    What I would like to do is to be able to querry a table in an Oracle database in a flow which manages adding new users to our system.

    The table would reside in Lawson database, but I would prefer that use a seperate tablespace for obvious reasons.

    Is it possible to set this up so that I can querry it via the querry node in pflow?

    If no, any other ideas to get around this like using a javascript routine to get the data or some other form of executible process??

    Thanks,
    Bart
    John Henley
    Posts: 3353
      As long as you have it defined in the Lawson database (i.e. via dbdef, perhaps as a 'view') you can use DME query calls from ProcessFlow against the data.
      Thanks for using the LawsonGuru.com forums!
      John
      Sanford Barton
      Basic Member
      Posts: 10
      Basic Member
        Hi - thats never worked for me. I've tried defining a "database space"(as view) and then a "data area", then blddbdict and a dbreorg, but all I ever see in the dme wizard is product lines and system codes....Do you see anything that I potentially missed? Thanks!
        John Henley
        Posts: 3353
          I have tested this and it does work, returning data from database views defined in dbdef--from direct DME calls via the browser, Excel query wizard, and ProcessFlow DME query builder.
          Thanks for using the LawsonGuru.com forums!
          John
          Sanford Barton
          Basic Member
          Posts: 10
          Basic Member
            Can you do updates to the tables as well with this method?
            John Henley
            Posts: 3353
              Using ProcessFlow, you would be limited to making AGS calls. AGS calls are made against forms not tables. Therefore you would need to create a form that updated your table. One of advantages of ProcessFlow Integrator is that you can do SQL updates directly to Non-LAWSON tables.
              Thanks for using the LawsonGuru.com forums!
              John
              Sanford Barton
              Basic Member
              Posts: 10
              Basic Member
                The Querry Builder in Processflow has a selector for "Database Tables" and "Application". Wouldn't that imply that one could build either DME (database) and AGS (Application) querries....not just AGS?...Or are you saying that only AGS can be used to make updates where DME is querry only?
                John Henley
                Posts: 3353
                  I should have said "Using ProcessFlow, you would be limited to making AGS calls in order to UPDATE.

                  For Updates, you can only use AGS.
                  For Queries, you can use either AGS (forms) or DME (tables).
                  Thanks for using the LawsonGuru.com forums!
                  John
                  Sanford Barton
                  Basic Member
                  Posts: 10
                  Basic Member
                    Ok thanks - so basically AGS/DME is a dead-end for updates (without backend app development to allow AGS).

                    I have a plan B...it sort of works, but my initial inquiry was to see if anyone has figured out a better way

                    Bacially, I've develpled an oratcl (TCL Scriptiong Language that Comes with Oracle) that will do querries and updates by calling it from a webrun node. Any language that can talk to Oracle would work. You can either write your own script for each type of querry/update you want to perfrom, or write a generic one that you can pass an entrire sql command to.

                    Only limitation that I have is that I can only deal with 1 row of data at a time. Haven't figured out a way to pass and parse multiple rows. Still in a pinch it works.

                    Anyone done anything similar?
                    John Henley
                    Posts: 3353
                      As you're already aware, LSF9/ProcessFlow Integrator is an ideal solution for what you're trying to do. The way it works is that when you do a SQL query it returns a JavaScript array of the results. It's not perfect (in fact, large resultsets tend to, ahem, bring the server to a crawl and eventually crash...), but it does work pretty well for simple tasks.

                      I did something similar awhile back; I created some .NET applications that exposed SQL table/command wrappers as web services. So, in theory similar to what you did with oratcl. The dillema when calling from ProcessFlow WebRun is that you're pretty limited in what you can do with the results that are returned from the WebRun node. In other words, you have to put it into a parsable format, and parse thru the results in ProcessFlow. At some point, you have to ask yourself if you're really using the right tool...
                      Thanks for using the LawsonGuru.com forums!
                      John