Showing posts with label AIA. Show all posts
Showing posts with label AIA. Show all posts

Tuesday, June 7, 2011

Avoiding invalid composites at server startup -Abstract V/s Concrete WSDL

One year back I got a chance to help a team working on AIA PIP migration project, the team was stuck with compilation issues of processes that gets migrated to 11g. All processes were using concrete WSDL of dependent processes which were not even ready. That’s when as a best practice we replaced all concrete WSDL’s with Abstract WSDL. Similar issue happens during startup of the server. While loading processes from MDS, there used to be issues related services being unavailable due to the order of process loading. That’s when much emphasis was laid on using Abstract WSDL compared to Concrete WSDL .A nice article on why Abstract WSDL need to be used instead of using concrete WSDL during design time and how it works @ runtime.

Wednesday, June 9, 2010

AIA 11g R1 (over SOASuite11.1.1.3) Installation Issues on Linux

consolehelp.book

I am putting down some of the issues that we had during the AIA installation on a linux box.

Issue#1 :- The AIA intallation failed at the Pre-Installtion step as it was unable to find the task definition for net/sf/antcontrib/antcontrib.properties or net/sf/antcontrib/antlib.xml.

Error StackTrace

No taskdef found for net/sf/antcontrib/antcontrib.properties

Build failed

In the build files there will be this task definition which looks for this specific task file.

Ant build file- snippet

<taskdef resource="net/sf/antcontrib/antcontrib.properties">

………

…………

</taskdef>

<taskdef resource="net/sf/antcontrib/antlib.xml">

………

…………

</taskdef>

Solution

Copy the ant-contrib.jar from Middleware_HOME/modules/net.sf.antcontrib_1.1.0.0_1-0b2/lib to the ANT_HOME/lib folder .Then Retry, it should go through smoothly.It needs to be in the classpath so that these properties or xml files and dependent class files are available to the ant.

Issue#2 :- During the Deployment phase there are chances that initial ear deployment may time out. In case you face such an issue increase the timeout value in the server. Since time-out is coming in the ear deployment increase the time-out value at the weblogic domain level.

Error StackTrace

[wlst] Deploying application from AIA_HOME/Infrastructure/Install/applications/AIAHomeApp.ear to targets soa_server1 (upload=true) ...

[wlst] <Jun 2, 2010 6:00:33 AM IST> <Info> <J2EE Deployment SPI> <BEA-260121> <Initiating deploy operation for application, AIAHomeApp [archive: AIA_HOME/Infrastructure/Install/applications/AIAHomeApp.ear], to soa_server1 .>

[wlst] You have an edit session in progress, hence WLST will not

[wlst] block for your deployment to complete.

[wlst] Started the Deployment of Application. Please refer to the returned WLSTProgress object or variable LAST to track the status.

[wlst] Activating all your changes, this may take a while ...

[wlst] The edit lock associated with this edit session is released

[wlst] once the activation is completed.

[wlst] Traceback (innermost last):

[wlst] Exception in thread "main" java.lang.IllegalStateException: Traceback (innermost last):

[wlst] File " AIA_HOME/Infrastructure/Install/AID/lib/py/deployApplication.py", line 39, in ?

[wlst] File "<iostream>", line 376, in activate

[wlst] File "<iostream>", line 1848, in raiseWLSTException

[wlst] WLSTException: Error occured while performing activate : Error while Activating changes. : Timed out waiting for completion

[wlst] Use dumpStack() to view the full stacktrace

Solution

Timeout can be configure in 2 ways on Weblogic domain level .Either it can be done from the console or else from backend by editing the configuration file.

a) Edit the config.xml @ Middleware_home\user_projects\domains\SOADomain\config folder

XML Snippet –config.xml

<?xml version='1.0' encoding='UTF-8'?>

<domain xmlns="http://xmlns.oracle.com/weblogic/domain"

……………..>

<name>soa_domain</name>

<domain-version>10.3.3.0</domain-version>

<security-configuration>

…………..

</security-configuration>


