SOA 12c – Error while processing audit information. failure due to exception fetching audit xml

While testing in SOA EM Console, if you get below error message for audit trail on launch of flow trace instead showing the actual flow it means that the flow message size is bigger than the default value which is set to 1048576.

Error Message: Error while processing audit information. failure due to exception fetching audit xml

So to view the flow, all you need to do is increase the default size given for audit trial. To do that follow below steps.

Right Click on your node server -> SOA Administration -> Common Properties -> More SOA Infra Advanced Configuration Properties (bottom link) -> Click on ‘Audit Config’ attribute from the list -> Increase the value (eg: 10485760) -> Apply.

This slideshow requires JavaScript.

Hope this is helpful.

Advertisements

Invoking Oracle Fusion Cloud REST services from SOA-CS

In this post I’ll brief about how we can trigger Oracle Fusion ERP Cloud REST services from Oracle SOA-CS.

Let’s take a requirement that to update a fusion cloud database table record. As we aware we won’t have access to cloud database and the only option left to us is making use of REST services provided by oracle.

So let’s go with the specific requirement that to update Expenditure Items table (pjc_exp_items_all). Simply search with the table name in google, you’ll get complete details about the table and columns in it.

This table belongs to Project Portfolio Management, so to search for any REST services available to update tables related to this, go through below Navigation.

Google -> Search for OER (Oracle Enterprise Repository) and open the site -> Select ‘Project Portfolio Management’ tab -> Under ‘Tables & Views’ category, select latest release (Release 13 Update 17b  by the time this post is blogged) -> In the left under REST API click on Project Portfolio Management -> In the page you can see all the available APIs.

Direct link for the same: https://docs.oracle.com/en/cloud/saas/project-portfolio-management/r13-update18a/fapap/api-Expenditure%20Items.html

There select the Expenditure Items API, you’ll be able to see all the methods, select required method (In our case select method ‘PATCH’ which is used to update an expenditure Item) .

Now in the page copy the path to be used for the method to invoke /fscmRestApi/resources/11.13.17.11/projectExpenditureItems/{ExpenditureItemId}

And In the examples, check the sample request and response, which we use to build our schema for input to the REST service.

1.png

Now let’s go into the development.

  • I’ve created a SOA project with BPEL (service defined later).
  • In the BPEL, first let’s create a Schema for the REST service. Make sure the schema attribute names must match with the attribute names given in the sample request, response.

4.PNG

  • In the schema two elements are created one is the primary key of table (ExpenditureItemId) and the other is updatable attribute (ExternalBillRateSourceName) in the cloud table (not all attributes are updatable).
  • Create REST service in the composite file and right click on it and ‘configure SOA WS policy‘ add security policy [oracle/wss_http_token_client_policy] and edit the policy, set csf-key (e.g: CW-key)
  • Put an Invoke activity in BPEL and call the REST service. In the Invoke add properties as given below.

[rest.binding.http.X-HTTP-Method-Override = ‘PATCH’,  rest.binding.http.Accept = ‘application/json’]

  • Create Assign activity and map the required values to the REST input variable.

This slideshow requires JavaScript.

Result: So if you pass ExpenditureItemId, ExternalBillRateSourceName values to REST service, it’ll update the  attribute ‘EXT_OVRD_BILL_RATE_SOURCE_NAME’ with the value coming from ‘ExternalBillRateSourceName’ for the already exist record with given ExpenditureItemId in the ‘pjc_exp_items_all’ table.

Reference (more details about security): http://www.ateam-oracle.com/invoke-fusion-cloud-secured-restful-web-services/

Hope you enjoyed the post!

Translation Error while doing Transformations in SOA

In the Transformation file (.xsl) we map source variable attributes to destination variable attributes.

Let’s say out destination is DBAdapterWriteInputVariable which has 25 columns. In the Transformation file if you map only 15 columns from source to destination (DBAdapterWriteInputVariable) and left the remaining 10 attributes as blank, then at the Transformation step of composite you’ll get this Translation error. This error is because target system is expecting values with respect to its defined schema (25 values) but the transformation file doesn’t map all the values according to the schema (only maps 15), so the error come here.

So all you need to do is, though you are not assigning any values to few attributes, they must be declared (present in source code of XSL file) like <attribute7/> having no value.

