Siebel Business Process Framework: Workflow Guide > Adding Workflow Process Steps > Adding Steps and Connectors >

Adding a Siebel Operation Step


This topic describes how to add the Siebel operation step. It includes the following topics:

The Siebel operation step is a type of workflow process step that does an operation on a business component, such as insert, update, or query. You define a Siebel operation step for the business component that a business object references. The workflow process references this business object. If you configure Siebel CRM to update a business component that this business object does not reference, then you can use Siebel Tools to start a sub process or to associate the business component with the business object. For more information, see Defining the Primary Business Component.

To add a Siebel operation step

  1. Add a Siebel operation step to a workflow process.

    For more information, see Adding a Step to a Workflow Process.

  2. Make sure the step you added in Step 1 is still chosen in the Process Designer.
  3. In the Properties window, in the Operation property, choose an operation.

    For more information, see Configuring the Operation Property.

  4. In the Business Component property, choose the business component that contains the data that the Siebel operation modifies.
  5. Optional. In the MVPW, add new input arguments and output arguments.

    If you choose Insert or Upsert in Step 3, then make sure you add the required arguments in the MVPW. For example:

    • In the Field Name field, make sure you define the name of the field that Siebel CRM must update.
    • In the Type field, choose an input argument type, and then define other fields, depending on the type.

      For more information, see Arguments That You Can Define for a Process Property.

  6. Optional. Define a search specification in the MVPW:
    1. In the Type field, choose a search specification type, as described in the following table.
      Type
      Description

      Literal

      A static string where the run-time value is the same as the value that you define in the Process Designer.

      Expression

      A Siebel expression that references a run-time variable. Siebel CRM can evaluate the expression only at run-time.

    2. In the Search Specification field, enter a search specification.
    3. If the search specification Type is Expression, then choose a business component.

      For more information, see Using a Siebel Operation Step with a Search Specification.

Using a Siebel Operation Step to Update a Process Property

You can define a test workflow process that uses a Siebel operation to update a process property. For example, you can use the sum of two business component integer fields that provide input to a decision that resides downstream in the workflow process. Siebel CRM uses the sum of the two required fields to update a process property in the Siebel operation step. You can then use this property on a subsequent branch connector.

The example in this topic references the Action business object.

To use a Siebel operation step to update a process property

  1. In Siebel Tools, add a new workflow process using values from the following table.

    Property

    Value

    Process Name

    Updating a Process Property

    Business Object

    Action

    Workflow Mode

    Service Flow

    For an example, see Creating the Workflow Process.

  2. Add steps and connectors until your workflow process resembles the workflow illustrated in the following figure:

    For more information, see Overview of Workflow Process Steps, and Diagramming a Workflow Process.

  3. Click the canvas, making sure no workflow process step or connector is chosen.
  4. In the MVPW, right-click, and then add a new process property using values from the following table.

    Field

    Value

    Name

    Custom Process Property

    Display Name

    Custom Process Property

    In/Out

    In/Out

    Business Object

    Action

    For more information, see Using Process Properties.

  5. Click the Update Process Property step, and then click the Search Spec Input Arguments tab in the MVPW.
  6. Right-click, click New Record, and then create a new record using values from the following table.

    Field

    Value

    Expression Business Component

    List of Values

    Filter Business Component

    Query

    Search Specification

    [Name] = 'Personal' AND [Type] = 'TODO_TYPE'

    Type

    Literal

  7. Make sure the Update Process Property step is chosen in the Process Designer.
  8. Click the Output Arguments tab in the MVPW.
  9. Right-click, click New Record, and then create a new record using values from the following table.

    Field

    Value

    Property Name

    Custom Process Property

    Type

    Expression

    Value

    [Class Code]

    Business Component Name

    List Of Values

  10. Validate, and then simulate the workflow process.

    For more information, see Process of Testing a Workflow.

  11. Implement this configuration in your production workflow process.

Using a Siebel Operation Step with the Object Id Process Property

