AQS Join Query Improvement โ†”๏ธ

We’re updating the behaviour of AQS Join queries to ensure that all join attributes are exported correctly in a particular scenario.

This will change the output of the Export API endpoint for some AQS Join queries. However, rest assured that none of your saved queries will be affected!

Who will be affected?

Anyone who uses:

  • the Data Explorer’s export feature in Alloy Web
  • the Export API endpoint

Details

The change will only affect AQS Join queries where all the following are true:

  • the queried design contains a Link attribute to an interface
  • the query includes a join attribute from the interface
  • the query includes one or more join attributes from a child design/interface that implements the interface

Currently, in this scenario, the join attributes from the child design/interface are incorrectly included within the interface’s path group. As a result, these join attributes are omitted from the export files because their paths are invalid.

The change will correct this issue. Therefore, if you regularly export joined data, be aware that export files may start to contain attributes that were missing before.

Expected release

30th May 2024 as part of the Alloy v2.59 release.

Workflow Log Retention ๐Ÿ—ƒ๏ธ

Whenever a workflow triggers, a run log is created to record a summary of the actions performed and the items involved. By default, these logs are stored indefinitely.

However, after several years of unchecked growth, the logs now occupy over a terabyte of database storage! This in turn produces larger indexes that consume extra server memory and generally slow things down.

As these log files are rarely viewed past a certain point, we've decided to implement a sensible default retention period that should cover most requirements:

  • Manual and Event workflows - 14 days
  • Schedule workflows - 45 days

This will improve the health and performance of Alloy for everyone.

Who will be affected?

All customer projects that have ever run a workflow.

Details

After the release date, all workflow logs older than 14/45 days will be routinely deleted. This will affect both new and existing workflow logs.

Set a different retention period

It remains possible to set the retention period of individual workflows via the Alloy API.

When creating or editing a workflow via the Workflow endpoint, you can supply a value for the optional logsRetentionDays parameter. For more detail, see ReDoc / Swagger.

Expected Release Date

The end of January 2024.

Custom Grid Transformation ๐ŸŒ

By default, Alloy uses a simple Helmert transformation when converting geometry from the British National Grid coordinate system (EPSG:27700) to WGS 84 (EPSG:4326). This works well most of the time and requires no user input.

However, it can result in slight misalignment in a handful of cases, and we do like to give you choices where we can!

Therefore, as of the October 2023 update, you can now specify a grid shift file for a particular transformation (e.g. OSTN02, OSTN15) when importing or exporting geometry data via the API.

To use a different transformation, first upload its grid shift file to Alloy. The max size is 100MB and the supported formats are:  GSB, LLA, DAT.

Using the API

When using the Alloy API to import or export data, just add +nadgrids=<fileid> to the proj4 string (where <fileid>is the Item ID of your uploaded grid shift file).

When importing data using the ImportSettingsDataWebModel, you can specify the proj4 string as part of its geometry property.

When importing NSG/NLPG data using one of the two ImportSettingsStandardFormatWebModels, no proj4j string is specified. Instead, you can populate its gridFileItemID property with the Item ID of the grid shift file.

Using Alloy Web

When configuring a custom import in Alloy Web, you can configure the Geometry in step 3.

After choosing the Type, select the magnifier icon in the Coordinate system field and choose one of those listed. This populates the field with a proj4 string, which you can then suffix with +nadgrids=<fileid>.

The Return of Access Policies โœ…

Access policies are back, baby! Use them to enforce item-level access control.

Back in February, we announced that access policies were being temporarily removed, with a new implementation coming in future. They originally worked by tracing paths between the user and the item they were trying to access. In practice, the performance cost was too high, so we took them back to the drawing board.

We're pleased to announce that the new implementation of access policies has now arrived!

How do they work?

You can create one or more access policies for a particular design/interface. Each access policy can have one or more rules.

A rule applies to one or more user groups. It grants them conditional read access to items of that design/interface, based on the value each item has for a given attribute/property.

Currently, access policies can only be created and managed via the Alloy API.

What are they good for?

Access policies are enforced throughout Alloy. If a user isn't granted access to an item, it won't appear for them, regardless of whether they're using the map, the Data Explorer, etc.

