3
Split Join in OSB This article is from the excellent Blog by oraclefusion1011. See complete article here - http://oraclefusion1011.blogspot.com/2011/05/blog-post.html  . It is reproduced here for easy reference only. This is one of an interesting feature in OSB , however if you know how FlowN works in Bpel this will appears to be same. Use Case: Orders -> Multiple Items Services : 1. Get each Item Status (Instock/outStock) 2. Get Order Status.  Now split join splits the input request to multiple threads and executes parallely. Like in this case for an Order with 10 items , 10 threads will get spawn ed. Resources: XSD : Order/Item Element WSDL : for ItemStatus Service and Order Status service Bpel : Implement the getItemStatus service for inividual item OSB : 1. create a project for split join 2. Import XSD and both WSDl While importing wsdl it may create xsd as well , up date the source with imported xsd from xsd folder and then delete the created one. 3. Create a Buss Service based on Item WSDL (get url from EM), this will be invoked as  part of split join http://localhost:8001/soa- infra/services/default/SplitJoinRrcs/getitemstatusbpel_client_ep?WSDL  4. Create split join based on getOrderStatus Service , select operation. - It will create Receive and Reply activity and request and response variables as well - initialize the response variable by adding an assign action , Put this Assign action right after Receive <ord:Order xmlns:ord="http://pchanel/Orders"> </ord:Order> - add a ForEach Flow Control to iterate each item in Order parallel = yes

OSB Split Join

Embed Size (px)

Citation preview

8/3/2019 OSB Split Join

http://slidepdf.com/reader/full/osb-split-join 1/3

Split Join in OSB

This article is from the excellent Blog by oraclefusion1011.

See complete article here - http://oraclefusion1011.blogspot.com/2011/05/blog-post.html . It is reproduced here for easy reference only.

This is one of an interesting feature in OSB , however if you know how FlowN works inBpel this will appears to be same.Use Case:Orders -> Multiple ItemsServices :1. Get each Item Status (Instock/outStock)

2. Get Order Status.

 Now split join splits the input request to multiple threads and executes parallely.Like in this case for an Order with 10 items , 10 threads will get spawned.

Resources:XSD : Order/Item ElementWSDL : for ItemStatus Service and Order Status serviceBpel : Implement the getItemStatus service for inividual item

OSB :

1. create a project for split join2. Import XSD and both WSDl

While importing wsdl it may create xsd as well , update the source with imported xsdfrom xsd folder and then delete the

created one.3. Create a Buss Service based on Item WSDL (get url from EM), this will be invoked as part of split join

http://localhost:8001/soa-infra/services/default/SplitJoinRrcs/getitemstatusbpel_client_ep?WSDL 4. Create split join based on getOrderStatus Service , select operation.

- It will create Receive and Reply activity and request and response variables as well- initialize the response variable by adding an assign action , Put this Assign action rightafter Receive

<ord:Order xmlns:ord="http://pchanel/Orders"></ord:Order>

- add a ForEach Flow Control to iterate each item in Order parallel = yes

8/3/2019 OSB Split Join

http://slidepdf.com/reader/full/osb-split-join 2/3

counter var = loopstart counter = 1final counter = count($request.payload/Items)

 - Add invoke service for the check Item status for each Item inside for each

Before invoke and inside scope---------------------------------------------- create input/output scope variable for the service invoke- Add another var "Param" to pass the value to the Service- Add assign action inside the for each , initialize input variable for service

<ord:Item xmlns:ord="http://pchanel/Orders"></ord:Item>

 - Add copy operation to copy items to Param

from exp : $request.payload/Items[$loop]to exp : $Param.payload

- Add replace to replace the service input with ParamReplace "." in input.payload with Exp : $Param.payloadReplace entire node---------------------------------------------

- After the service invoke add InsertExp : $output.payloadLOcation : as first chil of Xpath : .Variable : response.payload5. Right click split join.flow -> OSB -> Generate BS

Thats it split join is done !!

This is how it will look like in eclipse:

8/3/2019 OSB Split Join

http://slidepdf.com/reader/full/osb-split-join 3/3