Skip to main content
Version: 6.1

Overview

What is Scripting

B2Win Suite includes a built-in scripting language with a TypeScript-like syntax. It allows you to write custom logic directly inside workflows — transforming data, calling APIs, setting properties, and controlling execution flow.

Where to Use

Scripting is available in the following areas of B2Win Suite:

AreaDescription
Custom ScriptWrite custom transformation logic on tabular data or files.
If-Else ConditionEvaluate a script that returns true or false and route the input accordingly.
Switch CaseReturn 0, 1, or 2 to route the input to the matching output port.
Source Script (Table)Generate tabular data from a script (e.g. call an API and return a table).
Source Script (File)Generate a file from a script (e.g. fetch remote content and return a file).
Source Script (Object)Generate a JSON object from a script.
Data Prep (Custom Column)Add calculated columns using scripting expressions.
PropertiesDefine global or local property values using scripts.

For scripting examples inside the Workflow Builder, see Scripting in B2Win Suite.


Scripting Reference

SectionTopics
AI AssistantBuilt-in AI Chat in the FlowCode Editor — generate, explain, and debug scripts and SQL queries.
Getting StartedHello World, arithmetic, strings, conditionals, loops.
Language BasicsVariables, conditionals, comments, loops, error handling, structs.
Types & ObjectsPrimitive types, arrays, maps, and built-in objects (SuiteTable, LocalDate, JsonNode, etc.).
UtilitiesStatic utility classes accessed via util — HTTP, files, database, JSON, date/time, and more.
ContextsRuntime context (execution info) and node input types (DataFrame, File, DataObject).
PropertiesThe Property class for reading and setting global and local properties.
ConfigurationsThe Configs class for accessing workflow-level settings.

Tutorial

Follow a step-by-step walkthrough to write your first script.


Feedback

Have suggestions or found a bug? Share your feedback.