To declare them right click on each attribute in design mode which is not present in Source mode, and click on Edit Text and Enter (No need to give any value), so that attribute declaration will be saved which you can see in the source mode.

SOA_TranslationError.png

Hope this is helpful!

View the Job Details and run the jobs manually in Oracle Fusion Cloud Application

This post will be helpful in providing the navigation to find the job details and run them from the oracle cloud fusion application. As an example in this post I’ll show the FBDI (File Based Data Import) job details which is much used in real time.

Navigation to view the Job details:

  • Login to Oracle Fusion Cloud Application
  • Click on ‘Setup and Maintenance’ Icon from the home page.
  • Select the required Module from left drop down (Financials)
  • Search with the keyword ‘Manage Custom Enterprise Scheduler Jobs’
  • Select the link ‘Manage Custom Enterprise Scheduler Jobs for Financial and Supply Chain Management and Related Applications’
  • Search with the required Job in the Name column search box (or) in the Display Name column. [search with ‘Load’ keyword in Display Name column search box]
  • Select the required Job from the list and and view the Job details (You can see details like Job Name, Display Name, description, job path, job execution type (Java/ PL SQL/ Process). Using the options provided in the top you can ‘Edit’ the job, ‘Duplicate’ this job, ‘Export to Excel’.

This slideshow requires JavaScript.

Navigation to Run the Jobs:

  • Go to the Home page and click on Tools -> ‘Scheduled Processes’
  • Click on ‘Schedule New Process’, which will open a popup.
  • Click on ‘Search..’ link under Name drop down.
  • Search with the required job ‘Load Interface’ and select the job name ‘Load Interface File for Import’ from the list.
  • Basically this job will take the data file (FBDI CSV File) and executes the jobs which we select like ‘Import Projects Billing Events’ job. So the billing data which we upload will be moved to the Project billing events Interface table and from there they’ll be moved to the base tables [means billing events will be created in the cloud application]. This is how we can move the data to oracle cloud application.
  • Select the Import Process ‘Import Projects Billing Events’ and upload appropriate FBDI file and Submit the job.

This slideshow requires JavaScript.

Hope you like the post!

Customization in Oracle Fusion Cloud Application.

Fusion applications support to do Customizations at run time and these customizations are called ‘Run time customizations‘ (DT@RT/ design time at run time) using webbcenter composer tool. These are ADF page meta customizations, generally performed by Business Administrators. These customizations are directly stored into runtime MDS repository (tables), hence runtime loads them immediately without any application downtime for deploy/import.

Eg: In an Orders page, if you want to hide the ‘Create Order’ button based on some condition like based on the role of user logged in, this can be achieved by customizing the page’s Create Order button and setting its property ‘disabled‘ like given below
#{securityContext.userInRole[‘MANAGER_ROLE’]} [This means user’s who have the role ‘MANAGER’ role they can only create the order.

Generally to do these customization you need to create a sandbox first and then activate that sandbox, navigate to the required page where customization is planned to perform, then click on user’s drop down menu and click on ‘Customize pages’ link and then click on ‘Structure’ tab -> Hover the mouse on ‘Create Order’ button and click on Edit -> Set the disabled property as required.
The detailed step by step process is given below.

  • Login to Oracle Fusion Cloud Applications.
  • Click on user’s drop down and click on ‘Manage Sandboxes’.
  • Create a new sandbox and activate that sandbox.
  • Once you activate the sandbox, you can see the activated sandbox name in the top of the page. You can click on it anytime to exit from the sandbox.

This slideshow requires JavaScript.

  • Click on Order Management from the Home page or navigator menu.
  • Click on user’s drop down and click on ‘Customize Pages
  • Navigate to the ‘Structure‘ tab and click on the ‘Create Order‘ button, a popup will be hovered where click on Edit button.
  • You’ll be able to see a black strip in the bottom of the page, click on it and drag it upwards and click on Edit icon which will opens a popup where all the properties of the create order button are displayed.

This slideshow requires JavaScript.

  • Select Disabled property and click on Override, which will then shows a blue dot which means this property is customized and at any time by clicking the ‘Reset’ option we can reset it to the original setting.
  • Select the ‘Expression Builder’ button and give the EL (expression language) condition like given below.
    #{!securityContext.userInRole[‘MANAGER_ROLE’]}
  • Click on Apply and OK buttons and close the popup. Close the the composer by click on close button at top right of the page.
  • Now login to the Fusion Applications with the manager credentials who have the role (MANAGER_ROLE) mapped to him and navigate to the Orders page, where ‘Create Order’ button is visible and enabled to the user. [make sure the same sandbox is activate before testing]
  • Now login to the Fusion Applications with non-manager credentials who have not mapped to the role (MANAGER_ROLE) and navigate to the Orders page, where ‘Create Order’ button is disabled to the user. [make sure the same sandbox is activate before testing]
  • Click on sandbox name which appear in the top of the page and Exit from the sandbox. Once your customizations are completed click on user’s drop down and select ‘Manage Sandboxes’ and select the sandbox and click on Publish. Once this is performed all the customizations done in the sandbox will be moved to the root application.

This slideshow requires JavaScript.

 

Best Practice: Always exit from the sandbox after your customization work is completed.  Publish only when you customization work is completed.

References: For EL (https://cdn.app.compendium.com/uploads/user/e7c690e8-6ff9-102a-ac6d-e4aebca50425/f4a5b21d-66fa-4885-92bf-c4e81c06d916/File/b28ce781c5fd97d3066e8a5d1bc0574e/elfusionapps.pdf)

 

Hope you like the post 🙂

WSDL File

Web services have a description language known as WSDL, which is used to describe in a nutshell what the web service does and gives the client all the information required to connect and use the web service

There are two types of WSDL files, They are Abstract WSDL, Concreate WSDL.

Abstract WSDL will be created at design time where as Concrete WSDL will be created after the deployment. Concrete WSDL includes <Binding> and <Service> elements which are not present in abstract WSDL.

WSDL Elements:

  • wsdl: types
  • wsdl: message
  • wsdl: portType
  • wsdl: binding
  • wsdl: service

10

Types: Defines the (XML Schema) data types used by the web service. eg : Employee XML element data type is defined under types.

Messages: Defines the data elements for each operation. eg CreateEmployeeRequest , CreateEmployeeResponse.

PortType: Defines the operations (functionalities) and messages that this web service provides. Eg. Operation – createEmployee , input – CreateEmployeeRequest, Output – CreateEmployeeResponse  is defined in this section.

Binding: Defines the protocol and data format. SOAP binding of the webservice is providing here. Other bindings are ftp, jca etc..

Service: Provides the location (endpoint) where this service is available. https://soadev.orgA.com/services/EmployeeService

Sample WSDL File:

11

 

SOAP and REST

This post covers features of SOAP and REST and basic differences between them.

SOAP

REST

  • SOAP stands for Simple Object Access Protocol
  • It is an XML based web service
  • Adds a layer on top of the application protocols. HTTP is the widely used application protocol.
  • SOAP is considered heavy weight as it provides significant pre-build extensibility in the form of the WS* standards through additional layer.

1

  • Request includes HTTP header, SOAP Envelope (which includes SOAP Header, SOAP Body (which includes XML message))
  • As it has additional layer, it supports attaching files in the request which should be in base64 bit format.
  • It provides more security than REST.
  • REST stands for Representational State Transfer
  • REST typically supports all types of text data formats. Widely used formats are XML and JSON
  • Uses HTTP protocol only. No another layer on top of HTTP protocol.
  • REST is light weight as it leverages HTTP transport and uses all HTTP Action Verbs (POST, GET, PUT, DELETE)

2

 

  • Request includes just HTTP header and XML/JSON message.
  • It doesn’t support attachment of files in the request.
  • REST provides security like token based, but comparatively REST security is less than SOAP.

Sample SOAP Request:

A SOAP Message is encoded as an XML document, consisting of an <Envelope> element, which contains an optional <Header> element, and a mandatory <Body> element. The <Fault> element is sub element of Body is used for reporting errors.

5.png

 

SOAP Envelope with SOAP Header.

3

Sample SOAP Response:

6.PNG

Sample REST Request in XML:

7

Sample REST Response in XML:

8

Sample REST Request in JSON:

9

Testing of SOAP/REST web service Requests can be done using SOAP UI tool.