Skip to main content

Logic Variable Agent - JS/TS

Read logic variables (environment variables of a logic in a data process).

Logic TypeAvailable
Generic logic
Aggregator logic

Logic variables (string values) can be set while creating or editing a data process. The same logic can have different logic variables in different data processes.

Import and Usage

import {
LogicVariable,
} from "@fstnetwork/loc-logic-sdk";

export async function run(ctx) {
const data = LogicVariable.get("data");
}

export async function handleError(ctx, error) {
// ... same
}

Class Reference

Type

  • LogicVariable

Method: Finalise Task Result

Read

get(name: string): string | null
ParameterDescription
nameLogic variable name

Read the string value of a logic variable (null if not exist).

Examples

const data = LogicVariable.get("data");