Monday 28 September 2020

Extracting Multiple Nodes from Hierarchy - Working with XSL Transformation

 Hello All, 

Recently i was working on a integration where i was getting multiple errors in case of failures.

I was first planning to use FINS Industry XML service for the Error property extraction or Workflow Utility Echo, but these business services have limitations that they can only get one Node/Process Property from the hierarchy. i.e. return the first matching node in case multiple child are present at same level .

In the below XML if we try getting the Value of Error Code, using any Siebel provide vanilla business service ,we will only get "ErrorCode:500" and not the other nodes.







so, to get multiple Node we need to write custom Business Service that traverses the Hierarchy and do looing, that can be a bit confusing and requires multiple looping.

SiebelMessage.GetChild(0).GetChild(0).GetProperty("ErrorCode"); 

here, SiebelMessage.GetChild(0) is the IO instance

SiebelMessage.GetChild(0).GetChild(0) is the IC Instance

SiebelMessage.GetChild(0).GetChild(0).GetProperty("ErrorCode") is the location of process property we need to extract

XSL to the Rescue :-)

Well not a traditional approach, but yes we can use XSL for the multiple Node extraction, and that too without writing a custom BS. The code is pretty simple and can get to any level of hierarchy.

Below code Searches for ErrorCode and ErrorMessage under XMLResult/ErrorDetails path and uses for-each loop to iterate and get the values 





the final Result looks like, 

ErrorCode: 5002 ErrorMessage: The JSON value could not be converted to System 

ErrorCode: 5003 ErrorMessage: The Total value cannot be Negative. 

ErrorCode:5004 ErrorMessage: The Taxes must be passed in Input


I will share more details on how to use this in workflow in my next post, till then happy exploring

Sunday 27 September 2020

Siebel Integration: Search Spec in Data Maps

 Hello All, 

Recently i had a requirement where i had to pass some data over Outbound web service. There was a challenge that required me to pass data of a particular type only from the input data. i.e. The master data has Orders of Type A and Type B and i had to send only Type A Orders.

To achieve this there are multiple way but the best possible i found was Data Map SeachSpec.

This is very simple yet powerful approach for filtering the records.

Sample Data Map:

We need to put the Expression in Source Search Spec and the filtration will be done .
We can pass Expression like [Field] IS NULL, [Field]="TypeA", [Field]>Created etc.








Try and share your experiences.

Disabling Copy Paste in Siebel Fields

 Hello All, 

Recently i had a requirement where i had to Disable Copy Paste on a particular field, to force user to Open Pick Applet rather then directly entering the value for some performance issues.

This is very simple to achieve if we use Open UI, and below piece of code can be used for the purpose.


$('[aria-label="Account"]').bind('copy paste cut',function(e) {

e.preventDefault();

alert('cut,copy & paste options are disabled on this Field!!');

});

Error Popup:




Sample PR File:










Hope this was helpful.

to extend this to List applet please follow the Post

http://www.siebelfoundations.com/2020/10/disabling-copy-paste-in-siebel-fields.html

Siebel GoTo View - Handling Realtime cases

 Hello All,  We all must have used GoTo view functionality of siebel to navigate to a particular view from current view. What if the require...