When Siebel CRM finishes an Insert or Upsert operation, it stores the row ID of the record that it created. It stores this ID in the Siebel Operation Object Id process property. It passes the Object Id of the workflow process to the Siebel operation step. It is not necessary to define a search specification unless Siebel CRM must update child records. For example, if a workflow process:

  • References the Service Request business object, then it must update the service request but it is not necessary to define a search specification.
  • Must update activity records for the service request, then you can enter a search specification that queries for the activity that Siebel CRM must update. If you do not do this, then the update step updates every activity that Siebel CRM associates with the service request.

If Siebel CRM runs a Siebel operation, then the Object Id cannot be null unless it inserts this Object Id into the primary Object Id. If the workflow process does not contain an Object Id, then the Siebel operation step returns an error.

The Siebel Operation Object Id process property returns the following values if a query operation modifies child records:

  • The row ID if one record matches.
  • Null or no value if no records match.
  • An asterisk (*) if multiple records match. It provides this result to distinguish from a value that returns a unique record or no record. Typically, a unique record matches or no records match. In most situations, multiple records do not match and Siebel CRM returns an asterisk.

The following option returns the row ID of a matching row:

only

The Insert, Update, and Upsert operations update the Siebel Operation Object Id process property of the row ID for the record.

Using a Siebel Operation Step with the Upsert Operation

The Upsert Operation can do an update or insert operation depending on if a record or records exist in the Siebel database. Hence the name, Upsert. Assume a search specification on a Siebel operation step queries the Siebel database and returns one of the following results:

  • Returns one or more records. Upsert updates these records according to the workflow process configuration.
  • Returns no records. Upsert insert a record according to the workflow process configuration.

For example, assume the following occurs:

  1. Siebel CRM navigates a user to a view where the user can click a check box to create a new contact.

    The Yes default for the check box causes Siebel CRM to create a new contact.

  2. The user enters the contact information.
  3. The user navigates away from the view, and then returns to the view.

When the user returns there is the potential that Siebel CRM will create another contact. Siebel CRM must determine if the contact already exists. If a contact exists, then it must update this contact. If the contact does not exist, then it must create a new contact.

For another example, assume a workflow process runs in the background at midnight, processing orders that an external system sends to Siebel CRM:

  • If an order does not exist, then Upsert creates a new record.
  • If an order already exists but must be updated, then Upsert updates the record.

Configuring the Operation Property

If you configure this step to update or insert a field that contains a dependency, then you must make sure the field is valid. For example, if a service request process and a workflow process update the area and sub area fields, then you must make sure the values chosen for the subarea field are valid for this area.

If your configuration uses a DB2 for z/OS database, and if you must use a Siebel operation step to query this database, then it is recommended that you set the Operation property to QueryBiDirectional and not to Query. Using QueryBiDirectional avoids leaving an open thread on DB2 for z/OS.

Using a Siebel Operation Step with a Search Specification

You can use a search specification to filter the business component records that a Siebel operation modifies. For example, if a workflow process for the Account object must only update opportunities that possess a lead quality of Poor, then you can define a search specification that only returns these opportunities.

CAUTION:  Define a search specification for a Siebel operation as efficiently as possible so that the search returns the smallest possible set of rows. A search specification that returns in a large set of rows can severely degrade performance.

For information about using a search specification in an example workflow process, see Creating the Workflow Process.

Adding a Literal Search Specification

If the search specification is of type Literal, then Siebel CRM interprets it literally. For example, [Status] LIKE '*Open*'. A search specification of type Expression allows you to create a search specification dynamically. For example, consider the following search specification:

"[Contact ID] = ' " + [&New ID] + " ' "

If the New ID process property is 1-ABC at run time, then Siebel CRM interprets this search specification to the following value:

[Contact ID] = '1-ABC

Referencing a Business Component Field in a Search Specification

Each side of an expression can reference a business component field:

  • The Filter Business Component defines the business component on the left side.
  • The Expression Business Component defines the business component on the right side.

Table 12 describes an example of this configuration.

Table 12. Example of Referencing Business Component Fields in a Search Specification
Field
Value

Filter Business Component

Account

Expression Business Component

