7 Replies Latest reply on Jan 16, 2008 1:05 PM by Ronald van Kuijk

    JBPM 3.2.2 doesn't work

    m owens Newbie

      Was the JBPM 3.2 release some kind of practical joke that i and the rest of the world wasn't in on? Nothing works, absolutely nothing. The CVS tests don't work properly either as they leave the database in a state it wasn't previously in - a basic unit test no no. Signalling doesn't work at all. I've tried implementing saveAndReload() but that doesn't work.

      Instead all I get is errors such as "Session closed!" or "closed JbpmContext in different order then they were created... check your try-finally's around JbpmContexts blocks". Why do i need to reload a process instance? There is no documentation about anything.

      Does anyone use JBPM for commerical purposes because thats what im trying to do with it and it just doesn't work.

      Sorry if this seems angy but after 6 weeks of trying to get things working and coming up with nothing, i am angry.

      Can anyone submit some useful code that works in jbpm 3.2.2? Im trying to wrap the JBPM objects into more business orientated objects with clearer methods but i am getting continual context errors. its infuriating.

        • 1. Re: JBPM 3.2.2 doesn't work
          Koen Aers Master

          Hi Matt,

          I am sorry to hear that you can't get it to work. But there *is* a lot of documentation. I would advise you to first try to checkout the 3.2.2 release out of cvs and try to compile it and run the test suite. It should definitely run out of the box.
          If you can get that to work, you have plenty of useful code that works in jbpm 3.2.2 available in the test suite.

          Regards,
          Koen

          • 2. Re: JBPM 3.2.2 doesn't work
            m owens Newbie

            This is essentially what one of your unit tests does. Substitue any process definition for the xml file im reading in the xmlreader. You will see that the test fails with the given message. I have substituted the saveandreload code into the function for readability.

            @BeforeClass
            public static void setUp()
            {
            JbpmConfiguration.getInstance().createSchema();
            }

            @Test
            public void testSignal()
            {
            JbpmConfiguration configuration = JbpmConfiguration.getInstance();

            JbpmContext context = configuration.createJbpmContext();

            try {

            File f = TestFiles.getFile("ProcessDefinition.xml");

            ProcessDefinition def = ProcessDefinition.parseXmlReader(new FileReader(f));
            context.getGraphSession().deployProcessDefinition(def);

            ProcessInstance p = new ProcessInstance(def);

            //******* save and reload process instance**
            context.save(p);
            context.close();
            context = configuration.createJbpmContext();
            //******************************************
            p.signal();

            } catch (FileNotFoundException e) {
            // TODO Auto-generated catch block
            e.printStackTrace();
            }
            finally
            {
            context.close();
            }

            }

            You will see that this code does not work. This code is the same as the code in your unit tests. I don't understand whats going on

            • 3. Re: JBPM 3.2.2 doesn't work
              m owens Newbie

              Sorry, there was a slight mistake in the function I posted above. The process instance was not reloaded - as in your cvs tests. Here is the ammended version, which still has exactly the same outcome - error:

              @Test
              public void testSignal()
              {
              //JbpmConfiguration configuration = JbpmConfiguration.getInstance();

              JbpmContext context = config.createJbpmContext();

              try {

              File f = TestFiles.getFile("ProcessDefinition.xml");

              ProcessDefinition def = ProcessDefinition.parseXmlReader(new FileReader(f));
              context.getGraphSession().deployProcessDefinition(def);

              ProcessInstance p = new ProcessInstance(def);

              //******* save and reload process instance**
              context.save(p);
              context.close();
              context = config.createJbpmContext();
              context.loadProcessInstance(p.getId());
              //******************************************
              p.signal();

              } catch (FileNotFoundException e) {
              // TODO Auto-generated catch block
              e.printStackTrace();
              }
              finally
              {
              context.close();
              }

              }

              • 4. Re: JBPM 3.2.2 doesn't work
                m owens Newbie

                I'd also like to add that these errors only occur when you assign a custom ExpressionAssignmentHandler - even though the assignment handler has nothing to do with resolving or using a jbpm context

                • 5. Re: JBPM 3.2.2 doesn't work
                  m owens Newbie

                  Hey,

                  I have managed to resolve the problem so i sincerely apologise for my angry post. The problem was an open context in the getExpressionSession of the ExpressionAssignmentHandler.

                  My apologies. Love live JBPM. Could definitely do with more documentation though.

                  • 6. Re: JBPM 3.2.2 doesn't work
                    Koen Aers Master

                    Glad to hear that it finally worked. We always can do with more docs, that's right! Feel free to write down you experiences and contribute them...
                    And don't worry, we can handle a bit of anger. ;-)

                    Regards,
                    Koen

                    • 7. Re: JBPM 3.2.2 doesn't work
                      Ronald van Kuijk Master

                      NO I CAN'T HANDLE A BIT OF ANGER, NOT ME :-) peace anyone?

                      Glad it works though.