Tuesday, October 22, 2013

SOA AIAAsyncErrorHandlerBPELProcess Email Requirements

SOA AIA Error Handling

Error handling in SOA using  AIA Foundation pack. 
Exception handling in SOA can be achieved by calling  AIA FP OOB’s AIAAsyncErrrorHandlingBPELProcess.
AIAAsyncErrrorHandlingBPELProcess can be invoked in 2 ways.
1.       Using  fault policies
2.       Directly invoking  AIAAsyncErrrorHandlingBPELProcess from Catch Activity.

Using Fault Policies


Steps involved in using  fault policies.
1.       Add “EBM_HEADER” variable and populate “ EBM_HEADER “variable.
<variable name="EBM_HEADER" element="corecom:EBMHeader"/>
This variable is used in populating the  “FaultNotification”  element of AIAAsyncErrorHandlerBPELProcess, when invoked by fault policies.

Find the sample XSL used to populate EBM_HEADER


2.       Define a fault policy for the BPEL process and bind the process with this policy in fault-bindings.xml.
We can use specific fault policy for each process and store then in project directory or MDS.
We can use a Generic fault policy with covers standard exceptions and use the same in all BPEL processes. This policy has to be stored on MDS.

<property name="oracle.composite.faultPolicyFile">oramds:/apps/cfa/payroll/faultPolicies/fault-policies.xml</property>
    <property name="oracle.composite.faultBindingFile">oramds:/apps/cfa/payroll/faultPolicies/fault-bindings.xml</property>

3.       Populating FaultNotification element of AIAAsyncErrorHandlerBPELProcess’s Request message
Make sure “EBM_to_Fault.xsl” is in place in ‘XSL’ folder in project directory.  Fault polices  use this is transformation file to populate the notification message..

<from expression="ora:processXSLT('xsl/EBM_to_Fault.xsl',bpws:getVariableData('EBM_HEADER'))"/>                        <to variable="AIAAsyncErrorHandlingBPELProcessRequestMessage" part="FaultMessage"                             query="/corecom:Fault"/>
               
Above code is executed by fault policies to populate the FaultNotification Message.  SO EBM_HEADER variable and EBM_to_Fault.xsl are expected.
4.       Define catch and catchall blocks in BPEL process.

CompositeJavaAction in fault policies rethrow the error after the specified action. BPEL process catches that exception to show as faulted in EM console.  So we need to create separate Catch blocks for the exception conditions specified in fault policies.





Directly invoking AIAAsyncErrrorHandlingBPELProcess from Catch Activity.


  For Invoking  AIAAsyncErrrorHandlingBPELProcess directly from catch and catchall blocks, we can follow the steps as mentioned above or we can directly populate all the  elements in Catch or catchall blocks.
1.       Invoke AIAAsyncErrrorHandlingBPELProcess from Catch block.
2.       Populate atleast below elements in the Request message body
1.       CompositeInstance ID
2.       BPEL Process Name
3.       Payload Key (  Location number, employee number)
4.       TimeStamp
3.       Once the AIAAsyncErrrorHandlingBPELProcess has been invoked. Rethrow the exception, so that process appears as faulted in EM console

Tuesday, March 26, 2013

HOW TO CREATE USERS IN BAM


HOW TO CREATE USERS:

Oracle SOA Platform – BAM (Business Activity Monitoring) - Version: 11.1.1.3.0 and later   [Release: 11gR1 and later ]
Information in this document applies to any platform.
Goal

How to create specific users with roles in BAM so that users can see only view or create the report and not act as Administrators?


Solution

Enterprise Manager manages the Application Policies for Oracle BAM.

It is pre-configured with 4 roles for Oracle BAM application:

Administrator: Has access to all features
Report Architect: Has access to features for creating data objects and reports
Report Creator: Has access to features for creating reports
Report Viewer: Has access to features for viewing reports


Create a User and a group in the Weblogic Console by following the steps provided in the following document:

Oracle Fusion Middleware Oracle WebLogic Server Administration Console Online Help
11g Release 1 (10.3.5)
Part Number E13952-05, Section "Managing Users and Groups"

Assign the user this group
Open the Enterprise Manager start page in your web browser
Click on BAM / OracleBAMServer
Right Click on OracleBAMServer / Security / Application Policies
Click on the blue button next to the text box labeled permission to view the pre-configured polices:
Right Click on OracleBAMServer / Security / Application Roles
Click on the same blue button next to Role Name to view the pre-configured Roles
Click on a RoleName e.g. ‘Report Viewer’
Click on the green Plus sign Add Role under Members
An Add Role dialog box appears. Select Group in the Role Type and click the blue-green arrow button
This will show all the Groups created in WebLogic Console
Select the group that should be assigned to the role (e.g., the group created in step 1) and move it to the Selected Roles list
Click Ok.