Logic Variable Agent - JS/TS
Read logic variables (environment variables of a logic in a data process).
Logic Type | Available |
---|---|
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
- JavaScript
- TypeScript
import {
LogicVariable,
} from "@fstnetwork/loc-logic-sdk";
export async function run(ctx) {
const data = LogicVariable.get("data");
}
export async function handleError(ctx, error) {
// ... same
}
import {
GenericContext,
LogicVariable,
RailwayError,
} from "@fstnetwork/loc-logic-sdk";
export async function run(ctx: GenericContext) {
const data = LogicVariable.get("data");
}
export async function handleError(ctx: GenericContext, error: RailwayError) {
// ... same
}
Class Reference
Type
LogicVariable
Method: Finalise Task Result
Read
get(name: string): string | null
Parameter | Description |
---|---|
name | Logic variable name |
Read the string
value of a logic variable (null
if not exist).
Examples
const data = LogicVariable.get("data");