-
1. Re: JBPM 3.2.2 doesn't work
koen.aers Jan 16, 2008 6:05 AM (in response to mattowens)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
mattowens Jan 16, 2008 7:06 AM (in response to mattowens)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
mattowens Jan 16, 2008 7:45 AM (in response to mattowens)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
mattowens Jan 16, 2008 8:57 AM (in response to mattowens)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
mattowens Jan 16, 2008 9:37 AM (in response to mattowens)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 Jan 16, 2008 10:28 AM (in response to mattowens)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
kukeltje Jan 16, 2008 1:05 PM (in response to mattowens)NO I CAN'T HANDLE A BIT OF ANGER, NOT ME :-) peace anyone?
Glad it works though.