<jta>
<timeout-seconds>600</timeout-seconds>
</jta>

<server>

…

</server>

</domain>

b) Configure the value from weblogic console

Select Services > JTA

Select JTA tab

Change the parameter: Timeout Seconds

That’s it for the day. Have fun. :)

Tuesday, May 4, 2010

Oracle AIA Highlights: Oracle Announces Oracle® Application Integration Architecture (AIA) Foundation Pack 11gR1

The AIA 3.0 release has been rechristened as 11gR1 as Oracle wants to align the AIA releases to go with the Fusion middleware releases. Happy to see that finally it got released

Read Oracle Press Release for more : http://www.oracle.com/us/corporate/press/068339

Monday, April 12, 2010

Multiple Source Transformation in BPEL

There will be many instances in your project where you will be having requirements to transform data from multiple sources into a single destination. An example scenario will be the need to do selective data enrichment (from a different source) to a collection of existing records. Currently multiple source transformations are not supported out of the box in 10g. Only single source can be mapped to single destination. As always there is a workaround for every problem. I will list down the steps for the workaround .In one of my previous blog that I had written on Payload splitting using XSL uses similar steps.

There is a pre-requisite for this, a schema. In case you are using AIA below is the location

<xsd:import namespace="http://schemas.oracle.com/service/bpel/common" schemaLocation="http://<hostname>:<port>/AIAComponents/UtilityArtifacts/bpel-common.xsd" />

Or else you have create your own custom XSD

Code Snippet :: Custom schema - Param.xsd

<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"

xmlns:p="http://schemas.oracle.com/service/bpel/common"

xmlns="http://schemas.oracle.com/service/bpel/common"

targetNamespace="http://schemas.oracle.com/service/bpel/common"

elementFormDefault="qualified">

<xsd:element name="parameters">

<xsd:complexType>

<xsd:sequence>

<xsd:element name="item" minOccurs="1" maxOccurs="unbounded">

<xsd:complexType>

<xsd:sequence>

<xsd:element name="name" type="xsd:string"/>

<xsd:element name="value" type="xsd:string"/>

</xsd:sequence>

</xsd:complexType>

</xsd:element>

</xsd:sequence>

</xsd:complexType>

</xsd:element>

</xsd:schema>

1. Initialization

Create a Variable Params which should be of type parameters(Refer Param.xsd)

2. Assign XML fragment mentioned below to the parameters

Code Snippet :: XML fragment in Assign

<assign name="AssignXMLFragment">

<copy>

<from>

<common:parameters xmlns:common="http://schemas.oracle.com/service/bpel/common">

<common:item>

<common:name>InputDataFromSource2</common:name>

<common:value/>

</common:item>

</common:parameters>

</from>

<to variable="Params" query="/common:parameters"/>

</copy>

</assign>

3. Read the data from second source using a ora:getContentAsString() function into the InputDataFromSource2 parameter

Code Snippet :: Assign in .bpel file

<assign name="AssignDataFromSource2To Params">

<copy>

<from expression="ora:getContentAsString(bpws:getVariableData('InputSource2Msg','InputParameters','/ns12: InputParameters'))"/>

<to variable="Params" query="/common:parameters/common:item[common:name=' InputDataFromSource2']/common:value"/>

</copy>

</assign>

4. Now we will use transformations leveraging the feature of Passing Parameters into XSLT. We will pass the data in Params variable as the 3rd parameter so that it can be accessed in the XSL

Code Snippet :: Assign in .bpel file

<assign name="MultipleSourceTransformation">

<copy>

<from expression="ora:processXSLT('Xform_From_Two_Sources.xsl',bpws:getVariableData('inputVariable','TestInABM','/ns8:'TestABM'),bpws:getVariableData('Params'))"/>

<to variable="outputVariable" part="TestOutABM”/>

</copy>

</assign>

5. Inside the XSL we will be accessing the Param data using xsl:param tag . The entire data will be available in the InputDataFromSource2 parameter. We will use orcl:parseEscapedXML function to convert the string data into proper XML format.

