You are here

How To Add a New Property or Set the Value of an Existing Property in the Siebel Message XML that is Being Sent Out Through a Workflow Process

When you Need to add a property called SessionId to a SiebelMessage header to pass it to an external application. To illustrate this example, the integration uses the EAI XML Write to File business service and writes the XML to a file for easy inspection. In this case, the XML Converter business service is not needed because the EAI XML Write to File business service uses a property set as an input instead of an XML string. This will simplify the workflow process a bit. The workflow process will have 4 steps : Start, Query an Account, Write to File, and End.

  1. Create a new workflow process record called SessionId and define 4 steps, one start step, two business service steps, and finally an end step.
 
  1. Connect each step and rename them as shown above.
 
  1. In the Query an Account step, use the EAI Siebel Adapter business service and Query method.
 
  1. In the Write to File step, use the EAI XML Write to File business service and Write Siebel Message method.
 
  1. Define an additional Process Property on the workflow process with Type = Hierarchy and Name = Accnt Msg.
 
  1. Set the Object Id process property with the value of the ROW_ID of an existing Account in the Siebel database.
 
  1. For the Query an Account step, create the following input arguments:
 
Input Argument
Type
Value
Property Name
Output Integration Object Name
Literal
Sample Account
 
Object Id
Process Property
 
Object Id
 
  1. For the Query an Account step, create the following output arguments:
 
Output Argument
Type
Property Name
Siebel Message
Output Argument
Accnt Msg
 
  1. For the Write to File step, create the following input arguments:
     
Input ArgumentTypeValueProperty NameSequence*
(see note)
File NameLiteralc:\sessionid.xml 1
Siebel MessageProcess Property Accnt Msg2
SiebelMessage.SessionIdLiteral12345 3

 

NOTE From CR 10598825: For Siebel version 8.0, set the Sequence property of the SiebelMessage.SessionId input argument to a value higher than in the Siebel Message input argument,in other words, the sequence of the Siebel Message argument must be lesser in value. Or, create the SiebelMessage.SessionId input argument after creating the Siebel Message argument so that the auto-generated value for the sequence in the SiebelMessage.SessionId is greater than Siebel Message argument.

 

 
The result of this workflow process is that the header of the XML will change from:
 
<SiebelMessage MessageId="" MessageType="Integration Object" IntObjectName="Sample Account">
 
To:
 
<SiebelMessage MessageId="" MessageType="Integration Object" IntObjectName="Sample Account" SessionId="12345">
 
NOTE: One common error with this technique is to use "Siebel Message" instead of "SiebelMessage" as the top-level node. To determine how to name the nodes, view the process property hierarchy values in the workflow process simulator and check the child type value. Check this by clicking on the ellipse in the Process Property Hierarchy control. Examine the properties at each level of the XML by expanding the Child Type control in the parent and then inspect the values in the Property Key control.
 
In this example the child type for the Accnt Msg process property hierarchy is SiebelMessage not "Siebel Message". The node value must be the same as the type value. Expand the SiebelMessage child type and notice the next level node is ListOfSample Account and that the Property Keys control for the SiebelMessage node now includes the SessionId property.
 
NOTE: In Siebel version 7.7 onwards, the workflow process simulator is located in Siebel Tools. Use the Watch window to review the value in the process properties.
 

Scenario 2: Using the same workflow process, need to set a value for the MessageId property in the SiebelMessage header.

 
In the Query an Account step, add the following input argument:
 
Input Argument
Type
Value
MessageId
Literal
ABCDE
 
The result of this workflow process is that the header of the XML will change from:
 
<SiebelMessage MessageId="" MessageType="Integration Object" IntObjectName="Sample Account" SessionId="12345">
 
To:
 
<SiebelMessage MessageId="ABCDE" MessageType="Integration Object" IntObjectName="Sample Account" SessionId="12345">
 
NOTE: If user tries to add a new property to the SiebelMessage header at this point (for example SessionId), the value will not be set. If user tries to add it in the format  SiebelMessage.SessionId the following error is received:
 
Error invoking service 'EAI Siebel Adapter', method 'Query' at step 'Query an Account'.
Next ->
Required message header property 'IntObjectName' is missing or invalid
 

Scenario 3: Need to add a property called SessionId to a SiebelMessage header when using the EAI XML Converter to pass the XML as a string to the transport business service.

 
In this case create a new workflow process with 5 steps  Start, Get Account, Convert to XML, Contact External App, and End.
 
  1. Create a new workflow process record called SessionIdEAIXMLConverter and define 5 steps, one start step, three business service steps, and finally an end step.
 
  1. Connect each step and rename them as shown above.
 
  1. In the Get Account step, use the EAI Siebel Adapter business service and Query method.
 
  1. In the Convert to XML step, use the EAI XML Converter business service and Property Set to XML method.
 
  1. In the Contact External App step, use the EAI File Transport business service and the Send method.
 