This lets you control which items appear for which user groups. For example:

  • The "Emergency" group can only see tasks whose Priority attribute is "High" or "Critical".
  • The "Waste Sector C" group can only see waste jobs whose Geometry attribute is located within a specific area.
  • The "Acme Contractor" group can only see assets whose Default Team attribute is set to one of their teams.

What about Permissions?

Access policies are designed to work alongside Permissions. Think of them as a more granular replacement for the Read permission.

If you enable the Read permission on a design/interface, it grants read access to all of its items.

Alternatively, you can disable the Read permission and use access policies to grant conditional access to items, based on the values they hold.

Learn more

To learn about creating and managing access policies via the Alloy API, see Access Policies on the Alloy Help site.

Please note: the relational expressions will become available on 30th November, as part of the Alloy v2.53 release.

Goodbye Workflow Action Groups ๐Ÿ‘‹

Overview

A workflow action group lets you define a series of actions that can be stored on its own and referenced in other workflows. A workflow within a workflow, if you will.

However, now that manual workflows have parameters, they can provide this functionality in a better way. Therefore, for simplicity and consistency, we're removing workflow action groups and updating manual workflows so they can be referenced within other workflows.

Who will be affected?

Users who create and edit workflows via the Alloy API.

Details

You'll be able to reference a manual workflow in your workflow by creating an action whose design implements designInterfaces_workflowManualTrigger:

  • The parametersDesignCode property must be set to the design code of the manual workflow.
  • The new OutputActionId property must be set to the ID of the action that represents the final output of the referenced manual workflow. This output will be passed on to the next action in your workflow.

While it will be possible to chain multiple workflows (a workflow that references a manual workflow that references a manual workflow...), rest assured that Alloy will stop you from creating any circular references! 😮‍💨

Parameters

If the referenced manual workflow requires any parameters, you can supply them in the parameters array when adding/editing the relevant action in your workflow.

Depending on the type of WorkflowComputedItemAttributeWebModel used, you can supply values computed during your workflow, or pass on any parameter values that were supplied to your workflow when triggered.

Removed endpoints

All WorkflowActionGroup endpoints will be removed from the Alloy API.

Expected Release Date

26th October 2023 as part of the Alloy v2.52 release.

Report data source header changes ๐Ÿ“„

Overview

In the Report Builder, you can create an Item data source to represent the attributes and properties of a particular item, and an AQS data source to fetch the attribute data of multiple items.

You may have tried to use an Item data source as a parameter within an AQS data source, e.g. to fetch the defect items raised against that item. Currently, this doesn’t work because the Item Id header of the Item data source is a Text type, which isn't directly comparable with actual Item IDs.

Therefore, we're changing the Item Id header type from Text (string) to Link (AlloyId[]) to make this possible!

To accommodate this, a few other changes will also happen.

Who will be affected?

This will affect report builders wishing to use an Item data source as a parameter within an AQS data source.

Details

The Item data sources in everyone's custom reports will be updated with this change automatically.

However, any existing AQS data sources containing an unusable parameter as described above will still throw an error (1586360664 - Parameter type String cannot be used in node of type AlloyId). To fix this, simply recreate the parameter.

No more sorting by Item Id

After this change, it will no longer be possible to sort by the Item Id header on any data source. Doing so will throw an error (1603203353 - Ordering is not supported on the following type AlloyId).

Hardly anyone has attempted this, so we don't envisage it causing issues going forward.

More flexible joins

To create a Join data source, you must select a header from each of the two data sources you wish to join. Currently, you can only join headers of the same type (or a Link type to a Text type).

After this change, it will be possible to join a Text header to any other header type and vice versa. The other header type will be "stringified" for comparison.

AQS statistics constraints

AQS statistics data sources contain two headers to represent the data returned by its query. The Key header is a Text type and the Value header is a Number type.

After this change, API users will be able to specify the type of these headers via two new optional properties:

  • KeyConstraint - corresponds to the attribute being grouped on, so can be set to any attribute type.

  • ValueConstraint - corresponds to the aggregated values of the attribute being queried, so can be set to Number, DateTime or GeoJSON.

These can be declared within the relevant request model when using the /api/custom-report/{customReportCode}/data-source endpoint to add (Swagger/ReDoc) or edit (Swagger/ReDoc) an AQS statistics data source.

This will be useful for creating joins in some scenarios.

For example, imagine having an AQS statistics data source that counts Waste Containers grouped by type, and an AQS data source that fetches items of the Waste Container Types design.

To create a Join data source from these, you would select the Key header (String) of the first data source and the Item Id header (Link) of the second data source.

By default, the Item Id header will be stringified for comparison with the Key header, so the join should work. However, you can set KeyConstraint to "Link" to ensure an accurate comparison.

Expected release

29th June 2023 as part of the Alloy v2.48 release.

Manual Workflow Parameters ๐Ÿ› ๏ธ

Overview

With the April 2023 update comes the ability to specify parameters for manual workflows, enabling the workflow to take input from the user that triggers it!

This new feature is currently only available in the Alloy API but will appear in Alloy Web soon (look out for it in upcoming release notes 👀).

Start by creating a design with the desired parameters represented as attributes. When you create the workflow, you can now specify your parameter design in the trigger model. You can then reference the parameters by their attribute codes when configuring the workflow's actions.

When you trigger the workflow, you can specify which parameters to use and supply any required values. Once the feature comes to Alloy Web, users will be prompted to enter values for all parameters defined by the parameter design when they trigger the workflow.

Parameters greatly increase the flexibility of workflows, to the point where a single workflow can now cater for multiple circumstances that previously required setting up multiple workflows. We look forward to seeing how you use them!

Who is affected?

This change provides new opportunities for workflow editors when designing and implementing manual workflows via the Alloy API.

Details

Here are the steps for setting up a manual workflow that takes parameters via the Alloy API.

Create a parameter design

  • Create a design that implements the designInterfaces_workflowManualTrigger interface.
  • Add an attribute for each parameter you plan to use.

Create a workflow

  • Create a workflow via the /api/workflow endpoint (Swagger/ReDoc).
  • For the trigger property, specify a WorkflowTriggerWebModelBase with a discriminator of ManualTrigger
  • For the parametersDesignCode property, enter the code of your parameter design.

Use a parameter in an action

  • Add an action via the /api/workflow/{code}/action endpoint (Swagger/ReDoc).
  • For the parameters property, specify an array containing at least one object with a discriminator of WorkflowComputedItemAttributeWebModel.
  • For the value property of the WorkflowComputedItemAttributeWebModel object, specify an object with a discriminator of WorkflowSyntaxNodeTriggerParameterWebModel.
  • For the parameterCode property of the WorkflowSyntaxNodeTriggerParameterWebModel object, specify the relevant attributeCode from your parameter design.

Trigger the workflow

  • Run the workflow via the /api/workflow/{code}/manual-run endpoint (Swagger/ReDoc).
  • For the triggerParameters property, specify the relevant attribute code from your parameter design and optionally provide a value.

Removal of Access Policies

Overview

Alloy’s robust Permissions system gives you fine control over who has read/write access to most of the objects in your Alloy database (e.g. designs, layers, workflows).

To take this a step further, we introduced Access Policies. These are simple rules defined per design/interface, which ensure that users can only access items that can be traced back to them. For example, making job items only accessible to users who are members of the job’s allocated team.

While Access Policies work well in principle, the current implementation unfortunately comes with too much of a performance cost.

Therefore, Access Policies will be removed in the next Alloy release, to be replaced with a better implementation at a later date.

Who will be affected?

No active customers are currently using this feature, so we expect its removal to have zero impact.

Details

The /api/access-policy/ endpoints will be removed from the API. Any remaining access policies will be deleted.

Expected Release Date

23rd February 2023 as part of the Alloy v2.44 release.

Removal of old API key mechanism ๐Ÿ”‘

Overview

Back in December 2021, we announced that the mechanism for API keys would be changing.

In summary, API keys would no longer be generated automatically for every user, so new API keys must be generated on demand. Additionally, these new API keys must be passed using the OAuth 2.0 Bearer token format. For full details, please see the previous New API Key Management announcement.

