Search This Blog

Jun 27, 2011

Configuring a Siebel Workflow

1. Create a New Workflow Process
    1 In Siebel Tools, select the Workflow Process object type
    2 Create a new workflow process definition
    3 Enter the process name
    4 Assign the process to a locked project
    5 Assign a business object
        5.1 Provides context for references to business components and fields
    6 Right-click and select Edit Workflow Process to invoke the Workflow Designer

2. Specify Process Properties
    1 Select the Process Properties tab in the Multi Value Property Window (MVPW) to display the default process properties
    2 Edit the default set of process properties Add new process properties to store additional values created and used by the workflow steps Leave the default       process properties unchanged

3. Add Workflow Steps
    1 Add a start and end step to the designer - Drag steps from the palette to the workspace
    2 Add other steps as required
    3 Add connectors to sequence the steps
    4 Make sure that connector ends are anchored (red box appears)

4. Configure Workflow Steps: Siebel Operation
    1 For each Siebel operation step:
    2 Specify the business component and operation - Use the properties window
    3 "Specify additional child arguments as required in the MVPW Examples: Field names, search spec input arguments, output arguments"

5. Configure Workflow Steps: Business Service
    1 For each business service step:
    2 Specify the business service name and business service method
    3 Use the Properties window
    4 Specify inputs to use in the workflow
    5 Select the Input Arguments tab in the MVPW
    6 Assign a literal value or a process property to each input
    7 Specify outputs of the business service step
    8 Select the Output arguments tab in the MVPW
    9 Assign each output to a process property

6. Configure the Steps: Decision Point Step
    1 For each decision point step, set conditions on each branch (connector) originating at the step:
    2 Select the connector
    3 Right-click and select Edit Conditions
    4 Enter the condition criteria for each branch in the Compose Condition Criteria dialog box
    5 Do not create a condition criteria for the default branch
    6 Execution path taken if no other branches are satisfied

7. Validate the Workflow Process
    1 Save configuration performed in the Workflow Designer
    2 Return to the Workflow Process List
    3 Right-click the workflow and select Validate
    4 Click Start to perform the validation checks
    5 Syntactic errors are displayed in the Errors window

8. Enabling Workflow Simulation
    1 Configure the connection to the Siebel run-time instance
    2 In Siebel Tools, select View > Options > Debug
    3 Specify the run-time Siebel instance
    4 Provide a valid login

9. Testing a Workflow Using the Workflow Simulator
    1 The steps to test a workflow process in the Siebel Tools Workflow Simulator are:
    1. Specify the Test Record
    2. Start the Simulator
    3. Start the Simulation
    4. Execute the Workflow

10. Specify the Test Records
    1.In the Siebel client, create test records to support the simulation
    2.Use Help > About Record to determine the Row Id
    3.In Siebel Tools, enter the Row Id of the test record as the default string for the Object Id process property When the workflow is invoked in production,        the Row Id of the record is passed in as an input argument

11. Start the Simulator
    1.Ensure all the siebel client application instance are closed.
    2.Right click the work flow designer and select simulate.
    3.Click the Start Simulation button in the tool bar to start it.
    4.a new instance of siebel client will be launched.

12. Execute the Workflow
    Exeute Workflow has two modes for execution.
        1 - Single Step Mode with Simulate Next Button
        2 - Contineous mode using the Complete Simulation button

May 26, 2011

Siebel Workflows


Siebel Automation


Siebel Configuration


Siebel EIM


Siebel eScript

*************************************
     Server Scrpit UI Context
*************************************
----------------------------------------------------------------------------------------------------------------------
-- validate Account Name (BusComp_PreWriteRecord) on Account BC
    var min = 5;  
    var max = 12;  
    var len;  
    var n = 0;  
    var lname = this.GetFieldValue("Name");
    var flen = lname.length;  
  
    if(flen < min)  
    {          
        TheApplication().RaiseErrorText("Account name should be more than 4 characters");  
    }      
  
    if(flen > max)  
    {
        TheApplication().RaiseErrorText("Account name should not have more than 12 characters");  
    }  

    var rStrcspn = Clib.strcspn(lname,"1234567890");
  
    if(rStrcspn < flen)  
    {
        TheApplication().RaiseErrorText("Account name should not any number");
    }