NOTE: In the Contact External App step, it is possible to use any transport business service that takes an XML string as an input - the EAI MQ Series Server Transport, the EAI HTTP Transport, etc. The example uses the EAI File Transport business service to illustrate the technique and allow the user to inspect the output easily, but it is possible to use the other transport business services as well.
 
  1. Define two additional process properties on the workflow process:
 
Name
Type
Accnt Msg
Hierarchy
XML
String
 
  1. Set the Object Id process property with the value of the ROW_ID of an existing Account record in the Siebel database.
 
  1. For the Get Account step, create the following input arguments:
 
Input Argument
Type
Value
Property Name
Output Integration Object Name
Literal
Sample Account
 
Object Id
Process Property
 
Object Id
 
  1. For the Get Account step, create the following output arguments:
 
Output Argument
Type
Property Name
Siebel Message
Output Argument
Accnt Msg
 
  1. For the Convert to XML step, create the following input arguments:
 
Input Argument
Type
Value
Property Name
Siebel Message
Process Property
 
Accnt Msg
SiebelMessage.SessionId
Literal
12345
 
 
NOTE: For Siebel version 8.0, set the Sequence property of the SiebelMessage.SessionId input argument to a value higher than in the Siebel Message input argument, in other words, the sequence of the Siebel Message argument must be lesser in value. Or, create the SiebelMessage.SessionId input argument after creating the Siebel Message argument so that the auto-generated value for the sequence in the SiebelMessage.SessionId is greater than Siebel Message argument.
 
  1. For the Convert to XML step, create the following output arguments:
 
Output Argument
Type
Property Name
Message Text
Output Argument
XML
 
  1. For the Contact External App step, create the following input arguments:
 
Input Argument
Type
Value
Property Name
Message Text
Process Property
 
XML
Append To File
Literal
true
 
File Name
Literal
<path to file> for example c:\filetest.txt
 
Is Text File
Literal
true
 
 
The result of this workflow process is that the XML will be written to the file specified in the Contact External App step. The header of the XML will change from:
 
<SiebelMessage MessageId="" MessageType="Integration Object" IntObjectName="Sample Account">
 
To:
 
<SiebelMessage MessageId="" MessageType="Integration Object" IntObjectName="Sample Account" SessionId="12345">
 

Scenario 4: Using the same workflow process as scenario 3, need to set a value for the MessageId property in the SiebelMessage header.

 
For the Convert to XML step, create the following input arguments:
 
Input Argument
Type
Value
SiebelMessage.MessageId
Literal
ABCDE
 
NOTE: For Siebel version 8.0, set the Sequence property of the above argument to be higher than the sequence of Siebel Message argument.
 
The result of this workflow process is that the header of the XML will change from:
 
<SiebelMessage MessageId="" MessageType="Integration Object" IntObjectName="Sample Account" SessionId="12345">
 
To:
 
<SiebelMessage MessageId="ABCDE" MessageType="Integration Object" IntObjectName="Sample Account" SessionId="12345">
 

Scenario 5: Using the same workflow process as scenario 4, need to update the value for the Home Page property of the Account.

 
For the Convert to XML step, create the following input arguments:
 
Input Argument
Type
Value
SiebelMessage.ListOfSample Account.Account.Home Page
Literal
www.test.com
 
NOTE: For Siebel version 8.0, set the Sequence property of the above argument to be smaller than the sequence of Siebel Message argument.
 
The result of this is that the Home Page value of the Account you are passing out through the workflow is set to www.test.com.
 

NOTE: Regarding the format, even though the second node of the SiebelMessage has its XML tag set to ListofSampleAccount, the type shown in the workflow process simulator is ListOfSample Account (with the o in Of an upper case character and a space between Sample and Account) and therefore the input argument must reflect that. Similarly, although the Home Page integration component field in the Account integration component shows the XML tag is HomePage, the property in the simulator shows that the value is Home Page (with a space between Home and Page) and therefore the input argument must reflect that. In general, when listing several records, the prefix ListOf will be appended to the name of the integration object to represent the top-level node name, and then the next level will be defined with the integration component name. If the integration component name is not the same as the integration object then it will have a node with the ListOf prefix as well as a sub-level node with the integration component name (for example ListOfBusiness Address and ListOfContact in the level below the Account node).

Finally, when setting the value of a node element where several records are present, only the first record will have its value updated. If there were several records returned by the Get Account step for instance, only the first one in the list would have its Home Page value updated. For this reason, updating node elements should be limited to those nodes with only one record or the top level node in a group (those with the Type = ListOf<some value>). One other caution is that the workflow step input argument is limited to 75 characters so the names of the integration object, integration component and integration component fields should be kept short if they need to be updated in this type of scenario.