We are going to learn how to create our first “Hello World” process in Oracle SOA 11g today. It presumes Oracle SOA 11g is installed and started. Also, JDeveloper should have composite editor plugin installed.
Open JDeveloper 11g (11.1.1.3.0). If not already downloaded, you can get it from http://www.oracle.com/technology/software/products/jdev/htdocs/soft11.html Create a new Generic Application and name it SOATrainingSamples.
Click Next. In the next screen, specify New Project Name as HelloWorld. From available technologies, select SOA. This will import SOA relevant libraries into our project.
From next screen, select Composite with BPEL option. There are other composite options available, which we’ll explore in other samples.
Click Finish. This will prompt a “Create BPEL Process” screen. Name BPEL process as HelloWorldProcess. Select “Synchronous BPEL Service” template. Click OK.
JDeveloper creates HelloWorldProcess BPEL components and displays corresponding BPEL process.
From list of activities on the right hand navigation pane, lets drag “Assign” activity and drop between “receiveInput” and “replyOutput” activities.
Double click on “Assign_1″ activity and open it. Select “Copy Operation” from this screen.
Copy following expression into Expression Field.
concat('Hello ', bpws:getVariableData('inputVariable','payload','/client:process/client:input'))
Update 14-Jan-2012: If you are using SOA Suite 11.1.1.5.0 or above, please use
concat('Hello ', string(bpws:getVariableData('inputVariable','payload','/client:process/client:input')))
. This is because XML element is not converted to string value by default and requires explicit conversion.
This can also be created from XPath Expression Builder. Assign this expression to “outputVariable” as shown above and click OK.
Compile BPEL process by clicking on “Make HelloWorld.jpr” link as shown below:
Ensure BPEL process is successfully compiled. To deploy to Weblogic server, right click on “HelloWorld” from left side navigation and select Deploy -> HelloWorld. Following images show sequence of steps to deploy BPEL executable.
Connection to SOA Server needs to be created beforehand. In this example, a connection named SOAServerConnection was already created.
A successful deployment message is displayed at the bottom of JDeveloper window.
Next, let us check the deployed process through Weblogic’s EM console. Open http://localhost:7001/em. Drill down to “default” domain from SOA node on the left side navigation bar.
Select “HelloWorld [1.0]” process and click on “Test” service.
Under “Input Arguments” section, we can see “input” as one of the fields of payload. Enter “World” in input field and click on “Test Web Service”.![]()
Input payload can also be seen in XML format by selecting “XML View”.
Response will have “Hello” prefixed to our input string “World”.
This completes our Hello World process.
Hi,
Steps Followed and Successfully Developed the “Hello World Bpel Process” and Deployed it but while Testing the service got a failure message,please check the message and the log file details and help me.
BUILD SUCCESSFUL
Total time: 4 seconds
[05:02:52 AM] Successfully deployed archive sca_Helloworld_rev1.0.jar to partition “default” on server AdminServer [http://satya:7001]
[05:02:52 AM] Elapsed time for deployment: 17 seconds
[05:02:52 AM] —- Deployment finished. —-
Web service invocation payload in XML Format
satya
Web Service Invokation Failed
The selected operation process could not be invoked.
An exception occured while invoking the webservice operation. Please see logs for more details.
oracle.sysman.emSDK.webservices.wsdlapi.SoapTestException: faultName: {{http://schemas.xmlsoap.org/ws/2003/03/business-process/}mismatchedAssignmentFailure}messageType: {{http://schemas.oracle.com/bpel/extension}RuntimeFaultMessage}
java.lang.Exception: oracle.sysman.emSDK.webservices.wsdlapi.SoapTestException: faultName: {{http://schemas.xmlsoap.org/ws/2003/03/business-process/}mismatchedAssignmentFailure}
messageType: {{http://schemas.oracle.com/bpel/extension}RuntimeFaultMessage}
at oracle.sysman.emas.model.wsmgt.WSTestModel.invokeOperation(WSTestModel.java:575)
at oracle.sysman.emas.view.wsmgt.WSView.invokeOperation(WSView.java:381)
at oracle.sysman.emas.view.wsmgt.WSView.invokeOperation(WSView.java:298)
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:597)
at com.sun.el.parser.AstValue.invoke(Unknown Source)
at com.sun.el.MethodExpressionImpl.invoke(Unknown Source)
at org.apache.myfaces.trinidadinternal.taglib.util.MethodExpressionMethodBinding.invoke(MethodExpressionMethodBinding.java:53)
at org.apache.myfaces.trinidad.component.UIXComponentBase.broadcastToMethodBinding(UIXComponentBase.java:1256)
at org.apache.myfaces.trinidad.component.UIXCommand.broadcast(UIXCommand.java:183)
at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent$1.run(ContextSwitchingComponent.java:92)
at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent._processPhase(ContextSwitchingComponent.java:361)
at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent.broadcast(ContextSwitchingComponent.java:96)
at oracle.adf.view.rich.component.fragment.UIXInclude.broadcast(UIXInclude.java:102)
at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent$1.run(ContextSwitchingComponent.java:92)
at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent._processPhase(ContextSwitchingComponent.java:361)
at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent.broadcast(ContextSwitchingComponent.java:96)
at oracle.adf.view.rich.component.fragment.UIXInclude.broadcast(UIXInclude.java:96)
at javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:475)
at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:756)
at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._invokeApplication(LifecycleImpl.java:788)
at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._executePhase(LifecycleImpl.java:306)
at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:186)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:265)
at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:300)
at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
at oracle.help.web.rich.OHWFilter.doFilter(Unknown Source)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
at oracle.sysman.emSDK.license.LicenseFilter.doFilter(LicenseFilter.java:101)
Thank you for the help amjad..!!
I got as far as editing the activity “Assign_1″ and could progress no further.
When I double click “Assign_1″ I get a different screen than what you show here. I am using version 11.1.6.0 of jDeveloper. I get a screen with 2 panes displayed, each having a tree structure.
Keith, this tutorial was created using 11.1.1.3 version. Since 11.1.1.5, assign UI looks and behaves slightly differently. You will have to drag source element on to the target element. Please see this screenshot for reference – http://www.orafmwschool.com/hello-world-bpel-process/assign/.
Thanks. :0)
Error(74): xpath expression “concat(‘Hello ‘, string(bpws:getVariableData(‘inputVariable’,'payload’,'/client:process/client:input’)))” specified in is not valid, because XPath query syntax error.
The syntax error occurs while parsing XPath expression concat(‘Hello ‘, string(bpws:getVariableData(‘inputVariable’,’payload’,’/client:process/client:input’))), at position 7.
The XPath query syntax was wrong; the exception was: Unexpected ‘‘Hello ‘, string(bpws:getVariableData(‘inputVariable’,’payload’,’/client:process/client:input’)))’.
Check the detailed root cause described in the exception message text and verify that the XPath expression named in the error message is correct. The XPath expression is defined in the BPEL process.
Please help me how to fix this error.
Satya,
Please check all the quotation marks and make sure they are the same. Some times the HTML markup changes the ” to ‘’. Make sure that the string values like Hello to be correctly marked as ‘Hello’.
concat(‘Hello ‘, string(bpws:getVariableData(‘inputVariable’,’payload’,’/client:process/client:input’))) should really say
concat(‘Hello ‘, string(bpws:getVariableData(‘inputVariable’,'payload’,'/client:process/client:input’)))
I have updated the post to reflect the same.
Hi Chethan,
Thank you so much for the reply..!
Hie sir,
can you please send me the Link or File for the Using pick activity in BPEl project. I try to do a project with pick activity. but i did’t get understand. can please provide the images or video to know the pick activity usage .
Very nicely explained. Thanks very much. Keep up the good work, Amjad!!
The Herman Callier ergonomic office chair is a marvellous development built to generate everyday living simpler whenever resting. Ergonomic office is really a time period associated using Herman Callier that has revolutionized the way we all utes