Defining a New Effectivity Scope

Defining a New Effectivity Scope

In a previous blog post, we demystified the recently released Effectivity Services. That post provides an overview of how to assign Effectivity criteria and how to then use that criteria to resolve your 150% BOMs. An out-of-the-box (OOTB) Aras Innovator database comes with a standard Effectivity Scope with a few simple variables, but as usual, it's also possible to define your own Effectivity Scope to fit your needs. In this blog post, we'll cover how to create your own custom Effectivity Scope by walking through the use case of wanting to resolve our 150% BOMs based on manufacturing information.

Defining the Effectivity Variables

Before we create the scope, we first need to figure our what sorts of information should be contained in our manufacturing scope. For simplicity, we'll keep this to a manufacturing date, a batch number, and a manufacturing location. Let's start by opening up the Effectivity Variables and checking the existing variables.

  1. Log in as admin
  2. Navigate to TOC > Administration > Effectivity Services > Effectivity Variables
  3. Run an empty search to see all the existing variables

Manufacturing Date

We want our scope to be able to resolve based on when a particular batch of parts was manufactured. By following the steps above, we should see that there's already an existing Date variable. This seems generic enough that we can re-use it for our manufacturing date. Unfortunately, there don't seem to be existing variables for our other two pieces of information, so we'll have to create new two new Effectivity Variables.

Batch Number

We also want our scope to be able to resolve on a specific batch number, so that in the event that we have a faulty batch, we can check what the BOM looked like at the time those parts were created.

  1. Create a new Effectivity Variable
    1. Name - Batch
    2. Type - String
  2. Save and close this Effectivity Variable

Manufacturing Location

Lastly, we want our scope to be able to resolve on the location where our parts are manufactured. There's actually an ItemType that comes with the Manufacturing Process Planning (MPP) application that represents exactly this piece of information, so we can point our new Effectivity Variable to that ItemType to save the work of creating one ourselves.

  1. Create a new Effectivity Variable
    1. Name - Location
    2. Type - Item
    3. ItemTypempp_Location
  2. Save and close this Effectivity Variable

There's one extra step we'll need to do for this variable. Because this points to an ItemType, we need to configure Effectivity Services to be able to resolve based on this ItemType. We can do this by following the steps below.

  1. Navigate to TOC > Administration > ItemTypes
  2. Search for and open the ScopeCacheDependency ItemType
  3. Select the Poly Sources relationship tab
  4. Add a new relationship to the mpp_Location ItemType
  5. Save the close this ItemType

Creating the Effectivity Scope

Now that we have all of our Effectivity Variables, we can create the new Scope that uses them.

  1. Navigate to TOC > Administration > Effectivity Services > Effectivity Scope
  2. Create a new Effectivity Scope
    1. Name - Part BOM Manufacturing Scope
    2. Builder Method - effs_scopeObjectBuilderMethod
      1. This is a standard method that exists in the database
  3. In the Effectivity Scope ItemType relationship tab, add a new relationship to Part BOM
  4. In the Effectivity Variables tab, add a relationship to the DateBatch, and Location variables
  5. Save and close this Scope

We're finished! Effectivity only needs to be configured on a per ItemType basis and not on a per scope basis. Because the BOM Structure relationship tab on Part is configured to work with Effectivity OOTB, we don't need to do any additional configuration to add support for our new Scope. We can just hop right into using it.

Using the New Scope

Because we've already covered how to author and resolve on effectivity in our previous blog post, we'll instead focus this section on pointing out how our now two existing Effectivity Scopes will interact. To begin, we'll open up a Part BOM that has a few relationships and, more importantly, has some effectivity already defined under the default Aras Part BOM Scope.

As a quick refresher, we can right-click and anywhere in the grid and select View Effectivity to open up a panel on the right of the grid. This panel shows us more details about the effectivity of a selected row and also lets us quickly and easily edit the effectivity of the selected BOM.

Authoring Effectivity for Two Scopes on One BOM

If we take a look at the Effectivity editor, we'll see that there's an existing row describing an effectivity condition for the Aras Part BOM Scope. We can easily add a new row here to define another condition under our new scope.

  1. Click on the button to add a new row
  2. In the Effectivity Scope field, enter Part BOM Manufacturing Scope
  3. In the Effectivity Expression field, enter some expression such as Batch = 123 AND Date = [10/8/2020] AND Location = Detroit
  4. Click Apply to save this condition

We'll see that in the Effectivity Pane, a new row was added with our provided effectivity criteria. Additionally, we can see that there is now a comma separated list in the main grid showing all of our effectivity criteria together.

As a note here, it's also possible and sometimes encouraged to add multiple rows of effectivity criteria for the same scope. In our example, perhaps this same part is used in multiple different batches that were created on multiple different dates in multiple locations. We could write this using only one very long expression but that added complexity could quickly make it hard to maintain. Instead, we could just add a new row for each batch.

  1. Click on the button to add a new row
  2. In the Effectivity Scope field, enter Part BOM Manufacturing Scope
  3. In the Effectivity Expression field, enter some expression such as Batch = 234 AND Date = [10/15/2020] AND Location = Detroit

When we choose to filter the results, this BOM will be returned if either of these expressions match our criteria. For example, if we choose the filters below, the item will still be returned when the BOM is resolved because it matches our first effectivity condition.


One thing to keep in mind is that each expression on the item is treated as an individual entity even if they both belong to the same scope. For example, we can select the filters below where the Batch matches one of the expressions and the Date matches another, but the combination of Batch and Date does not match any of the expressions.


If we apply this criteria, we will see that the BOM is not returned when the structure is resolved.

Two Effec Scopes with the Same Variable

At the beginning of this design process, we decided to re-use the Date variable from the default Aras Part BOM Scope for our custom scope. In practice, this effectively functions as if there were two different Dates. Let's look at a BOM that has two different expressions: one for each Scope.

Now if we try to resolve this structure under our Part Manufacturing Scope with the date 10/1/2020, we'll notice that the BOM is not returned when the structure is resolved. While this BOM does have an expression referencing 10/1/2020, it is only valid under the Aras Part BOM Scope. Similarly, if we try to resolve this structure under the Aras Part BOM Scope with a date of 10/8/2020, the BOM will also not be returned.

Conclusion

Each part of Effectivity Services is fully customizable. Adding new Effectivity Variables or entire new Scopes is quick and simple with the most time consuming part being the actual data entry itself. As we continue to explore Effectivity Services, future blog posts will cover topics like adding effectivity to a brand new ItemType like Part Document. Each business has it's own unique challenges, so go out and try adding a new Effectivity Scope to solve yours.