Portal Community
No authentication required. The Function node executes JavaScript locally within the BizFirst workflow engine. No external service credentials are needed.

Function vs CodeExecute

BizFirst provides two scripting nodes. Understanding the difference helps you choose the right one:

FeatureFunctionCodeExecute
EngineSandboxed V8 execution (full JavaScript runtime)Jint (embedded lightweight JS engine)
Best forComplex logic, transformations, multi-step processing, custom business rulesSimple expressions, quick value transformations, inline calculations
Workflow data accessFull access via context object — all node outputs, variables, and input dataLimited — primarily for single expression evaluation
SandboxModeConfigurable — true (restricted) or false (broader access)Always sandboxed
Return valueExplicit return statement or last expression valueLast expression value
Error handlingRoutes to error port on exception or timeoutRoutes to error port on exception

Security Model

The Function node runs in a sandboxed V8 context. The security level is controlled by SandboxMode:

SandboxMode = true (Default — Recommended)

SandboxMode = false (Trusted Contexts Only)

Output Ports

PortDescription
successScript executed without errors. Output contains the return value of the script plus execution metadata.
errorScript threw an unhandled exception, the timeout was exceeded, or a syntax error was detected. Includes errorCode, message, and stack trace.

Use Cases

In This Guide

Configuration

Script, Timeout, SandboxMode properties — plus full documentation of the context object available inside scripts.

Input & Output

How to access input data and workflow state in scripts, return value handling, and error port behaviour.

Examples

Four examples: JSON transformation, pricing engine, multi-rule validation, and regex extraction.