Create a workflow

A workflow can be created on any event in Nordcraft. This can be a standard JavaScript event on an element, a custom event on a component or lifecycle events like On load or On attribute change.

Create a workflow

To create a workflow on an event:

  1. 1
    Select the event. This can be any event in Nordcraft
  2. 2
    Add nodes to create your logic

Reusable workflows

If you have logic in your component that you need multiple times or if the logic tree is complex, you can create a reusable workflow from the data panel.

Create reusable workflow

To create a reusable workflow:

  1. 1
    Make sure you have no element selected so that you can see the data panel. Click the + button in the workflows section.
  2. 2
    Select a name for the worflow and optionally add parameters
  3. 3
    Add nodes to create your logic
Tip

Create reusable workflows to keep your logic trees managable or if you need the same functionality multiple times.

Parameters and Events

When a workflow is triggered by an event, you have access to the event's data within the formulas of the workflow. That way you can react to the data of the event.

Use event data

In reusable workflows, you can define parameters. These are the inputs of the workflow. You can use them in any formula in the workflow. By defining parameters, you can create workflows that can cover multiple scenarios.

Create parameters

To create a parameter:

  1. 1
    Click the + button
  2. 2
    Choose a name for the parameter
  3. 3
    Optionally assign a test value. This value is only valid in the editor and will not affect the production app

Nodes

Nodes are the core of workflows. A node is an action or a piece of logic that is executed sequentially. Nodes are the visual language in Nordcraft that you use to compose the desired logic. There are several built-in nodes like Set variable, Set session cookies or Switch. But you can also call custom actions or reusable workflows. This way you can create nested workflows and individual pieces of logic that are composable.

Create nodes

To add a node:

  1. 1
    Click on a + icon in the workflow
  2. 2
    Pick a node from the list and click on it
Tip

You can copy and paste nodes in a workflow or between workflows via the context menu or Cmd/Ctrl + C and Cmd/Ctrl + V.

04/14/2025
Edit article
Help Forum