usher
Version:
Simple DSL for composing decision workflows for AWS Simple Workflow
865 lines (275 loc) • 11.5 kB
HTML
<html lang="en">
<head>
<meta charset="utf-8">
<title>JSDoc: Class: DecisionPoller</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: DecisionPoller</h1>
<section>
<header>
<h2>
DecisionPoller
</h2>
</header>
<article>
<div class="container-overview">
<dt>
<h4 class="name" id="DecisionPoller"><span class="type-signature"></span>new DecisionPoller<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 decision poller, where all workflow versions can be created. Tasks will automaticly be
routed to the first workflow that satisfies the version requested. If no valid workflow is found, the task will
be marked as a failure.
</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 workflow.</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 use when listening for decision tasks.</td>
</tr>
<tr>
<td class="name"><code>options</code></td>
<td class="type">
<span class="param-type">object</span>
</td>
<td class="attributes">
<optional><br>
</td>
<td class="description last">Additional SWF options used when creating and executing this workflow
(taskList, tagList, childPolicy, executionStartToCloseTimeout, taskStartToCloseTimeout)</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">decider/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="execute"><span class="type-signature"></span>execute<span class="signature">()</span><span class="type-signature"> → {<a href="WorkflowVersion.html">WorkflowVersion</a>}</span></h4>
</dt>
<dd>
<div class="description">
Execute a new run of this workflow
</div>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="poller.js_.html">decider/poller.js</a>, <a href="poller.js_.html#line114">line 114</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="WorkflowVersion.html">WorkflowVersion</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"> → {<a href="DecisionPoller.html">DecisionPoller</a>}</span></h4>
</dt>
<dd>
<div class="description">
Register a SWF 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 name of the workflow.</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 workflow 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">decider/poller.js</a>, <a href="poller.js_.html#line96">line 96</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="DecisionPoller.html">DecisionPoller</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"> → {<a href="DecisionPoller.html">DecisionPoller</a>}</span></h4>
</dt>
<dd>
<div class="description">
Start listening for decision 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">decider/poller.js</a>, <a href="poller.js_.html#line148">line 148</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
This workflow poller
</div>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type"><a href="DecisionPoller.html">DecisionPoller</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"> → {<a href="DecisionPoller.html">DecisionPoller</a>}</span></h4>
</dt>
<dd>
<div class="description">
Stop listening for decision 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">decider/poller.js</a>, <a href="poller.js_.html#line237">line 237</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
This workflow poller
</div>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type"><a href="DecisionPoller.html">DecisionPoller</a></span>
</dd>
</dl>
</dd>
<dt>
<h4 class="name" id="version"><span class="type-signature"></span>version<span class="signature">(version)</span><span class="type-signature"> → {<a href="WorkflowVersion.html">WorkflowVersion</a>}</span></h4>
</dt>
<dd>
<div class="description">
Get or create a new WorkflowVersion to handle the given version
</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>version</code></td>
<td class="type">
<span class="param-type">string</span>
</td>
<td class="description last">Version(s) this workflow can handle (conforms to v2.0 of http://semver.org)</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">decider/poller.js</a>, <a href="poller.js_.html#line72">line 72</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
This workflow version so you can configure the actual decider.
</div>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type"><a href="WorkflowVersion.html">WorkflowVersion</a></span>
</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>