logologo
Get Started
Guide
Development
Plugins
API
Home
English
简体中文
日本語
한국어
Español
Português
Deutsch
Français
Русский
Italiano
Türkçe
Українська
Tiếng Việt
Bahasa Indonesia
ไทย
Polski
Nederlands
Čeština
العربية
עברית
हिन्दी
Svenska
Get Started
Guide
Development
Plugins
API
Home
logologo
RunJS Overview
Import Modules
Render in Container

Globals

window
document
navigator

ctx

ctx.blockModel
ctx.collection
ctx.collectionField
ctx.dataSource
ctx.dataSourceManager
ctx.element
ctx.exit()
ctx.exitAll()
ctx.filterManager
ctx.form
ctx.getModel()
ctx.getValue()
ctx.getVar()
ctx.i18n
ctx.importAsync()
ctx.initResource()
ctx.libs
ctx.location
ctx.logger
ctx.makeResource()
ctx.message
ctx.modal
ctx.model
ctx.notification
ctx.off()
ctx.on()
ctx.openView()
ctx.render()
ctx.request()
ctx.requireAsync()
ctx.resource
ctx.route
ctx.router
ctx.setValue()
ctx.sql
ctx.t()
ctx.view
Previous Pagectx.exit()
Next Pagectx.filterManager

#ctx.exitAll()

Terminate the current flow and all nested subflows. Use this when a global error or permission check requires stopping everything under the current event.

You can call it in FlowEngine scripts such as JSField, JSItem, or Action.

#Type definition (simplified)

exitAll(): never;

Calling ctx.exitAll() throws an internal FlowExitAllException, which is caught by the flow engine to stop the current flow instance and all subflows (e.g. child workflows, modal flows). After calling it, remaining statements will not execute.

Related methods:

  • ctx.exit() - terminate only the current flow instance
  • ctx.exitAll() - terminate all related flows under the current event

Tips:

  • Use for pre-checks, permission checks, or conditions that must block any subsequent steps
  • Often you show a message first via ctx.message, ctx.notification, or a modal, then call ctx.exitAll()
  • If you only need to stop the current subflow, use ctx.exit()
  • You rarely need to catch FlowExitAllException in business code; let the engine handle it