new ActivityPoller(name, domain, options)
Represents a single, named poller, where all activities are defined.
Parameters:
| Name | Type | Argument | Description |
|---|---|---|---|
name |
string | The name of the poller. This is arbitrary and has no bering on SWF. | |
domain |
string | The AWS SWF domain name to execute this pollers activities in. | |
options |
object |
<optional> |
Additional options used when polling for new activities (taskList) |
- Source:
Methods
-
activity(name, version, activityFn) → {ActivityPoller}
-
Add an activity to the workflow
Parameters:
Name Type Description namestring The unique name of the activity. versionstring Version(s) this activity can handle (conforms to v2.0 of http://semver.org) activityFnActivityPoller~activityFn Function to execute when this activity is invoked - Source:
Returns:
This Poller so you can chain commands.- Type
- ActivityPoller
-
register(name, version) → {ActivityPoller}
-
Register a SWF Activity
Parameters:
Name Type Description namestring The name of the activity. versionstring The AWS version of the activity being registered. - Source:
Returns:
This Poller so you can chain commands.- Type
- ActivityPoller
-
start() → {ActivityPoller}
-
Start listening for activity tasks from SWF
- Source:
Returns:
This workflow so you can chain commands.- Type
- ActivityPoller
-
stop() → {ActivityPoller}
-
Stop listening for activity tasks from SWF
- Source:
Returns:
This Poller so you can chain commands.- Type
- ActivityPoller
Type Definitions
-
activityFn(task)
-
The business logic to run when this activity executes
Parameters:
Name Type Description taskActivityTask The results of all dependencies for this decision - Source: