19State Models

About State Models

State model functionality allows administrators to control the value of a field in a record by setting up for that field the allowed state values and the allowed transitions between those state values. For example, administrators can limit the Status field for a service request record to the following state values: Open, Closed, and Pending. Furthermore, administrators can limit the allowed transitions between those state values to the following transitions: Open to Pending, Open to Closed, and Pending to Closed.

For Siebel workflows, state models provide a data-driven method for extending control using state values for fields in records. For general information about Siebel workflows, see Siebel Business Process Framework: Workflow Guide.

The state model functionality consists of the following key elements:

  • State Model. The state model is a blueprint of allowed state values and allowed transitions between those state values.

  • State Machine. The state machine enforces the transitions between state values. The state value can designate the status of a record. The state value for a field in a record can also determine if the other field values in that record can be modified. For example, a record with a Status field value of Closed might be read-only, and the other field values in the record cannot be modified. The state machine reviews all criteria that administrators define for the transition of a state value before allowing that transition.

  • State Transitions. State transitions define the allowed changes from one value to another value for a field in a record. For example, a record with a Status field value of Closed must be reopened. The Status field can transition from the Closed value to an Open value and from the Open value to a Pending value, but cannot transition directly from the Closed value to a Pending value.

    Administrators can set up criteria for state transitions. For example, they can specify that only certain users can initiate state transitions or that all users can initiate state transitions only if certain criteria are met.

Scenario for Managing State Models

This topic gives one example of how state model management might be used. You might use state model management differently, depending on your business model.

A company wants to configure its Siebel application to track suggestions from customers and employees about product enhancements. To implement this configuration, a developer creates a new Enhancements business component and a supporting Product Enhancements screen with views.

The administrator must set up a state model for this new business component. She uses Siebel Tools to check that the Enhancements business component is based on the CSSBCBase class. She discovers that the configurator already enabled the state model user property for this business component.

In the Siebel application, she creates a state model for the Status field (an LOV field) of the Enhancement business component. This state model contains the following allowed state values:

  • New. She designates this state value as the default state value. When an enhancement idea is first received, the state value for the Status field of the record is always New.

  • Assigned. She sets up this state value.

  • Accepted. When she sets up this state value, she selects the check box for the No Delete field and the No Update field so that an accepted enhancement record is read-only and cannot be deleted or modified.

  • Rejected. When she sets up this state value, she selects the check box for the No Delete field and the No Update field so that a rejected enhancement record is read-only and cannot be deleted or modified.

This state model contains the following allowed transitions between the state values:

  • From New to Assigned. Managers assign enhancement suggestions to the most suitable employees for investigation. Therefore, she specifies that only managers can change the Status field value from New to Assigned.

  • From Assigned to Accepted. Employees must write an assessment of each enhancement suggestion before accepting it. Therefore, she creates simple criteria indicating that users cannot change the Status field value for a record to Accepted if the Assessment field for the record is blank.

  • From Assigned to Rejected. Employees must write an assessment of each enhancement suggestion before rejecting it. Therefore, she creates simple criteria indicating that users cannot change the Status field value for a record to Rejected if the Assessment field for the record is blank.

Finally, she activates the state model by restarting the server.

Process of Setting Up State Models

To set up state models, complete the following tasks:

  1. Configuring Business Components for State Models

    This task is required only if the business component is not enabled for state models.

  2. Creating State Models and State Transitions

  3. Activating State Models

Configuring Business Components for State Models

Administrators can create state models for business components that meet the following criteria:

  • The business components are state-model enabled in the preconfigured Siebel application.

  • The business components are based directly on the CSSBCBase class and are enabled using the procedure in this topic.

    Oracle supports state model creation for business components that are based on the CSSBCBase class and its subclasses. Do not create or modify state models for the Enterprise Service Definitions, SRM Request, and SRM Repeating Request business components. These business components are used for server administration.

