WithWorkflows
Interface for workflow-enabled entities
Audience: Programmer
The WithWorkflows interface is implemented by entities that can trigger and participate in Temporal workflows for complex business processes.
Fields
workflows
[Workflow!]
Active workflows for this entity
workflowHistory
WorkflowConnection
Historical workflow executions
canStartWorkflow
Boolean!
Whether new workflows can be started
Workflow Integration
Entities with workflows can:
Trigger automated processes
Require approvals
Orchestrate multi-step operations
Handle long-running tasks
Implement saga patterns
Implementing Types
PickingOrder
ReceivingInbound
InventoryItem
Customer
Supplier
Usage
Common Workflows
Order Fulfillment - Pick, pack, ship
Receiving - Inspect, count, putaway
Inventory Counts - Cycle counting
Returns - RMA processing
Transfers - Multi-step movements
Workflow States
PENDING- Waiting to startRUNNING- Currently executingCOMPLETED- Successfully finishedFAILED- Execution failedCANCELLED- Manually cancelledTERMINATED- Force stopped
Best Practices
Design idempotent workflow activities
Handle partial failures gracefully
Implement compensation logic
Monitor workflow metrics
Set appropriate timeouts
See Also
Workflow Type - Workflow details
WorkflowSignal Type - Workflow signaling
Temporal Metadata - Temporal.io integration
Last updated
Was this helpful?
