UNPKG

usher

Version:

Simple DSL for composing decision workflows for AWS Simple Workflow

939 lines (297 loc) 12.6 kB
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <title>JSDoc: Class: ActivityPoller</title> <script src="scripts/prettify/prettify.js"> </script> <script src="scripts/prettify/lang-css.js"> </script> <!--[if lt IE 9]> <script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script> <![endif]--> <link type="text/css" rel="stylesheet" href="styles/prettify-tomorrow.css"> <link type="text/css" rel="stylesheet" href="styles/jsdoc-default.css"> </head> <body> <div id="main"> <h1 class="page-title">Class: ActivityPoller</h1> <section> <header> <h2> ActivityPoller </h2> </header> <article> <div class="container-overview"> <dt> <h4 class="name" id="ActivityPoller"><span class="type-signature"></span>new ActivityPoller<span class="signature">(name, domain, <span class="optional">options</span>)</span><span class="type-signature"></span></h4> </dt> <dd> <div class="description"> Represents a single, named poller, where all activities are defined. </div> <h5>Parameters:</h5> <table class="params"> <thead> <tr> <th>Name</th> <th>Type</th> <th>Argument</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>name</code></td> <td class="type"> <span class="param-type">string</span> </td> <td class="attributes"> </td> <td class="description last">The name of the poller. This is arbitrary and has no bering on SWF.</td> </tr> <tr> <td class="name"><code>domain</code></td> <td class="type"> <span class="param-type">string</span> </td> <td class="attributes"> </td> <td class="description last">The AWS SWF domain name to execute this pollers activities in.</td> </tr> <tr> <td class="name"><code>options</code></td> <td class="type"> <span class="param-type">object</span> </td> <td class="attributes"> &lt;optional><br> </td> <td class="description last">Additional options used when polling for new activities (taskList)</td> </tr> </tbody> </table> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="poller.js.html">activity/poller.js</a>, <a href="poller.js.html#line33">line 33</a> </li></ul></dd> </dl> </dd> </div> <h3 class="subsection-title">Methods</h3> <dl> <dt> <h4 class="name" id="activity"><span class="type-signature"></span>activity<span class="signature">(name, version, activityFn)</span><span class="type-signature"> &rarr; {<a href="ActivityPoller.html">ActivityPoller</a>}</span></h4> </dt> <dd> <div class="description"> Add an activity to the workflow </div> <h5>Parameters:</h5> <table class="params"> <thead> <tr> <th>Name</th> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>name</code></td> <td class="type"> <span class="param-type">string</span> </td> <td class="description last">The unique name of the activity.</td> </tr> <tr> <td class="name"><code>version</code></td> <td class="type"> <span class="param-type">string</span> </td> <td class="description last">Version(s) this activity can handle (conforms to v2.0 of http://semver.org)</td> </tr> <tr> <td class="name"><code>activityFn</code></td> <td class="type"> <span class="param-type"><a href="ActivityPoller.html#activityFn">ActivityPoller~activityFn</a></span> </td> <td class="description last">Function to execute when this activity is invoked</td> </tr> </tbody> </table> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="poller.js.html">activity/poller.js</a>, <a href="poller.js.html#line81">line 81</a> </li></ul></dd> </dl> <h5>Returns:</h5> <div class="param-desc"> This Poller so you can chain commands. </div> <dl> <dt> Type </dt> <dd> <span class="param-type"><a href="ActivityPoller.html">ActivityPoller</a></span> </dd> </dl> </dd> <dt> <h4 class="name" id="register"><span class="type-signature"></span>register<span class="signature">(name, version)</span><span class="type-signature"> &rarr; {<a href="ActivityPoller.html">ActivityPoller</a>}</span></h4> </dt> <dd> <div class="description"> Register a SWF Activity </div> <h5>Parameters:</h5> <table class="params"> <thead> <tr> <th>Name</th> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>name</code></td> <td class="type"> <span class="param-type">string</span> </td> <td class="description last">The name of the activity.</td> </tr> <tr> <td class="name"><code>version</code></td> <td class="type"> <span class="param-type">string</span> </td> <td class="description last">The AWS version of the activity being registered.</td> </tr> </tbody> </table> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="poller.js.html">activity/poller.js</a>, <a href="poller.js.html#line111">line 111</a> </li></ul></dd> </dl> <h5>Returns:</h5> <div class="param-desc"> This Poller so you can chain commands. </div> <dl> <dt> Type </dt> <dd> <span class="param-type"><a href="ActivityPoller.html">ActivityPoller</a></span> </dd> </dl> </dd> <dt> <h4 class="name" id="start"><span class="type-signature"></span>start<span class="signature">()</span><span class="type-signature"> &rarr; {<a href="ActivityPoller.html">ActivityPoller</a>}</span></h4> </dt> <dd> <div class="description"> Start listening for activity tasks from SWF </div> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="poller.js.html">activity/poller.js</a>, <a href="poller.js.html#line121">line 121</a> </li></ul></dd> </dl> <h5>Returns:</h5> <div class="param-desc"> This workflow so you can chain commands. </div> <dl> <dt> Type </dt> <dd> <span class="param-type"><a href="ActivityPoller.html">ActivityPoller</a></span> </dd> </dl> </dd> <dt> <h4 class="name" id="stop"><span class="type-signature"></span>stop<span class="signature">()</span><span class="type-signature"> &rarr; {<a href="ActivityPoller.html">ActivityPoller</a>}</span></h4> </dt> <dd> <div class="description"> Stop listening for activity tasks from SWF </div> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="poller.js.html">activity/poller.js</a>, <a href="poller.js.html#line194">line 194</a> </li></ul></dd> </dl> <h5>Returns:</h5> <div class="param-desc"> This Poller so you can chain commands. </div> <dl> <dt> Type </dt> <dd> <span class="param-type"><a href="ActivityPoller.html">ActivityPoller</a></span> </dd> </dl> </dd> </dl> <h3 class="subsection-title">Type Definitions</h3> <dl> <dt> <h4 class="name" id="activityFn"><span class="type-signature"></span>activityFn<span class="signature">(task)</span><span class="type-signature"></span></h4> </dt> <dd> <div class="description"> The business logic to run when this activity executes </div> <h5>Parameters:</h5> <table class="params"> <thead> <tr> <th>Name</th> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>task</code></td> <td class="type"> <span class="param-type"><a href="ActivityTask.html">ActivityTask</a></span> </td> <td class="description last">The results of all dependencies for this decision</td> </tr> </tbody> </table> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="poller.js.html">activity/poller.js</a>, <a href="poller.js.html#line98">line 98</a> </li></ul></dd> </dl> </dd> </dl> </article> </section> </div> <nav> <h2><a href="index.html">Index</a></h2><h3>Classes</h3><ul><li><a href="Accumulator.html">Accumulator</a></li><li><a href="ActivityPoller.html">ActivityPoller</a></li><li><a href="ActivityTask.html">ActivityTask</a></li><li><a href="DecisionPoller.html">DecisionPoller</a></li><li><a href="Fragment.html">Fragment</a></li><li><a href="Loop.html">Loop</a></li><li><a href="Usher.html">Usher</a></li><li><a href="WhileLoop.html">WhileLoop</a></li><li><a href="WorkflowVersion.html">WorkflowVersion</a></li></ul> </nav> <br clear="both"> <footer> Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.3.0-alpha5</a> on Mon Sep 12 2016 14:59:00 GMT-0700 (MST) </footer> <script> prettyPrint(); </script> <script src="scripts/linenumber.js"> </script> </body> </html>