ION Actions
ION Actions turn your physical controls into digital guardrails.
ION Actions allows you to define, manage, and automate business rules that govern your manufacturing processes directly within ION, leveraging the power and flexibility of GraphQL. Actions enable users to create, edit, update, or delete rules that determine workflow behaviors, enforce data validation, and manage conditions for status transitions.
Key Action Fields
Each Action consists of key attributes that define its behavior and purpose:
Title: Clearly identifies the Action's intent, appearing in toast notifications and serving as an internal reference for logging and tracking purposes.
Context: Contains all necessary data used within the Action's script. This may include details such as model attributes, user roles, and specific issue details, structured as a JSON string for easy integration within GraphQL.
Code: A Python-based script executed whenever the Action is triggered. This script defines the logic, conditions, and behaviors enforced by the Action. If conditions specified in the code are not met, a ValidationError is triggered.
Target: Specifies the object or entity you wish to control and monitor for changes. The target is selected from a dropdown list during the initial creation of an Action.
Event: Determines when the Action's Python code is evaluated. You can choose from UPDATE, CREATE, or DELETE events based on when you want the Action to execute in response to changes in the target.
Use cases for Actions include:
Controlling when and how statuses within workflows can be updated or progressed.
Ensuring critical fields are filled out before proceeding in a process.
Validate that certain conditions are met before building critical hardware.
Example: making sure parts are flight worthy before installation.
Actions Statuses
Below is guidance on creating and managing Actions effectively:
Enabled: Actions in this status are live and actively enforced throughout your organization's production workflows. Newly created actions set to enabled will immediately influence workflow behaviors based on their conditions.
Disabled: Actions in this status are not evaluated or enforced. Disabling Actions allows safe testing and refinement without disrupting live workflows, providing flexibility to toggle Actions between enabled and disabled states as needed.
Remember, you must enable rules within your organizational settings before using Actions to automate and enforce your processes. To do so you can follow the following instructions:
Turn rules on in your environment:
First, rules must be enabled in your organization settings in order to use them.
Check that the rules are enabled with the below query:
{
me {
organization {
id
_etag
settings {
rules {
enabled
}
}
}
}
}
If they are not, enable them with this mutation:
mutation UpdateOrganization($input: UpdateOrganizationInput!) {
updateOrganization(input: $input) {
organization {
settings {
rules {
enabled
errorState
errorStateMessage
}
}
}
}
}
With the following input variables (retrieve the etag
from the first query):
{
"input": {
"id": <populate from first query>,
"etag": "<populate from first query>",
"settings": {
"rules": {
"enabled": true
}
}
}
}
Last updated
Was this helpful?