Alloy Announcements logo

Announcements

Back to Homepage Subscribe to Updates

Labels

  • All Posts
  • Improvement
  • highlight
  • feature
  • deprecation
  • Fix
  • API
  • mesh
  • mobile
  • web

Jump to Month

  • April 2025
  • March 2025
  • February 2025
  • January 2025
  • December 2024
  • November 2024
  • September 2024
  • August 2024
  • July 2024
  • June 2024
  • May 2024
  • April 2024
  • March 2024
  • January 2024
  • December 2023
  • November 2023
  • October 2023
  • September 2023
  • July 2023
  • June 2023
  • May 2023
  • April 2023
  • March 2023
  • February 2023
  • January 2023
  • December 2022
  • November 2022
  • October 2022
  • September 2022
  • August 2022
  • July 2022
  • June 2022
  • May 2022
  • March 2022
  • February 2022
  • December 2021
  • November 2021
  • September 2021
  • June 2021
  • April 2021
  • February 2021
  • January 2021
  • September 2020
  • July 2020
Powered️ byAnnounceKit

Create yours, for free!

2 years ago

Applicable Types Now Enforced by Web API

Overview

As part of the ongoing changes to the Extended API, we have updated the Web API to now handle the logic associated with Applicable Types. This ensures that items cannot be created linked to parents that are not compatible or applicable to that item. The Applicable Types logic only governs the creation of Jobs, Inspections and Defects to Assets and Job Work Units to Jobs.

This change also includes the creation of new endpoints on the API to handle listing and managing Applicable Types. Attempting to create an item that is governed by applicable types, to a parent item that is not applicable will result in an error.

Who will be affected?

This change affects all users who create Jobs/Inspections/Defects through the Web API directly or through the Create Item process on the Web Frontend. Whereas previously it was possible to create items that did not adhere to Applicable Types, this will no longer be possible.

Details

Currently, it is possible to create Jobs/Inspections/Defects/Job Work Units through the Web API and set the parent asset or job, regardless of the design. Therefore bypassing the logic implemented on the Extended API through Applicable Types. This created the possibility for inconsistencies as users from one service area could raise items against incorrect parents from another service area.

To support this change, a number of Applicable Type filter designs and attributes have been deprecated and will be set to customer context:

designs_jobFilters 

designs_jobFilterApplicableTypes

designs_inspectionFilters 

designs_inspectionFilterApplicableTypes

designs_defectFilters

designs_defectFilterApplicableTypes

attributes_workItemsAppliesTo

designs_workItemApplicableTypes

Two new designs designs_applicableTo and designs_applicableFilter have been created as part of Core blueprints to handle Applicability across Alloy. 

designs_applicableTo

designs_applicableTocontains two string attributes that describe applicability:

attributes_applicableFrom - Can contain a Design or Design Interface Code or ItemID

attributes_applicableToTo - Will contain a Design or Design Interface Code

Values in attributes_applicableFrom are considered applicable to the corresponding values in attributes_applicableToTo.

designs_applicableFilter

designs_applicableFilter holds information that defines the validation rules applied by the Alloy Engine that were previously hard-coded. The design holds the following attributes:

attributes_applicableFilterLink - a string attribute containing a link attribute code. Changes to this link attribute will be validated against the applicable types. The design containing this attribute will be treated as "to" side of the filter and the design it links to will be considered the "from"

attributes_applicableFilterFrom - a required string attribute that contains the design or design interface code that of the "from" side of the applicable type

attributes_applicableFilterVia - an optional string attribute containing a link attribute code. This is a child or parent link that changes the "to" side of the applicable type to be the child or parent items

New API Endpoints

The following new endpoints have been added to the Web API to allow management of the new applicable types:

/api/applicable-type/applicable-to - Lists applicable to types

/api/applicable-type/applicable-from - Lists applicable from types

/api/applicable-type/add - Add applicable types

/api/applicable-type/remove - Remove applicable types

The existing applicable types endpoints on the Extended API will not be removed. Calls to these endpoints will be re-routed through the new endpoints automatically.

Expected Release Date

This change will be included as part of the v2.37 release of Alloy on 30th June 2022




Avatar of authorJonathan Shaw