These changes were implemented on 13th January 2022, with the old API keys remaining valid for a year.

Therefore, this is to remind everyone that the old API key mechanism will be removed in January 2023!

Who will be affected?

Any user or integration that still uses an old API key to communicate with the Alloy APIs.

Details

As of the release date below, old API keys that were created before 13th January 2022 will no longer be valid.

Additionally, the /api/user/me endpoint (Swagger/ReDoc) will no longer include the old apiKey property in its responses.

To learn about the new endpoints for managing API keys, please see the previous New API Key Management announcement.

How can I check my API key?

The simplest way to check if your API key is "old" or "new" is to consult your code. Does it pass the API key in the OAuth 2.0 Bearer token format (RFC 6750)? If so, your API key is new!

Alternatively, you can use the GET /api/user/me endpoint (Swagger/ReDoc) before the release date to return information about the currently logged in user. If your API key matches the value of the depreciated apiKey property in the returned user, your API key is old.

If in doubt, we recommend using the POST /api/api-key endpoint (Swagger/ReDoc) to create a new API key.

Mesh Users

If you have any workflows that use a Call Mesh action, your Alloy customer project will need updating with a new API key. We've been reaching out to customers we believe to be affected by this, but if in doubt, please contact Support to request this.

Expected Release Date

26th January 2023 as part of the Alloy v2.43 release.

Changes to the ApplicableTypes endpoints

Overview

We recently added several Applicable Type endpoints to the Web API: https://announcements.alloyapp.io/applicable-types-now-enforced-by-web-api-3jpgbe

Applicable Types define how items of various activity-related designs can link to each other, e.g.

  • Which Asset types can each Job/Inspection/Defect type be linked to?
  • Which Job types can each Job Work Unit type be linked to?

When using the api/applicable-type/applicable-from endpoint, you may receive some unexpected results. Put simply, this is because the current logic is finding links that can be applicable but haven’t explicitly been made applicable.

To improve this, we’re changing how the endpoint behaves. Rather than accepting a list of designs, it will instead accept a list of items. The new logic will be able to use the parent or child items to determine which DoDIs or items are applicable from that item.

This should produce results that are more in line with expectations! However, it will require some breaking changes. 😐

Who will be affected?

These breaking changes will affect anyone who uses the ApplicableTypes endpoints on the Web API.

Details

New Endpoint Addresses

The addresses of the following endpoints will be changing.

List Applicable From Types endpoint

The request for this endpoint (ApplicableTypeFromWebRequestModel) will be changing:

  • The toAll property will be removed.
  • The from property will no longer accept a ApplicableFromItemWebModel (item IDs) and therefore will no longer require a discriminator. It will only accept ApplicableFromDodiWebModel (DoDi codes).
  • The toAllItems required property will be added (to replace toAll). This is an array of item IDs that you wish to check.
  • The filterAttributeCode required property will be added. This specifies the link attribute to find applicable types on. The attribute must be present on all the items provided in toAllItems.

For example, to query which job types can be raised against specific assets, you would provide these values for the aforementioned parameters:

  • ToAllItems = an array of asset item IDs
  • FilterAttributeCode = attributes_tasksAssignableTasks
  • From = designInterfaces_jobs
    (to exclude inspections and other task types)

Additionally, the response model for this endpoint (ApplicableTypeFromWebResponseModel) will also be changing:

  • The NoRestrictions property will be added.  If no results are returned, this boolean explains why. If true, there are no restrictions, which means everything applies. If false, it means that nothing applies.
  • The results can be of type ApplicableFromDodiWebResponseModel or ApplicableFromItemResultWebModel, so these are the new discriminators to use (no more ApplicableItemWebModel).

Importantly, this revised endpoint won’t support finding applicable job types for supplied work unit items. This will be handled by a new endpoint coming in future.

List Applicable To Types endpoint

The response for this endpoint will be changing:

  • The results can only be of type ApplicableToDodiWebResponseModel. Therefore, it will no longer be necessary to supply a discriminator.

Expected Release

8th December 2022 as part of the Alloy v2.42 release.

The documentation available on Swagger and ReDoc will be updated accordingly.

Show Previous EntriesShow Previous Entries