Skip to content

SWF

CloudMock emulates Amazon SWF, supporting domains, workflow and activity types, workflow execution lifecycle, decision and activity task polling, and tagging.

OperationStatusNotes
RegisterDomainSupportedRegisters a domain
DescribeDomainSupportedReturns domain details
ListDomainsSupportedLists domains
DeprecateDomainSupportedDeprecates a domain
RegisterWorkflowTypeSupportedRegisters a workflow type
DescribeWorkflowTypeSupportedReturns workflow type details
ListWorkflowTypesSupportedLists workflow types
DeprecateWorkflowTypeSupportedDeprecates a workflow type
RegisterActivityTypeSupportedRegisters an activity type
DescribeActivityTypeSupportedReturns activity type details
ListActivityTypesSupportedLists activity types
DeprecateActivityTypeSupportedDeprecates an activity type
StartWorkflowExecutionSupportedStarts a workflow execution
DescribeWorkflowExecutionSupportedReturns execution details
ListOpenWorkflowExecutionsSupportedLists open executions
ListClosedWorkflowExecutionsSupportedLists closed executions
TerminateWorkflowExecutionSupportedTerminates an execution
SignalWorkflowExecutionSupportedSends a signal to an execution
RequestCancelWorkflowExecutionSupportedRequests cancellation
PollForDecisionTaskSupportedPolls for a decision task
RespondDecisionTaskCompletedSupportedCompletes a decision task
PollForActivityTaskSupportedPolls for an activity task
RespondActivityTaskCompletedSupportedCompletes an activity task
RespondActivityTaskFailedSupportedFails an activity task
GetWorkflowExecutionHistorySupportedReturns execution history
TagResourceSupportedAdds tags to a resource
UntagResourceSupportedRemoves tags from a resource
ListTagsForResourceSupportedLists tags for a resource
import { SWFClient, RegisterDomainCommand, StartWorkflowExecutionCommand } from '@aws-sdk/client-swf';
const client = new SWFClient({
endpoint: 'http://localhost:4566',
region: 'us-east-1',
credentials: { accessKeyId: 'test', secretAccessKey: 'test' },
});
await client.send(new RegisterDomainCommand({
name: 'my-domain',
workflowExecutionRetentionPeriodInDays: '30',
}));
const { runId } = await client.send(new StartWorkflowExecutionCommand({
domain: 'my-domain',
workflowId: 'my-workflow-1',
workflowType: { name: 'my-workflow', version: '1.0' },
}));
console.log(runId);
import boto3
client = boto3.client('swf',
endpoint_url='http://localhost:4566',
region_name='us-east-1',
aws_access_key_id='test',
aws_secret_access_key='test')
client.register_domain(
name='my-domain',
workflowExecutionRetentionPeriodInDays='30')
response = client.start_workflow_execution(
domain='my-domain',
workflowId='my-workflow-1',
workflowType={'name': 'my-workflow', 'version': '1.0'})
print(response['runId'])
cloudmock.yml
services:
swf:
enabled: true
  • Task polling returns stubs; actual distributed task coordination is simplified
  • Workflow execution history is basic
  • Long polling is not implemented; responses are immediate