- Right Click on the Account Business Component and Compile It.
---------------------------------------------------------------------------------------------------------------------
-- Set the JOb Field Value to Employee Whenever any New Record is Create on Contact BC.
1 - Select the Contact Business Component and Lock the it.
2 - Right and Select Edit Server Script Option.
3 - Select Function -  (BusComp_SetFieldValue (FieldName)) .
4 - Write the following script.
-- set the job field value.
    var defJob = "Employee";  
    this.SetFieldValue("Job Title",defJob);

5- Right Click on the Contact Business Component and Compile It.
6- Open Siebel web client and go to Conact create a new record to test it.
---------------------------------------------------------------------------------------------------------------------
-- Do not allow to delete the account if the status is Active.
1 - Select the Account Business Component and Lock the it.
2 - Right and Select Edit Server Script Option.
3 - Select Function -  BusComp_PreDeleteRecord
4 - Write the following script.

function BusComp_PreDeleteRecord ()
{
    var status = this.GetFieldValue("Account Status")
    if(status == "Active")
    {
        TheApplication().RaiseErrorText("You can not delete this account as its a Active account.");                  
        return (CancelOperation);
    }
    else
    {
        return (ContinueOperation);
    }
}

5- Right Click on the Account Business Component and Compile It.
---------------------------------------------------------------------------------------------------------------------
-- Do not allow to change the account status if current volume is greater than 0.
1 - Select the Account Business Component and Lock the it.
2 - Right and Select Edit Server Script Option.
3 - Select Function -  BusComp_PreSetFieldValue
4 - Write the following script.

function BusComp_PreSetFieldValue (fieldName, value)
{

   if (fieldName == "Account Status")
   {
      var cVolume = this.GetFieldValue("Current Volume");

      if ((value == "Inactive") && (cVolume > 0))
      {
         TheApplication().RaiseErrorText("Unable to inactivate an account that has a current volume greater than 0");
         return ("CancelOperation");
      }
      else
         return ("ContinueOperation");
   }
   else
      return ("ContinueOperation");
}
---------------------------------------------------------------------------------------------------
-- Write Script to Call Server Script on User Define Button.
Server Script with Applet Button :

1 - Check the current volumn field value on the button click using the server script.

1) Goto Applet Query for Account Entry Applet
2) Right Click and Edit Web Layout and Drag a MiniButton from Palette window to Applet.
3) Right Click the Button and goto Property window.
    -- Change the following peroperties.
    -- Caption-String Overriden : Check Volume
    -- Runtime  = TRUE
    -- MethodName = CheckVol

4) Save the changes and close the web layout.
5) Now Right the method to enable the button on applet.
6) Right click on Account Entry Applet and click on Edit Server Script.
7) Goto WebApplet_CanPreInvoke Method and write the following script.

    // enable the button on applet
    if(MethodName == "CheckVol")
    {
        CanInvoke="TRUE";
        return (CancelOperation);
    }
    return (ContinueOperation);

8) Now we will be writting a function to call on the button click.
9) Query for the Business Component Account and Right Click select Edit Server Script.
10) Goto BusComp_PreInvokeMethod method and write the following script.

function BusComp_PreInvokeMethod (MethodName)
{
    var vol = this.GetFieldValue("Current Volume");

    if( vol > 0 )
    {
        TheApplication().RaiseErrorText("Volumn exist for this account. Volumn = " + vol);
        return (CancelOperation);
    }
    else
    {
        TheApplication().RaiseErrorText("Volumn does not exist for this account.");
        return (ContinueOperation);
    }
}
----------------------------------------------------------------------------------------------------------
*************************************
    Server Scrpit Non UI Context
