Sunday, August 26, 2012

#197 Oracle Fusion CRM - Web Services part 1

Here is a short intro to FCRM web services, one of the main integrations points for Fusion Apps.
A previous post covered the Fusion Apps Repository which details which services are available.
Please see http://niallcblogs.blogspot.de/2012/07/fusion-apps-enterprise-repository.html

Let's take it from there...
The post covers basic get and create functionality and also details how to leverage FSM to find lookup values for web services call. A big thank you to my colleagues AngeloS and ChrisV for the latter! 

In the following scenarios I am using the CustomerInteraction Service.


Notice the Keyword External - If you are doing 3rd party integrations with Fusion Apps, make sure you leverage services with the Keyword: External. A good explanation for this keyword etc. can be found at http://rraheja.wordpress.com/2012/08/13/five-qs-fa-ext-webservices/

Import the WSDL into your tool of choice - this could be, for example, Oracle JDeveloper - HTTP Analyzer or some other tool such as SOAP UI.


Here you see 2 sections - callbacks and requests.

We will concentrate on the request operations.




The 2 GET operations are get and find

findInteraction - will return all interactions, if no search criteria is specified.
getInteraction - will return 1 particular CustomerInteraction object. The key – InteractionId, is the required input.


This is the general modus operandi for all Fusion Apps web services.
Here is a sample test of findInteraction with no search parameters specified.



















Request -


















Response -


































Ok, so let's do a find - using one of the InteractionIds returned.




Request payload -









Very intuitive!
Deja vu for those used to working with ADF BC Service Interfaces!

How about the createInteraction operation?

Let's begin by looking at the customer in the FCRM app.



Here are the current interactions -












I get the following dialogue when I click the create button on the UI -
















So the web service call will have to include essentially the same information.

But let's take Type - how do I know which types are available?
We could extrapolate from the create UI above, however you should do the following -

Go to FSM (Functional Setup Manager)


























Click on Go to Task
(please expand image, if you do not see it!)











Click on ZMM_INTERACTION_TYPE
















So Meaning is what we see in the UI.
Lookup Code is what we must enter in the web service call.

createInteraction request payload

















More later...


Tuesday, August 21, 2012

#196 Oracle Fusion CRM Application Composer - Creating Links

I've started doing some extensibility work with Fusion CRM Application Composer.
Great tool - wizard/meta-data driven.

To quote the official guide -

The Oracle Fusion CRM Application Composer is a browser-based configuration
tool that enables business analysts and administrators, not just application
developers, to customize and extend an Oracle Fusion CRM application. Make
the type of data model changes which, for non-CRM applications, can only be
made by application developers. For example, easily create a new object and
related fields, then create new Enterprise pages where that object and its fields
are exposed to users. The Application Composer is a design time at runtime tool,
which means that you can navigate to the Application Composer directly from
a CRM application, make your changes, and see most changes take immediate
effect in real time, without having to sign back in to the application.


So what does it look like?


Now in this simple scenario, I want to add a link to Google on the Customer/Sales Account Details page. Customer is naturally an important business object within Fusion CRM. There are a standard set of UI Pages that can be used to interface with it.


 So here we see links to configure Overview/Creation/Details pages. Very intuitive!

There is also a menu option - Action and Links. Here I create my link.



  The Groovy expression used is very simple -

PartyUniqueName is a field on the Details page that I want to pass to Google.

Now that my link is created, I just need to add it to the Details page







Then call up the Customers app to test



Select a Customer and open the details page


Click on the Google link - Google the Customer






Tuesday, August 14, 2012

BPM 11g - aggregating orders example

Scenario: Customer places an order, it is processed within 2 hours.
If in the meantime the customer orders more goods these will be added to the original order.

So I considered the following approach -

2 processes - OrderEntry and OrderShipping.

In this post I look at the OrderEntry process

I decided to use a simple DB table TEMP_ORDERS to flag orders in process. So the first step in my OrderEntry process is to check if there is already an open order for this customer.

I use the DB adapter (OrderListSelect) here.


Now the first challenge is how to process the output from the DB adapter.
The first time we call this for, let us say, Order123, the order does not exist.

So the DataOutput mapping I chose was -


I created a process Data Object v_orderExists (type boolean)

The From above:
boolean(bpmn:getDataOutput('tempShippingCollection')/ns:TempShipping[1]/ns:customer)

v_orderExists is then used in the Exclusive Gateway condition.

More soon...