[JBoss JIRA] Created: (JBPM-1036) config-type schema declaration doesnt accept custom instantiator classes
by Roland Huss (JIRA)
config-type schema declaration doesnt accept custom instantiator classes
------------------------------------------------------------------------
Key: JBPM-1036
URL: http://jira.jboss.com/jira/browse/JBPM-1036
Project: JBoss jBPM
Issue Type: Bug
Affects Versions: jBPM jPDL 3.2.1
Reporter: Roland Huss
Assigned To: Tom Baeyens
Specifying a custom delegation instantiator with a fully qualified class name like in
<action config-type="com.consol.cmas.workflow.jbpm.exe.SpringInstantiator"
class="com.consol.cmas.projects.it.workflow.development.AssignCallToReviewerActionHandler"/>
doesnt work anymore because the schema allows value from a fixed enumeration only:
<xs:attribute name="config-type" default="field">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:enumeration value="field"/>
<xs:enumeration value="bean"/>
<xs:enumeration value="constructor"/>
<xs:enumeration value="configuration-property"/>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
This contrary to the relevant code in the Delegation class this should work (and indeed worked in some pre 3.2.1 versions):
Instantiator instantiator = null;
try {
// find the instantiator
instantiator = (Instantiator) instantiatorCache.get(configType);
if (instantiator == null) {
// load the instantiator class
Class instantiatorClass = classLoader.loadClass(configType);
// instantiate the instantiator with the default constructor
instantiator = (Instantiator) instantiatorClass.newInstance();
instantiatorCache.put(configType, instantiator);
}
} catch (Exception e) {
log.error(e);
throw new JbpmException("couldn't instantiate custom instantiator '" + configType + "'", e);
}
So please either relax the schema restriction (which I highly prefer, since I rely on using a custom instantiator) or remove the possibility to
use a custom instantiator.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
18 years, 10 months
[JBoss JIRA] Closed: (JBPM-158) Add <description> back into jPDL
by Tom Baeyens (JIRA)
[ http://jira.jboss.com/jira/browse/JBPM-158?page=all ]
Tom Baeyens closed JBPM-158.
----------------------------
Fix Version/s: (was: jBPM jPDL 3.2.2)
Resolution: Done
description was added to a lot of elements. nodes, transitions and tasks.
i just tried to add it to all other elements. like e.g. swimlanes. XML schema is just fuckin screwed. too many ways to get it wrong. it will take me too much time to get to a new schema that includes descriptions. and if i did get there, i would not trust it for backwards compatibility. so i'm not going to do it this time.
sorry guys.
> Add <description> back into jPDL
> --------------------------------
>
> Key: JBPM-158
> URL: http://jira.jboss.com/jira/browse/JBPM-158
> Project: JBoss jBPM
> Issue Type: Task
> Components: Core Engine
> Affects Versions: jBPM 3.0
> Environment: All
> Reporter: Jim Rigsbee
> Assigned To: Tom Baeyens
> Priority: Minor
> Original Estimate: 3 days
> Remaining Estimate: 3 days
>
> A description element was supported in 2.0. This does not exist in 3.0 so far.
> We need to decide whether it should go in and to what extent. In 2.0 it was available on every major element. I would like to suggest that we support it only on the process-definition itself, as people can use <! xxx ---> style comments anywhere they choose.
> Perhaps this needs to be coordinated with tasks surrounding features for versioning, etc.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
18 years, 10 months
[JBoss JIRA] Created: (JBPM-1042) org.jbpm.JbpmException: token '1' can't be locked by 'job[1]' cause it's already locked by 'token[1]'
by Jeff Johnson (JIRA)
org.jbpm.JbpmException: token '1' can't be locked by 'job[1]' cause it's already locked by 'token[1]'
-----------------------------------------------------------------------------------------------------
Key: JBPM-1042
URL: http://jira.jboss.com/jira/browse/JBPM-1042
Project: JBoss jBPM
Issue Type: Bug
Components: Core Engine
Affects Versions: jBPM jPDL 3.2.1
Environment: jBPM 3.2.1
Java 1.6 update 2
Windows XP
Run as a standalone Java application. No app server.
Use the standard test framework and configuration. (HyperSonic, etc). Same behavior with Oracle 10g
Reporter: Jeff Johnson
Assigned To: Tom Baeyens
org.jbpm.JbpmException: token '1' can't be locked by 'job[1]' cause it's already locked by 'token[1]' is thrown when a node has an ActionHandler that propagates execution via ExecutionContext.leaveNode() to a node that is marked as async="true".
My ActionHandler.execute() method:
public void execute(ExecutionContext executionContext) throws Exception
{
// Normally would do stuff here
// Leave via the default transition
// When this test case was written, this method would throw when
// it tried to enter Node2 because it would try to lock the token but
// it is already locked.
executionContext.leaveNode();
}
}
Section 9.5 of the user guide states: "Note the difference
between an action that is placed in an event versus an action that is placed in a node. Actions that are put in an event
are executed when the event fires. Actions on events have no way to influence the flow of control of the process.
It is similar to the observer pattern. On the other hand, an action that is put on a node has the responsibility of propagating the execution.
The execute() method from Node does not propagate the execution context if there is a custom action associated with the node. Based on this code and the documentation above, I concluded that I must propagate the execution inside my action handler.
// From org.jbpm.graph.def.Node.execute()
public void execute(ExecutionContext executionContext) {
// if there is a custom action associated with this node
if (action!=null) {
try {
// execute the action
executeAction(action, executionContext);
} catch (Exception exception) {
// NOTE that Error's are not caught because that might halt the JVM and mask the original Error.
// search for an exception handler or throw to the client
raiseException(exception, executionContext);
}
} else {
// let this node handle the token
// the default behaviour is to leave the node over the default transition.
leave(executionContext);
}
}
However this appears to conflict with the comments for Token.lock()
/**
* locks a process instance for further execution. A locked token
* cannot continue execution. This is a non-persistent
* operation. This is used to prevent tokens being propagated during
* the execution of actions.
* @see #unlock(String)
*/
public void lock(String lockOwnerId) {
Originally this test case failed in jBPM 3.2.1 with the following exception
* org.jbpm.JbpmException: token '1' can't be locked by 'job[1]' cause it's already locked by 'token[1]'
at org.jbpm.graph.exe.Token.lock(Token.java:646)
at org.jbpm.graph.def.Node.enter(Node.java:316)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.hibernate.proxy.pojo.cglib.CGLIBLazyInitializer.invoke(CGLIBLazyInitializer.java:157)
at org.jbpm.graph.def.Node$$EnhancerByCGLIB$$cc789161.enter(<generated>)
at org.jbpm.graph.def.Transition.take(Transition.java:151)
at org.jbpm.graph.def.Node.leave(Node.java:393)
at org.jbpm.graph.def.Node.leave(Node.java:357)
at org.jbpm.graph.exe.ExecutionContext.leaveNode(ExecutionContext.java:120)
at org.jbpm.job.executor.SimpleAsyncProcessTest$AsyncAction.execute(SimpleAsyncProcessTest.java:57)
at org.jbpm.graph.def.Action.execute(Action.java:122)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.hibernate.proxy.pojo.cglib.CGLIBLazyInitializer.invoke(CGLIBLazyInitializer.java:157)
at org.jbpm.graph.def.Action$$EnhancerByCGLIB$$4852cc95.execute(<generated>)
at org.jbpm.graph.def.GraphElement.executeAction(GraphElement.java:255)
at org.jbpm.graph.def.Node.execute(Node.java:338)
at org.jbpm.graph.def.Node.enter(Node.java:318)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.hibernate.proxy.pojo.cglib.CGLIBLazyInitializer.invoke(CGLIBLazyInitializer.java:157)
at org.jbpm.graph.def.Node$$EnhancerByCGLIB$$cc789161.enter(<generated>)
at org.jbpm.graph.def.Transition.take(Transition.java:151)
at org.jbpm.graph.def.Node.leave(Node.java:393)
at org.jbpm.graph.node.StartState.leave(StartState.java:70)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.hibernate.proxy.pojo.cglib.CGLIBLazyInitializer.invoke(CGLIBLazyInitializer.java:157)
at org.jbpm.graph.def.Node$$EnhancerByCGLIB$$cc789161.leave(<generated>)
at org.jbpm.graph.exe.Token.signal(Token.java:194)
at org.jbpm.graph.exe.Token.signal(Token.java:139)
at org.jbpm.graph.exe.ProcessInstance.signal(ProcessInstance.java:270)
at org.jbpm.job.executor.SimpleAsyncProcessTest.launchProcess(SimpleAsyncProcessTest.java:112)
at org.jbpm.job.executor.SimpleAsyncProcessTest.testConsecutiveAycnActionHandlers(SimpleAsyncProcessTest.java:69)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at junit.framework.TestCase.runTest(TestCase.java:154)
at junit.framework.TestCase.runBare(TestCase.java:127)
at junit.framework.TestResult$1.protect(TestResult.java:106)
at junit.framework.TestResult.runProtected(TestResult.java:124)
at junit.framework.TestResult.run(TestResult.java:109)
at junit.framework.TestCase.run(TestCase.java:118)
at junit.framework.TestSuite.runTest(TestSuite.java:208)
at junit.framework.TestSuite.run(TestSuite.java:203)
at org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestReference.run(JUnit3TestReference.java:130)
at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
18 years, 10 months