*************************************

-- Do not allow to delete the account if an opportunity is exist for the account.
1 - Select the Account Business Component and Lock the it.
2 - Right and Select Edit Server Script Option.
3 - Select Function - BusComp_PreDeleteRecord.
4 - Write the following script.

TheApplication().TraceOn("c:\temp\opp_trace.txt","Allocation","All");
var returnCode = ContinueOperation;

try
{
    //get the BO and BC first for the Opporunity.
    var boOpty;
    var bcOpty;
    var rowID;
    // get the rowid
    rowID = this.GetFieldValue("Id");


    // create the business object using GetBusObject method.
    boOpty = TheApplication().GetBusObject("Opporunity");
    bcOpty = boOpty.GetBusComp("Opporunity");

    // trace the operation
    TheApplication().Trace("Preparing Query");
  
    with(bcOpty)
    {
        SetViewMode(ViewAll);
        ActivateField("Account Id"); // must activate the field before the cleartoquery method.
        ClearToQuery(); // clears the current query.
        SetSearchExpr("[Account Id]= '"+rowID+"'");
        ExecuteQuery(ForwardOnly);
    }
    TheApplication().Trace("Query Executed.");
  
    if(bcOpty.FirstRecord())
    {
        returnCode = CancelOperation;
        TheApplication().RaiseErrorText("Opp is exist for this Account. It can not be deleted.");
    }
    else
    {
        returncode = ContinueOperation;
    }
}
catch(e)
{
    throw(e); //display error message to user
}
finally
{
    delete bcOpty;
    delete boOpty;
    TheApplication().TraceOff();
}
return (returncode);
------------------------------------------------------------------------------------------------------------
*************************************
            Browser Scrpit
*************************************

** Display the confirmation of the changing the account status from any other to active status.
1 - Select Applet in the Object List Expolrer.
2 - Select Account List Applet.
3 - Right Click on the Opportunity List Applet.
4 - select Edit Browser Scritp.
5 - Select Applet_ChangeRecord.
6 - Write the following script.
  
function Applet_ChangeFieldValue (field, value)
{
    //var status = this.FindControl("Account Status");
    if(field == "Account Status")
    {
        if(value == "Active")
        {
            var ans = confirm("are you sure you wnat to change status of this account");
            if(ans == true)
              return (ContinueOperation);
            else
              return (CancelOperation);             
        }
    }
}
7 - set the compile direcotry path using View - Option - Scripting
   - browswer script compilation folder : D:\siebel81\Client\PUBLIC\enu
----------------------------------------------------------------------------------------------------------------
Ex2 - Broswer Script
** Make the controls read only on the applet if the Service Request status is Cancelled.
1 - Select Applet in the Object List Expolrer.
2 - Select Service Request Detail Applet.
3 - Right Click on the Service Request Detail Applet.
4 - select Edit Browser Scritp.
5 - Select Applet_ChangeFieldValue(field,value)
6 - Write the following script.

