To create a Pre-integration Pack to suit all the requirements is impossible, but to work around that by providing plug-in points so as to add custom functionalities to meet different requirements is an example of well thought and implemented architecture.
Whenever you need to add some additional functionality into the PIP, first point you need to consider would be to use the extension feature available with the PIP. This feature is also called as User Exit. By default for normal business flows, PIPs comes with 8 extensibility points basically 4 on the Requester ABCS side and 4 on Provider ABCS side. User Exits points on requester side will be present prior to:
· execution of transformation of
· invocation of Enterprise Business Service.( PreProcessEBM )
· Execution of transformation of EBM to
· invocation of callback service or response return.( PostProcessEBM)
And on Provider side prior to
· execution of transformation of EBM to
· invocation of Application Service. .( PreProcessEBM )
· execution of transformation of
· invocation of callback EBS or return of response message.( PostProcessEBM)
By default all these user exits will be disabled and can be enabled by modifying entries in the
I will take you through different steps involved in activating and using User Exits. Here I will explain based on
Steps
1. To start of with inspect the ABCS process (Requestor /Provider) .Check for an Extension Service .In this case it will be ProcessEngineeringChangeOrderAgileReqABCSExtensionService. If you see the Partner link will be referring to a Abstract wsdl which will be referring to a concrete wsdl on the Server. Or else you can check out the wsdlRuntimeLocation property in bpel.xml for the service related partner link binding. Runtime location will refer to a wsdl in AIAComponents/ ExtensionServiceLibrary.
- All the concrete wsdls related to the extension library will be defined under the AIAComponents/ExtensionServiceLibrary and in runtime will refer form the location -- http://<host_name>:<port>/AIAComponents/ExtensionServiceLibrary/
In our scenario Go to the
3. As a best practice all the extensions will be routed via an ESB process. So next step will be create ESB routing service based on the concrete wsdl.
· create a local copy of the concrete wsdl (mentioned in step2)
· Remove the Soap service tags from the wsdl.
· Create an ESB process
· Assign proper System/service groups
· Create a Routing service using the local copy of the wsdl. Routing service will have 4 operations each for each user exit.
4. Next create a BPEL process which will contain the custom functionality required by the client.
· Create an empty BPEL process
· Create a local copy-2 of the concrete wsdl
· Since the BPEL process will be specific to a UserExit the operations/entries related to other User exits can be removed. In the case of UserExit1 we will be using only the PreProcessABM operations, so remove unwanted entries related to PreProcessEBM, PostProcessABM and PostProcessEBM .It would be a trimmed version of the wsdl.
· Create a Partner Link in the BPEL process with the local copy-2
· Add a receive and reply activity and link it to the partner link. The input and output variables will be of the same message type.
· Add the custom functionality in between receive and reply activity.
· Once the custom functionality is added deploy the process.
5. Next step will be to link the ESB process with the custom BPEL process.
· Open the ESB process
· Add a soap service with the WSDL URL of the BPEL process.
· Select soap service(aka BPEL process) as the target for routing rule corresponding to PreProcessABM operation
· Save it and register the service.
6. Next step is to link the concrete WSDL on server to the ESB routing service
· Go to the extension library folder –physical location will be
<Oracle_HOME>/Apache/Apace/htdocs/AIAComponents/ExtensionServiceLibrary .Open the concrete wsdl related to the flow. Go to the services tag. The default location will be
<soap:address location="http://<hostname>:<port>/MirrorServlet/mirror"/>
Modify the soap:address location value to the ESB soap Endpoint
<service name="ProcessEngineeringChangeOrderAgileReqABCSExtensionService">
<port name="ProcessEngineeringChangeOrderAgileReqABCSExtensionService_Port" binding="tns:ProcessEngineeringChangeOrderAgileReqABCSExtensionService_Binding">
<soap:address xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" location="http://<hostname>:<port>/event/AIASystem/Extension/ProcessECOExtensionESB" />
</port>
</service>
7. Final step is to enable this User Exit point
· Open <AIAHOME>\config\AIAConfigurationProperties.xml
Go to ServiceConfiguration tag and activate the User Exits by changing the attribute values to true. Here we have enabled the UserExit1 (PreProcessABM)
<ServiceConfiguration serviceName="{http://xmlns.oracle.com/ABCSImpl/Agile/Core/ProcessEngineeringChangeOrderAgileReqABCS/V1}ProcessEngineeringChangeOrderAgileReqABCS">
<Property name="ABCSExtension.PreProcessABM">true</Property>
<Property name="ABCSExtension.PreProcessEBM">false</Property>
<Property name="ABCSExtension.PostProcessEBM">false</Property>
<Property name="ABCSExtension.PostProcessABM">false</Property>
<Property name="TRACE.LOG.ENABLED">false</Property>
……………………..
……………………..
</ServiceConfiguration>
Save the config file.
· Login to http://<host_name>:<port>/AIA
Navigate to Setup tab > Configuration
Press Reload button to reload the entire
We are all set to test the custom user extensions. Run a test case scenario and see the custom ESB and BPEL process extension getting invoked.
Special thanks :: Nikhil, Sandhya and Rajesh for their inputs and help.
No comments:
Post a Comment