4 Replies Latest reply on Sep 20, 2011 9:58 AM by Mauricio Salatino

    jBPM5 on AS7 -  KnowledgeSession

    Jim Dwyer Novice

      I need to obtain a KnowledgeSession inside of an EJB3 bean.  I have the jbpm-gwt-console-server deployed.  I can see the database tables/KnowledgeBase.  How do I connect to a KnowledgeSession that uses the current KnowledgeBase?

        • 1. Re: jBPM5 on AS7 -  KnowledgeSession
          Jim Dwyer Novice

          How do I connect to the KnowledgeBase created by jbpm-gwt-console-server.war?  This should be easy.  What am I missing.  I want access the KnowledgeBase from and EJB3 bean.  I want to use the jbpm API.  Has anybody done this?  What is the code?  

           

          It seems like I want to do something like this:

           

            KnowledgeBase kbase = kbuilder.newKnowledgeBase(); 
            StatefulKnowledgeSession ksession = kbase.newStatefulKnowledgeSession();

           

          but without creating a newKnowledgeBase.  I already have one.  How do I get the reference to the KnowledgeBase.

           

          I am running jbpm-gwt-console-server in AS7.

           

          • 2. Re: jBPM5 on AS7 -  KnowledgeSession
            Mauricio Salatino Master

            Hi Jim, can you share with us what exactly do you want to achieve? If the server exposes the REST interfaces to interact with it why do you want to obtain the kbase inside your EJB? probably there is something missing in the interface that needs to be added instead of sharing it.

            Cheers

            • 3. Re: jBPM5 on AS7 -  KnowledgeSession
              Jim Dwyer Novice

              I should be able to do it with the REST interface. 

               

              I think that the documentation for jBPM 5 should be reconsidered.  As a user of jBPM5 I will probably not have much use for knowing how to instantiate the KnowledgeBase, KnowledgeSession and so forth.  It appears that jBPM5 user API is the REST API.  That doesn't seem to be covered very well in the jBPM5 documentation. 

              • 4. Re: jBPM5 on AS7 -  KnowledgeSession
                Mauricio Salatino Master

                yes, I'm planning to write a section about it in the jBPM5 Developer Book.. so stay tuned!

                1 of 1 people found this helpful