Skip to main content

FlowIntent

@dopt/react / Exports / FlowIntent

Interface: FlowIntent

Methods corresponding to an intent-based API for signaling state transitions of a flow. These methods have side effects on ['state'] contained within the flow.

Table of contents

Methods

Methods

start

start(options?): undefined | void

Starts the flow (with force).

If options?.force is passed as true, the flow will be started despite any targeting or entry conditions. Otherwise, the flow will only be started if all conditions are met.

Modifies

This intent will only modify state if the flow is started. Sets flow's ['state']['started'] to true. Sets all blocks' ['state']['active'] connected to the entry block to true. Sets all blocks' ['state']['entered'] connected to the entry block to true.

Parameters

NameType
options?Object
options.force?boolean

Returns

undefined | void

Defined in

packages/@dopt/react/src/types.ts:262

start(): undefined | void

Returns

undefined | void

Defined in

packages/@dopt/react/src/types.ts:263


reset

reset(options?): undefined | void

Resets the flow's state and all of its associated blocks and their state to the original/default state. After the reset is performed, starts the flow with options?.force.

Modifies

Sets flow's ['state']['stopped'] to false. Sets flow's ['state']['finished'] to false. Sets flow's ['state']['started'] to false. Sets all blocks' ['state']['active'] to false. Sets all blocks' ['state']['exited'] to false. Sets all blocks' ['state']['entered'] to false.

Subsequently calls start with force.

Parameters

NameType
options?Object
options.force?boolean

Returns

undefined | void

Defined in

packages/@dopt/react/src/types.ts:280

reset(): undefined | void

Returns

undefined | void

Defined in

packages/@dopt/react/src/types.ts:281


stop

stop(): undefined | void

Stops the flow.

Modifies

Sets flow's ['state']['stopped'] to true. Sets all blocks' ['state']['active'] to false.

Returns

undefined | void

Defined in

packages/@dopt/react/src/types.ts:289


finish

finish(): undefined | void

Finishes the flow, independent of exited states that might be derived from its [].

Modifies

Sets flow's ['state']['finished'] to true. Sets all blocks' ['state']['active'] to false.

Returns

undefined | void

Defined in

packages/@dopt/react/src/types.ts:299