In previous post I mentioned that there are other ways to achieve our requirement. So, I am going to discuss another approach, which involves less scripting (in fact very less) and workflows.
Our invocation method is going to remain the same Named Method n user property but now it will invoke a workflow instead of a business service. Change the value of user property we had created in previous post as below
“LookupCountry”, “INVOKESVC”, “Contact”, “Workflow Process Manager”, “RunProcess”, “‘ProcessName’”, “TestGeoWebService”, “‘IPAddress’”, “[IP Address]”
Now, this user property will invoke a workflow named “TestGeoWebService” and pass value of IP Address field into a workflow process property name “IPAddress”.
Workflow Details:
I don’t really like to put workflow details in article. So, I am just going to explain the steps and purpose of each step that are in workflow.

Create Property Set: Uses PRM ANI Utility Service and CreateEmptyPropSet method to generate a blank Siebel Message-

Set IP Address: Uses PRM ANI Utility Service and SetProperty method to set the IP Address using IPAddress workflow process property 
Set Child Type: This method uses custom BS to modify SiebelMessage header to a header expected by web service (GetGeoIPSoapIn:parameters)
Call Web Service: Calls GeoIPServiceSoap with GetGeoIP method which will internally invoke web service
Change Header Back: Uses PRM ANI Utility Service with SetChildType method to set header of response received to SiebelMessage so that it can be processed by next step
Extract Country Name: Uses PRM ANI Utility Service with GetProperty method to extract the country name from web service response
Update Contact: Uses Siebel Update Operation to update contact BC
You can download the workflow XML and the code for custom business service for your reference.
There are various ways to invoke the workflow such as runtime events, workflow policy etc. I am not going to discus those in this series but I believe there might be one more approach that might help us to eliminate even the small piece of custom code that we have used.
Final approach that I am thinking of using involves Data Maps to get the desired hierarchy but I am not sure if it is going to work.
So, stay tuned for the next posts in this series in which we will discuss the final approach to complete the requirement, the problems I faced during development and how to debug EAI problems.
<< Previous in series Next in series >>

