3 Replies Latest reply on Jun 5, 2012 2:16 PM by bhaskarven

    Simple step by step for JBPM 5 web application

    rajvij

      Hi All,

       

      I am new to jBPM and trying to create a web service which would initiate a said process. Starting with examples provided under jBPM installer was quite easy, but running it as web application has been a nightmare for me.

       

      Can someone please provide step by step document, which tells how I can create a webservice and start the process which has human tasks also.

       

      I am currently getting this error:

       

      1 May, 2012 1:04:35 PM org.apache.catalina.core.StandardWrapperValve invoke

      SEVERE: Servlet.service() for servlet Jersey Web Application threw exception

      javax.persistence.PersistenceException: No Persistence provider for EntityManager named org.jbpm.task

                at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:56)

                at org.jbpm.test.JBPMHelper.startTaskService(JBPMHelper.java:92)

                at name.brucephillips.hellows.resources.HelloResource.startUp(HelloResource.java:125)

       

      Thanks.

       

      Attached is my web project : I have removed lib folder.

        • 1. Re: Simple step by step for JBPM 5 web application
          salaboy21

          Hi Rajan,

          Don't expect a document describing the steps to build your application.

          The error that you are getting is not even a JBPM error, it's a JPA one, so you can try to find out what's is happening. Usually you get that error when you don't have Hibernate or any JPA provider inside your application classpath. Are you using Maven? if not you will need to add hibernate and all its dependencies to the classpath.

          Cheers

          • 2. Re: Simple step by step for JBPM 5 web application
            rajvij

            Ok, what I wanted to ask was how do I move my human task(the one available with eclipse plugin) application to jboss server as 7. I couldn't find a single example which talks about moving human task application to jboss as 7.

             

            + I have created a simple Rest web service in which when I try to call human task process, it doesn't works. Why? I am using same persistence xml and jndi is defined in standalone.xml.

             

            I am new to jBPM and hibernate and thus facing several issues so it would be realy great if you could atleast confirm below is correct, if not provide steps to use create a web application using existing java:jboss/datasources/jbpmDS.

             

            I have created dynamic web project in which I define class for rest web service and move code of human task application accordingly into the application.

             

            But it still get exceptions like

             

            : Entity manager could not be created for "org.hibernate.persistence.jpa"

            : Datasource could not be found.

             

            How's task get persisted when I run human taska project using eclipse?

             

            Do we have an application available where in I could just code and deploy that. A kinda sample.war that has persistence.xml defined for using java:jboss/datasources/jbpmDS

            Thanks in advance.

            • 3. Re: Simple step by step for JBPM 5 web application
              bhaskarven

              Hi,

               

              I got the same errors mentioned by you in your first message. Mauricio's reply was helpful in knowing about the cause.

              But unfortunately I was unable to rectify the error as I am new to Hibernate concept. Luckily there was help from bpmn2user

              in one of his blog articles which explains in detail for introducing persistence. Please find the link below.

               

              Hello Process ( without persistence )

               

              https://community.jboss.org/people/bpmn2user/blog/2011/02/27/jbpm5-console--hello-process-example

               

              Hello Process ( without persistence but having a task server created )

               

              https://community.jboss.org/people/bpmn2user/blog/2011/02/27/helloprocess-example-using-jbpm5-eclipse-plug-in

               

              Hello Process ( with persistence )

               

              https://community.jboss.org/people/bpmn2user/blog/2011/03/25/jbpm5--persistence-hello-process-example

               

              I did try the one with persistence. But there were error messages related to Bitronix Transaction Manager. I don't have the

              error messages with me rigt now. I will post it tomorrow with more details.

               

              You may also want to check bpmn2user's blog which has several interesting and informative articles explained very well.

               

              https://community.jboss.org/people/bpmn2user/blog/

               

              Hope this helps.

              1 of 1 people found this helpful