if(field == "Status")
{      
    if(value=="Cancelled")  
    {      
        var tmp = this.FindControl("CommitTime");                                          
        tmp.SetProperty("ReadOnly",true);
        tmp = this.FindControl("ContactLastName");
        tmp.SetProperty("ReadOnly",true);
        tmp = this.FindControl("Account");                                              
        tmp.SetProperty("ReadOnly",true);              
        tmp = this.FindControl("Product");                                              
        tmp.SetProperty("ReadOnly",true);
        tmp = this.FindControl("Description");                                              
        tmp.SetProperty("ReadOnly",true);
        tmp = this.FindControl("Abstract");
        tmp.SetProperty("ReadOnly",true);      
    }
    else
    {
        var tmp = this.FindControl("CommitTime");
        tmp.SetProperty("ReadOnly",false);
        tmp = this.FindControl("ContactLastName");
        tmp.SetProperty("ReadOnly",false);
        tmp = this.FindControl("Account");
        tmp.SetProperty("ReadOnly",false);
        tmp = this.FindControl("Product");
        tmp.SetProperty("ReadOnly",false);
        tmp = this.FindControl("Description");
        tmp.SetProperty("ReadOnly",false);  
        tmp = this.FindControl("Abstract");                                              
        tmp.SetProperty("ReadOnly",false);      
    }
}
-----------------------------------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------------
-- Write a Browser script to Prompt a Message to user on the New Record creation ask to enter a value to continue. ( Value : Y || N )
1 - Select Applet Object Type in OE.
2 - Select Account List Applet in OBLE.
3 - Right Click on Account List Applet.
4 - Select Edit Browser Script.
5 - It will show the functions and three Modes of Applet.
  - Select function Applet_PreInvokeMethod and write the following Script.


function Applet_PreInvokeMethod (name, inputPropSet)
{
    if(name == "NewRecord")
    {
        var ans = prompt("Y to Create Record & N to Exit \n Enter a Value : ");  
        if(ans == "Y")
        {
            theApplication().SWEAlert("Please fill the records .....");
            return ("ContinueOperation");
        }
        if(ans == "N")
        {
            alert("Operation Cancelled.");
            return ("CancelOperation");
        }
    }
}
--------------------------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------------
-- Write a Browser script to Prompt a Message to user on the New Record creation ask to enter a value to continue. ( Value : Y || N )
1 - Select Applet Object Type in OE.
2 - Select Account List Applet in OBLE.
3 - Right Click on Account List Applet.
4 - Select Edit Browser Script.
5 - It will show the functions and three Modes of Applet.
  - Select function Applet_PreInvokeMethod and write the following Script.


function Applet_PreInvokeMethod (name, inputPropSet)
{
    if(name == "NewRecord")
    {
        var ans = prompt("Y to Create Record & N to Exit \n Enter a Value : ");  
        if(ans == "Y")
        {
            theApplication().SWEAlert("Please fill the records .....");
            return ("ContinueOperation");
        }
        if(ans == "N")
        {
            alert("Operation Cancelled.");
            return ("CancelOperation");
        }
    }
}
-----------------------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------------------
-- Create a Button on Applet and Export to Account Names to Excel using DOM Object.

1 - Select Applet Object Type in OE.
2 - Select Account List Applet in OBLE.
3 - Right Click on Account List Applet.
4 - Select Edit Web Layout
  - It will show the functions and three Modes of Applet.
5 - Select Edit List Mode and Add a button to Applet and Change the following properties ;
    - Caption String Override : Export 2 Excel
    - Method Invoke : Export
    - Runtime : TRUE.

6 - Save the applet and close the web layout.
7 - Select Account List Applet and Right Click Select Edit Server Script.
  - this step will enable the button on applet.
  Select function WebApplet_CanPreInvokeMethod and write the following Script.
    function WebApplet_PreCanInvokeMethod (MethodName, &CanInvoke)
    {
        if(MethodName=="Export")
        {
            CanInvoke = "True";
            return (CancelOperation);
        }
        return (ContinueOperation);
}
- Save the script and Close the window.
8 - Select Applet Object Type in OE.
9 - Select Account List Applet in OBLE.
10 - Right Click on Account List Applet.
11 - Select Edit Browser Script.
12 - It will show the functions and three Modes of Applet.
  - Select function Applet_PreInvokeMethod and write the following Script.
Write the Following Script.

