· mQuark · Technical Guides  · 3 min read

Precision Automation: The mQuark Actionful Type System

Deep dive into the type system that powers Actionful workflows

Deep dive into the type system that powers Actionful workflows

In many workflow automation platforms, data is often treated as an unpredictable “blob” of JSON passed from one step to the next. This lack of structure leads to “runtime errors” that are only discovered when a workflow fails in production.

At mQuark, we built Actionful on a foundation of rigorous logic. Every piece of data in an Actionful workflow is strongly typed, ensuring that your automation is robust, predictable, and easy to maintain.

The Taxonomy of Data: Kind and Container

Actionful’s type system, known as MqDataType, is designed to be immutable and highly performant. It distinguishes between what the data is and how it is organized.

1. MqDataKind (The “What”)

This defines the base primitive or structure of the data:

  • Void: Represents no return value, typically used for actions.
  • String: UTF-16 character sequences for text.
  • Boolean: Logical true or false values.
  • Numeric: High-precision decimal values designed for mathematical and financial logic.
  • DateTime: Temporal data including both date and time.
  • Object: A structured custom type identified by a unique ShapeId.

2. MqContainerType (The “How”)

This defines the dimensionality or collection behavior of that data:

  • Scalar: A single value of a specific kind.
  • Array: An ordered, index-based collection.
  • Map: A keyed collection where values are accessed by strings.

By combining these, you can create specific types like !string (a required string), numeric[] (an array of numbers), or user_profile[string] (a map of user objects).

The “Mathematical Ring” of Actionful

In mathematics, a Ring is a set where operations (like addition or multiplication) are “closed” — meaning the result of the operation is always another element within that same set.

Actionful’s workflow engine functions in a remarkably similar way. Workflows are constructed from Rules, and every rule is categorized by the data type it returns.

  • A NumericRule always returns a Numeric value.
  • A StringRule always returns a String value.
  • Logical rules like And or Or always return a Boolean.

Because every rule has a strictly defined output type, you can nest rules within each other to create an expression tree. No matter how complex your logic becomes, the “operations” (rules) are closed under the type system. You can never accidentally pass a “String” into a property expecting a “Numeric” because the system validates these connections during the design phase.

Custom Models: Speaking Your Business Language

While primitives are the building blocks, your business logic lives in Models. Actionful allows you to define custom data structures that mirror your real-world requirements.

These models are built using the same strict rules as our primitives. For example, you can mark a property as required using the ! prefix or indicate a collection with the [] suffix.

Example Model Definition:

// The `address` model
Building: numeric
Street: string
Town: string
Zip: !string

// The `person` model
FirstName: !string
LastName: !string
DateOfBirth: datetime
Address: address
Hobbies: string[]

In the example above, the person model uses the address model as a property type, demonstrating how you can build complex, nested hierarchies that remain fully validated.

Why Strong Typing Matters

The benefit of this system is Transactional Integrity. When you create an Endpoint to execute a workflow, Actionful takes a snapshot of your rules and models, creating an immutable version of your logic.

Whether you are using the Http Rule to communicate with external APIs or injecting custom logic via User Functions, the type system acts as a guardrail. It ensures that the data flowing into your workflow, through your logic, and out to your users is exactly what you expect it to be.

Ready to experience the power of logic-driven automation?

Start Building for Free | Explore our Pricing

Back to Blog

Related Posts

View All Posts »