[JBoss jBPM] - Problem with task assignment
by asmo
Hello!
I have written a little processdefinition and executed it in a jUnit test. Everything is ok and no failure occured.
But the assignment handler of the task node is excecuted twice and i have no clue why.
Could anyone give me an advise???
This is the processDefinition:
<process-definition
| name="crmTest">
| <start-state name="start">
| <transition name="to_createActivity" to="createActivity"></transition>
| </start-state>
| <state name="createActivity">
| <event type="before-signal">
| <action name="action1" class="createActionHandler"></action>
| </event>
| <transition name="to_handleActivity" to="handleActivity"></transition>
| </state>
| <task-node name="handleActivity"
| >
| <task name="task1">
| <assignment class="activityAssignment"></assignment>
| </task>
| <transition name="tr2" to="createActivity"></transition>
| <transition name="to_end" to="end"></transition>
| </task-node>
| <end-state name="end"></end-state>
| </process-definition>
this is the code of the jUnit test:
| public class HelloWorldDbTest extends TestCase{
|
| static JbpmConfiguration jbpmConfiguration = null;
|
| static {
|
| jbpmConfiguration = JbpmConfiguration.parseResource("jbpm1.cfg.xml");
|
|
| }
| public void setUp(){
| jbpmConfiguration.createSchema();
|
| }
| public void tearDown(){
| // jbpmConfiguration.dropSchema();
| }
| public void testSimplePersistence(){
| deployProcessDefinition();
| assign();
|
| }
|
| public void deployProcessDefinition(){
|
| ProcessDefinition processDefinition = ProcessDefinition.parseXmlResource("processdefinition.xml");
| System.out.println("name of the processdefinition: " + processDefinition.getName());
| JbpmContext jbpmContext = jbpmConfiguration.createJbpmContext();
|
| try{
| jbpmContext.deployProcessDefinition(processDefinition);
| }finally{
| jbpmContext.close();
| }
| }
| public void assign(){
| JbpmContext jbpmContext = jbpmConfiguration.createJbpmContext();
| try{
| GraphSession graphSession = jbpmContext.getGraphSession();
| ProcessDefinition processDefinition = graphSession.findLatestProcessDefinition("crmTest");
|
| ProcessInstance processInstance = new ProcessInstance(processDefinition);
|
| Token token = processInstance.getRootToken();
|
| assertEquals("start", token.getNode().getName());
|
|
| token.signal();
| assertEquals("createActivity" , token.getNode().getName(),"createActivity");
|
| token.signal();
| assertEquals("handleActivity ", token.getNode().getName(), "handleActivity");
|
| Collection tasks = processInstance.getTaskMgmtInstance().getTaskInstances();
| Iterator it = tasks.iterator();
|
| while(it.hasNext()){
| TaskInstance taskInstance = (TaskInstance)it.next();
| System.out.println("Taskinstance " + taskInstance.getId() + " finished");
| taskInstance.end("to_end");
| }
|
| assertEquals("end expected", token.getNode().getName(), "end");
|
| jbpmContext.save(processInstance);
|
| }finally {
| jbpmContext.close();
|
| }
| }
|
|
and at least the output of the console:
| 15:44:48,390 WARN EhCacheProvider:103 - Could not find configuration [org.jbpm.graph.def.Node]; using defaults.
| 15:44:48,453 WARN EhCacheProvider:103 - Could not find configuration [org.jbpm.instantiation.Delegation]; using defaults.
| 15:44:48,625 WARN EhCacheProvider:103 - Could not find configuration [org.jbpm.taskmgmt.def.Task]; using defaults.
| 15:44:48,781 WARN EhCacheProvider:103 - Could not find configuration [org.jbpm.graph.def.ProcessDefinition]; using defaults.
| 15:44:48,875 WARN EhCacheProvider:103 - Could not find configuration [org.jbpm.graph.def.ExceptionHandler]; using defaults.
| 15:44:48,890 WARN EhCacheProvider:103 - Could not find configuration [org.jbpm.module.def.ModuleDefinition]; using defaults.
| 15:44:49,156 WARN EhCacheProvider:103 - Could not find configuration [org.jbpm.graph.def.Action]; using defaults.
| 15:44:49,203 WARN EhCacheProvider:103 - Could not find configuration [org.jbpm.graph.def.Event]; using defaults.
| 15:44:49,406 WARN EhCacheProvider:103 - Could not find configuration [org.jbpm.context.def.VariableAccess]; using defaults.
| 15:44:49,515 WARN EhCacheProvider:103 - Could not find configuration [org.jbpm.graph.def.Transition]; using defaults.
| 15:44:49,734 WARN EhCacheProvider:103 - Could not find configuration [org.jbpm.taskmgmt.def.TaskController]; using defaults.
| 15:44:49,734 WARN EhCacheProvider:103 - Could not find configuration [org.jbpm.taskmgmt.def.TaskMgmtDefinition.tasks]; using defaults.
| 15:44:49,750 WARN EhCacheProvider:103 - Could not find configuration [org.jbpm.graph.node.ProcessState.variableAccesses]; using defaults.
| 15:44:49,750 WARN EhCacheProvider:103 - Could not find configuration [org.jbpm.graph.def.ProcessDefinition.events]; using defaults.
| 15:44:49,750 WARN EhCacheProvider:103 - Could not find configuration [org.jbpm.taskmgmt.def.Swimlane.tasks]; using defaults.
| 15:44:49,750 WARN EhCacheProvider:103 - Could not find configuration [org.jbpm.graph.def.Node.leavingTransitions]; using defaults.
| 15:44:49,750 WARN EhCacheProvider:103 - Could not find configuration [org.jbpm.taskmgmt.def.TaskController.variableAccesses]; using defaults.
| 15:44:49,750 WARN EhCacheProvider:103 - Could not find configuration [org.jbpm.graph.def.ProcessDefinition.exceptionHandlers]; using defaults.
| 15:44:49,750 WARN EhCacheProvider:103 - Could not find configuration [org.jbpm.graph.node.Decision.decisionConditions]; using defaults.
| 15:44:49,765 WARN EhCacheProvider:103 - Could not find configuration [org.jbpm.file.def.FileDefinition.processFiles]; using defaults.
| 15:44:49,765 WARN EhCacheProvider:103 - Could not find configuration [org.jbpm.graph.def.Transition.exceptionHandlers]; using defaults.
| 15:44:49,765 WARN EhCacheProvider:103 - Could not find configuration [org.jbpm.graph.def.ProcessDefinition.actions]; using defaults.
| 15:44:49,765 WARN EhCacheProvider:103 - Could not find configuration [org.jbpm.graph.def.ProcessDefinition.nodes]; using defaults.
| 15:44:49,765 WARN EhCacheProvider:103 - Could not find configuration [org.jbpm.graph.def.Node.arrivingTransitions]; using defaults.
| 15:44:49,765 WARN EhCacheProvider:103 - Could not find configuration [org.jbpm.graph.node.TaskNode.tasks]; using defaults.
| 15:44:49,765 WARN EhCacheProvider:103 - Could not find configuration [org.jbpm.graph.def.ProcessDefinition.definitions]; using defaults.
| 15:44:49,781 WARN EhCacheProvider:103 - Could not find configuration [org.jbpm.graph.def.Event.actions]; using defaults.
| 15:44:49,781 WARN EhCacheProvider:103 - Could not find configuration [org.jbpm.taskmgmt.def.Task.events]; using defaults.
| 15:44:49,781 WARN EhCacheProvider:103 - Could not find configuration [org.jbpm.graph.def.Node.events]; using defaults.
| 15:44:49,781 WARN EhCacheProvider:103 - Could not find configuration [org.jbpm.taskmgmt.def.TaskMgmtDefinition.swimlanes]; using defaults.
| 15:44:49,781 WARN EhCacheProvider:103 - Could not find configuration [org.jbpm.graph.def.SuperState.nodes]; using defaults.
| 15:44:49,781 WARN EhCacheProvider:103 - Could not find configuration [org.jbpm.graph.action.Script.variableAccesses]; using defaults.
| 15:44:49,781 WARN EhCacheProvider:103 - Could not find configuration [org.jbpm.graph.def.ExceptionHandler.actions]; using defaults.
| 15:44:49,781 WARN EhCacheProvider:103 - Could not find configuration [org.jbpm.taskmgmt.def.Task.exceptionHandlers]; using defaults.
| 15:44:49,781 WARN EhCacheProvider:103 - Could not find configuration [org.jbpm.graph.def.Node.exceptionHandlers]; using defaults.
| 15:44:49,781 WARN EhCacheProvider:103 - Could not find configuration [org.jbpm.graph.def.Transition.events]; using defaults.
| name of the processdefinition: crmTest
| 15:44:51,125 WARN ProxyWarnLog:654 - Narrowing proxy to class org.jbpm.graph.node.State - this operation breaks ==
| hier angekommen
| 15:44:51,468 WARN ProxyWarnLog:654 - Narrowing proxy to class org.jbpm.graph.node.TaskNode - this operation breaks ==
| Task assigned
| Task assigned
| Taskinstance 1 finished
| Taskinstance 2 finished
|
I would be very thankful for an advice!
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3958806#3958806
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3958806
19 years, 9 months
[JBoss Seam] - Re: Embeddable Objects (EJB3) not working properly
by petemuir
"niesar" wrote :
| <h:inputText id="classEInst" value="#{classAInst.classEInst.classEVar}" >
|
This is most definitely should work. Doesn't matter to JSF EL whether it's Embedded or not. Having looked at your code I can't see why it doesn't I'm afraid. Perhaps Class is a keyword in JSF EL, have you tried using another name? Does accessing classAInst.classEInst.classEVar work if you put an inputText for it in classAEdit.xhtml rather than the tag source file?
anonymous wrote : The only workaround I could find is to pass the complete ClassE object like
| <h:inputText id="classEInst" value="#{classAInst.classEInst}" >
| But that causes the problem that I have the restriction 1object <---> 1String for the JSF converter. This way it's also no option.
|
This is not the right way to access properties of an object.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3958800#3958800
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3958800
19 years, 9 months
[EJB 3.0] - Problem with deploy
by taras1984
Hi,
I have just installed latest version of JBoss and I tried to run simple Hello Application. I work with NetBeans5.5.
The result is wierd for me, when deploying a server log ends with
INFO[org.jboss.deployment.ClientDeployer] Client ENC bound under: JBossHello-app-client
INFO[org.jboss.deployment.EARDeployer] Started J2EE application: file:/C:/jboss-4.0.4.GA/server/default/deploy/JBossHello.ear
and that's it ,shouldn't it show anything more ??
Then, in deploy folder, there is JBossHello.ear file but in jmx-console there is no name JBossHello in JNDI Global Namespace.
And then, running JBossHello-app-client I can see
javax.naming.NameNotFoundException: JBossHello not bound
in the log.
Perhaps this is Jboss or NetBeans settings that cause that problem
Thanks for help.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3958798#3958798
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3958798
19 years, 9 months