[Design of JBoss jBPM] - custom node-type derived from superstate produces hibernate
by hackerdan
Hello,
I'm trying to create a custom node type called my-step which should be a container like super-state.
I'm using jbpm-3.1.4 and set up the junit test case scenario from the documentation, chapter "3.2. Database example". I changed the method "deployProcessDefinition": i switched "JbpmContext jbpmContext = jbpmConfiguration.createJbpmContext();" to be the first statement in this method, so that "...ProcessDefinition.parseXmlString..." uses the config defined in the unit test and not some default settings. Then I changed the config to point to my node-types.xml where I added this line:
<node-type element="my-step" class="test.Step" />
The class looks like this:
| package test;
|
| import org.jbpm.graph.def.SuperState;
|
| public class Step extends SuperState {
|
| private static final long serialVersionUID = 1L;
|
| public Step() {
| System.err.println("Hello there.");
| }
|
| public Step(String name) {
| super(name);
| System.err.println("Hello: " + name);
| }
| }
|
I changed the process definition and wrapped the state into super-state.
When I run it, everything works as expected.
When I change super-state into my-state, I get the following hibernate exception (shortened) after my output "Hello there.":
| org.jbpm.persistence.JbpmPersistenceException: couldn't commit hibernate session
| ...
| Caused by: org.hibernate.HibernateException: instance not of expected entity type: test.Step is not a: org.jbpm.graph.def.Node
| ...
|
I don't understand this. Step extends SuperState and SuperState extends Node, so Step is a Node - isn't it?
Do I need a hibernate mapping for my class? What should it look like?
Maybe it is not supported to extend SuperState? I don't like to copy the SuperState class. In fact it is not possible because the class uses the superstate field from Node which is not accessible from a copy...
What can I do?
Is it a bug?
--
Regards,
Daniel
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4012428#4012428
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4012428
19 years, 2 months
[Design of JBoss Portal] - Re: DB test matrix
by julien@jboss.com
correct, it was a mistake from Chris that did not update his test case according to other changes he did 2 days ago
I fixed it.
"prabhat.jha(a)jboss.com" wrote : Testsuite build failed because of deploymet issue with wsrp-producer.
|
| 2007-02-06 11:06:35,628 INFO [org.jboss.system.ServiceConfigurator] Problem configuring service portal.wsrp:service=RegistrationManager
| org.jboss.deployment.DeploymentException: Exception setting attribute javax.management.Attribute: name=Policy value=MBeanProxyExt[portal.wsrp:service=RegistrationPolicy] on mbean portal.wsrp:service=Registr\
| ationManager; - nested throwable: (java.lang.RuntimeException: Error creating MBeanProxy: portal.wsrp:service=RegistrationPolicy)
|
| .....
|
|
| Caused by: javax.management.InstanceNotFoundException: portal.wsrp:service=RegistrationPolicy is not registered.
| at org.jboss.mx.server.registry.BasicMBeanRegistry.get(BasicMBeanRegistry.java:523)
| at org.jboss.mx.server.MBeanServerImpl.getMBeanInfo(MBeanServerImpl.java:666)
| at org.jboss.mx.util.MBeanProxyExt.init(MBeanProxyExt.java:407)
|
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4012417#4012417
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4012417
19 years, 2 months
[Design of JBoss jBPM] - initial nodes
by tom.baeyens@jboss.com
for some reason or another i never did take the time to properly analyse and implement initial nodes.
just did some tests and this is now supported:
<process-definition name="door" initial="Closed">
|
| <state name="Locked">
| <transition name="unlock" to="Closed" />
| </state>
| <state name="Closed">
| <transition name="lock" to="Locked" />
| <transition name="open" to="Open" />
| </state>
| <state name="Open">
| <transition name="close" to="Closed" />
| <transition name="lock" to="Open Locked" />
| </state>
| <state name="Open Locked">
| <transition name="unlock" to="Open" />
| </state>
|
| </process-definition>
this prevents users from having to do a signal right after creation of the process.
also, when creating a new process instance, the initial node (or the start state) IS EXECUTED as the last step in the creation of the process instance. This means that you can have processes that start automatically. You can e.g. specify an initial node with an action handler.
To remain backwards compatible, start-state still ends up in the process definition startState. so you do not HAVE to specify an initial node name.
in theory, this should also work in the context of super states. in that case you can specify the slash separated hierarchical name of the initial node. (not tested yet)
the complete test suite now runs with this additions.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4012411#4012411
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4012411
19 years, 2 months
[Design the new POJO MicroContainer] - Re: Property replacement
by alesj
I've added simple property replace to annotations def (the thing that was bothering Brian):
| String annString = annotation;
| // TODO - JBMICROCONT-143 + any better way?
| if (replace)
| {
| annString = StringPropertyReplacer.replaceProperties(annString);
| }
| //FIXME [JBMICROCONT-99] [JBAOP-278] Use the loader for the bean?
| ann = (Annotation)AnnotationCreator.createAnnotation(annString, Thread.currentThread().getContextClassLoader());
|
If there is any better idea ...
Btw, how does one get this:
I have this bean via XML:
| <bean name="MyBeanReplace" class="org.jboss.test.kernel.config.support.MyObject">
| <annotation>@org.jboss.test.kernel.config.support.SimpleAnnotation(name = "test.${test.property.value}.Name")</annotation>
| </bean>
|
And I would like to get its annotations in a classical way:
| MyObject mybean = ...;
| SimpleAnnotation ann = mybean.getClass().getAnnotation(SimpleAnnotation.class);
|
What AOP things must I add to XML, so that my bean gets annotation 'aspect'?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4012348#4012348
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4012348
19 years, 2 months