workflow

package
v1.17.7 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 15, 2026 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CountHistoryEventsMatching added in v1.17.7

func CountHistoryEventsMatching(t *testing.T, ctx context.Context, cl *client.TaskHubGrpcClient, id api.InstanceID, pred func(*protos.HistoryEvent) bool) int

CountHistoryEventsMatching returns the number of events in the workflow's history (as exposed via GetInstanceHistory) that satisfy pred.

func CountHistoryEventsOfType

func CountHistoryEventsOfType[T any](t *testing.T, ctx context.Context, client *client.TaskHubGrpcClient, id api.InstanceID) int

func GetLastHistoryEventOfType

func GetLastHistoryEventOfType[T any](t *testing.T, ctx context.Context, client *client.TaskHubGrpcClient, id api.InstanceID) *protos.HistoryEvent

func InjectInboxEvent added in v1.17.7

func InjectInboxEvent(t *testing.T, ctx context.Context, db *sqlite.SQLite, daprd *daprd.Daprd, instanceID string, evt *protos.HistoryEvent)

InjectInboxEvent appends evt to the workflow actor's persisted inbox in the SQLite state store and increments the metadata's InboxLength by one. The caller is responsible for invalidating the actor's in-memory cache (e.g. via daprd.Restart) before relying on the injection to take effect.

func IsChildCompletedFor added in v1.17.7

func IsChildCompletedFor(taskScheduledID int32) func(*protos.HistoryEvent) bool

func IsChildFailedFor added in v1.17.7

func IsChildFailedFor(taskScheduledID int32) func(*protos.HistoryEvent) bool

func IsTaskCompletedFor added in v1.17.7

func IsTaskCompletedFor(taskScheduledID int32) func(*protos.HistoryEvent) bool

IsTaskCompletedFor returns a predicate that matches a TaskCompleted event for the given TaskScheduledId.

func IsTaskFailedFor added in v1.17.7

func IsTaskFailedFor(taskScheduledID int32) func(*protos.HistoryEvent) bool

func IsTaskScheduledFor added in v1.17.7

func IsTaskScheduledFor(eventID int32) func(*protos.HistoryEvent) bool

func IsTimerFiredFor added in v1.17.7

func IsTimerFiredFor(timerID int32) func(*protos.HistoryEvent) bool

func RemoveHistoryEvent added in v1.17.7

func RemoveHistoryEvent(t *testing.T, ctx context.Context, db *sqlite.SQLite, daprd *daprd.Daprd, instanceID string, pred func(*protos.HistoryEvent) bool)

RemoveHistoryEvent deletes the first history event matching pred and renumbers any subsequent history-* keys to keep the sequence contiguous. The metadata's HistoryLength is decremented by one.

func WaitForOrchestratorStartedEvent

func WaitForOrchestratorStartedEvent(t *testing.T, ctx context.Context, client *client.TaskHubGrpcClient, id api.InstanceID)

func WaitForRuntimeStatus

func WaitForRuntimeStatus(t *testing.T, ctx context.Context, client *client.TaskHubGrpcClient, id api.InstanceID, status protos.OrchestrationStatus)

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL