5 Replies Latest reply on Nov 10, 2008 12:01 PM by salaboy21

    newbie: looking to implement an old POJO client

      HI,
      I'm sorry but I wasn't able to find any answer about my problem.
      I'm a newbie to Jboss and JBPM so I'm going around without any success.
      I installed everything and I deployed some example succesffully. Now my "next level" is to try to implement a POJO client able to connect to the server and retrieve information about active processes and tasks (and even to interact with them).
      Is there some easy way to do it?
      Where I can find docs to solve this problem? I even read about some WS implementation but API could be enough for my case, where I can find some code example? Should I connect to the DB to retrieve this information or I can query it to the server itself?
      Any link or advice?
      Hoping that my answer aren't too foolish...
      Thank you in advance!

        • 1. Re: newbie: looking to implement an old POJO client
          kukeltje

          almost all the testcases in the source use jBPM from a pojo as an embedded library. If you deploy jBPM (on an appserver) and you want to remotely interact with it, use the commandservice (ejb). The webservice 'api' is kind of similar as the commandservice but with the advantages of being transactional. Not sure how mature the ws-api is btw...

          • 2. Re: newbie: looking to implement an old POJO client

            Thanks for you quick reply... I'm going to look for "commandservice".
            Thank you

            • 3. Re: newbie: looking to implement an old POJO client
              salaboy21

              If you are trying to do something simple you can include the jbpm-jpdl-xx.jar and then configurate it to consume the database with the JbpmContext....
              Hope it helps. I will try to make a post about it in my blog!

              • 4. Re: newbie: looking to implement an old POJO client

                My first attempt was in that direction. I tried doing it using JbpmContext but it seems I'm not able to connect to server/DB, I mean I'm only able to use a new local context.
                Maybe it is possible to configure the right context by configuring the hibernate.cfg.xml or hibernate.cfg.xml files, but I wasn't able to understand it. do you know where I can find some example?
                thank you

                • 5. Re: newbie: looking to implement an old POJO client
                  salaboy21

                  Yes.. of course, you need to configure the hibernate.cfg.xml file to connect to you database that have the jBPM schema. You can do that in the following way, if you are in a standalone application with a postgreSQL DB:

                   <!-- hibernate dialect -->
                   <property name="hibernate.dialect">org.hibernate.dialect.PostgreSQLDialect</property>
                  
                   <!-- JDBC connection properties (begin) -->
                   <property name="hibernate.connection.driver_class">org.postgresql.Driver</property>
                   <property name="hibernate.connection.url">jdbc:postgresql://localhost:5432/jbpm</property>
                   <property name="hibernate.connection.username">user</property>
                   <property name="hibernate.connection.password">password</property>
                   <!-- JDBC connection properties (end) -->
                  


                  In the case that you are using jBPM in an Application Server you could look in my post:
                  http://salaboy.wordpress.com/2008/08/26/jugando-con-jbpm-9-cambiando-de-datasource/