How to read property sets from a XML file
The requirement is to read the XML file from a local drive and read the property sets to perform the following actions:–
1. Count the number of Parent’s in the XML.
2. Count the number of child’s BC associated to each parent.
3. Extract a property of a parent.
4. Extract a property from a child under a parent.
Follow the below steps to implement this requirement.
1. In Siebel Tools, create a new Custom Business Service and write the below code in PreInvokeMethod Event
GetParentAccount – CustomMethod name invoked in the Business Service.
2. Compile the Business Service and run it through the simulator. In the Debug mode traverse through the scripts and see the property sets extracted in the variables.
3. You can use the Siebel.XML for dummy tests as attached in the article below.
Sample XML Screenshots:
The above screenshot shows all parent Accounts in the Incoming XML
The above screenshot shows the properties of the First Account such as AccountId, Account Status, Name. It also shows the list of Child records associated with the First Account
The above method just provides a basic understanding on property sets. Modify this business logic as per your business requirements.