[JBoss jBPM] - Re: Easy One : Creating Testcase Swimlane Assignments
by JerWah
Answers:
Version: bpm 3.1.2
This is the testcase I am trying to run:
| public void testProcess() throws Exception {
|
| // Extract a process definition from the processdefinition.xml file.
| FileInputStream fis = new FileInputStream("processes/Hello/processdefinition.xml");
| ProcessDefinition MyDef = ProcessDefinition.parseXmlInputStream(fis);
| assertNotNull("Definition should not be null",MyDef);
|
| // Start the Instance
| ProcessInstance MyInstance=new ProcessInstance(MyDef);
|
| assertEquals(
| "Instance is now in the start state",
| MyInstance.getRootToken().getNode().getName(), "start");
| MyInstance.signal();
|
| // Brings us to the FORK so we should now have active children
| assertEquals(
| "Should have Children",
| MyInstance.getRootToken().hasActiveChildren(), true );
| //Dump Children list to out.
|
| System.out.println(MyInstance.getRootToken().getChildren().toString());
|
| // Signal the left hand side
| MyInstance.signal("B1");
| // Signal the right hand side
| MyInstance.signal("S1");
|
| System.out.println("BLAH");
|
| // Should put us back past the join
| // MyInstance.signal();
| // assertEquals(
| // "Instance is now in the end state",
| // MyInstance.getRootToken().getNode().getName(), "end1");
| //
| // assertTrue("Instance is ended", MyInstance.hasEnded());
|
| }
|
process definition:
| <?xml version="1.0" encoding="UTF-8"?>
|
| <process-definition
| xmlns="urn:jbpm.org:jpdl-3.1" name="Hello">
| <swimlane name="ME">
| <assignment expression="user(Karl Taylor)"></assignment>
| </swimlane>
| <start-state name="start">
|
| <transition name="tr0" to="fork1"></transition>
| </start-state>
| <end-state name="end1"></end-state>
| <fork name="fork1">
| <transition name="tr1" to="BOBBY">
| </transition>
| <transition name="tr2" to="SALLY"></transition>
| </fork>
| <task-node name="BOBBY">
| <task name="task1" blocking="true" swimlane="ME">
| </task>
| <transition name="B1" to="join1"></transition>
| </task-node>
| <task-node name="SALLY">
| <task name="task1" blocking="true" swimlane="ME">
| </task>
| <transition name="S1" to="join1"></transition>
| </task-node>
| <join name="join1">
| <transition name="" to="end1"></transition>
| </join>
| </process-definition>
|
Debug output
| 12:29:14,403 [main] INFO JbpmConfiguration : using jbpm configuration resource 'jbpm.cfg.xml'
| 12:29:14,410 [main] DEBUG JbpmConfiguration : loading defaults in jbpm configuration
| 12:29:14,683 [main] DEBUG ObjectFactoryImpl : adding object info 'default.jbpm.context'
| 12:29:14,686 [main] DEBUG ObjectFactoryImpl : adding object info 'resource.hibernate.cfg.xml'
| 12:29:14,688 [main] DEBUG ObjectFactoryImpl : adding object info 'resource.business.calendar'
| 12:29:14,690 [main] DEBUG ObjectFactoryImpl : adding object info 'resource.default.modules'
| 12:29:14,692 [main] DEBUG ObjectFactoryImpl : adding object info 'resource.converter'
| 12:29:14,694 [main] DEBUG ObjectFactoryImpl : adding object info 'resource.action.types'
| 12:29:14,697 [main] DEBUG ObjectFactoryImpl : adding object info 'resource.node.types'
| 12:29:14,698 [main] DEBUG ObjectFactoryImpl : adding object info 'resource.parsers'
| 12:29:14,700 [main] DEBUG ObjectFactoryImpl : adding object info 'resource.varmapping'
| 12:29:14,702 [main] DEBUG ObjectFactoryImpl : adding object info 'jbpm.msg.wait.timout'
| 12:29:14,704 [main] DEBUG ObjectFactoryImpl : adding object info 'jbpm.byte.block.size'
| 12:29:14,706 [main] DEBUG ObjectFactoryImpl : adding object info 'mail.smtp.host'
| 12:29:14,710 [main] DEBUG ObjectFactoryImpl : adding object info 'jbpm.task.instance.factory'
| 12:29:14,712 [main] DEBUG ObjectFactoryImpl : adding object info 'jbpm.variable.resolver'
| 12:29:14,714 [main] DEBUG ObjectFactoryImpl : adding object info 'jbpm.mail.address.resolver'
| 12:29:14,715 [main] DEBUG JbpmConfiguration : loading specific configuration...
| 12:29:15,012 [main] DEBUG JpdlParser$JpdlEntityResolver : resolving schema reference publicId(null) systemId(http://jbpm.org/jpdl-3.1.xsd)
| 12:29:15,014 [main] DEBUG JpdlParser$JpdlEntityResolver : providing input source to local 'jpdl-3.1.xsd' resource
| 12:29:15,201 [main] DEBUG NodeTypes : node 'page' will not be available. class 'org.jboss.seam.pageflow.Page' couldn't be loaded
| 12:29:15,203 [main] DEBUG NodeTypes : node 'start-page' will not be available. class 'org.jboss.seam.pageflow.Page' couldn't be loaded
| 12:29:15,238 [main] DEBUG GraphElement : event 'process-start' on 'ProcessDefinition(Hello)' for 'Token(/)'
| 12:29:15,241 [main] DEBUG GraphElement : event 'before-signal' on 'StartState(start)' for 'Token(/)'
| 12:29:15,242 [main] DEBUG GraphElement : event 'node-leave' on 'StartState(start)' for 'Token(/)'
| 12:29:15,243 [main] DEBUG GraphElement : event 'transition' on 'Transition(tr0)' for 'Token(/)'
| 12:29:15,244 [main] DEBUG GraphElement : event 'node-enter' on 'Fork(fork1)' for 'Token(/)'
| 12:29:15,247 [main] DEBUG GraphElement : event 'node-leave' on 'Fork(fork1)' for 'Token(/tr1)'
| 12:29:15,248 [main] DEBUG GraphElement : event 'transition' on 'Transition(tr1)' for 'Token(/tr1)'
| 12:29:15,249 [main] DEBUG GraphElement : event 'node-enter' on 'TaskNode(BOBBY)' for 'Token(/tr1)'
| 12:29:15,260 [main] DEBUG GraphElement : event 'task-create' on 'Task(task1)' for 'Token(/tr1)'
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3967037#3967037
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3967037
19 years, 8 months
[JBoss AOP] - jboss AS 4.0.4 GA aop application deployment issue
by kistler59
I'm trying to utilize some simple pointcuts and interceptors within an ejb that is packaged within an ear that also contains a war (1 war and 1 ejb in an EAR).
I've deployed the appliciation and I get the following error
anonymous wrote :
| 2006-08-23 09:55:03,449 DEBUG [org.jboss.mx.loading.RepositoryClassLoader] Added url: file:/usr/local/jboss-4.0.4.GA/server/default/tmp/aopdynclasses/ucl17412/?dynamic=true, to ucl: org.jboss.mx.loading.UnifiedClassLoader3@104d976{ url=file:/usr/local/jboss-4.0.4.GA/server/default/tmp/deploy/tmp17411application.ear ,addedOrder=41}
| 2006-08-23 09:55:04,721 ERROR [org.jboss.ejb.plugins.LogInterceptor] Unexpected Error in method: public abstract boolean com.package.test.WebApplicationCoordinatorRemoteI.connectToModel(java.lang.String,java.lang.Object) throws java.rmi.RemoteException
| java.lang.ExceptionInInitializerError
| at com.package.DLWebModelSessionContext.(DLWebModelSessionContext.java:50)
| at com.package.DLWebUserSessionContext.addModelContext(DLWebUserSessionContext.java:77)
| at com.package.DLWebUserSessionContext.getModelContext(DLWebUserSessionContext.java:137)
| at com.package.DLWebSessionCoordinator.connectToModel(DLWebSessionCoordinator.java:209)
| at com.package.DLApplicationCoordinator.connectToModel(DLApplicationCoordinator.java:315)
| at com.package.infrastructure.test.DLWebApplicationCoordinatorBean.connectToModel(DLWebApplicationCoordinatorBean.java:67)
| at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
| at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:585)
| at org.jboss.invocation.Invocation.performCall(Invocation.java:359)
| at org.jboss.ejb.StatelessSessionContainer$ContainerInterceptor.invoke(StatelessSessionContainer.java:237)
| at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invoke(CachedConnectionInterceptor.java:158)
| at org.jboss.ws.server.ServiceEndpointInterceptor.invoke(ServiceEndpointInterceptor.java:64)
| at org.jboss.ejb.plugins.CallValidationInterceptor.invoke(CallValidationInterceptor.java:63)
| at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:121)
| at org.jboss.ejb.plugins.AbstractTxInterceptorBMT.invokeNext(AbstractTxInterceptorBMT.java:173)
| at org.jboss.ejb.plugins.TxInterceptorBMT.invoke(TxInterceptorBMT.java:77)
| at org.jboss.ejb.plugins.StatelessSessionInstanceInterceptor.invoke(StatelessSessionInstanceInterceptor.java:169)
| at org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:168)
| at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:205)
| at org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke(ProxyFactoryFinderInterceptor.java:136)
| at org.jboss.ejb.SessionContainer.internalInvoke(SessionContainer.java:648)
| at org.jboss.ejb.Container.invoke(Container.java:954)
| at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
| at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:585)
| at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
| at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
| at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
| at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
| at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
| at org.jboss.invocation.jrmp.server.JRMPInvoker$MBeanServerAction.invoke(JRMPInvoker.java:819)
| at org.jboss.invocation.jrmp.server.JRMPInvoker.invoke(JRMPInvoker.java:420)
| at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
| at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:585)
| at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:294)
| at sun.rmi.transport.Transport$1.run(Transport.java:153)
| at java.security.AccessController.doPrivileged(Native Method)
| at sun.rmi.transport.Transport.serviceCall(Transport.java:149)
| at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:460)
| at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:701)
| at java.lang.Thread.run(Thread.java:595)
| Caused by: java.lang.IllegalArgumentException
| at sun.reflect.UnsafeStaticObjectFieldAccessorImpl.set(UnsafeStaticObjectFieldAccessorImpl.java:61)
| at java.lang.reflect.Field.set(Field.java:656)
| at org.jboss.aop.ClassAdvisor.initializeMethodChain(ClassAdvisor.java:461)
| at org.jboss.aop.ClassAdvisor.createInterceptorChains(ClassAdvisor.java:591)
| at org.jboss.aop.ClassAdvisor.access$300(ClassAdvisor.java:82)
| at org.jboss.aop.ClassAdvisor$1.run(ClassAdvisor.java:299)
| at java.security.AccessController.doPrivileged(Native Method)
| at org.jboss.aop.ClassAdvisor.attachClass(ClassAdvisor.java:271)
| at org.jboss.aop.AspectManager.initialiseClassAdvisor(AspectManager.java:587)
| at org.jboss.aop.AspectManager.getAdvisor(AspectManager.java:575)
| at com.package.DLWANPEngineTranslator.(DLWANPEngineTranslator.java)
|
I've tried repackaging the application different ways, checked for missing or outdated dependencies... I'm not coming up with much. Does anyone have any suggestions?
thanks
-Keith
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3967031#3967031
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3967031
19 years, 8 months
[JBoss Seam] - Cannot get FacesMessages to work
by c_eric_ray
bean code...
|
| @In(create=true)
| private transient FacesMessages facesMessages;
|
| ...
|
| if (!item.getCode().getCode().equals("SVD")) {
| facesMessages.add("closeButton", FacesMessage.SEVERITY_ERROR, "Remittance Item [#0] has not been saved.", item.getId());
| return "main";
| }
|
web page...
| <h:form>
| <h:commandButton id="closeButton" action="#{packages.close}" image="../img/save_green.gif"
| styleClass="button"
| onmouseover="this.src='../img/save_green_over.gif';"
| onmouseout="this.src='../img/save_green.gif';"
| onmousedown="this.src='../img/save_green_down.gif';"
| onmouseup="this.src='../img/save_green.gif';"/>
| <h:message for="closeButton"/>
|
| <h:dataTable id="openPackageTable" value="#{openPackages}" var="pkgEntity"
|
| ...blah, blah, blah...
| </h:dataTable>
| </h:form>
|
I cannot get the message to to display on the web page. Any ideas on what I'm doing wrong.
Thanks.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3967029#3967029
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3967029
19 years, 8 months
[JBoss jBPM] - In-process HSQLDB
by ayang
Hi there,
Can anyone point me to how to configure JBPM to run with a "totally in-memory" HSQLDB instance?
In the hsqldb-ds.xml, the default config in the starter's kit is for the persistent db:
<connection-url>jdbc:hsqldb:${jboss.server.data.dir}${/}hypersonic${/}localDB</connection-url>
Simply uncommenting
<connection-url>jdbc:hsqldb:.</connection-url> doesn't get the database schema created/populated during startup.
Adding
<property name="hibernate.hbm2ddl.auto">update</property> to hibernate.cfg.xml in jbpm.sar doesn't seem to work (and is probably not the right thing to do anyways). However, I can't find a hibernate.properties anywhere in the starter kit.
Thanks,
Andy
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3967028#3967028
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3967028
19 years, 8 months