Skip to main content

Runner class

๐Ÿ“– Descriptionโ€‹

The Runner class is the workhorse of all Tripetto runners. It parses a form definition and turns it into an virtual finite state machine. New form instances can then start and the right events for rendering the UI will invoke while the Runner library executes the state machine for that form. It also handles the data collection (storing the values it receives from the UI) and handles the validation of that data. Form instances can be paused and resumed if desired.


๐Ÿ†• constructorโ€‹

Creates a new Runner instance with the specified runner properties.

Signatureโ€‹

constructor(properties: IRunnerProperties): Runner

Parametersโ€‹

NameTypeOptionalDescription
propertiesIRunnerPropertiesNoSpecifies the runner core properties.

Return valueโ€‹

Returns a reference to the new Runner instance.

Exampleโ€‹

const runner = new Runner({
definition: /* Supply your form definition here */,
mode: "paginated"
});

๐Ÿ“Œ Staticsโ€‹


๐Ÿ”ง getInitialStorylineโ€‹

Retrieves an initial empty storyline. Some runners use this to initiate a storyline before the runner is actually started.

Signatureโ€‹

getInitialStoryline<T extends NodeBlock>(mode: "paginated" | "continuous" | "progressive" | "ahead"): IStoryline<T>

Parametersโ€‹

NameTypeOptionalDescription
mode"paginated" | "continuous" | "progressive" | "ahead"NoSpecifies the mode of operation of the runner. See the IRunnerProperties interface for more information.

Return valueโ€‹

Returns a storyline object of type IStoryline.

๐Ÿ—ƒ๏ธ Fieldsโ€‹


๐Ÿท๏ธ definitionโ€‹

Sets or retrieves the form definition.

Typeโ€‹

IDefinition


๐Ÿท๏ธ epilogueโ€‹

Retrieves the epilogue of the loaded definition (or undefined if the form does not have an epilogue configured). An epilogue can be used by runners (that support it) to show a closing message when a form is completed.

Typeโ€‹

IEpilogue | undefined


๐Ÿท๏ธ fingerprintโ€‹

Retrieves the fingerprint of the form.

Typeโ€‹

string

tip

More information in the Form fingerprint guide.


๐Ÿท๏ธ instanceโ€‹

Retrieves the active instance or undefined if no form instance is active.

Typeโ€‹

Instance | undefined


๐Ÿท๏ธ isEmptyโ€‹

Retrieves if the loaded form definition is an empty form. Useful when you want to render a special message in the UI for indicating an empty form.

Typeโ€‹

boolean


๐Ÿท๏ธ isFinishedโ€‹

Retrieves if the form is finished.

Typeโ€‹

boolean


๐Ÿท๏ธ isFinishingโ€‹

Retrieves if the form is finishing. This is true when the form is in the process of completing, but this process might fail. Check isFinished to determine if the form actually has finished.

Typeโ€‹

boolean


๐Ÿท๏ธ isLoadedโ€‹

Retrieves if the form definition is loaded successfully.

Typeโ€‹

boolean


๐Ÿท๏ธ isPausedโ€‹

Retrieves if the form is paused.

Typeโ€‹

boolean


๐Ÿท๏ธ isPausingโ€‹

Retrieves if the form is pausing. This is true when the form is in the process of being paused, but this process might fail. Check isPaused to determine if the form actually has paused.

Typeโ€‹

boolean


๐Ÿท๏ธ isPreviewโ€‹

Sets or retrieves if the form is in preview mode. This is a special mode that allows the whole form to be shown by the runner UI (basically ignoring all branch conditions, so all branches are taken and shown). This is useful when building a live preview panel that is shown along with the builder.

Typeโ€‹

boolean


๐Ÿท๏ธ isRunningโ€‹

Retrieves if the form is running (a form instance is active).

Typeโ€‹

boolean


๐Ÿท๏ธ isStoppedโ€‹

Retrieves if the form was stopped.

Typeโ€‹

boolean


๐Ÿท๏ธ isTestโ€‹

Sets or retrieves if the form is in test mode. This is a special mode that runs the whole form normally, but without invoking the data submission events when the form completes. This is useful in a live preview setup where users want to test a form, without generating response data.

Typeโ€‹

boolean


๐Ÿท๏ธ isVerboseโ€‹

Sets or retrieves the verbose mode of the runner. When verbose mode is activated, it will log more messages to the log and the logger function. This is useful for debugging a form definition.

Typeโ€‹

boolean


๐Ÿท๏ธ l10nโ€‹

Retrieves the localization namespace with helper functions for working with translations and locales.

Typeโ€‹

L10n.Namespace


๐Ÿท๏ธ logโ€‹

Contains the log of the runner.

Typeโ€‹

string[]


๐Ÿท๏ธ loggerโ€‹

Sets or retrieves the log function that is invoked when a new message is logged.

Typeโ€‹

(message: string) => void

Exampleโ€‹

const runner = new Runner({
definition: /* Supply your form definition here */,
mode: "paginated"
});

// A simple logger to output log messages to the browser console.
runner.logger = (message) => console.log(message);

๐Ÿท๏ธ metricsโ€‹

Contains metrics about the virtual finite state machine that is generated for the currently loaded form definition.

Typeโ€‹

{
/* Number of states. */
states: number;

/* Number of transducers. */
transducers: number;

/* Number of branches. */
branches: number;

/* Number of conditions. */
conditions: number;

/* Number of slots. */
slots: number;
}

๐Ÿท๏ธ modeโ€‹

Sets or retrieves the current mode of operation for the form. See the IRunnerProperties interface for more information about the possible modes.

Typeโ€‹

"paginated" | "continuous" | "progressive" | "ahead"


๐Ÿท๏ธ nameโ€‹

Retrieves the name of the form.

Typeโ€‹

string


๐Ÿท๏ธ namespaceโ€‹

Retrieves the namespace for the runner. The namespace contains the blocks used in the runner.

Typeโ€‹

INamespace


๐Ÿท๏ธ prologueโ€‹

Retrieves the prologue of the loaded definition (or undefined if the form does not have a prologue configured). A prologue can be used by runners (that support it) to show a welcome message before starting the actual form.

Typeโ€‹

IPrologue | undefined


๐Ÿท๏ธ statusโ€‹

Retrieves the status of the runner. It can be one of the following values:

  • idle: The runner is idle, no form instance is running;
  • empty: The form definition is empty, so the form cannot run;
  • preview: The runner runs in preview mode (see preview for more information);
  • running: An active form instance is running;
  • pausing: The active form instance is pausing;
  • paused: The active form is paused;
  • stopped: The active form is stopped;
  • finishing: The active form has completed and is now finishing;
  • finished: The active form is completed and finished.

Typeโ€‹

"idle" | "empty" | "preview" | "running" | "pausing" | "paused" | "stopped" | "finishing" | "finished"


๐Ÿท๏ธ storylineโ€‹

Retrieves the storyline of the active form instance. The storyline contains all sections and nodes that are visible and should render in the UI.

Typeโ€‹

Storyline | undefined

โ–ถ๏ธ Methodsโ€‹


๐Ÿ”ง destroyโ€‹

Destroys the runner instance.

Signatureโ€‹

destroy(): void

๐Ÿ”ง finishโ€‹

Finish the active instance when it is finishable. A form is finishable when all nodes pass their validation and the form has reached the end.

Signatureโ€‹

finish(): Promise<void> | false

Return valueโ€‹

Returns a Promise that resolves when the instance was finished or false when the instance is not finishable. When an instance is finishable the submission events will invoke when the form is finished. Those events could contain asynchronous code, for example when form data is sent to a HTTP endpoint. When that operation fails, the promise will reject, and the form instance is kept active. If the operation succeeds, the promise will resolve.


๐Ÿ”ง loadโ€‹

Loads a form definition.

Signatureโ€‹

load(definition: IDefinition | string): Errors

Parametersโ€‹

NameTypeOptionalDescription
definitionIDefinition | stringNoSpecifies the form definition to load. You can either supply the form definition as an object or as a JSON string.

Return valueโ€‹

Returns an Errors type with the result of the load operation. Errors.None indicates the operation succeeded.


๐Ÿ”ง pauseโ€‹

Pauses the runner and returns an ISnapshot object that can be used to restore it later on.

Signatureโ€‹

pause(customData?: {}, onPause?: (snapshot: ISnapshot, done: (succeeded: boolean) => void) => void): Promise<ISnapshot> | ISnapshot | undefined

Parametersโ€‹

NameTypeOptionalDescription
customData{}YesOptional custom data that should be stored in the snapshot.
onPause(snapshot: ISnapshot, done: (succeeded: boolean) => void) => voidYesSpecifies a function that is invoked when the pause is initiated. This function receives the pause snapshot together with a callback function that needs to be invoked to indicate if the pause should be executed or dismissed.

Return valueโ€‹

When the onPause argument is omitted, this method returns a ISnapshot object or undefined when the snapshot fails. When the onPause argument is specified, this method returns a Promise that resolves or rejects based on the result of the done function called in the onPause function.

info

There is a JSON Schema available for the ISnapshot object (handy for static validation). You can download it here.

Exampleโ€‹

const runner = new Runner({
definition: /* Supply your form definition here */,
mode: "paginated"
});

// Example 1: Synchronous pause
const snapshot = runner.pause();

// Example 2: Asynchronous pause
const snapshot = await runner.pause({}, async (snapshot, done) => {
// Send the snapshot to an endpoint
const response = await fetch("/example-server", {
method: "POST",
headers: {
"Content-Type": "application/json"
},
body: JSON.stringify(snapshot)
});

done(response.ok);
});
tip

If you want to retrieve a runner snapshot without actual pausing/stopping it, use the snapshot method.


๐Ÿ”ง reloadโ€‹

Reloads the runner with the specified definition. During a reload the runner tries to maintain any collected data, making it suitable to use in a live preview setup.

Signatureโ€‹

reload(definition: IDefinition, onlyRestartWhenRunning: boolean = false): Instance | undefined

Parametersโ€‹

NameTypeOptionalDescription
definitionIDefinitionNoSpecifies the definition to load.
onlyRestartWhenRunningbooleanYesSpecifies to only restart the runner if it was running before the reload was requested (default is false).

Return valueโ€‹

Returns a reference to the new form instance or undefined when no instance was started.


๐Ÿ”ง rerenderโ€‹

Rerenders the runner for the specified instance.

Signatureโ€‹

rerender(instance: Instance): void

Parametersโ€‹

NameTypeOptionalDescription
instanceInstanceYesReference to the instance.

๐Ÿ”ง restartโ€‹

Restarts the runner.

Signatureโ€‹

restart(preserveData: boolean = false): Instance

Parametersโ€‹

NameTypeOptionalDescription
preserveDatabooleanYesSpecifies if the data of an existing running instance should be preserved (default is false).

Return valueโ€‹

Returns a reference to the new form instance.


๐Ÿ”ง restoreโ€‹

Restores a runner snapshot. A snapshot is a saved state of a form instance that can be restored later on. To obtain a snapshot you either pause the runner or use snapshot.

Signatureโ€‹

restore(snapshot: ISnapshot): Instance | undefined

Parametersโ€‹

NameTypeOptionalDescription
snapshotISnapshotNoSpecifies the snapshot to restore.

Return valueโ€‹

Returns a reference to the form instance or undefined if the snapshot data was invalid.


๐Ÿ”ง snapshotโ€‹

Takes a snapshot of the current state of the runner without stopping/pausing it. The returned ISnapshot object can be used to restore the runner later on.

Signatureโ€‹

snapshot(customData?: {}): ISnapshot | undefined

Parametersโ€‹

NameTypeOptionalDescription
customData{}YesOptional custom data that should be stored in the snapshot.

Return valueโ€‹

Returns a ISnapshot object or undefined when the snapshot fails.

info

There is a JSON Schema available for the ISnapshot object (handy for static validation). You can download it here.

tip

The pause method does the same, but that function also stops (pauses) the runner.


๐Ÿ”ง startโ€‹

Starts a new form instance. Throws an error if no form definition is loaded.

Signatureโ€‹

start(snapshot: IInstanceSnapshot, onInitialize?: (instance: Instance) => void): Instance

Parametersโ€‹

NameTypeOptionalDescription
snapshotIInstanceSnapshotNoSpecifies the instance snapshot to restore.
onInitialize(instance: instance) => voidYesSpecifies a function that is invoked when the instance is started. Can be used to prefill values.

Return valueโ€‹

Returns a reference to the form instance.

caution

The IInstanceSnapshot interface is different then the ISnapshot interface. An instance snapshot only contains a single instance, whereas the snapshot interface could contain multiple instances. Use restore to restore an ISnapshot object.


๐Ÿ”ง stencilโ€‹

Calculates the form stencil hash for the specified type. The form data stencil is a set of two hashes calculated from the form definition. Those data stencil hashes remain stable as long as the data fields generated when running the form definition remain the same. This is different than the fingerprint hash, which remains stable as long as the structure of the form stays the same.

Signatureโ€‹

stencil(type?: "exportables" | "actionables"): string

Parametersโ€‹

NameTypeOptionalDescription
type"exportables" | "actionables"YesSpecifies the stencil type. It can be one of the following values:
- exportables: Generates the hash for all exportable fields (this is the default type);
- actionables: Generates the hash for all actionable fields.

Return valueโ€‹

Returns the stencil hash.

tip

More information about the stencil hashes in the Form data stencil guide. More information about exportable vs. actionable data can be found here.


๐Ÿ”ง stepBackwardโ€‹

Step backward in the active instance.

Signatureโ€‹

stepBackward(): boolean

Return valueโ€‹

Returns true if the step succeeded.

info

This is only useful for runners in the paginated or continuous mode. When invoked the runner goes to the previous section.


๐Ÿ”ง stepForwardโ€‹

Step forward in the active instance.

Signatureโ€‹

stepForward(): boolean

Return valueโ€‹

Returns true if the step succeeded.

info

This is only useful for runners in the paginated or continuous mode. When invoked the runner goes to the next section.


๐Ÿ”ง stepToHeadโ€‹

Step to the head in the history of the active instance. This is the furthest point in the form that has been reached.

Signatureโ€‹

stepToHead(): boolean

Return valueโ€‹

Returns true if the step succeeded.

info

This is only useful for runners in the paginated or continuous mode.


๐Ÿ”ง stepToStartโ€‹

Step to the start of the active instance (beginning of the form).

Signatureโ€‹

stepToStart(): boolean

Return valueโ€‹

Returns true if the step succeeded.

info

This is only useful for runners in the paginated or continuous mode.


๐Ÿ”ง stopโ€‹

Stops the currently running form instance.

Signatureโ€‹

stop(): boolean

Return valueโ€‹

Returns true when a form instance was active and stopped.


๐Ÿ”ง unloadโ€‹

Unloads the currently loaded form definition and frees up the used memory.

Signatureโ€‹

unload(): void

๐Ÿ”’ onInstanceBranchLeaveโ€‹

Protected method

This is a protected method that you can override to extend its functionality (but never need to call).

Invoked when a branch is left.

Signatureโ€‹

onInstanceBranchLeave(context: Context, branch: Branch): void

Parametersโ€‹

NameTypeOptionalDescription
contextContextNoReference to the context.
branchBranchNoReference to the branch.

๐Ÿ”’ onInstanceChangeโ€‹

Protected method

This is a protected method that you can override to extend its functionality (but never need to call).

Invoked when a change occurred in the form instance. You could override this method and use it to update the UI to reflect this change.

Signatureโ€‹

onInstanceChange(
instance: Instance,
typeOfChange: "started" | "render" | "evaluating" | "validated" | "forward" | "backward" | "progress" | "finishing" | "finished" | "stopped" | "paused" | "mode" | "preview",
storyline: Storyline | undefined
): void

Parametersโ€‹

NameTypeOptionalDescription
instanceInstanceNoReference to the instance.
typeOfChange"started" | "render" | "evaluating" | "validated" | "forward" | "backward" | "progress" | "finishing" | "finished" | "stopped" | "paused" | "mode" | "preview"NoSpecifies the type of change that occurred. It can be one of the following values:
- started: The form instance is started;
- render: The form UI should render;
- evaluating: The form is evaluating;
- validated: The form is validated;
- forward: A step forward is made in the form;
- backward: A step backward is made in the form;
- progress: The progress of the form is changed;
- finishing: The form is finishing;
- finished: The form is completed and finished;
- stopped: The form is stopped;
- paused: The form is paused.
- mode: The mode of the runner is changed;
- preview: The preview mode of the runner is changed.
storylineStoryline | undefinedNoReference to the storyline.

๐Ÿ”’ onInstanceCreateโ€‹

Protected method

This is a protected method that you can override to extend its functionality (but never need to call).

Invoked when a form instance is created.

Signatureโ€‹

onInstanceCreate(instance: Instance): void

Parametersโ€‹

NameTypeOptionalDescription
instanceInstanceNoReference to the instance.

๐Ÿ”’ onInstanceDataโ€‹

Protected method

This is a protected method that you can override to extend its functionality (but never need to call).

Invoked when the collected data of an instance is changed.

Signatureโ€‹

onInstanceData(instance: Instance, dataChangeEvent: IDataChangeEvent): void

Parametersโ€‹

NameTypeOptionalDescription
instanceInstanceNoReference to the instance.
dataChangeEventIDataChangeEventNoReference to a data change event.

๐Ÿ”’ onInstanceEndโ€‹

Protected method

This is a protected method that you can override to extend its functionality (but never need to call).

Invoked when an instance ends. This event is always invoked when an instance is finished, stopped or paused.

Signatureโ€‹

onInstanceEnd(instance: Instance, type: "finished" | "stopped" | "paused"): void

Parametersโ€‹

NameTypeOptionalDescription
instanceInstanceNoReference to the instance.
type"finished" | "stopped" | "paused"NoSpecifies why the instance has ended. It can be one of the following values:
- finished: The instance has finished;
- stopped: The instance was forced to stop;
- paused: The instance was paused.

๐Ÿ”’ onInstanceFinishโ€‹

Protected method

This is a protected method that you can override to extend its functionality (but never need to call).

Invoked when the instance has finished.

Signatureโ€‹

onInstanceFinish(instance: Instance): void

Parametersโ€‹

NameTypeOptionalDescription
instanceInstanceNoReference to the instance.

๐Ÿ”’ onInstanceFinishingโ€‹

Protected method

This is a protected method that you can override to extend its functionality (but never need to call).

Invoked when an instance is about to finish. The function allows you to perform an action before the form is actually completed (for example, sending the form data to a server). If the action fails, the form remains active, and the user can, for example, try to complete (resubmit) the form again.

Signatureโ€‹

onInstanceFinishing(
instance: Instance,
onFinish: (succeeded: boolean, reference?: string) => void
): boolean

Parametersโ€‹

NameTypeOptionalDescription
instanceInstanceNoReference to the instance.
onFinish(succeeded: boolean, reference?: string) => voidNoCallback function that is invoked when the finish process ends. It contains two arguments:
- succeeded: Contains whether the form completed successfully or not;
- reference: Optional reference (for example, the server identifier of the form submission).

Return valueโ€‹

Return true to allow the form instance to finish synchronously or return false to wait for the onFinish callback function to be invoked.


๐Ÿ”’ onInstanceNodeโ€‹

Protected method

This is a protected method that you can override to extend its functionality (but never need to call).

Invoked when a node is entered.

Signatureโ€‹

onInstanceNode(context: Context, node: Node, observer: Await): void

Parametersโ€‹

NameTypeOptionalDescription
contextContextNoReference to the context.
nodeNodeNoReference to the node.
observerAwaitNoReference to the await pointer that signals the runner to validate the node. If the mode is set to progressive or ahead this is done automatically.

๐Ÿ”’ onInstancePauseโ€‹

Protected method

This is a protected method that you can override to extend its functionality (but never need to call).

Invoked when the instance is paused.

Signatureโ€‹

onInstancePause(instance: Instance): void

Parametersโ€‹

NameTypeOptionalDescription
instanceInstanceNoReference to the instance.

๐Ÿ”’ onInstanceProcessingโ€‹

Protected method

This is a protected method that you can override to extend its functionality (but never need to call).

Invoked when an instance is processing. This means the runner is currently evaluating conditions and branches.

Signatureโ€‹

onInstanceProcessing(instance: Instance, processing: boolean): void

Parametersโ€‹

NameTypeOptionalDescription
instanceInstanceNoReference to the instance.
processingbooleanNoSpecifies if the instance is processing.

๐Ÿ”’ onInstanceProgressโ€‹

Protected method

This is a protected method that you can override to extend its functionality (but never need to call).

Invoked when the progress with in the form changes.

Signatureโ€‹

onInstanceProgress(instance: Instance, percentage: number): void

Parametersโ€‹

NameTypeOptionalDescription
instanceInstanceNoReference to the instance.
percentagenumberNoContains the progress percentage of the form.

๐Ÿ”’ onInstanceSectionโ€‹

Protected method

This is a protected method that you can override to extend its functionality (but never need to call).

Invoked when a section is entered.

Signatureโ€‹

onInstanceSection(context: Context, section: Section, observer: Await): void

Parametersโ€‹

NameTypeOptionalDescription
contextContextNoReference to the context.
sectionSectionNoReference to the section.
observerAwaitNoReference to the await pointer that signals the runner to validate the section and make a step forward. If the mode is set to progressive or ahead this is done automatically.

๐Ÿ”’ onInstanceSectionEvaluatingโ€‹

Protected method

This is a protected method that you can override to extend its functionality (but never need to call).

Invoked when a section starts or stops evaluating.

Signatureโ€‹

onInstanceSectionEvaluating(instance: Instance, section: Section, evaluating: boolean): void

Parametersโ€‹

NameTypeOptionalDescription
instanceInstanceNoReference to the instance.
sectionSectionNoReference to the section.
evaluatingbooleanNoSpecifies if the section is evaluating.

๐Ÿ”’ onInstanceSectionLeaveโ€‹

Protected method

This is a protected method that you can override to extend its functionality (but never need to call).

Invoked when a section is left.

Signatureโ€‹

onInstanceSectionLeave(
instance: Instance,
direction: "forward" | "backward",
section: Section
): void

Parametersโ€‹

NameTypeOptionalDescription
instanceInstanceNoReference to the instance.
direction"forward" | "backward"NoSpecifies the step direction.
sectionSectionNoReference to the section.

๐Ÿ”’ onInstanceStartโ€‹

Protected method

This is a protected method that you can override to extend its functionality (but never need to call).

Invoked when a form instance is started.

Signatureโ€‹

onInstanceStart(instance: Instance): void

Parametersโ€‹

NameTypeOptionalDescription
instanceInstanceNoReference to the instance.

๐Ÿ”’ onInstanceStepโ€‹

Protected method

This is a protected method that you can override to extend its functionality (but never need to call).

Invoked when the instance makes a step.

Signatureโ€‹

onInstanceStep(instance: Instance, direction: "forward" | "backward"): void

Parametersโ€‹

NameTypeOptionalDescription
instanceInstanceNoReference to the instance.
direction"forward" | "backward"NoSpecifies the step direction.

๐Ÿ”’ onInstanceStepForwardโ€‹

Protected method

This is a protected method that you can override to extend its functionality (but never need to call).

Invoked when an instance wants to check if it can step forward.

Signatureโ€‹

onInstanceStepForward(instance: Instance, section: Section): boolean

Parametersโ€‹

NameTypeOptionalDescription
instanceInstanceNoReference to the instance.
sectionSectionNoReference to the section.

Return valueโ€‹

Should return true when the runner may step forward or false when the step should reject.


๐Ÿ”’ onInstanceStopโ€‹

Protected method

This is a protected method that you can override to extend its functionality (but never need to call).

Invoked when the instance is stopped.

Signatureโ€‹

onInstanceStop(instance: Instance): void

Parametersโ€‹

NameTypeOptionalDescription
instanceInstanceNoReference to the instance.

๐Ÿ”’ onInstanceUpdateโ€‹

Protected method

This is a protected method that you can override to extend its functionality (but never need to call).

Invoked when the instance is updated and needs an UI rendering.

Signatureโ€‹

onInstanceUpdate(instance: Instance): void

Parametersโ€‹

NameTypeOptionalDescription
instanceInstanceNoReference to the instance.

๐Ÿ”’ onInstanceValidatedโ€‹

Protected method

This is a protected method that you can override to extend its functionality (but never need to call).

Invoked when the instance is validated.

Signatureโ€‹

onInstanceValidated(
instance: Instance,
result: "fail" | "pass",
type: "initial" | "revalidate"
): void

Parametersโ€‹

NameTypeOptionalDescription
instanceInstanceNoReference to the instance.
result"fail" | "pass"NoSpecifies the validation result.
type"initial" | "revalidate"NoSpecifies the validation type.

๐Ÿ“ข Eventsโ€‹


๐Ÿ”” onChangeโ€‹

Invoked when a change in an instance occurs.

Signatureโ€‹

(event: IRunnerChangeEvent) => void

Parametersโ€‹

NameTypeOptionalDescription
eventIRunnerChangeEventNoReference to the event object.

๐Ÿ”” onDataโ€‹

Invoked when the collected data of a form instance is changed.

Signatureโ€‹

(instance: Instance, event: IDataChangeEvent) => void

Parametersโ€‹

NameTypeOptionalDescription
instanceInstanceNoReference to the instance.
eventIDataChangeEventNoReference to the event object.

๐Ÿ”” onFinishโ€‹

Invoked when a form instance finishes.

tip

The collected form data can be extracted from the instance using one of the available export functions.

Signatureโ€‹

(instance: Instance) => void

Parametersโ€‹

NameTypeOptionalDescription
instanceInstanceNoReference to the instance.

๐Ÿ”” onRestartโ€‹

Invoked when a form instance is restarted.

Signatureโ€‹

(instance: Instance) => void

Parametersโ€‹

NameTypeOptionalDescription
instanceInstanceNoReference to the instance.