Sunday, September 9, 2012

Business Service to fetch property value for dynamic message

Dynamic Message- Message where certain XML elements might or might not be available.

Assume incoming message might or might not have XML Element "Contact_Business Address"(Contact_undBusiness_spcAddress in xml example shown below). If we have a XML element we need to retrieve the value of attribute "Country" and if its value is USA we need to set it.

We were not able to use "PRM ANI Utility Service" and "Workflow Utilities" business service here as it throws error if XML Element "Contact_Business Address" is not found in the incoming message.

We have used business service to retrieve same. Please find the code written in BS below:

Input of Business Service




if(MethodName=="Execute")
{
            try
            {
                        var PropVal = "";
                        var NumChilds = 0;
                        var psListOfContact = Inputs.GetChild(0);
                        var psContact = psListOfContact.GetChild(0);
                        var psListOfConAddr = psContact.GetChild(0);
                        NumChilds =psListOfConAddr.GetChildCount();
                        for (var i = 0; i < NumChilds; i++)
                        {
                                    var psAddr = psListOfConAddr.GetChild(i);
                                    var Type = psAddr.GetType();
//Check if the type exists then only fetch the value else skip this part.
                                    if(Type == "Contact_Business Address")
                                    {
                                                Outputs.SetProperty("Type", Type);
                                                PropVal = psAddr.GetProperty("Country");
                                                if(PropVal == "USA")
                                                {
                                                Outputs.SetProperty("Country", PropVal);
                                                }
                                    }
                        }
                        return (CancelOperation);
            }
            catch(e)
            {
                        throw(e);
            }
            finally
            {
                        psAddr= null;
                        psListOfConAddr= null;
                        psContact= null;
                        psListOfContact= null;
            }
            return (ContinueOperation);
}

Output of Business Service





Saturday, September 8, 2012

Modifying Control Colors in Siebel


HTML tags are used in “Caption – String Override” property of Control to change the font color, background color, size of font and color of control on mouse over.
Let’s see the following scenarios and how can they be achieved.
  • Login to Siebel tools, Navigate to Applets in OBE.
  • Query for required form applet and select the control where modifications needs to be implemented

Changing the font and size of Control
Syntax: <font face="name of font" size=10 color='blue'> fieldname </font>


Changing the color of control on mouse over.
Syntax: <font onmouseover="style.color='yellow'" onmouseout="style.color='black'">fieldname</font>


Changing the background color  of control
Syntax:  <span style="background-color:green">fieldname</span>
<label style="background-color:green">fieldname</label>

Outcome of Above modifications




Friday, September 7, 2012

EAI MQSeries Transport -Session 1


In the previous post we have talked about HTTP transport in this we are going to talk about the Queue based transport.

In simple words a Queue is nothing but a medium through which the data gets transported to other system. Siebel supports multiple queue mechanisms such as MSMQ , JMS, MQ Series etc.

We will be discussing about sending the message to external system using IBM MQ Series Queue Mechanism. Siebel provides vanilla business service 'EAI MQSeries Server Transport'  to send/ receive messages from queue based on MQ Series.

Pre-requisite:

  • IBM MQ Server should be up and running .
  • Queue Manager and Send Queue must be set before sending the data to the Queue .

Create a sample workflow to explain the input and output arguments required for EAI MQSeries Server Transport
to send message or placing a message on Queue.

Input Arguments- 

      1.     <Value> - This is a required input parameter and it contains the message to be send .

      2.     MqPhysicalQueueName - This is an optional parameter using it you provide your workflow which Mq transport

            service it has to use. (These details will be provided to you by the other team).

      3.    MqQueueManagerName – This is an optional parameter  it contains the Name of queue manager for request  

           connection.(These details will be provided to you by the other team). 

Output Arguments –

       1)     MqSentMessageId – This is an optional parameter used to indentify the sent message.


Sample workflow to send the data to Queue.



Validation

To validate whether data has been successfully reached go to IBM Websphere MQ Explorer Queue. Please find the screenshot below:

  

You can browse the message and see in the message properties data in message data.


We are going to talk about the Inbound Transport using Queue in the next post.

Thursday, September 6, 2012

Comparison of Workflow Utilities with PRM ANI Utilities service

Many times we get confuse whether we should be using the Workflow Utilities or PRM ANI Utilities Business Services to Set Property or Get Property in a message.

Few places where we feel Workflow utilities can be used more effectively than PRM ANI Utility Service.(Please refer to PRM ANI utility blog to learn about BS.)

Scenario1

In order to set multiple properties in a message we need to define multiple ‘Set Property’ workflow steps as we can only define one property name in ‘SetProperty’ Method of PRM ANI Utility service.

Whereas in Workflow Utilities we can set the multiple properties in one worklfow Step(Echo Method) itself using dot notation as shown in screenshot below where we are setting both First and Last Name in one Workflow Step.

  

Note: Workflow Utilities removes all other empty properties from message. Please see below scenario.

