[jBPM] - jBPM-console - Oracle - start process
by bpmn2user
bpmn2user [http://community.jboss.org/people/bpmn2user] created the discussion
"jBPM-console - Oracle - start process"
To view the discussion, visit: http://community.jboss.org/message/582637#582637
--------------------------------------------------------------
I get the following error after starting a porcess using jBPM-console with Oracle database(SNAPSHOT code).
Any comments are appreciated
[2011:01:23 22:01:450:exception] Uncaught exception on client
org.apache.mina.filter.codec.ProtocolDecoderException: java.lang.IllegalStateExc
eption: unread block data (Hexdump: 00 00 01 7F AC ED 00 05 73 72 01 00 1D 6F 72
67 2E 6A 62 70 6D 2E 74 61 73 6B 2E 73 65 72 76 69 63 65 2E 43 6F 6D 6D 61 6E 6
.......
at org.apache.mina.filter.codec.ProtocolCodecFilter.messageReceived(Prot
ocolCodecFilter.java:180)
at org.apache.mina.core.filterchain.DefaultIoFilterChain.callNextMessage
Received(DefaultIoFilterChain.java:414)
at org.apache.mina.core.filterchain.DefaultIoFilterChain.access$1200(Def
aultIoFilterChain.java:49)
at org.apache.mina.core.filterchain.DefaultIoFilterChain$EntryImpl$1.mes
sageReceived(DefaultIoFilterChain.java:832)
at org.apache.mina.core.filterchain.DefaultIoFilterChain$HeadFilter.mess
ageReceived(DefaultIoFilterChain.java:616)
at org.apache.mina.core.filterchain.DefaultIoFilterChain.callNextMessage
Received(DefaultIoFilterChain.java:414)
at org.apache.mina.core.filterchain.DefaultIoFilterChain.fireMessageRece
ived(DefaultIoFilterChain.java:408)
at org.apache.mina.core.polling.AbstractPollingIoProcessor.read(Abstract
PollingIoProcessor.java:578)
at org.apache.mina.core.polling.AbstractPollingIoProcessor.process(Abstr
actPollingIoProcessor.java:540)
at org.apache.mina.core.polling.AbstractPollingIoProcessor.process(Abstr
actPollingIoProcessor.java:532)
at org.apache.mina.core.polling.AbstractPollingIoProcessor.access$400(Ab
stractPollingIoProcessor.java:58)
at org.apache.mina.core.polling.AbstractPollingIoProcessor$Worker.run(Ab
stractPollingIoProcessor.java:857)
at org.apache.mina.util.NamePreservingRunnable.run(NamePreservingRunnabl
e.java:51)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExec
utor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor
.java:908)
at java.lang.Thread.run(Thread.java:662)
Caused by: java.lang.IllegalStateException: unread block data
at java.io.ObjectInputStream$BlockDataInputStream.setBlockDataMode(Objec
tInputStream.java:2376)
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1360)
at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:19
46)
at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1870)
at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1
752)
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1328)
at java.io.ObjectInputStream.readObject(ObjectInputStream.java:350)
at org.apache.mina.core.buffer.AbstractIoBuffer.getObject(AbstractIoBuff
er.java:1628)
at org.apache.mina.filter.codec.serialization.ObjectSerializationDecoder
.doDecode(ObjectSerializationDecoder.java:93)
at org.apache.mina.filter.codec.CumulativeProtocolDecoder.decode(Cumulat
iveProtocolDecoder.java:173)
at org.apache.mina.filter.codec.ProtocolCodecFilter.messageReceived(Prot
ocolCodecFilter.java:170)
... 15 more
2011-01-23 22:51:49,356 (LogLevel.java:90) INFO org.apache.mina.filter.logging.
LoggingFilter - IDLE: both idle
java.lang.RuntimeException: Timeout : unable to retrieve results
at org.jbpm.task.service.responsehandlers.BlockingTaskSummaryResponseHan
dler.getResults(BlockingTaskSummaryResponseHandler.java:41)
at org.jbpm.integration.console.TaskManagement.getAssignedTasks(TaskMana
gement.java:132)
at org.jboss.bpm.console.server.TaskListFacade.getTasksForIdRef(TaskList
Facade.java:99)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.jboss.resteasy.core.MethodInjectorImpl.invoke(MethodInjectorImpl.
java:117)
at org.jboss.resteasy.core.ResourceMethod.invokeOnTarget(ResourceMethod.
java:260)
at org.jboss.resteasy.core.ResourceMethod.invoke(ResourceMethod.java:232
)
at org.jboss.resteasy.core.ResourceMethod.invoke(ResourceMethod.java:166
)
at org.jboss.resteasy.core.DispatcherUtilities.getJaxrsResponse(Dispatch
erUtilities.java:142)
at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispa
tcher.java:356)
at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispa
tcher.java:173)
at org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.servi
ce(HttpServletDispatcher.java:93)
at org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.servi
ce(HttpServletDispatcher.java:68)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
icationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
ilterChain.java:206)
at org.jboss.bpm.console.server.util.GWTJsonFilter.doFilter(GWTJsonFilte
r.java:59)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
icationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
ilterChain.java:206)
2011-01-23 22:51:54,435 (LogLevel.java:90) INFO org.apache.mina.filter.logging.
LoggingFilter - IDLE: both idle
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperV
alve.java:233)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextV
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/582637#582637]
Start a new discussion in jBPM at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
12 years, 10 months
[jBPM] - Re: registerWorkItemHandler workItemName
by Tihomir Surdilovic
Tihomir Surdilovic [http://community.jboss.org/people/tsurdilovic] created the discussion
"Re: registerWorkItemHandler workItemName"
To view the discussion, visit: http://community.jboss.org/message/622117#622117
--------------------------------------------------------------
I made sure it opens fine in Designer. I have not played with the new Eclipse BPMN2 editor much but just from your pasted BPMN2 from the earlier post it seems like it has many issues. In your pasted BPMN2 there is a number of missing elements, some in the ioSpecification of the service task, then missing variable definition parameter nodes and thins like that. Here is the BPMN2 produced by Designer with a very similar process as yours (start task, service node, end task):
| 1. | | | <?xml version="1.0" encoding="UTF-8"?> |
| 2. | | | <bpmn2:definitions xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.omg.org/bpmn20" xmlns:bpmn2="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" xmlns:drools="http://www.jboss.org/drools" id="a89e1d83-57d7-441e-bde7-bcfc07046877" xsi:schemaLocation="http://www.omg.org/spec/BPMN/20100524/MODEL BPMN20.xsd" name="Sample Service Process" targetNamespace="http://www.omg.org/bpmn20"> |
| 3. | | | <bpmn2:itemDefinition id="_sItem" structureRef="String"/> |
| 4. | | | <bpmn2:process id="serviceProcess" drools:packageName="defaultPackage" name="Sample Service Process" isExecutable="true"> |
| 5. | | | <bpmn2:startEvent id="_AE376570-6FDE-4862-AAB0-8FE9AFB6F3F9" name=""> |
| 6. | | | <bpmn2:outgoing>_BF300974-57DC-4219-82F6-5BA95FC29589</bpmn2:outgoing> |
| 7. | | | </bpmn2:startEvent> |
| 8. | | | <bpmn2:serviceTask id="_8D551B36-A5AF-4808-9D50-7691FB2A1B87" drools:servicetaskinterface="org.jbpm.examples.junit.HelloService" drools:servicetaskoperation="hello" name="Service Task" implementation="Other" operationRef="_8D551B36-A5AF-4808-9D50-7691FB2A1B87_ServiceOperation"> |
| 9. | | | <bpmn2:incoming>_BF300974-57DC-4219-82F6-5BA95FC29589</bpmn2:incoming> |
| 10. | | | <bpmn2:outgoing>_1F57B200-3F32-45BC-A775-BB3FC333EAF6</bpmn2:outgoing> |
| 11. | | | <bpmn2:ioSpecification id="_5Qp0ocymEeCp6N3BENwuag"> |
| 12. | | | <bpmn2:dataInput id="_8D551B36-A5AF-4808-9D50-7691FB2A1B87_ParameterInput" name="Parameter"/> |
| 13. | | | <bpmn2:dataOutput id="_8D551B36-A5AF-4808-9D50-7691FB2A1B87_ResultOutput" name="Result"/> |
| 14. | | | <bpmn2:inputSet id="_5Qp0osymEeCp6N3BENwuag"> |
| 15. | | | <bpmn2:dataInputRefs>_8D551B36-A5AF-4808-9D50-7691FB2A1B87_ParameterInput</bpmn2:dataInputRefs> |
| 16. | | | </bpmn2:inputSet> |
| 17. | | | <bpmn2:outputSet id="_5Qp0o8ymEeCp6N3BENwuag"> |
| 18. | | | <bpmn2:dataOutputRefs>_8D551B36-A5AF-4808-9D50-7691FB2A1B87_ResultOutput</bpmn2:dataOutputRefs> |
| 19. | | | </bpmn2:outputSet> |
| 20. | | | </bpmn2:ioSpecification> |
| 21. | | | <bpmn2:dataInputAssociation id="_5Qp0pMymEeCp6N3BENwuag"> |
| 22. | | | <bpmn2:sourceRef>s</bpmn2:sourceRef> |
| 23. | | | <bpmn2:targetRef>_8D551B36-A5AF-4808-9D50-7691FB2A1B87_ParameterInput</bpmn2:targetRef> |
| 24. | | | </bpmn2:dataInputAssociation> |
| 25. | | | <bpmn2:dataOutputAssociation id="_5QqbsMymEeCp6N3BENwuag"> |
| 26. | | | <bpmn2:sourceRef>_8D551B36-A5AF-4808-9D50-7691FB2A1B87_ResultOutput</bpmn2:sourceRef> |
| 27. | | | <bpmn2:targetRef>s</bpmn2:targetRef> |
| 28. | | | </bpmn2:dataOutputAssociation> |
| 29. | | | </bpmn2:serviceTask> |
| 30. | | | <bpmn2:sequenceFlow id="_BF300974-57DC-4219-82F6-5BA95FC29589" sourceRef="_AE376570-6FDE-4862-AAB0-8FE9AFB6F3F9" targetRef="_8D551B36-A5AF-4808-9D50-7691FB2A1B87"/> |
| 31. | | | <bpmn2:sequenceFlow id="_1F57B200-3F32-45BC-A775-BB3FC333EAF6" sourceRef="_8D551B36-A5AF-4808-9D50-7691FB2A1B87" targetRef="_B68024DD-A828-494F-843A-29C48087EEFB"/> |
| 32. | | | <bpmn2:endEvent id="_B68024DD-A828-494F-843A-29C48087EEFB" name=""> |
| 33. | | | <bpmn2:incoming>_1F57B200-3F32-45BC-A775-BB3FC333EAF6</bpmn2:incoming> |
| 34. | | | <bpmn2:terminateEventDefinition id="_5QqbscymEeCp6N3BENwuag"/> |
| 35. | | | </bpmn2:endEvent> |
| 36. | | | <bpmn2:property id="s" itemSubjectRef="_sItem"/> |
| 37. | | | </bpmn2:process> |
| 38. | | | <bpmn2:interface id="_8D551B36-A5AF-4808-9D50-7691FB2A1B87_ServiceInterface" name="org.jbpm.examples.junit.HelloService"> |
| 39. | | | <bpmn2:operation id="_8D551B36-A5AF-4808-9D50-7691FB2A1B87_ServiceOperation" name="hello"> |
| 40. | | | <bpmn2:inMessageRef>_8D551B36-A5AF-4808-9D50-7691FB2A1B87_InMessage</bpmn2:inMessageRef> |
| 41. | | | </bpmn2:operation> |
| 42. | | | </bpmn2:interface> |
| 43. | | | <bpmn2:message id="_8D551B36-A5AF-4808-9D50-7691FB2A1B87_InMessage" itemRef="_8D551B36-A5AF-4808-9D50-7691FB2A1B87_InMessageType"/> |
| 44. | | | <bpmn2:itemDefinition id="_8D551B36-A5AF-4808-9D50-7691FB2A1B87_InMessageType"/> |
| 45. | | | <bpmndi:BPMNDiagram id="_5QqbssymEeCp6N3BENwuag"> |
| 46. | | | <bpmndi:BPMNPlane id="_5Qqbs8ymEeCp6N3BENwuag" bpmnElement="serviceProcess"> |
| 47. | | | <bpmndi:BPMNShape id="_5QqbtMymEeCp6N3BENwuag" bpmnElement="_AE376570-6FDE-4862-AAB0-8FE9AFB6F3F9"> |
| 48. | | | <dc:Bounds height="30.0" width="30.0" x="144.0" y="206.0"/> |
| 49. | | | </bpmndi:BPMNShape> |
| 50. | | | <bpmndi:BPMNShape id="_5QqbtcymEeCp6N3BENwuag" bpmnElement="_8D551B36-A5AF-4808-9D50-7691FB2A1B87"> |
| 51. | | | <dc:Bounds height="80.0" width="100.0" x="219.0" y="181.0"/> |
| 52. | | | </bpmndi:BPMNShape> |
| 53. | | | <bpmndi:BPMNEdge id="_5QqbtsymEeCp6N3BENwuag" bpmnElement="_BF300974-57DC-4219-82F6-5BA95FC29589"> |
| 54. | | | <di:waypoint xsi:type="dc:Point" x="159.0" y="221.0"/> |
| 55. | | | <di:waypoint xsi:type="dc:Point" x="269.0" y="221.0"/> |
| 56. | | | </bpmndi:BPMNEdge> |
| 57. | | | <bpmndi:BPMNEdge id="_5Qqbt8ymEeCp6N3BENwuag" bpmnElement="_1F57B200-3F32-45BC-A775-BB3FC333EAF6"> |
| 58. | | | <di:waypoint xsi:type="dc:Point" x="269.0" y="221.0"/> |
| 59. | | | <di:waypoint xsi:type="dc:Point" x="378.0" y="221.0"/> |
| 60. | | | </bpmndi:BPMNEdge> |
| 61. | | | <bpmndi:BPMNShape id="_5QqbuMymEeCp6N3BENwuag" bpmnElement="_B68024DD-A828-494F-843A-29C48087EEFB"> |
| 62. | | | <dc:Bounds height="28.0" width="28.0" x="364.0" y="207.0"/> |
| 63. | | | </bpmndi:BPMNShape> |
| 64. | | | </bpmndi:BPMNPlane> |
| 65. | | | </bpmndi:BPMNDiagram> |
| 66. | | | </bpmn2:definitions> |
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/622117#622117]
Start a new discussion in jBPM at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
12 years, 10 months
[jBPM] - Custom processes in jBPM 5.1 console
by Michał Warecki
Michał Warecki [http://community.jboss.org/people/michal.warecki] created the discussion
"Custom processes in jBPM 5.1 console"
To view the discussion, visit: http://community.jboss.org/message/622021#622021
--------------------------------------------------------------
Hi,
I discovered an issue while retrieving custom processes in jBPM 5.1 console.
I've configured persistence.xml and testDS1 for my already created processes in MySQL db. Also I set workDefinitions inside jbpm-gwt-console for custom WorkItem Handlers and set -Djbpm.console.directory to directory where my processes are placed. When I'm trying to read processes in jbpm console I've got exceptions:
> org.jboss.resteasy.spi.UnhandledException: java.lang.RuntimeException: Could not initialize stateful knowledge session: Could not find true
> org.jboss.resteasy.core.SynchronousDispatcher.handleApplicationException(SynchronousDispatcher.java:319)
> org.jboss.resteasy.core.SynchronousDispatcher.handleException(SynchronousDispatcher.java:230)
> org.jboss.resteasy.core.SynchronousDispatcher.handleInvokerException(SynchronousDispatcher.java:206)
> org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:360)
> org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:173)
> org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:93)
> org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:68)
> javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
> org.jboss.bpm.console.server.util.GWTJsonFilter.doFilter(GWTJsonFilter.java:59)
> org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
> *root cause*
> java.lang.RuntimeException: Could not initialize stateful knowledge session: Could not find true
> org.jbpm.integration.console.CommandDelegate.newStatefulKnowledgeSession(CommandDelegate.java:185)
> org.jbpm.integration.console.CommandDelegate.getSession(CommandDelegate.java:193)
> org.jbpm.integration.console.CommandDelegate.<init>(CommandDelegate.java:71)
> org.jbpm.integration.console.ProcessManagement.<init>(ProcessManagement.java:35)
> org.jbpm.integration.console.ManagementFactory.createProcessManagement(ManagementFactory.java:22)
> org.jbpm.integration.console.ManagementFactory.createProcessManagement(ManagementFactory.java:19)
> org.jboss.bpm.console.server.ProcessMgmtFacade.getProcessManagement(ProcessMgmtFacade.java:98)
> org.jboss.bpm.console.server.ProcessMgmtFacade.getDefinitionsJSON(ProcessMgmtFacade.java:122)
> sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> java.lang.reflect.Method.invoke(Method.java:597)
> org.jboss.resteasy.core.MethodInjectorImpl.invoke(MethodInjectorImpl.java:117)
> org.jboss.resteasy.core.ResourceMethod.invokeOnTarget(ResourceMethod.java:260)
> org.jboss.resteasy.core.ResourceMethod.invoke(ResourceMethod.java:232)
> org.jboss.resteasy.core.ResourceMethod.invoke(ResourceMethod.java:166)
> org.jboss.resteasy.core.DispatcherUtilities.getJaxrsResponse(DispatcherUtilities.java:142)
> org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:356)
> org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:173)
> org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:93)
> org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:68)
> javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
> org.jboss.bpm.console.server.util.GWTJsonFilter.doFilter(GWTJsonFilter.java:59)
> org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
>
>
> *root cause*
>
> java.lang.IllegalArgumentException: Could not find true
> org.jbpm.integration.console.CommandDelegate.newStatefulKnowledgeSession(CommandDelegate.java:111)
> org.jbpm.integration.console.CommandDelegate.getSession(CommandDelegate.java:193)
> org.jbpm.integration.console.CommandDelegate.<init>(CommandDelegate.java:71)
> org.jbpm.integration.console.ProcessManagement.<init>(ProcessManagement.java:35)
> org.jbpm.integration.console.ManagementFactory.createProcessManagement(ManagementFactory.java:22)
> org.jbpm.integration.console.ManagementFactory.createProcessManagement(ManagementFactory.java:19)
> org.jboss.bpm.console.server.ProcessMgmtFacade.getProcessManagement(ProcessMgmtFacade.java:98)
> org.jboss.bpm.console.server.ProcessMgmtFacade.getDefinitionsJSON(ProcessMgmtFacade.java:122)
> sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> java.lang.reflect.Method.invoke(Method.java:597)
> org.jboss.resteasy.core.MethodInjectorImpl.invoke(MethodInjectorImpl.java:117)
> org.jboss.resteasy.core.ResourceMethod.invokeOnTarget(ResourceMethod.java:260)
> org.jboss.resteasy.core.ResourceMethod.invoke(ResourceMethod.java:232)
> org.jboss.resteasy.core.ResourceMethod.invoke(ResourceMethod.java:166)
> org.jboss.resteasy.core.DispatcherUtilities.getJaxrsResponse(DispatcherUtilities.java:142)
> org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:356)
> org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:173)
> org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:93)
> org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:68)
> javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
> org.jboss.bpm.console.server.util.GWTJsonFilter.doFilter(GWTJsonFilter.java:59)
> org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
>
What is the reason of this exception? More interesting question: How can I set this custom work item definitions if there are deployed in other spring-based web application? Is it possible to just browse already created processes without execution? Execution of this processes will be left for my spring-based web app.
I want to use jBPM console for just browsing and check status (in graph viewer in case of processes) of processes and task.
Thanks in advance.
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/622021#622021]
Start a new discussion in jBPM at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
12 years, 10 months
[jBPM] - Re: registerWorkItemHandler workItemName
by Esteban Aliverti
Esteban Aliverti [http://community.jboss.org/people/eaa] created the discussion
"Re: registerWorkItemHandler workItemName"
To view the discussion, visit: http://community.jboss.org/message/622080#622080
--------------------------------------------------------------
It seems that if you want to usa a then you need to define the interface of your service in the process definition. The interface defines an operation and then you can use that operation in your node. Here is an example: https://github.com/droolsjbpm/jbpm/blob/master/jbpm-bpmn2/src/test/resour... https://github.com/droolsjbpm/jbpm/blob/master/jbpm-bpmn2/src/test/resour... This is a generic way to invoke services, but I'm not sure if it is the best. If you use a then you need to register a generic "ServiceTaskHandler" to it. Because it is generic, you can attach the same handler to all your nodes. The ServiceTaskHandler class is a WorkItemHandler that will take the parameters defined in the your references, instantiate a new class (the one defined in 's 'name' attribute) using reflection, and finally it will try to invoke the method defined by the element. For simple scenarios, this could be enough, but for more complex situations, I think a plain node with a custom WorkItemHandler is much better. Here is the implementation of ServiceTaskHandler: https://github.com/droolsjbpm/jbpm/blob/master/jbpm-bpmn2/src/main/java/o... https://github.com/droolsjbpm/jbpm/blob/master/jbpm-bpmn2/src/main/java/o... Because node has this 'generic' behavior, I'm not sure if you can attach different Handlers to different node instances. Again, I think a node is much better.
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/622080#622080]
Start a new discussion in jBPM at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
12 years, 10 months