]
Ronald van Kuijk commented on JBPM-2394:
----------------------------------------
Robert,
Would you mind sharing with us why you marked it 'rejected' yourself? Was it no
'bug'? Then it should have been marked invalid.
Java Activities cannot be be async when the method takes an argument
(at least on the spring context).
------------------------------------------------------------------------------------------------------
Key: JBPM-2394
URL:
https://jira.jboss.org/jira/browse/JBPM-2394
Project: JBoss jBPM
Issue Type: Bug
Security Level: Public(Everyone can see)
Affects Versions: jBPM 4.0.CR1
Environment: java-6-sun-1.6.013. The app is a unit test set up after Andres
Inze's examples here
http://www.inze.be/andries/2009/05/24/spring-integration-part-of-jbpm4-tr...
Reporter: Robert Moskal
I have been testing the spring integration code in the trunk, though I think this has
nothing to do with Spring.
If I run a test that simply starts a process that has an async node with a bean with a
method that takes no argument it runs to the end just as yuo would expect.
<process name="TopTake2"
xmlns="http://jbpm.org/4.0/jpdl">
<start g="69,143,48,48" name="TopSubFlow">
<transition to="entryNotifications"/>
</start>
<java expr="#{notificationService}" g="169,146,80,40"
method="notify1" name="entryNotifications" async="true">
<transition to="end1" g="-49,-22"/>
</java>
<end name="end1" g="296,144,48,48"/>
</process>
However, if I change the description a little to call a method that takes an argument,
like so I get an xml validation error saying that async is not allowed to appear in
element java (the trace is below):
<process name="TopTake2"
xmlns="http://jbpm.org/4.0/jpdl">
<start g="69,143,48,48" name="TopSubFlow">
<transition to="entryNotifications"/>
</start>
<java expr="#{notificationService}" g="169,146,80,40"
method="notify1" name="entryNotifications" async="true">
<arg value="hi"/>
<transition to="end1" g="-49,-22"/>
</java>
<end name="end1" g="296,144,48,48"/>
</process>
org.jbpm.api.JbpmException:
xml validation error: cvc-complex-type.3.2.2: Attribute 'async' is not allowed
to appear in element 'java'. [line=7 column=114 ]: org.xml.sax.SAXParseException:
cvc-complex-type.3.2.2: Attribute 'async' is not allowed to appear in element
'java'.
error: arg must contain exactly one descriptor element out of [task-service,
transaction, char, hibernate-session, long, float, hibernate-configuration,
execution-service, byte, jboss-idm-identity-session-factory, mail-session, false,
db-session, command-service, message-session, seam-hibernate-session, job-executor,
jboss-idm-identity-session, repository-session, int, class, properties, double,
transaction-ref, repository-service, script-manager, deployer-manager, identity-service,
management-service, authorization-interceptor, business-calendar, job-test-helper,
repository-cache, hibernate-session-factory, set, timer-session, env-ref, object,
address-resolver, short, map, types, jndi, history-service, null, identity-session,
jpdl-deployer, context-ref, true, list, env, history-session, process-engine-ref, ref,
authentication, string, id-generator, mail-template] as contents:<java
async="true" continue="sync" expr="#{notificationService}"
g="169,146,80,40" method="notify1" name="entryNotifications"
xmlns="http://jbpm.org/4.0/jpdl">
<arg value="hi"/>
<transition g="-49,-22" to="end1"/>
</java> [line=8 column=21 ]
at org.jbpm.pvm.internal.xml.ProblemList.getJbpmException(ProblemList.java:168)
at org.jbpm.pvm.internal.xml.ProblemList.getJbpmException(ProblemList.java:141)
at org.jbpm.pvm.internal.repository.DeployerManager.deploy(DeployerManager.java:50)
at
org.jbpm.pvm.internal.repository.RepositorySessionImpl.deploy(RepositorySessionImpl.java:55)
at org.jbpm.pvm.internal.cmd.DeployCmd.execute(DeployCmd.java:46)
at org.jbpm.pvm.internal.cmd.DeployCmd.execute(DeployCmd.java:32)
at
org.jbpm.pvm.internal.svc.DefaultCommandService.execute(DefaultCommandService.java:42)
at
org.jbpm.pvm.internal.spring.CommandTransactionCallback.doInTransaction(CommandTransactionCallback.java:50)
at
org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:127)
at
org.jbpm.pvm.internal.tx.SpringTransactionInterceptor.execute(SpringTransactionInterceptor.java:79)
at
org.jbpm.pvm.internal.svc.EnvironmentInterceptor.execute(EnvironmentInterceptor.java:54)
at org.jbpm.pvm.internal.svc.RetryInterceptor.execute(RetryInterceptor.java:55)
at org.jbpm.pvm.internal.repository.DeploymentImpl.deploy(DeploymentImpl.java:89)
at
org.jbpm.test.AbstractTransactionalSpringJbpmTestCase.deployJpdlFromClasspath(AbstractTransactionalSpringJbpmTestCase.java:100)
at
com.bluesky.skyline.workflow.toplevel.TestWiring.onSetUpInTransaction(TestWiring.java:23)
at
org.springframework.test.AbstractTransactionalSpringContextTests.onSetUp(AbstractTransactionalSpringContextTests.java:176)
at
org.springframework.test.AbstractSingleSpringContextTests.setUp(AbstractSingleSpringContextTests.java:89)
at junit.framework.TestCase.runBare(TestCase.java:125)
at org.springframework.test.ConditionalTestCase.runBare(ConditionalTestCase.java:69)
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)
Caused by: org.jbpm.api.JbpmException
at org.jbpm.pvm.internal.xml.ProblemList.getJbpmException(ProblemList.java:164)
... 30 more
Caused by: org.xml.sax.SAXParseException: cvc-complex-type.3.2.2: Attribute
'async' is not allowed to appear in element 'java'.
at org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(Unknown Source)
at org.apache.xerces.util.ErrorHandlerWrapper.error(Unknown Source)
at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
at org.apache.xerces.impl.xs.XMLSchemaValidator$XSIErrorReporter.reportError(Unknown
Source)
at org.apache.xerces.impl.xs.XMLSchemaValidator.reportSchemaError(Unknown Source)
at org.apache.xerces.impl.xs.XMLSchemaValidator.processAttributes(Unknown Source)
at org.apache.xerces.impl.xs.XMLSchemaValidator.handleStartElement(Unknown Source)
at org.apache.xerces.impl.xs.XMLSchemaValidator.startElement(Unknown Source)
at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown Source)
at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown
Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
at org.jbpm.pvm.internal.xml.Parser.buildDom(Parser.java:451)
at org.jbpm.pvm.internal.xml.Parser.execute(Parser.java:387)
at org.jbpm.pvm.internal.xml.Parse.execute(Parse.java:157)
at org.jbpm.jpdl.internal.repository.JpdlDeployer.deploy(JpdlDeployer.java:60)
at org.jbpm.pvm.internal.repository.DeployerManager.deploy(DeployerManager.java:46)
... 28 more
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: