4 Replies Latest reply on Jan 12, 2012 8:58 AM by nt2005

    jBPM5 - Seam 2.2 Example at AS6

    nt2005 Newbie

      Hey Guys,

       

      Someone have an example for a jBPM 5.2 with seam 2.2.2 project at AS7? That would be great!

      It does not work for me when I want use both..

       

      Many thanks in advance!

        • 1. Re: jBPM5 - Seam 2.2 Example at AS7
          Tihomir Surdilovic Master

          Seam 2 has integrated support for jBPM 3.x afaik. However in Seam you can write custom components and include the drools/jbpm jars so they can use them. As far as any Seam 2 issues running on AS7, that's questions you should probably ask on their mailing lists/forums and not here.

           

          Hope this helps.

          1 of 1 people found this helpful
          • 2. Re: jBPM5 - Seam 2.2 Example at AS7
            nt2005 Newbie

            Oh, I think you are right, thank you. And do you know any Seam 2.2 an jBPM example for AS6?

            • 3. Re: jBPM5 - Seam 2.2 Example at AS7
              nt2005 Newbie

              There are some JBoss jBPM example in jBoss Tools of Eclipse like ToDo-List or DVD-Store.

              Is that compatible to jBPM5 and BPMN2?

               

              Is there any example out there for Seam 2.2 and jBPM5 (at AS6)? Please help me.

              • 4. Re: jBPM5 - Seam 2.2 Example at AS6
                nt2005 Newbie

                I still need help to deploy Seam 2.2  (EAR-Project) with jBPM 5.2. at AS6.

                 

                What I have done:

                -create a new Seam 2.2 Web Project

                -update drools to 5.3 (in the ear library)

                -add jbpm librarys

                -add the btm-2.1.2 library

                 

                Okay and when I start deploy the project and use the bean:

                 

                @Stateful

                @Name("processHandler")

                public class ProcessHandlerBean implements ProcessHandler

                {

                    private static final String MARKER = "------------------------";

                 

                    @Logger private Log log;

                 

                    @In StatusMessages statusMessages;

                   

                    public void processHandler()

                    {

                        // implement your business logic here

                    }

                 

                    // add additional action methods

                 

                    public void start() {       

                 

                        // load up the knowledge base

                        KnowledgeBase kbase = readKnowledgeBase();

                        StatefulKnowledgeSession ksession = kbase.newStatefulKnowledgeSession();

                 

                        ksession.getWorkItemManager().registerWorkItemHandler(TextOutputWorkItem.NAME, new OutputWorkItem());

                        

                         // start a new process instance

                        ksession.startProcess("de.tneubert.bpm);

                        log.info(MARKER +" startProcess() - end "+ MARKER);

                       

                    }

                   

                    private KnowledgeBase readKnowledgeBase() {

                        log.info(MARKER +" readKnowledgeBase() "+ MARKER);

                        KnowledgeBuilder kbuilder = KnowledgeBuilderFactory.newKnowledgeBuilder();

                        kbuilder.add(ResourceFactory.newClassPathResource("process.bpmn"), ResourceType.BPMN2);

                       

                        return kbuilder.newKnowledgeBase();

                    }

                 

                    @Destroy

                    @Remove

                    public void destroy() {}

                }

                 

                I get this error:

                WARNUNG [javax.enterprise.resource.webcontainer.jsf.lifecycle] Could not instantiate Seam component: processHandler: org.jboss.seam.InstantiationException: Could not instantiate Seam component: processHandler

                    at org.jboss.seam.Component.newInstance(Component.java:2170) [:2.2.2.Final]

                ....

                Caused by: javax.naming.NameNotFoundException: unable to find a bound object at name 'Process-ear/ProcessHandlerBean/local'

                    at bitronix.tm.jndi.BitronixContext.lookup(BitronixContext.java:83) [:2.1.2]

                    at javax.naming.InitialContext.lookup(Unknown Source) [:1.6.0_30]

                    at org.jboss.seam.Component.instantiateSessionBean(Component.java:1403) [:2.2.2.Final]

                 

                And I thought, I should write this in my persistence:

                     <property name="hibernate.transaction.manager_lookup_class" value="org.hibernate.transaction.BTMTransactionManagerLookup" />

                But than on startup I get the error, that the class does not exist.

                 

                Please, is there anyone out there who can help me.