12Compound Product Validation

Compound Product Validation

This chapter is a reference that explains the methods developed for the Compound Product Validation Engine (CPVE) business service. This chapter includes the following topic:

About Compound Product Validation Engine Business Service

The Compound Product Validation Engine (CPVE) business service, VORD CPVE Validation Service, is a set of methods that allows the Compound Product Validation Engine to be initiated through a Workflow.

The CPVE business service includes methods to validate a network and display rule violations. These methods are summarized in the following table.

Method Comment

FindFutureDate Method

Gets the due date of the current line item.

Format Violation Method

Formats rules violations in a single string that can be displayed to the user.

Validate Method

Executes the cross-product validation rules associated with a compound product and returns any rule violations.

ValidateComplexProduct Method

Executes product validation expression validation rules associated with a complex product and returns any rule violations.

ValidateComplexProductAll Method

Executes product validation expression validation rules associated with the complex product in the document and returns any rule violations.

ValidateComplexProductFromPropertySet Method

Executes product validation expression validation rules associated with the complex product in the property set and returns any rule violations.

Compound Product Validation Engine Business Service Methods

The CPVE business service includes methods to validate a network and display rule violations. These methods are as follows:

    FindFutureDate Method

    This method gets the value of the field specified by FutureDateFieldName for the business component instance identified by BusinessComponentName and RowId.

    The FindFutureDate method requires the current UI BC context.

    Arguments

    Argument Description

    BusinessComponentName

    [in] Name of the business component from which to get the future date. (Required)

    RowId

    [in] Row Id of the business component instance for which to get the future date. (Required)

    FutureDateFieldName

    [in] Name of the field in the business component that stores the date. (Required)

    FutureDate

    [out] Value of the return date. (Required)

    Returns

    The value of the date field to use to validate the network at a date in the future.

    Related Information

    See the topic about workflows in Siebel Order Management Guide.

      Format Violation Method

      This method takes a property set of rules violations and formats them in a single string that can be displayed to the user.

      Arguments

      Argument Description

      RuleViolation

      [in] Property set of child property sets of type 'RuleViolation'. (Required)

      RuleViolationText

      [out] Single string containing the formatted rules violations. (Required

      Related Information

      See the topic about workflows in Siebel Order Management Guide, and Validate Method.

        Validate Method

        This method executes the cross-product validation rules associated with a compound product and returns any rule violations. It queries the Business Component VORD Compound Product Rule for all the rules defined for the top level product (highest-level network product) of the compound product (network). It then instantiates the business service for each of the rules and asks them for the fields and attribute values they need. It then initializes the Projected Asset Cache by asking it to build a future state of all the root line items within this compound product. This is done by querying the Quote Item, Order Item, Asset and their XAs for the fields and attributes required by all the rules, and then applying them to the associated assets. It then invokes the Validate method of each rules checker business service and creates a consolidated list of rules violations.

        The Validate method is called within the VORD Validate (Order) and VORD Validate (Quote) workflows, which are invoked from the Quote and Order Network Applets.

        Arguments

        Argument Description

        CompoundProductNumber

        [in] Compound Product Number (Network Id) associated with the compound product to be validated. (Required)

        FutureDate

        [in] Date at which to validate the compound product. (Optional)

        QuoteId

        [in] Row Id of the current quote. (Optional)

        CompoundProductNumber

        [out] Compound Product Number (Network Id) associated with the compound product. (Required)

        RuleViolationEmpty

        [out] Y or N flag indicating whether there are any violations. (Required)

        RootCompoundProduct

        [out] Name of the compound product. (Required)

        SiebelMessage

        [out] Property set of child property sets of type 'RuleViolation'. (Required)

        Related Information

        See the topic about workflows in Siebel Order Management Guide, and Format Violation Method.

          ValidateComplexProduct Method

          This method executes product validation expression validation rules associated with a complex product and returns any rule violations. It queries the Business Component VORD Compound Product Rule for all the rules defined for the top level product (network product) of the compound product (network). It then instantiates the business service for each of the rules and asks them for the fields and attribute values they need. It then initializes the Projected Asset Cache by asking it to build a future state of all the root line items within this compound product. This is done by querying the Quote Item, Order Item, Asset and their XAs for the fields and attributes required by all the rules, and then applying them to the associated assets. It then invokes the Validate method of each rules checker business service and creates a consolidated list of rules violations.

          The ValidateComplexProduct method is called within the VORD Validate Complex Product (Order) or VORD Validate Complex Product (Quote) workflows, which in turn are called within the Verify Item (Order) or Verify Item (Quote) workflows.

          Arguments

          Argument Description

          FutureDate

          [in] Date at which to validate the complex product. (Optional)

          IsComplexProduct

          [in] Y or N flag indicating whether the product is complex. (Optional)

          QuoteId

          [in] Row Id of the current quote. (Optional)

          RootAssetIntegrationId

          [in] Root Id of the integration asset. (Required)

          RootProductId

          [in] Root Id of the product. (Required)

          RootProductName

          [in] Root name of the product. (Optional)

          RuleViolationEmpty

          [out] Y or N flag indicating whether there are any violations. (Required)

          Siebel Message

          [out] Property set of child property sets of type 'RuleViolation'. (Required)

          Related Information

          See the topic about workflows in Siebel Order Management Guide, Validate Method, and Format Violation Method.

            ValidateComplexProductAll Method

            This method executes product validation expression validation rules associated with the complex product in the document and returns any rule violations. It queries the Business Component VORD Compound Product Rule for all the rules defined for the top level product (network product) of the compound product (network). It then instantiates the business service for each of the rules and asks them for the fields and attribute values they need. It then initializes the Projected Asset Cache by asking it to build a future state of all the root line items within this compound product. This is done by querying the Quote Item, Order Item, Asset and their XAs for the fields and attributes required by all the rules, and then applying them to the associated assets. It then invokes the Validate method of each rules checker business service and creates a consolidated list of rules violations.

            The ValidateComplexProductAll method is called within the VORD Validate Complex Product All (Order) or VORD Validate Complex Product All (Quote) workflows, which in turn are called within the Verify Header (Order) or Verify Header (Quote) workflows.

            The ValidateComplexProductAll method requires the current UI BC context.

            Arguments

            Argument Description

            BusinessComponentName

            [in] Name of the business component. (Required)

            FutureDate

            [in] Date at which to validate the complex product. (Optional)

            QuoteId

            [in] Row Id of the current quote. (Optional)

            RuleViolationEmpty

            [out] Y or N flag indicating whether there are any violations. (Required)

            SiebelMessage

            Property set of child property sets of type 'RuleViolation'. (Required)

            Related Information

            See the topic about workflows in Siebel Order Management Guide, Validate Method, and Format Violation Method.

              ValidateComplexProductFromPropertySet Method

              This method executes the product validation expression validation rules associated with the complex product in the property set and returns any rule violations.

              Arguments

              Argument Description

              IdFieldName

              [in] Row Id of the field name. (Required)

              RecordSet

              [in] The record set. (Optional)

              RootProductId

              [in] Root Id of the product. (Required)

              RootProductName

              [in] Root name of the product. (Optional)

              RuleViolation

              [out] The rule violation. (Optional)

              RuleViolationEmpty

              [out] Y or N flag indicating whether there are any violations. (Required)

              Related Information

              See the topic about workflows in Siebel Order Management Guide, Validate Method, and Format Violation Method.