Contact

Expression

"[Id] = [Account Id]"

Siebel CRM uses the following format to evaluate this expression:

"[Account.Id] = [Contact.Account Id]"

Using Compound Expressions and Substitutions in a Search Specification

You can use compound expressions and substitutions in a search expression. For example, consider the following generic format:

"([Field1] > '" + [&Process Property Name] + "') OR ([Field2] IS NULL) OR ([Field3] IS NULL)"

Siebel CRM translates this format to the following value:

([Field1] > 'value') OR ([Field2] IS NULL) OR ([Field3] IS NULL)

An expression can include a literal representation of a business component field. For example:

  • "([Open] > '" + [&dFromDate] + "') OR ([Open] IS NULL)"
  • "([Open] > '" + [&dFromDate] + "') AND ([Status] IS NULL)"

where:

  • dFromDate is a custom process property

For more information about using a process property as a substitution variable, see Referencing a Process Property.

Using a Siebel Operation Step to Update a Field That References a Multi-Value Group

A Siebel operation step can indirectly update a field that references a multi-value group. For example, assume Siebel CRM must update the Account Team business component field. This field references a multi-value group, so you cannot use a Siebel operation step to update it. You can define a business component named Account Team, and then associate it with the Account business object. You can then choose Account Team as the business component that the Siebel operation step updates. For more information about multi-value groups, see Configuring Siebel Business Applications.

Using a Siebel Operation Step with a Calculated Field

A Siebel operation step cannot update a calculated field because, typically, the calculated field requires values from the fields of another business component. Instead, you can use an expression to perform calculations.

Using a Siebel Operation Step to Traverse a Record Set

To traverse a record set, you can use the NextRecord, PrevRecord, and QueryBiDirectional operations on the Siebel operation step in conjunction with the Update, Query, and Insert operations. You can use the following operations to traverse the records of a child business component of the business object that the workflow process references:

  • NextRecord. Changes the active row of the business component to the next record.
  • PrevRecord. Changes the active row to the previous record.

You must configure Siebel CRM to perform a query on the business component before it uses another Next Record or Previous Record operation. If the workflow process traverses active records or if it uses the PreviousRecord operation, then use the QueryBiDirectional operation. Otherwise, use the Query operation.

You cannot use NextRecord, PrevRecord, and QueryBiDirectional to traverse records of the primary business component. These operations traverse records only for a child business component.

For a detailed example that traverses a record set, see Defining a Workflow Process That Traverses a Record Set to Close Service Requests.

Stopping a Traverse a Record Set Operation

You set the NoMoreRecords output argument in the Siebel operation to TRUE. Siebel CRM uses this argument when the Siebel operation attempts to read the next record but finds that no more records exist in the record set to traverse. You set NoMoreRecords to TRUE:

  • In the forward direction for Next Record
  • In the backward direction for Previous Record

You can assign NoMoreRecords to a process property. You can use it in conjunction with a decision point to exit the loop after navigating through every record in the record set. To support this output argument, the Process Designer displays an Output Argument column in the Output Arguments tab of the Siebel operation step.

Counting the Number of Records Siebel CRM Gets or Updates

You can use the NumAffRows (Number of Affected Rows) output argument with the following operations:

  • Query. NumAffRows returns the number of rows that Siebel CRM gets as a result of the query.
  • Update or Upsert. NumAffRows returns the number of rows that Siebel CRM updated.

How Siebel Operations and Workflow Policy Programs Use Different Object Layers

The Siebel operation step uses a different object layer than a workflow policy program to update data. For example:

  • Assume a workflow policy calls a workflow policy program that updates a service request. This configuration proceeds through the data layer where the state model does not apply.
  • Assume a workflow policy calls a workflow process that includes a Siebel operation step that updates a service request. This configuration proceeds through the object layer, where the state model does apply.

When determining to user a Siebel operation or workflow policy program, you must consider how these operations interact with the various object layers.

Siebel Business Process Framework: Workflow Guide Copyright © 2018, Oracle and/or its affiliates. All rights reserved. Legal Notices.