usher
Version:
Simple DSL for composing decision workflows for AWS Simple Workflow
3,286 lines (1,059 loc) • 48.4 kB
HTML
<html lang="en">
<head>
<meta charset="utf-8">
<title>JSDoc: Class: WorkflowVersion</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: WorkflowVersion</h1>
<section>
<header>
<h2>
WorkflowVersion
</h2>
</header>
<article>
<div class="container-overview">
<dt>
<h4 class="name" id="WorkflowVersion"><span class="type-signature"></span>new WorkflowVersion<span class="signature">(name, version, domain, <span class="optional">options</span>)</span><span class="type-signature"></span></h4>
</dt>
<dd>
<div class="description">
Represents a single, named workflow, where all activities and decisions 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 workflow.</td>
</tr>
<tr>
<td class="name"><code>version</code></td>
<td class="type">
<span class="param-type">string</span>
</td>
<td class="attributes">
</td>
<td class="description last">Version(s) this workflow can handle (conforms to v2.0 of http://semver.org)</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 workflow in.</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="version.js.html">decider/version.js</a>, <a href="version.js.html#line34">line 34</a>
</li></ul></dd>
</dl>
</dd>
</div>
<h3 class="subsection-title">Extends</h3>
<ul>
<li><a href="Fragment.html">Fragment</a></li>
</ul>
<h3 class="subsection-title">Methods</h3>
<dl>
<dt>
<h4 class="name" id="accumulator"><span class="type-signature"></span>accumulator<span class="signature">(name, <span class="optional">deps</span>, fragment, doneFn, <span class="optional">options</span>)</span><span class="type-signature"> → {<a href="Fragment.html">Fragment</a>}</span></h4>
</dt>
<dd>
<div class="description">
Add a accumulator execution to the workflow
The accumulator executes a fragment until the `doneFn` returns a truthy value, taking the results
of each iteration and making them available to any dependents
</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 unique name of the accumulator fragment.</td>
</tr>
<tr>
<td class="name"><code>deps</code></td>
<td class="type">
<span class="param-type">Array</span>
</td>
<td class="attributes">
<optional><br>
</td>
<td class="description last">The names of the dependencies that must be met before this activity can execute.</td>
</tr>
<tr>
<td class="name"><code>fragment</code></td>
<td class="type">
<span class="param-type"><a href="Fragment.html">Fragment</a></span>
</td>
<td class="attributes">
</td>
<td class="description last">The workflow fragment to iterate over. Generated by `usher.fragment()`</td>
</tr>
<tr>
<td class="name"><code>doneFn</code></td>
<td class="type">
<span class="param-type">function</span>
</td>
<td class="attributes">
</td>
<td class="description last">Indicates when the accumulator is complete by returning a truthy value.</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">Custom options for this activity.</td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="inherited-from">Inherited From:</dt>
<dd class="inherited-from"><ul class="dummy"><li>
<a href="Fragment.html#accumulator">Fragment#accumulator</a>
</li></dd>
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="fragment.js.html">decider/fragment.js</a>, <a href="fragment.js.html#line248">line 248</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="Fragment.html">Fragment</a></span>
</dd>
</dl>
</dd>
<dt>
<h4 class="name" id="activity"><span class="type-signature"></span>activity<span class="signature">(name, <span class="optional">deps</span>, <span class="optional">options</span>)</span><span class="type-signature"> → {<a href="Fragment.html">Fragment</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>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 unique name of the activity.</td>
</tr>
<tr>
<td class="name"><code>deps</code></td>
<td class="type">
<span class="param-type">Array</span>
</td>
<td class="attributes">
<optional><br>
</td>
<td class="description last">The names of the dependencies that must be met before this activity can execute.</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">Custom options for this activity.</td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="inherited-from">Inherited From:</dt>
<dd class="inherited-from"><ul class="dummy"><li>
<a href="Fragment.html#activity">Fragment#activity</a>
</li></dd>
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="fragment.js.html">decider/fragment.js</a>, <a href="fragment.js.html#line130">line 130</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="Fragment.html">Fragment</a></span>
</dd>
</dl>
</dd>
<dt>
<h4 class="name" id="activityDefaults"><span class="type-signature"></span>activityDefaults<span class="signature">(options)</span><span class="type-signature"> → {<a href="Fragment.html">Fragment</a>}</span></h4>
</dt>
<dd>
<div class="description">
Set global activity options for the entire 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>options</code></td>
<td class="type">
<span class="param-type">Object</span>
</td>
<td class="description last">Custom options to use for all defined activities.</td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="inherited-from">Inherited From:</dt>
<dd class="inherited-from"><ul class="dummy"><li>
<a href="Fragment.html#activityDefaults">Fragment#activityDefaults</a>
</li></dd>
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="fragment.js.html">decider/fragment.js</a>, <a href="fragment.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="Fragment.html">Fragment</a></span>
</dd>
</dl>
</dd>
<dt>
<h4 class="name" id="child"><span class="type-signature"></span>child<span class="signature">(name, <span class="optional">deps</span>, workflowName, workflowVersion, <span class="optional">options</span>)</span><span class="type-signature"> → {<a href="Fragment.html">Fragment</a>}</span></h4>
</dt>
<dd>
<div class="description">
Add an child workflow execution to the workflow
</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 unique name of the child workflow.</td>
</tr>
<tr>
<td class="name"><code>deps</code></td>
<td class="type">
<span class="param-type">Array</span>
</td>
<td class="attributes">
<optional><br>
</td>
<td class="description last">The names of the dependencies that must be met before this activity can execute.</td>
</tr>
<tr>
<td class="name"><code>workflowName</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 to execute.</td>
</tr>
<tr>
<td class="name"><code>workflowVersion</code></td>
<td class="type">
<span class="param-type">string</span>
</td>
<td class="attributes">
</td>
<td class="description last">The version of the workflow to execute.</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">Custom options for this activity.</td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="inherited-from">Inherited From:</dt>
<dd class="inherited-from"><ul class="dummy"><li>
<a href="Fragment.html#child">Fragment#child</a>
</li></dd>
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="fragment.js.html">decider/fragment.js</a>, <a href="fragment.js.html#line157">line 157</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="Fragment.html">Fragment</a></span>
</dd>
</dl>
</dd>
<dt>
<h4 class="name" id="decision"><span class="type-signature"></span>decision<span class="signature">(name, <span class="optional">deps</span>, decisionFn)</span><span class="type-signature"> → {<a href="Fragment.html">Fragment</a>}</span></h4>
</dt>
<dd>
<div class="description">
Add a decision to the workflow
</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 unique name of the decision.</td>
</tr>
<tr>
<td class="name"><code>deps</code></td>
<td class="type">
<span class="param-type">Array</span>
</td>
<td class="attributes">
<optional><br>
</td>
<td class="description last">The names of the dependencies that must be met before this decision can execute.</td>
</tr>
<tr>
<td class="name"><code>decisionFn</code></td>
<td class="type">
<span class="param-type"><a href="Fragment.html#decisionLogic">Fragment~decisionLogic</a></span>
</td>
<td class="attributes">
</td>
<td class="description last">The logic for this decision.</td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="inherited-from">Inherited From:</dt>
<dd class="inherited-from"><ul class="dummy"><li>
<a href="Fragment.html#decision">Fragment#decision</a>
</li></dd>
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="fragment.js.html">decider/fragment.js</a>, <a href="fragment.js.html#line272">line 272</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="Fragment.html">Fragment</a></span>
</dd>
</dl>
</dd>
<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="version.js.html">decider/version.js</a>, <a href="version.js.html#line59">line 59</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="loop"><span class="type-signature"></span>loop<span class="signature">(name, <span class="optional">deps</span>, fragment, loopFn, <span class="optional">options</span>)</span><span class="type-signature"> → {<a href="Fragment.html">Fragment</a>}</span></h4>
</dt>
<dd>
<div class="description">
Add a looping workflow execution to the workflow
The loop executes in batches to help alleviate rate limit exceptions.
The number of items to proccess per batch and the delay between batches are both configurable.
</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 unique name of the loop fragment.</td>
</tr>
<tr>
<td class="name"><code>deps</code></td>
<td class="type">
<span class="param-type">Array</span>
</td>
<td class="attributes">
<optional><br>
</td>
<td class="description last">The names of the dependencies that must be met before this activity can execute.</td>
</tr>
<tr>
<td class="name"><code>fragment</code></td>
<td class="type">
<span class="param-type"><a href="Fragment.html">Fragment</a></span>
</td>
<td class="attributes">
</td>
<td class="description last">The workflow fragment to loop over. Generated by `usher.fragment()`</td>
</tr>
<tr>
<td class="name"><code>loopFn</code></td>
<td class="type">
<span class="param-type">function</span>
</td>
<td class="attributes">
</td>
<td class="description last">A function given the taks's input that returns an array. For every item in the Array an
execution of the `fragment` workflow will execute.</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">Custom options for this activity. [itemsPerBatch, batchDelay]</td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="inherited-from">Inherited From:</dt>
<dd class="inherited-from"><ul class="dummy"><li>
<a href="Fragment.html#loop">Fragment#loop</a>
</li></dd>
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="fragment.js.html">decider/fragment.js</a>, <a href="fragment.js.html#line189">line 189</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="Fragment.html">Fragment</a></span>
</dd>
</dl>
</dd>
<dt>
<h4 class="name" id="result"><span class="type-signature"></span>result<span class="signature">(name, <span class="optional">deps</span>, <span class="optional">transformFn</span>)</span><span class="type-signature"> → {<a href="Fragment.html">Fragment</a>}</span></h4>
</dt>
<dd>
<div class="description">
Add a result transformation to the workflow. This sets the fragments results based on the `transformFn`
</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 unique name of the result task.</td>
</tr>
<tr>
<td class="name"><code>deps</code></td>
<td class="type">
<span class="param-type">Array</span>
</td>
<td class="attributes">
<optional><br>
</td>
<td class="description last">The names of the dependencies that must be met before this decision can execute.</td>
</tr>
<tr>
<td class="name"><code>transformFn</code></td>
<td class="type">
<span class="param-type"><a href="Fragment.html#transformationLogic">Fragment~transformationLogic</a></span>
</td>
<td class="attributes">
<optional><br>
</td>
<td class="description last">The funtion that will perform the transformation.</td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="inherited-from">Inherited From:</dt>
<dd class="inherited-from"><ul class="dummy"><li>
<a href="Fragment.html#result">Fragment#result</a>
</li></dd>
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="fragment.js.html">decider/fragment.js</a>, <a href="fragment.js.html#line349">line 349</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="Fragment.html">Fragment</a></span>
</dd>
</dl>
</dd>
<dt>
<h4 class="name" id="sequencedTasks"><span class="type-signature"></span>sequencedTasks<span class="signature">()</span><span class="type-signature"> → {Array}</span></h4>
</dt>
<dd>
<div class="description">
Get the defined tasks for the fragment in execution order
</div>
<dl class="details">
<dt class="inherited-from">Inherited From:</dt>
<dd class="inherited-from"><ul class="dummy"><li>
<a href="Fragment.html#sequencedTasks">Fragment#sequencedTasks</a>
</li></dd>
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="fragment.js.html">decider/fragment.js</a>, <a href="fragment.js.html#line70">line 70</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
An array of defined tasks
</div>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">Array</span>
</dd>
</dl>
</dd>
<dt>
<h4 class="name" id="tasks"><span class="type-signature"></span>tasks<span class="signature">()</span><span class="type-signature"> → {Array}</span></h4>
</dt>
<dd>
<div class="description">
Get the defined tasks for the fragment
</div>
<dl class="details">
<dt class="inherited-from">Inherited From:</dt>
<dd class="inherited-from"><ul class="dummy"><li>
<a href="Fragment.html#tasks">Fragment#tasks</a>
</li></dd>
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="fragment.js.html">decider/fragment.js</a>, <a href="fragment.js.html#line61">line 61</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
An array of defined tasks
</div>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">Array</span>
</dd>
</dl>
</dd>
<dt>
<h4 class="name" id="terminate"><span class="type-signature"></span>terminate<span class="signature">(name, <span class="optional">deps</span>)</span><span class="type-signature"> → {<a href="Fragment.html">Fragment</a>}</span></h4>
</dt>
<dd>
<div class="description">
Add a termination point to the workflow
</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 unique name that represents this termination point.</td>
</tr>
<tr>
<td class="name"><code>deps</code></td>
<td class="type">
<span class="param-type">Array</span>
</td>
<td class="attributes">
<optional><br>
</td>
<td class="description last">The names of the dependencies that must be met before the workflow can terminate.</td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="inherited-from">Inherited From:</dt>
<dd class="inherited-from"><ul class="dummy"><li>
<a href="Fragment.html#terminate">Fragment#terminate</a>
</li></dd>
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="fragment.js.html">decider/fragment.js</a>, <a href="fragment.js.html#line301">line 301</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="Fragment.html">Fragment</a></span>
</dd>
</dl>
</dd>
<dt>
<h4 class="name" id="transform"><span class="type-signature"></span>transform<span class="signature">(name, <span class="optional">deps</span>, <span class="optional">transformFn</span>)</span><span class="type-signature"> → {<a href="Fragment.html">Fragment</a>}</span></h4>
</dt>
<dd>
<div class="description">
Add a transformation to the workflow. Transformations are good for manipulating the results of prior activities into new representations for future dependents.
</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 unique name of the transformation.</td>
</tr>
<tr>
<td class="name"><code>deps</code></td>
<td class="type">
<span class="param-type">Array</span>
</td>
<td class="attributes">
<optional><br>
</td>
<td class="description last">The names of the dependencies that must be met before this decision can execute.</td>
</tr>
<tr>
<td class="name"><code>transformFn</code></td>
<td class="type">
<span class="param-type"><a href="Fragment.html#transformationLogic">Fragment~transformationLogic</a></span>
</td>
<td class="attributes">
<optional><br>
</td>
<td class="description last">The funtion that will perform the transformation.</td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="inherited-from">Inherited From:</dt>
<dd class="inherited-from"><ul class="dummy"><li>
<a href="Fragment.html#transform">Fragment#transform</a>
</li></dd>
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="fragment.js.html">decider/fragment.js</a>, <a href="fragment.js.html#line319">line 319</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="Fragment.html">Fragment</a></span>
</dd>
</dl>
</dd>
<dt>
<h4 class="name" id="validate"><span class="type-signature"></span>validate<span class="signature">()</span><span class="type-signature"> → {<a href="WorkflowVersion.html">WorkflowVersion</a>}</span></h4>
</dt>
<dd>
<div class="description">
Validate this workflow
</div>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="version.js.html">decider/version.js</a>, <a href="version.js.html#line89">line 89</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
This workflow version 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="variable"><span class="type-signature"></span>variable<span class="signature">(name, <span class="optional">deps</span>, <span class="optional">valueFn</span>)</span><span class="type-signature"> → {<a href="Fragment.html">Fragment</a>}</span></h4>
</dt>
<dd>
<div class="description">
Set an variable accessable to all future scheduled activities
</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 unique name of the variable.</td>
</tr>
<tr>
<td class="name"><code>deps</code></td>
<td class="type">
<span class="param-type">Array</span>
</td>
<td class="attributes">
<optional><br>
</td>
<td class="description last">The names of the dependencies that must be met before this variable can be set.</td>
</tr>
<tr>
<td class="name"><code>valueFn</code></td>
<td class="type">
<span class="param-type"><a href="Fragment.html#variableValueFunction">Fragment~variableValueFunction</a></span>
</td>
<td class="attributes">
<optional><br>
</td>
<td class="description last">The funtion that will calculate the variable name.</td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="inherited-from">Inherited From:</dt>
<dd class="inherited-from"><ul class="dummy"><li>
<a href="Fragment.html#variable">Fragment#variable</a>
</li></dd>
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="fragment.js.html">decider/fragment.js</a>, <a href="fragment.js.html#line372">line 372</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="Fragment.html">Fragment</a></span>
</dd>
</dl>
</dd>
<dt>
<h4 class="name" id="whileLoop"><span class="type-signature"></span>whileLoop<span class="signature">(name, <span class="optional">deps</span>, fragment, doneFn, <span class="optional">options</span>)</span><span class="type-signature"> → {<a href="Fragment.html">Fragment</a>}</span></h4>
</dt>
<dd>
<div class="description">
Add a while loop workflow execution to the workflow
The loop executes until the `doneFn` returns a truthy value
</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 unique name of the while loop fragment.</td>
</tr>
<tr>
<td class="name"><code>deps</code></td>
<td class="type">
<span class="param-type">Array</span>
</td>
<td class="attributes">
<optional><br>
</td>
<td class="description last">The names of the dependencies that must be met before this activity can execute.</td>
</tr>
<tr>
<td class="name"><code>fragment</code></td>
<td class="type">
<span class="param-type"><a href="Fragment.html">Fragment</a></span>
</td>
<td class="attributes">
</td>
<td class="description last">The workflow fragment to loop over. Generated by `usher.fragment()`</td>
</tr>
<tr>
<td class="name"><code>doneFn</code></td>
<td class="type">
<span class="param-type">function</span>
</td>
<td class="attributes">
</td>
<td class="description last">Indicates when the loop is complete by returning a truthy value.</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">Custom options for this activity.</td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="inherited-from">Inherited From:</dt>
<dd class="inherited-from"><ul class="dummy"><li>
<a href="Fragment.html#whileLoop">Fragment#whileLoop</a>
</li></dd>
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="fragment.js.html">decider/fragment.js</a>, <a href="fragment.js.html#line218">line 218</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="Fragment.html">Fragment</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>