[
https://jira.jboss.org/browse/JBPM-2829?page=com.atlassian.jira.plugin.sy...
]
Huisheng Xu updated JBPM-2829:
------------------------------
Fix Version/s: jBPM 4.x
A newline in a decision expression break the scripting engine
-------------------------------------------------------------
Key: JBPM-2829
URL:
https://jira.jboss.org/browse/JBPM-2829
Project: jBPM
Issue Type: Bug
Security Level: Public(Everyone can see)
Components: Runtime Engine
Reporter: Sebastian Rühl
Fix For: jBPM 4.x
Attachments: jbpm-test-db-NewLineConditionExpressionTest.patch
If you put a new line in a decision expression like:
<conditionExpression
xsi:type="tFormalExpression">${bewertungen>2}
</conditionExpression>
instead of:
<conditionExpression
xsi:type="tFormalExpression">${bewertungen>2}</conditionExpression>
the scripting engine will fail with a error:
org.jbpm.api.JbpmException: Expression '${bewertungen>2}
' did not resolve to a boolean value
at org.jbpm.bpmn.model.SequenceflowCondition.evaluate(SequenceflowCondition.java:55)
at org.jbpm.bpmn.flownodes.BpmnActivity.findOutgoingSequenceFlow(BpmnActivity.java:134)
at
org.jbpm.bpmn.flownodes.ExclusiveGatewayActivity.execute(ExclusiveGatewayActivity.java:53)
at
org.jbpm.bpmn.flownodes.ExclusiveGatewayActivity.execute(ExclusiveGatewayActivity.java:43)
at org.jbpm.pvm.internal.model.op.ExecuteActivity.perform(ExecuteActivity.java:60)
at
org.jbpm.pvm.internal.model.ExecutionImpl.performAtomicOperationSync(ExecutionImpl.java:657)
at
org.jbpm.pvm.internal.model.ExecutionImpl.performAtomicOperation(ExecutionImpl.java:617)
at org.jbpm.pvm.internal.model.ExecutionImpl.signal(ExecutionImpl.java:418)
at org.jbpm.pvm.internal.model.ExecutionImpl.signal(ExecutionImpl.java:404)
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.hibernate.proxy.pojo.javassist.JavassistLazyInitializer.invoke(JavassistLazyInitializer.java:197)
at
org.jbpm.pvm.internal.model.ExecutionImpl_$$_javassist_32.signal(ExecutionImpl_$$_javassist_32.java)
at org.jbpm.pvm.internal.task.TaskImpl.complete(TaskImpl.java:199)
at org.jbpm.pvm.internal.cmd.CompleteTaskCmd.execute(CompleteTaskCmd.java:65)
at org.jbpm.pvm.internal.cmd.CompleteTaskCmd.execute(CompleteTaskCmd.java:32)
at org.jbpm.pvm.internal.cmd.CompositeCmd.execute(CompositeCmd.java:43)
at org.jbpm.pvm.internal.cmd.CompositeCmd.execute(CompositeCmd.java:35)
at
org.jbpm.pvm.internal.svc.DefaultCommandService.execute(DefaultCommandService.java:42)
at
org.jbpm.pvm.internal.tx.StandardTransactionInterceptor.execute(StandardTransactionInterceptor.java:54)
at
org.jbpm.pvm.internal.svc.EnvironmentInterceptor.executeInNewEnvironment(EnvironmentInterceptor.java:53)
at
org.jbpm.pvm.internal.svc.EnvironmentInterceptor.execute(EnvironmentInterceptor.java:40)
at org.jbpm.pvm.internal.svc.RetryInterceptor.execute(RetryInterceptor.java:55)
at org.jbpm.pvm.internal.svc.SkipInterceptor.execute(SkipInterceptor.java:43)
at org.jbpm.pvm.internal.svc.TaskServiceImpl.completeTask(TaskServiceImpl.java:105)
at org.jbpm.pvm.internal.svc.TaskServiceImpl.completeTask(TaskServiceImpl.java:92)
at
org.jbpm.bpmn.NewLineConditionExpressionTest.testNormalExecuteDecisionCondition(NewLineConditionExpressionTest.java:47)
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 junit.framework.TestCase.runTest(TestCase.java:164)
at org.jbpm.test.BaseJbpmTestCase.runTest(BaseJbpmTestCase.java:87)
at junit.framework.TestCase.runBare(TestCase.java:130)
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:120)
at junit.framework.TestSuite.runTest(TestSuite.java:230)
at junit.framework.TestSuite.run(TestSuite.java:225)
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:467)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)
In fact there is a error in jbpm cause the scripting engine will evaluate right but
instead of returning true it will return "true" in this case...
see appended patch with contains a patch with a test
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
https://jira.jboss.org/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira