IRunnerSequenceItem interface
đ Descriptionâ
Interface that describes a sequence item for useRunner hooks that run in sequence mode. The items are returned by the storyline property of the IRunner object.
đ Type declarationâ
interface IRunnerSequenceItem { type: "node" | "prologue" | "epilogue" | "finishing" | "pausing" | "paused" | "error";Readonly id: string;Readonly key: string;Readonly index: number;Readonly timeStamp?: number;ReadonlyOptional node?: IObservableNode;ReadonlyOptional prologue?: IPrologue;ReadonlyOptional epilogue?: IEpilogue;ReadonlyOptional error?: "unknown" | "outdated" | "rejected" | "paused";ReadonlyOptional state: "history" | "past" | "pre-active" | "before-active" | "active" | "after-active" | "post-active" | "upcoming";Readonly isHealthy: boolean;Readonly isHistory: boolean;Readonly isPast: boolean;Readonly isPreActive: boolean;Readonly isBeforeActive: boolean;Readonly isActive: boolean;Readonly isAfterActive: boolean;Readonly isPostActive: boolean;Readonly isUpcoming: boolean;Readonly isFirst: boolean;Readonly isLast: boolean;Readonly isPaused: boolean;Readonly allowActivate: boolean;Readonly allowNext: boolean;Readonly allowUndo: boolean;Readonly allowSkip: boolean;Readonly activate: (useTransition?: boolean) => boolean;Function deactivate: () => boolean;Function next: () => boolean;Function undo: () => boolean;Function skip: () => boolean;Function wait: () => void;Function continue: () => void;Function repeat?: () => void;FunctionOptional kickOff?: () => void;FunctionOptional retry?: () => void;FunctionOptional cancel?: () => void;FunctionOptional }
đī¸ Propertiesâ
đˇī¸ allowActivateâ
Specifies if the runner is allowed to activate the item.
Typeâ
boolean
đˇī¸ allowNextâ
Specifies if the runner is allowed to continue to the next item.
Typeâ
boolean
đˇī¸ allowSkipâ
Specifies if the runner is allowed to skip the item.
Typeâ
boolean
đˇī¸ allowUndoâ
Specifies if the runner is allowed to undo (go to the previous item).
Typeâ
boolean
đˇī¸ epilogueâ
Retrieves the epilogue when the item type is epilogue. This epilogue can be used by runners (that support it) to show a closing message when the form is completed.
Typeâ
đˇī¸ errorâ
Retrieves the error code when the item type is error. It can be one of the following values:
unknown: An unknown error occurred when finishing the form;outdated: The form definition is outdated;rejected: The server rejected the response data;paused: An error occurred when pausing the form.
Typeâ
"unknown" | "outdated" | "rejected" | "paused"
đˇī¸ idâ
Specifies the unique identifier of the item.
Typeâ
string
đˇī¸ indexâ
Retrieves the zero-based index of the item in the storyline sequence array.
Typeâ
string
đˇī¸ isActiveâ
Specifies if the item is active.
Typeâ
boolean
đˇī¸ isAfterActiveâ
Specifies if the item is becoming inactive.
Typeâ
boolean
đˇī¸ isBeforeActiveâ
Specifies if the item is becoming active.
Typeâ
boolean
đˇī¸ isFirstâ
Specifies if the item is the first item in the storyline sequence array.
Typeâ
boolean
đˇī¸ isHealthyâ
Retrieves if the item is still in the storyline sequence array.
Typeâ
boolean
đˇī¸ isHistoryâ
Specifies if the item is history and cannot be changed anymore (write-protected).
Typeâ
boolean
đˇī¸ isLastâ
Specifies if the item is the last item in the storyline sequence array.
Typeâ
boolean
đˇī¸ isPastâ
Specifies if the item is in the past.
Typeâ
boolean
đˇī¸ isPausedâ
Specifies if the runner is paused.
Typeâ
boolean
đˇī¸ isPostActiveâ
Specifies if the item is about to become inactive.
Typeâ
boolean
đˇī¸ isPreActiveâ
Specifies if the item is about to become active.
Typeâ
boolean
đˇī¸ isUpcomingâ
Specifies if the item is upcoming (is in the future).
Typeâ
boolean
đˇī¸ keyâ
Retrieves a unique key for the item within its context (the key is prefixed with an underscore).
Typeâ
string
đˇī¸ nodeâ
Retrieves the node when the item type is node.
Typeâ
đˇī¸ prologueâ
Retrieves the prologue when the item type is prologue. This prologue can be used by runners (that support it) to show a welcome message before starting the actual form.
Typeâ
đˇī¸ stateâ
Retrieves the item state. It can be one of the following values:
history: Specifies the item is history and cannot be changed anymore (write-protected);past: Specifies the item is in the past;pre-active: Specifies the item is about to become active (stage 1 out of 5);before-active: Specifies the item is becoming active (stage 2 out of 5);active: Specifies the item is active (stage 3 out of 5);after-active: Specifies the item is becoming inactive (stage 4 out of 5);post-active: Specifies the item is about to become inactive (stage 5 out of 5);upcoming: Specifies the item is upcoming (is in the future).
Typeâ
"history" | "past" | "pre-active" | "before-active" | "active" | "after-active" | "post-active" | "upcoming"
đˇī¸ timeStampâ
Retrieves a last update timestamp for the item.
Typeâ
string
đˇī¸ typeâ
Specifies the item type. It can be one of the following values:
node: The item is anode;prologue: The item is aprologue;epilogue: The item is aepilogue;finishing: The item is a finishing message that indicates the runner is submitting a form;pausing: The item is a pausing message that indicates the runner is pausing a form;paused: The item is a paused message that indicates the runner has paused;error: The item is an error message (errorindicates the error type).
Typeâ
"node" | "prologue" | "epilogue" | "finishing" | "pausing" | "paused" | "error"
âļī¸ Functionsâ
đ§ activateâ
Activates the item.
Signatureâ
(useTransition?: boolean) => boolean
Parametersâ
| Name | Type | Optional | Description |
|---|---|---|---|
useTransition | boolean | Yes | Specifies if a transition should be applied. |
Return valueâ
Returns true if the item is activated.
đ§ cancelâ
Retries an operation after it failed.
Signatureâ
() => void
đ§ continueâ
Continues an item that was in a waiting state.
Signatureâ
() => void
đ§ deactivateâ
Deactivates the item.
Signatureâ
() => boolean
Return valueâ
Returns true if the item is deactivated.
đ§ kickOffâ
Kick off a form.
Signatureâ
() => void
đ§ nextâ
Activates to the next item.
Signatureâ
() => boolean
Return valueâ
Returns true if the next item is activated.
đ§ repeatâ
Repeats the form after it is completed.
Signatureâ
() => void
đ§ retryâ
Retries an operation after it failed.
Signatureâ
() => void
đ§ skipâ
Skips the item.
Signatureâ
() => boolean
Return valueâ
Returns true if the item is skipped.
đ§ undoâ
Undos the item (and activates the previous item).
Signatureâ
() => boolean
Return valueâ
Returns true if the undo operation was successful.
đ§ waitâ
Puts the item in a waiting state that ends when continue is invoked.
Signatureâ
() => void