Create an Approval Rule

Approval rules in change orders can be based on items, attributes, or attribute groups. You can create rules to route each attribute group to a different approver or approval group.

You can create approval rules based on these attribute types:
  • Change standard attributes.
  • Change extensible flexfield attributes.
  • Affected item extensible flexfield attributes.
  • Affected item standard attributes.
Note that you can’t create approval rules based on these attribute types:
  • Change header descriptive flexfields and change header context descriptive flexfields.

  • Change line standard attributes, change line descriptive flexfields, and change line context descriptive flexfields.

In this example, you create a change order approval group and an approval rule.

Rules are based on:

  • The new item data including the unchanged data from production or source version and

  • The modified data.

The figure shows one of the steps in creating an approval rule.

One of the steps in creating an approval rule.

Prerequisites:

  • Ensure that extensible flexfields are deployed and synchronized in BPM.

  • For the change type, ensure that the approval is set to rules-based.

    To do this, run the Manage Change Order Types task in the Product Management Offering. Edit the change type to set the approval to rules-based.

The image shows change order type set as Rule based.

Change order type set as Rule based

The image shows an approval group and its members.

An approval group and its members

Create a Change Order Approval Group

  1. From the Setup and Maintenance work area, run the Manage Approval Group task in the Product Management offering.

  2. Click Create Approval Group.

  3. Enter a name for the group and click Save. For example, create a ComplianceTeam group to route all compliance related changes to this group. Note that you must avoid using a space in the group name.

  4. Click Add Member.

  5. In the Add to Group dialog, select either a user or an existing approval group and click OK.

  6. Save the approval group.

Create a Change Order Approval Rule and Include the Approver

The ChangeOrderApprovalTask can be used to create an approval rule for change orders, change requests, problem reports, and corrective actions.

For information on how a ChangeOrderApprovalTask can be used to create an approval rule for change orders, change requests, problem reports, and corrective actions, see Configure Approval Rules.

Here's an example of a rule based on change extensible flexfield attributes.

When the extensible flexfield named Compliance Details is defined on the change order, and the value of attribute meetsCompliance is Yes, users defined in the approval group named ComplianceTeam will receive approval notification when change moves to the approval status.

The image shows the extensible flexfields of the Meet Compliance attribute.

The extensible flexfields of the Meet Compliance attribute

This image shows the compliance rule:

The compliance rule

Rule Syntax with Examples

Here's what you need to keep in mind while writing approval rules:

If you're associating an attribute group to a non-root item class, and the item class and attribute group both have an internal name (API name) defined, use this syntax:

[<Attribute Group Name API>].[<Internal Attribute Name>]

Example: Consider that the item class is Radio and Region is SouthEast, and the approval group is Technology Team. The rule is written as follows:

Item.categoryCode is "RADIOS" and

Region.region is "SE"

THEN

Approval Group: TechTeam

Here's an image that shows the rule added in BPM Worklist.Image that shows the rule added in BPM Worklist

When the item class of the affected item is RADIOS and the extensible flexfield attribute (on the item) named Region is set to SouthEast, users in the TechTeam approval group will receive an approval notification when the change order moves to the approval status.

Best Practices

  • When you create an item class or an attribute group, make sure you specify the API name.
  • Avoid creating item classes with names such as Item, ItemCategory, ItemRevision, ItemSupplier, RevisedItemLineApproval, ChangeObjectApproval, Evidence, and Certificate. Or creating similar names for the item class and flexfield attribute groups. Distinct names help ensure that rules run without error.

Assign Approver Based on Change Header Attribute

Let's say you want to manage the approval of engineering change orders in which reason for change is either Quality or Safety. You want to route the approval to the AsiaDesignTeam approval group.

Here's how you create the rule:
  1. In the If statement click the Advanced Add or Modified Options (plus) icon and select simple test.

    Enter:
    ChangeObjectApproval.attributeCategory is "ORA_ENG_CO"
  2. Click Add > Nested test. Enter
    ChangeObjectApproval.reasonCode is "QUALITY"

    Or

    ChangeObjectApproval.reasonCode is "SAFETY"
  3. In the Then statement, enter the approval group as:

    AsiaDesignTeam

    Here's an image that shows the approval rule added in BPM Worklist.

    Image that shows the approval rule added in BPM Worklist

If it’s an engineering change order, and the Reason Code of the change is either QUALITY or SAFETY, users defined in the AsiaDesignTeam approval group will receive approval notification when change is moved to approval status.

Assign Approver Based on Change Extensible Flexfield Attribute

Let's say you want to manage the approval of change orders which don't meet compliance by routing the approval to the ComplianceTeam approval group. You have extensible flexfield defined as follows:

  • Attribute Group API name = ComplianceDetails
  • Attribute Code=meetsCompliance

The value is a list, contains Yes and No.

In the If statement click the Advanced Add or Modified Options (plus) icon and select simple test. Enter

ComplianceDetails.meetsCompliance is "No"
In the Then statement, enter the approval group as:
ComplianceTeam

Here's an image that shows the approval rule created to route compliance changes to an approval group.

The approval rule created to route compliance changes to an approval group

When the compliance details are defined in the change order, and the value of the meetsCompliance attribute is No, users defined in the ComplianceTeam approval group will receive an approval notification when change moves to the approval status.

Assign Approver Based on Item Class

Let's say you want to manage the approval of items which belong to the item class named bikes. Here's the rule syntax:
  1. In the If statement click the Advanced Add or Modified Options (plus) icon and select simple test. Enter
    Item.categoryCode is "bikes"
  2. In the Then statement, enter the approval group as:
    Lead_Design_Engineer

    Here's an image that shows the approval rule added in BPM Worklist.

    Image that shows the approval rule added in BPM Worklist.

When the item class of the affected item is Bikes, users defined in the Lead_Design_Engineer approval group will receive an approval notification when change moves to the approval status.