This task is a step in Process of Setting Up State Models.

    Determining Whether Business Components Are Enabled for State Models

    Complete the following procedure to determine whether a business component is enabled for state models.

    To determine whether a business component is enabled for state models

    1. Navigate to the Administration - Application screen, then the State Models view.

    2. Create a new record, and click the select button in the Business Component field.

      • If the business component is listed in the Business Components dialog box, then the business component is enabled. You can create a state model for the business component. For more information, see Creating State Models and State Transitions.

      • If the business component is not listed in the Business Components dialog box, then the business component is not enabled. You can enable the business component. For more information, see the other procedure in this topic.

    3. Delete or undo the new record.

      Enabling Business Components for State Model Functionality

      In Siebel Tools, administrators can enable a business component for state model functionality.

      To enable a business component for state model functionality in Siebel Tools

      1. Make sure that the business component is based on the CSSBCBase class.

      2. Create a new business component user property with the following properties:

        • For the Name column, enter a value of State Model.

        • For the Value column, enter a value of Y.

        Creating State Models and State Transitions

        This topic describes how to create state models and state transitions for those models.

        To create a state model for a field on a business component, the field must meet the following criteria:

        • The field is an LOV (list-of-values) field or MLOV (multilingual-list-of-values) field.

        • The field has no dependencies on other fields.

        For example, do not use a constrained LOV field or a calculated field.

        This task is a step in Process of Setting Up State Models.

        To create a new state model

        1. Navigate to the Administration - Application screen, then the State Models view.

        2. In the State Models list, create a new record, and complete the necessary fields.

          Some fields are described in the following table.

          Field Comments

          Name

          Type a name that uniquely identifies the state model.

          Business Component

          Select the business component for the state model. The dialog box for this field displays all of the business components that are enabled for state models. To enable additional business components, see Configuring Business Components for State Models.

          Field

          Select the name of the field for the state model. The dialog box for this field displays the fields that are defined for the business component.

          Activation

          Select the date on which the state model is enforced.

          Note: You can set up multiple state models for a field as long as the activation to expiration periods for each state model do not overlap.

          Expiration

          Select the date on which the state model is no longer enforced.

        3. Navigate to the States view, in the States list create a new record for each state value for the field in the state model, and complete the necessary fields.

          Some fields are described in the following table.

          Field Comments

          State Name

          Select the state value for the field in the state model.

          Default

          Select this check box to indicate that the State Name field is the default state value. The default state value specifies the value that is automatically populated in the state model field when a new record is created.

          Note: If the field in the state model is populated from Siebel Tools, then you cannot override this default in the state model.

          No Delete

          Select this check box to indicate that a record with a field in this state is read-only and cannot be deleted.

          No Update

          Select this check box to indicate that a record with a field in this state is read-only and cannot be modified.

          Note: If you select the No Delete and No Update fields for a state in the state model, then a record with MVG (multi-value group) fields that do not have a direct parent-child link between the parent field and the MVG applet is not read-only when the state for the record has the No Update or No Delete fields selected. To avoid confusion for users, you can remove MVG fields from the child applet.

          Restrict Transition

          Select this check box to indicate that only the transitions that you define for the state value are allowed. If you select this check box and do not define transitions, then the state value is an end state, and the state value cannot change to another state value.

          Clear this check box to indicate that the state value can transition to any other defined state value.

        4. Navigate to the Transitions view, and complete the following steps:

          1. In the Transitions list, create a new record for each state transition that you want to restrict, and complete the necessary fields.

            Some fields are described in the following table.

            Field Comments

            From State

            Select a source state value in the state transition of the state model field.

            Note: If you do not define a state transition for the State Name field that is the default value, then the field in the state model cannot change.

            To State

            Select a destination state value in the state transition of the state model field.

            Public

            Select this check box to indicate that all users are allowed to perform this state transition. If you select this check box, then the records in the Authorized Positions list are not in effect. For more information, see step b.

            Rule Field

            Select a field that controls the state transition. This field is frequently not the field in the state model, but another field in the business component for the state model.

            Rule Operator

            Select an operator for the field in the Rule Field.

            Rule Value

            Type the state value for the field in the Rule Field.

            The Rule Field, Rule Operator, and Rule Value fields allow you to specify simple criteria that must be met for the state transition to occur. For more information about creating simple criteria, see About Criteria for State Transitions.

            Rule Expression

            Type complex criteria that must be met for the state transition to occur.

            Users see an error message when they attempt to perform a state transition, and the transition does not satisfy the rule expression.

          2. To restrict a state transition to a group of users (or positions), create records in the Authorized Positions list, and clear the check box in the Public field for the transition record.

            Note: If the check box in the Public field is cleared, and if you do not create positions in the Authorized Positions list, then no users are allowed to perform the state transition.

        Activating State Models

        This topic provides information about activating state models.

          How Are State Models Activated?

          A new state model is not available to users until you start a new Siebel Application Object Manager server process. By restarting the server or the AOM server components, you start new AOM processes that obtain the new state model from the refreshed state model cache.

            How Are State Models Activated for Mobile Users?

            For mobile users who connect through Siebel Remote, the state model is available after a user synchronizes with the database server. State models are supported on regional nodes. For more information about support for regional nodes, see Siebel Remote and Replication Manager Administration Guide.

              How Are State Models Enforced?

              State models are enforced on the Siebel business logic level. Thus, state models are enforced for updates that you make through Siebel Visual Basic, Siebel eScript, and workflow processes. However, state models are not enforced for updates that do not go through Siebel Application Object Managers, such as updates that you make through Enterprise Integration Manager (EIM) or workflow policy programs.

                How the AOM Reads State Model Objects

                The AOM reads state model objects from the application data stored in the Siebel database.

                Note: If you distribute state models to other environments, then migrate the run-time database tables for the state model.

                This task is a step in Process of Setting Up State Models.

                To activate state models

                1. Perform one of the following actions:

                  • Restart the server.

                  • Restart the AOM server components.

                2. Clear the browser cache.

                  Configuring All Operations for Child Records

                  By default, users cannot delete child records when the No Delete field is selected for the state value of the parent record. Also, by default, users cannot add and modify child records when the No Update field is selected for the state value of the parent record.

                    Enabling All Operations for Child Records

                    To override the default behavior, administrators can complete the following procedure to enable all operations for child records.

                    To enable all operations for child records

                    • In Siebel Tools, set the Enable Child Modification user property for the State Model Cache business service to Y.

                      Users can now delete child records, even when the No Delete field is selected for the state value of parent record. Also, users can now add and modify child records, even when the No Update field is selected for the state value of parent record.

                      Disabling All Operations for Specific Child Records

                      After they enable all operations for child records, administrators can complete the following procedure to disable all operations for specific child records.

                      To disable all operations for specific child records

                      • In Siebel Tools, set the State Model Enable Child Modification user property for the business component associated with specific child records to N.

                        The default behavior applies to the child records associated with the business component.

                        Enabling All Operations for Specific Child Records

                        To override the default behavior, administrators can complete the following procedure to enable all operations for specific child records.

                        To enable all operations for specific child records

                        1. In Siebel Tools, make sure the Enable Child Modification user property for the State Model Cache business service is set to N (the default value).

                          Note: When you change this user property from Y to N, you disable all operations for child records for which you do not complete Step 2 of this procedure.
                        2. Set the State Model Enable Child Modification user property for the business component associated with specific child records to Y.

                          Users can now delete child records associated with the business component, even when the No Delete field is selected for the state value of parent record. Also, users can now add and modify child records associated with the business component, even when the No Update field is selected for the state value of parent record.

                          About Criteria for State Transitions

                          Administrators can define the criteria that must be met for a state transition to occur. This topic includes an example of these criteria. The syntax for these criteria is the same as the syntax for calculated field values and for field validation in Siebel Tools. For more information about the syntax, see the information about operators, expressions, and conditions in Siebel Developer's Reference.

                            Example of Simple Criteria

                            Administrators can specify simple criteria in the Rule Field, Rule Operator, and Rule Value fields in the Transitions view in the State Model view of the Administration - Application screen.

                            For example, an administrator can create a state transition record to allow users to change the Status field of a service request from an Open value to a Closed value only when the value in the Sub-Status field of the service request is Resolved. The following table shows the values that the administrator enters in the fields of the state transition record.

                            Table Field Values of State Transition Record Containing Simple Criteria

                            Field Value

                            From State

                            Open

                            To State

                            Closed

                            Rule Field

                            Sub-Status

                            Rule Operator

                            =

                            Rule Value

                            ‘Resolved’