Code Snippet :: .xsl file

<xsl:stylesheet>

………………………………

…………………………………

<xsl:param name="InputDataFromSource2">

<xsl:text disable-output-escaping="yes"><test:InputSource2Msg

xmlns:test="http://xmlns.geo.com/test/"/></xsl:text>

</xsl:param>

<xsl:variable name="Source2Data"

select="orcl:parseEscapedXML($InputDataFromSource2)"/>

6. After step 5 the data in XML format will be available in Source2Data variable which can be used as any other variable definition and all child elements can be accessed using this variable.

Code Snippet :: .xsl file

…………………………………

<geo:FirstName>

<xsl:value-of select=”$Source2Data /test:inputData/test:First_Name"/>

</geo: FirstName >

That’s it.. Compile and deploy. You will be able to access the data from different sources in same XSL.

Friday, April 9, 2010

AIA FP and PIP installation issues with Oracle Service Registry

AIA FP and PIP installations are always tricky and can throw up different issues in different environments. For one of the clients we had successfully completed the AIA PIP installation but there were couple of build scripts which had failed due to certain environment issues.

All the BPEL/ESB processes that are part of AIA will be plugged in with a feature to enable CAVS testing. This helps in doing individual testing of the processes developed to form part of a PIP. So all the processes will have routing to the CAVS, which will be a generic WSDL. The EBS services that come with PIPs (ESB processes) will be shared among different business process flows. So depending on the PIP that you deploy the Routing rules gets added at a PIP specific installation.

For all these routing rules to be added it becomes mandatory to have all the endpoint up and running, and since CAVS URL is one among them, it also needs to be available at time of installation.

CAVS ESB is referring to the wsdls inside the AIAApplication.ear, but the AIA app urls were not accessible even though AIAApplication was up and running.

