Skip to main content

Variable Definitions Value Model

The value model describes a list of variable definitions. It is used to define the variables of a workflow.

Example

Check the Editors Example.

Configuration

import { createVariableDefinitionsValueModel } from 'sequential-workflow-editor-model';

builder
.property('foo')
.value(
createVariableDefinitionsValueModel({})
);

The model doesn't have any configuration yet.

Value Reading

The value is stored in a simple object:

interface VariableDefinition {
name: string;
type: string;
}

interface VariableDefinitions {
variables: VariableDefinition[];
}

To read the value you just need to read the property value:

const value: VariableDefinitions = step.properties['foo'];
const variables = value.variables; // array of variable definitions