Showing posts with label SOA 12c New Features. Show all posts
Showing posts with label SOA 12c New Features. Show all posts

Monday, May 23, 2016

#506 SOA 12.2.2.1. --> JSON processing in BPEL

An excellent feature...

Here is a simple example in which I process a customer.

I start by creating a REST interface -

































































Now I create the BPEL process, based on this -























Edit the process -


















Let's look at the process variables -









Now, if I want to address these within the process, I need to do so as -
process.inputVar.parameterName

e.g. process.inputVar.custName.

I can leverage the above in a simple assign as follows -

Note: I do not see any input structure in the ASSIGN activity.











So I need to add a suffix to outputVar.








Edit the above assignment - adding an attribute to the outputVar.




















I deploy and test -















Now I add a JavaScript activity to the BPEL process -







































Here I am referring to a new process variable v_response.
I need to define this.
























Now let's use v_response to set the output.








Re-deploy and Re-test -














What if this BPEL process needs to call another process, for example, to validate the
customer?









Validate Customer is a simple process -










So how do I pass the JSON input to this process?












Again, edit the ASSIGN -











Simple stuff!


Wednesday, October 29, 2014

#17 SOA 12c New Features - ESS --> incompatible jobs

Here is a simple example -

I have a composite with 2 sync BPEL processes -














Now, I have included WAITs for 20 seconds in each of the BPEL processes.

I now create 2 ESS job definitions, one for each job.





































I define the following incompatibility.






















I now create a job set that will include both these jobs.
I define it as parallel, which will trigger the incompatibility rule at runtime.

























I schedule the jobset -




Here is the master process -



Now here are the 2 jobs -

 






When one has finished, the other begins -





Eventually, both are finished -












Tuesday, October 28, 2014

# 16 SOA Suite 12c New Features - Coherence Adapter

Here is a simple example of using the above -

I have a web service that checks the inventory status of products.













I create a BPEL process that accepts an order as input and then calls the above web service to get the
inventory status of the product.



















I deploy and test.











I will now leverage Coherence to store the Inventory Status.

There will be 2 operations - Put and Get that will need to be supported.

Defining the Get adapter










































Defining the Put adapter




































































Amend the BPEL process to leverage the Coherence adapters













Edit the Invoke activity and add the following property -

















This will populate the product variable value into the property
and then pass it on the invocation to the adapter.

Now I add an If branch after this, checking if the value is in the cache.













Rename the labels













If in the cache, simply assign the cached value to the output


















If not, then call the web service to get the inventory status.
Then store the result in the coherence cache.

Do not forget to edit the Invoke of the Put, to add the jca.coherence.key value


























Deploy and test

The first test, and the cache is empty -









Now, I re-test with the same product -








JDev project here