The context in the urls refered in CAVS ESB(

(eg: http://:/AIAValidationSystemServlet/asyncrequestrecipient?wsdl).

) was AIAValidationSystemServlet and the search for this context directed us to AIAApplication.ear .

As a workaround we redeployed the AIAApplication.ear and all the wsdls became accessible. But once the server gets restarted the AIA app urls become inaccessible.

AIAApplication was not starting up even though the application was deployed.

The workaround didn’t work for long. So finally we had to zero in on the issue to solve it.

This issue is with having registry.ear and AIAApplication.ear together .There seems to be a conflict in starting these applications together due to shared resources of different versions being used by both applications. So as a workaround we modified the order in which the applications are loaded at server startup.The entries were modified in server.xml and default-web-site.xml with AIAApplication entries above the registry entries.

Friday, March 5, 2010

Best practices on XSL Transformations-AIA PIP Customizations

Siebel CRM Integration Pack for Oracle Order Management: Order to Cash 2

In the recent past the hype on AIA has reached a new high than compared to the past few years when the idea was conceived and implemented. The AIA PIP’s have matured a lot coming from 2.1 to 2.5.

In today’s write-up, I will be focus more on the Transformations involved in the PIP flows. Since PIPs needs to be configured for each customer requirement, there will be some customizations involved like custom mapping to be done from ABM to EBM to ABM. To cater to this need AIA provides the Custom XSL feature which will be part of all the processes. This is achieved by embedding Call Custom Template tags under each category.

The PIPs developed till date may not have completely complied with all the standard practices. I will familiarize you with the practices Oracle have followed in couple of PIPs namely Design to Release, Order to Cash and MDM Product PIPs.

I will first go with my favorite one.

D2R PIP

On Agile Requestor side, the artifacts particularly the transformations (both main and Custom XSL) are accessed from the server repository.

In case of Ebiz Provider process, only the custom transformations are accessed from the server repository. The main XSL will be embedded with the process. The selection between main XSL and custom XSL is decided based on a property defined in AIA Configurations file.(code snippets below will give you a better idea)

The main difference between both sides is that on Agile side mappings on both XSL files will be used for mapping where as in the case of Ebiz there is always a option to decide whether to use either main XSL or custom XSL. Both XSL’s can also be used (similar to Agile) in conjunction as call template feature to custom templates are embedded in the Main XSL.

Ebiz Main XSL

<xsl:template match="/">

<xsl:choose>

<xsl:when test="aia:getServiceProperty('{http://xmlns.oracle.com/ABCSImpl/Ebiz/Core/CreateEngineeringChangeOrderListEbizProvABCSImpl/V1}CreateEngineeringChangeOrderListEbizProvABCSImpl','CUSTOM.TRANSFORMATIONS.EBM_TO_ABM',false())='true'">

<xsl:call-template name="Custom" />

</xsl:when>

<xsl:otherwise>

<db:InputParameters>

</xsl:otherwise>

</xsl:choose>

</xsl:template>

AIA configurations file

<ServiceConfiguration serviceName="{http://xmlns.oracle.com/ABCSImpl/Ebiz/Core/CreateEngineeringChangeOrderListEbizProvABCSImpl/V1}CreateEngineeringChangeOrderListEbizProvABCSImpl">

<Property name="CUSTOM.TRANSFORMATIONS.EBM_TO_ABM">false</Property>

<Property name="CUSTOM.TRANSFORMATIONS.ABM_TO_EBM">false</Property>

……………………….

……………………….

</ServiceConfiguration>

If the CUSTOM.TRANSFORMATIONS.EBM_TO_ABM parameter in AIA properties file is set to true it will completely skip the main XSL file and use the Custom mapping file. You will need to do all the mapping in the custom XSL as the main XSL is skipped.

O2C flow & MDM Product Flow

This looks like one of the earliest PIP’s developed as no standards for the transformations has been followed. All the XSL’s (main XSL and Custom XSL) are tightly couple to the process .So any customizations on these XSL’s have to be done inside the BPEL_HOME/domains/default/tmp folder.

Best Practices

  • In AIA all the artifacts including ABO, EBO, ABM, EBM XSD’s and EBS WSDL’s are supposed to be placed in a common server location (ORACLE_HOME\ Apache\Apache\htdocs\AIAComponents) and accessed via the server host URL –http://serverhostname:port/AIAComponents.
  • All the transformation files (mapping XSL files) should be uploaded in the Apache location and participating processes must be independent of any XSL files. The most common customizations that will be done on pre-integration packs will be adding new custom fields and new mappings. If all these objects are referred from a location outside the process the impact to the processes due to changes can be kept to minimum.
  • A property in AIA configurations file should be used to decide whether to use either main XSL or custom XSL. It will help us in isolating all the mappings to a single file instead of looking around in both the XSL to figure out an issue.

That’s it for today. Special thanks to Sandhya, Nikhil, Anil and Rajesh for their inputs.

Wednesday, February 24, 2010

How to use the UserExit/extensions feature in AIA

Agile EBS PIP Guide 2.5


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. AIA PIPs comes with this feature of user exits built in to the integration process flow which makes it easier to add custom processes at different points to cater to the different requirements of the client without touching the core business flow of the PIP. This blog explains on how to use user exit feature in case you have a requirement to create a custom functionality not supported out of the box by PIP.

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 ABM to EBM.( PreProcessABM )

· invocation of Enterprise Business Service.( PreProcessEBM )

· Execution of transformation of EBM to ABM. (PostProcessABM)

· invocation of callback service or response return.( PostProcessEBM)

And on Provider side prior to

· execution of transformation of EBM to ABM. ( PreProcessABM )

· invocation of Application Service. .( PreProcessEBM )

· execution of transformation of ABM to EBM. (PostProcessABM)

· 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 AIA config file.

I will take you through different steps involved in activating and using User Exits. Here I will explain based on ECO sync scenario on the Agile-EBIZ PIP.

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.

  1. 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

http://<host_name>:<port>/AIAComponents/ExtensionServiceLibrary/Agile/ProcessEngineeringChangeOrderAgileReqABCSExtConcrete.wsdl

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 URI

<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 AIA related configuration XMLs.

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.