Scenario2
Requirement `- Need to send only part of message where properties are being set and other part should be ignored.

When we set the properties in a message using Workflow Utilities Echo method, the part of message which is empty is being ignored in the output. Below screenshots clearly explains the input and output of Set Property in  workflow explained above.

Input of Set Property (Step 2of above workflow):




Output of Set Property (Step 2 of workflow):



While in PRM ANI Utility Service we get complete message with empty properties as part of message too. 

Output after setting the property using SetProperty Method of PRM ANI Utility Service.


Same is true for Get Property Method of PRM ANI Utility Service. We can retrieves only one property in one workflow step whereas can retrieve multiple properties in single workflow step in workflow utilities.

Scenario 3

While getting the property value from message using PRM ANI Utility Service , we usually come across an error  Running Method 'Execute'(SBL_PRM_00104). even though we have provided the correct Hierarchy Path:

Try using Workflow Utilities to get the property in this scenario, you will be able to get the value with same hierarchy path.

Limitations
  • Both Workflow Utilities and PRM ANI Utility service do not work for multiple records.
  • We cannot retrieve the value of property in case of dynamic message( Message where we are not sure whether specific property will be coming in a message or not. For ex we might have Status as an xml attribute of contact for some incoming messages whereas for some message we might not even have xml Attribute 'Status' as part of Contact message.

I will be writing next blog to explain the way to accomplish the above limitations.

Wednesday, September 5, 2012

Resetting Workflow Version back to 0

Requirement - Need to reset the version of workflow back to version 0.
Here are the steps to configure same:
1)    Right click on Siebel Tools Icon and click on Properties.
2)    In Properties, Add “/editseeddata” to the target attribute.


3)    Launch the Siebel tools and Navigate to workflow processes in OBE.
4)    Query for workflow that needs to be reset to version 0.
5)    Right click the workflow process and Click on “Reset version” menu, workflow version will change to 0.


Outcome


Tuesday, September 4, 2012

Static Picklist - Prefetch Size


As per vanilla, Static Picklist can have maximum of 500 values. How to set more values in static Picklist?

Steps to configure
  • Login to Siebel Tools and Navigate to Business Components in OBE.
  • Query for "PickList Generic" Business Component.
  • At BC level there is a property called as Prefetch Size which is by default set to 500.
  • Modify the Prefetch Size property to change the number of values to be displayed in Picklist.



EIM DIFFERENCE UTILITY

This has come to notice that whenever Siebel Releases a new Version of Application.There has been a change of Siebel Data Model some base tables gets deactivated and some of the EIM table mapping gets changed or become deactivated, certain columns, tables and user keys changes.

Though Siebel publishes these changes but when the difference of Application version is large it becomes difficult to find these changes.Specially when an upgrade has happened upgrading the Interface becomes a challenge or whenever we have two repositories available and we need to determine the Data Model Difference .

Siebel provided out of box UTLEIMDIFF utility can be used to find EIM mapping differences between two repositories.

      Prerequisite - Create the view S_EIM_MAP_V in the database. The independent script for 
      creating this view is called create_EIM_MAP_V.sql. This script can be found in the directory
      <dbrsvr>\common directory. 
       
 Find the executable UTLEIMDIFF.EXE in the <tools>\bin directory.Use the below mentioned parameters for running this utility.

Switch
Entry
Description
/U
[username]
Siebel username
/P
[password]
Siebel password
/D
[table owner]
Database table owner
/N
“[new Siebel
repository]”
Required. Name of the new repository.
NOTE: Enclose the repository name in quotation marks.
/O
“[old Siebel repository]”
Required. Name of the old repository.
NOTE: Enclose the repository name in quotation marks.
/I
[input filename]
This file contains the list of EIM tables to be compared.
The default input file (eim_tbl_lst.inp) is in the
<tools>\bin directory.
You can edit this file.
/M
[report filename]
Required. This is the output report. The default name is eim_diff.txt.
/L
[log filename]
The default name is eim_diff.log.

 The execution time will depend on the total no of tables getting analyze this might take some time.

        
Command for Execution:

utleimdiff.exe /u [username] /p [password] /c [Server Name]r /d [table owner] /n “[new Siebel  repository]”/o “[old Siebel repository]” /i [input filename] /m [[report filename]] /l [[log filename]]
   
Log file to be use to debug failure if any. Report file will contain the generated file containing details of the mapping .Once you run the command you will see some below steps.

Connecting to the database...
Connected.
Disconnecting from the database.

Once you have executed this the Output of EIM difference Utility contains three major areas.

Part 1 compares all the EIM tables in the two repositories as 

The first column of each part is the repository name. If there is an entry in one repository but not the other, then that means that the entry exists in one repository but not the other.


Part 2 compares the EIM tables listed in the input file.

 If the same entry appears in both repositories, then that means that the entry has been modified.

 
 

The third and very important section compares the interface columns for the tables listed in the input file. “UK” means “User Key sequence.” “Req'd” indicates that the column in the base table is required.

Friends you need to see the file by clicking the following link.