function BusComp_PreInvokeMethod (MethodName)
{
    var ExcelApp;

   if(MethodName == "Export")
   {

        this.ActivateField("Name");
         this.SetSearchSpec ("Name","*");
        this.ExecuteQuery(ForwardBackward);

        var count = this.CountRecords();

        ExcelApp = this.COMCreateObject("Excel.Application");
           ExcelApp.Visible = true;
           ExcelApp.WorkBooks.Add();
     
        this.FirstRecord();     

           for(var i=1;i<=count;i++)
           {
              ExcelApp.ActiveSheet.Cells(i,1).Value = this.GetFieldValue("Name");
               ExcelApp.ActiveSheet.Cells(i,2).Value = this.GetFieldValue("City");
               ExcelApp.ActiveSheet.Cells(i,3).Value = this.GetFieldValue("Account Status");
               this.NextRecord();
          }
      
        ExcelApp.Application.Quit();
           ExcelApp = null;
       }
    return (CancelOperation);


-------------------------------------------------------------------------------------------------------

What is Siebel CRM ?

1 - Siebel Customer Relationship Management (CRM)
Siebel CRM enables you to manage interaction with customers, partners, and employees.Its deployed as a single applicaion with broad functionality which support a multiple communicaton channels like :
- Web and email
- Call Center
- Field Service
Siebel CRM Application uses a single database to manage all the kind of OLTP work like Inserting a Records, Updating a Records, Deleting a Records mean while it also allows different users to access the same set of data.
- Example : The status of Opportunity is same across all the user like manager or the person who has created the opportunity or the opportunity is assigned to some person. This Application also ensure that changes to the data are made once and only once.
- Example : An address needs to be updated in only one place.

Siebel CRM Applications
Siebel CRM Applications are available tailored for different types of customer, partner, or employee interactions and channels
  • Horizontal applications)
  • Industry applications
  • Examples:
    • Horizontal applications
      1. Siebel Sales
      1. Siebel Call Center
      1. Siebel Partner Portal
      1. Siebel Remote
    • Industry applications
      1. Siebel Finance
      1. Siebel Consumer Goods
Types of Siebel Enterprise Applications
There are different types of applications are available in siebel crm for internal employees, company partners, company customers, 
  1. Employee Internal Application 
    1. Siebel Call Center
    2. Siebel Sales
  2. Customer and partner applications
    1. Siebel eSales
    2. Siebel Partner Portal
Siebel User Interface (UI) Modes
The Siebel Application User Interface is rendered in one of the two modes.

    - High Interactivity Mode
    - Standard Interactivity Mode

1) High Interactivity Mode
- This mode of UI is for the employee applications which supports high interactive users. It uses additional  code such as ActiveX controls to provide extra functionality like :
    1- User can drop and drop , change width, sorting on the columns
    2- Explorer like hierarchy views
    3- Menu bars and tool bars
    4- Saving the record as user move the cursor from the current record.

High Interactivity works only with Internet Explorer which supports the following version of IE.
    - 4.0
    - 5.0
    - 6.0
    1) Standard Interactivity Mode
    - This mode of UI is for the customers and employee applications which designed to be less browser dependent. It behave like a typical HTML based web application. It supports wide variety of browsers.

    Common Siebel Application Business Entities

    Siebel Application has some common business entities defined in the application which help to store the details related to the business activities or represent the information about your business. Business Entity is some thing of business interest in the real world.Business entity may Product, Account,Customers,Sales and so on.
    These Business Entities are referred as Business Components in Siebel Application.Some of the Business Component examples are :
    - Account, Contact , Opportunity, Service Request, Assets, Products and so on........
    1) Accounts : are businesses external to your company which represents a current potential client, a business partner, or a competitor.Accounts are associate with the Account Team in siebel Application.
    2) Contact: These are the people whom with you do business. These contact can me marked as public or personal contact they are also also associated with team.
    3) Opportunity : Its some thing potential revenue-generating events. It has the following characteristics :
                - A possible association with an account
                - A probability of completion
                - Will have close date.
    and so on..................

    Siebel IP 2017 - Web Tool Development Steps

    Siebel IP 2017 Development and Deployment Steps : 1. Click on the Workspace Icon in Siebel Web Tools application. 2. Create a New work s...