-
1. Re: bpm service in switchYard
kcbabo Jan 29, 2013 8:19 AM (in response to snowstormuser)Since you mentioned a video, I'll go ahead and plug our new SwitchYard Video Series which aims to help new users get started and also covers specific subjects in detail. It's just getting started, but there are six videos there already. We are looking for feedback on other videos to shoot, so I'll go ahead and shoot a video on creating a BPM service. Here's the JIRA:
https://issues.jboss.org/browse/SWITCHYARD-1282
I should be able to get this done during this week. In the meantime, there are a few things you can do to get started:
1) If you haven't installed the SY and BPMN 2 tooling yet, I recommend you do so. The Tooling Install guide provides details on installing both.
2) Import the existing bpm-service quickstart into the editor (File -> Import -> Existing Maven Projects) and see what that looks like.
3) To get some experience in creating a new application, check out the Tooling Quick Start guide or watch episode 6 in the SwitchYard Video Series.
After that, watch the BPM video once it's done and you'll be ready to rock.
hth,
keith
-
2. Re: bpm service in switchYard
snowstormuser Jan 29, 2013 9:07 AM (in response to kcbabo)hi..
Thanks for giving answer, SwitchYard Video Series I allready seen this vedio and I am able to call bean service, as well as I am able to call bpm process using Junit Test,But now I would like to call bpm service by soap. is there any video's related to bpm service.please provide url..
thank...
-
3. Re: bpm service in switchYard
kcbabo Jan 29, 2013 9:16 AM (in response to snowstormuser)Calling a BPM service will work the same as calling a bean service from the standpoint of using a SOAP binding. If you have a bpm service in your app that can be called from a unit test, then it's just a matter of promoting that service and adding a SOAP binding to it. Assuming you are using a Java interface for the contract of your BPM service, then you will need to add a transformer to map from XML->Java for the request. If it's in in-out MEP, then you'll need a Java->XML transformer for the response. There are examples of this in the video and in the tooling quickstart that will apply to this scenario as well.
-
4. Re: bpm service in switchYard
snowstormuser Jan 30, 2013 12:55 AM (in response to snowstormuser)Thanks Keith Babo,
When I run test class process start successfully and script task is executed, but when I promote component service and deploy on jboss server I get following urls..
11:02:48,426 INFO [org.jboss.wsf.stack.cxf.metadata.MetadataBuilder] (MSC service thread 1-7) Add Service
id=org.switchyard.component.soap.endpoint.BaseWebService
address=http://localhost:8080/example4/MyService
implementor=org.switchyard.component.soap.endpoint.BaseWebService
invoker=org.jboss.wsf.stack.cxf.JBossWSInvoker
serviceName={urn:com.example.switchyard:switchyard-example4:1.0}MyService
portName={urn:com.example.switchyard:switchyard-example4:1.0}MyServicePort
wsdlLocation=vfs:/D:/SwitchYardJuno/switchyard-as7-0.6.0.Final/switchyard-as7-0.6/bin/content/switchyard-example4.jar/MyService.wsdl
mtomEnabled=false
when I run http://localhost:8080/example4/MyService?wsdl using soap then i get following error
11:03:51,921 ERROR [org.apache.camel.processor.DefaultErrorHandler] (default-workqueue-1) Failed delivery for (MessageId: ID-sstorm7-PC-57863-1359523959355-2-1 on ExchangeId: ID-sstorm7-PC-57863-1359523959355-2-2). Exhausted after delivery attempt: 1 caught: java.lang.IllegalArgumentException: Unknown process ID: MyService: java.lang.IllegalArgumentException: Unknown process ID: MyService
at org.jbpm.process.instance.ProcessRuntimeImpl.createProcessInstance(ProcessRuntimeImpl.java:152) [jbpm-flow-5.3.0.Final.jar:5.3.0.Final]
at org.jbpm.process.instance.ProcessRuntimeImpl.startProcess(ProcessRuntimeImpl.java:135) [jbpm-flow-5.3.0.Final.jar:5.3.0.Final]
at org.drools.common.AbstractWorkingMemory.startProcess(AbstractWorkingMemory.java:1082) [drools-core-5.4.0.Final.jar:5.4.0.Final]
at org.drools.impl.StatefulKnowledgeSessionImpl.startProcess(StatefulKnowledgeSessionImpl.java:320) [drools-core-5.4.0.Final.jar:5.4.0.Final]
I am not able to track this issue.whats going wrong please suggest me.
-
5. Re: bpm service in switchYard
dward Jan 30, 2013 1:04 AM (in response to snowstormuser)Here is the key to your problem:
Unknown process ID: MyService: java.lang.IllegalArgumentException: Unknown process ID: MyService
This error occurs when the processId used to start the process does not match what is in the bpmn2 file.
To fix this: First, look inside your bpmn2 process definition, and see what you called your process id. Then, set the processId attribute of the <implementation.bpm> element to match it. If you don't set that attribute, the SwitchYard BPM component defaults to the name of your service, which in your case appears to be MyService.
-
6. Re: bpm service in switchYard
snowstormuser Jan 30, 2013 2:42 AM (in response to dward)Hi kaith/David,
Thanks for the info. I downloaded BPM quick start and ran ProcessOrder sample
I am getting still getting same error . I haven't chnaged anything so I expected it to work.
12:48:46,094 ERROR [org.apache.camel.processor.DefaultErrorHandler] (http-localhost-127.0.0.1-8080-2) Failed delivery for (MessageId: ID-SSTORM5-PC-64863-1359529998536-0-5 on ExchangeId: ID-SSTORM5-PC-64863-1359529998536-0-6). Exhausted after delivery attempt: 1 caught: java.lang.IllegalArgumentException: Unknown process ID: ProcessOrder: java.lang.IllegalArgumentException: Unknown process ID: ProcessOrder
I have isntalled eclipse juno and Jboss tools which is latest. For runtime version I am using "switchyard-as7-0.6.0.Final.zip" which has as 7.1.1 and SY 0.6
Will this cause any issue?
-
7. Re: bpm service in switchYard
dward Jan 30, 2013 8:03 AM (in response to snowstormuser)snowstorm,
Sorry, but where are you getting "serviceName={urn:com.example.switchyard:switchyard-example4:1.0}MyService" and "http://localhost:8080/example4/MyService" from if you didn't change anything? I'm looking at the 0.6.0.Final version of the bpm-service quickstart here, and the namespace and service names are different than that. Unless you've downloaded it from someplace else, something must have changed.
David
-
8. Re: bpm service in switchYard
snowstormuser Jan 30, 2013 9:26 AM (in response to dward)Hi David,
Sorry for confusion. My message(number 6) was for BPM quick start downloaded from GITHUB and there I did not make any changes to that sample.
Aftwards I imported the sample from switchyard-as7-0.6.0.Final.zip and it worked fine.
I noted that it had "processDefinition" attribute in implementation.bpm tag as below.
<implementation.bpm xmlns="urn:switchyard-component-bpm:config:1.0" processDefinition="META-INF/ProcessOrder.bpmn" processId="ProcessOrder">
When I added "processDefinition" attribute to my sample, it also worked.
The sample generated by me uses "0.7 Final" and deploying on AS7-0.6.
-
9. Re: bpm service in switchYard
dward Jan 30, 2013 10:43 AM (in response to snowstormuser)So you're all set now then?
PS: It does make sense, now that I re-read what you wrote. In SwitchYard <= 0.6, you have to specify the processDefinition attribute. In SwitchYard >= 0.7, there is no more processDefinition attribute. The bpmn2 file is a resource in the manifest like any other. (Please checkout the latest docs for information on this.)
-
10. Re: bpm service in switchYard
d.synchronized Nov 9, 2013 9:17 AM (in response to dward)Hi ,
I am getting the same error of failed Message delivery when i am simply calling up my bpmn Service from a rest end point in version 1.0.0.CR1
Jboss Console says
Route: direct:{urn:com.example.switchyard:switchyard-example:1.0}WithdrawMoneyWorkflow started and consuming from: Endpoint[direct://%7Burn:com.example.switchyard:switchyard-example:1.0%7DWithdrawMoneyWorkflow]
When i hit at the following url :-
http://localhost:8080/restWorkflow/workFlow/withdrawMoney
My error says something like :-
ERROR [org.apache.camel.processor.DefaultErrorHandler] (http-localhost-127.0.0.1-8080-1) Failed delivery for (MessageId: ID-TBS15-56260-1384004634878-6-1 on ExchangeId: ID-TBS15-56260-1384004634878-6-2). Exhausted after delivery attempt: 1 caught: java.lang.IllegalArgumentException: Unknown process ID: WithdrawMoneyWorkflow: java.lang.IllegalArgumentException: Unknown process ID: WithdrawMoneyWorkflow
at org.jbpm.process.instance.ProcessRuntimeImpl.createProcessInstance(ProcessRuntimeImpl.java:152) [jbpm-flow-5.3.0.Final.jar:5.3.0.Final]
at org.jbpm.process.instance.ProcessRuntimeImpl.startProcess(ProcessRuntimeImpl.java:135) [jbpm-flow-5.3.0.Final.jar:5.3.0.Final]
at org.drools.common.AbstractWorkingMemory.startProcess(AbstractWorkingMemory.java:1082) [drools-core-5.4.0.Final.jar:5.4.0.Final]
My process Id in switchyard.xml and the id in bpmn file are both WithdrawMoneyWorkflow,It seems like it is unable to load my bpmn file into the knowledge base?
Can anybody please help on this?
Regards
Dishant Anand
-
11. Re: bpm service in switchYard
dward Nov 11, 2013 10:46 AM (in response to d.synchronized)Again, a mix of Drools 5.4.0.Final with jBPM 5.3.0.Final, when both should be 6.0.0.Beta4 for SwitchYard 1.0.0.Final.
Please see my comment on the other discussion thread, where I ask how your installation could have gotten into this state.