Skip to content

//workflow/com.squareup.workflow1.testing/WorkflowTestParams/StartMode/StartFromWorkflowSnapshot

StartFromWorkflowSnapshot

[jvm] class StartFromWorkflowSnapshot(snapshot: Snapshot) : WorkflowTestParams.StartMode<Nothing>

Starts the workflow from its initial state (as specified by initial state), with a non-null snapshot. Only applies to StatefulWorkflows.

This differs from StartFromCompleteSnapshot because it represents only the snapshot for the root workflow, without any of the snapshots of its children or other bookkeeping data added by the workflow runtime.

Parameters

jvm

snapshot

A Snapshot that can be directly parsed by a workflow’s initialState method. For workflow trees, this is only the snapshot of the root workflow, as returned by snapshotState. To test with a complete snapshot of the entire workflow tree, use StartFromCompleteSnapshot.

Constructors

StartFromWorkflowSnapshot [jvm] fun StartFromWorkflowSnapshot(snapshot: Snapshot)A Snapshot that can be directly parsed by a workflow’s initialState method.

Properties

Name Summary
snapshot [jvm] val snapshot: SnapshotA Snapshot that can be directly parsed by a workflow’s initialState method.