[JBoss jBPM] - Re: JBPM Nested Fork/Joins Doesn't seem to work
by philsegal
Here is the 1 failing test, the other 2 work.
| @Test
| public void testWithMultipleAdjustmentsProcessNoApprove() throws Exception
| {
| ProcessDefinition def = ProcessDefinition.parseXmlResource("workflow/ny-workflow-2/processdefinition.xml");
|
| assertNotNull("Definition should not be null", def);
|
| ProcessInstance instance = new ProcessInstance(def);
| assertEquals("Def should be at start",
| "start-daily-pnl",
| instance.getRootToken().getNode().getName());
|
| instance.signal("default");
|
| instance.getRootToken().getChild("propose").signal("propose an adjustment");
|
| assertEquals("Def should be at fork2",
| "fork2",
| instance.getRootToken().getChild("propose").getNode().getName());
|
| instance.getRootToken().getChild("propose").getChild("propose").signal("propose an adjustment");
| instance.getRootToken().getChild("propose").getChild("approve").signal("cancel");
|
| instance.getRootToken().getChild("propose").getChild("propose").getChild("propose").signal("cancel");
| instance.getRootToken().getChild("propose").getChild("propose").getChild("approve").signal("cancel");
|
| assertEquals("propose/propose should be at join1",
| "join1",
| instance.getRootToken().getChild("propose").getChild("propose").getNode().getName());
| assertEquals("propose/approve should be at join2",
| "join2",
| instance.getRootToken().getChild("propose").getChild("approve").getNode().getName());
|
| assertEquals("parent should be at fork1",
| "fork1",
| instance.getRootToken().getNode().getName());
|
| assertEquals("propose should be at join1",
| "join1",
| instance.getRootToken().getChild("propose").getNode().getName());
|
|
| instance.getRootToken().getChild("signoff").signal("signoff pnl");
| assertEquals("signoff should be at join1",
| "join1",
| instance.getRootToken().getChild("signoff").getNode().getName());
|
| assertEquals("Def should be at auto approve",
| "auto-signoff-adj",
| instance.getRootToken().getNode().getName()
| );
|
| }
|
|
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4236064#4236064
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4236064
16 years, 10 months
[Microcontainer] - Re: Locating the current DeploymentUnit
by adrian@jboss.org
You can't use a thread local because
1) the deployers/micrcontainer can cause other deployments/contexts to be processed
when dependencies are satisfied. e.g. deploying the transaction manager will cause
many other other services to start.
2) Outside the deployment framework callbacks there will be no "current deployment"
Also Classes don't necessarily belong to any deployment unit,
e.g. the bootstrap classes
I'd suggest the easiest way to implement this feature would be write a new deployer
that runs "post classlaoder". This would mainatain a map of
ClassLoader->DeploymentUnit
for any DeploymentUnit (including subdeployments like wars) that have a Module
attachment and hence their own classloader.
You can then use this map in whatever you want to do.
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4236057#4236057
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4236057
16 years, 10 months