Subversion-Projekte lars-tiefland.php_share

Revision

Details | Letzte Änderung | Log anzeigen | RSS feed

Revision Autor Zeilennr. Zeile
1 lars 1
<?php
2
/*
3
 * Copyright 2010-2012 Amazon.com, Inc. or its affiliates. All Rights Reserved.
4
 *
5
 * Licensed under the Apache License, Version 2.0 (the "License").
6
 * You may not use this file except in compliance with the License.
7
 * A copy of the License is located at
8
 *
9
 *  http://aws.amazon.com/apache2.0
10
 *
11
 * or in the "license" file accompanying this file. This file is distributed
12
 * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
13
 * express or implied. See the License for the specific language governing
14
 * permissions and limitations under the License.
15
 */
16
 
17
/**
18
 * Amazon Simple Workflow Service (SWF) is an orchestration service for building scalable,
19
 * resilient applications. Using Amazon SWF, developers can structure the various processing steps
20
 * in an application as tasks that drive independent, distributed components and orchestrate these
21
 * tasks in a reliable and scalable manner.
22
 *
23
 * The flow for a typical Amazon SWF application is to use long-running processes which are
24
 * handled by the PHP executable directly, instead of being part of the common web server
25
 * request/response cycle that PHP developers are typically more familiar with.
26
 *
27
 * <strong>Managing a scalable workflow:</strong>
28
 *
29
 * <ol>
30
 * 	<li>Create a workflow domain to work within.</li>
31
 * 	<li>Register any Workflow Types and Activity Types that are relevant to your workflow.</li>
32
 * 	<li>Start your Workflow Execution.</li>
33
 * 	<li>Poll for decisions that need to be made and respond to them.</li>
34
 * 	<li>Poll for activities that a particular state of completion (successful, failure, canceled,
35
 * in-progress), and respond to them.</li>
36
 * </ol>
37
 *
38
 * Once a Workflow has been configured and execution has started, the acts of polling for
39
 * decisions and polling for activities follow an event-driven programming model. Since PHP's
40
 * interpreter is single-threaded, entering into event loops for polling decisions and activities
41
 * simultaneously requires two separate PHP processes to be running.
42
 *
43
 * @version 2012.02.21
44
 * @license See the included NOTICE.md file for complete information.
45
 * @copyright See the included NOTICE.md file for complete information.
46
 * @link http://aws.amazon.com/simpleworkflow/ Amazon Simple Workflow
47
 * @link http://aws.amazon.com/simpleworkflow/documentation/ Amazon Simple Workflow documentation
48
 */
49
class AmazonSWF extends CFRuntime
50
{
51
	/*%******************************************************************************************%*/
52
	// CLASS CONSTANTS
53
 
54
	/**
55
	 * Specify the queue URL for the United States East (Northern Virginia) Region.
56
	 */
57
	const REGION_US_E1 = 'swf.us-east-1.amazonaws.com';
58
 
59
	/**
60
	 * Specify the queue URL for the United States East (Northern Virginia) Region.
61
	 */
62
	const REGION_VIRGINIA = self::REGION_US_E1;
63
 
64
	/**
65
	 * Default service endpoint.
66
	 */
67
	const DEFAULT_URL = self::REGION_US_E1;
68
 
69
 
70
	/*%******************************************************************************************%*/
71
	// STATUS CONSTANTS
72
 
73
	/**
74
	 * Status: Registered
75
	 */
76
	const STATUS_REGISTERED = 'REGISTERED';
77
 
78
	/**
79
	 * Status: Deprecated
80
	 */
81
	const STATUS_DEPRECATED = 'DEPRECATED';
82
 
83
 
84
	/*%******************************************************************************************%*/
85
	// POLICY CONSTANTS
86
 
87
	/**
88
	 * Policy: Terminate
89
	 */
90
	const POLICY_TERMINATE = 'TERMINATE';
91
 
92
	/**
93
	 * Policy: Request Cancel
94
	 */
95
	const POLICY_REQUEST_CANCEL = 'REQUEST_CANCEL';
96
 
97
	/**
98
	 * Policy: Abandon
99
	 */
100
	const POLICY_ABANDON = 'ABANDON';
101
 
102
 
103
	/*%******************************************************************************************%*/
104
	// CONSTRUCTOR
105
 
106
	/**
107
	 * Constructs a new instance of <AmazonSWF>.
108
	 *
109
	 * @param array $options (Optional) An associative array of parameters that can have the following keys: <ul>
110
	 * 	<li><code>certificate_authority</code> - <code>boolean</code> - Optional - Determines which Cerificate Authority file to use. A value of boolean <code>false</code> will use the Certificate Authority file available on the system. A value of boolean <code>true</code> will use the Certificate Authority provided by the SDK. Passing a file system path to a Certificate Authority file (chmodded to <code>0755</code>) will use that. Leave this set to <code>false</code> if you're not sure.</li>
111
	 * 	<li><code>credentials</code> - <code>string</code> - Optional - The name of the credential set to use for authentication.</li>
112
	 * 	<li><code>default_cache_config</code> - <code>string</code> - Optional - This option allows a preferred storage type to be configured for long-term caching. This can be changed later using the <set_cache_config()> method. Valid values are: <code>apc</code>, <code>xcache</code>, or a file system path such as <code>./cache</code> or <code>/tmp/cache/</code>.</li>
113
	 * 	<li><code>key</code> - <code>string</code> - Optional - Your AWS key, or a session key. If blank, the default credential set will be used.</li>
114
	 * 	<li><code>secret</code> - <code>string</code> - Optional - Your AWS secret key, or a session secret key. If blank, the default credential set will be used.</li>
115
	 * 	<li><code>token</code> - <code>string</code> - Optional - An AWS session token.</li></ul>
116
	 * @return void
117
	 */
118
	public function __construct(array $options = array())
119
	{
120
		$this->api_version = '2012-01-25';
121
		$this->hostname = self::DEFAULT_URL;
122
		$this->auth_class = 'AuthV3JSON';
123
		$this->operation_prefix = "x-amz-target:SimpleWorkflowService.";
124
 
125
		return parent::__construct($options);
126
	}
127
 
128
 
129
	/*%******************************************************************************************%*/
130
	// SETTERS
131
 
132
	/**
133
	 * This allows you to explicitly sets the region for the service to use.
134
	 *
135
	 * @param string $region (Required) The region to explicitly set. Available options are <REGION_US_E1>.
136
	 * @return $this A reference to the current instance.
137
	 */
138
	public function set_region($region)
139
	{
140
		// @codeCoverageIgnoreStart
141
		$this->set_hostname($region);
142
		return $this;
143
		// @codeCoverageIgnoreEnd
144
	}
145
 
146
 
147
	/*%******************************************************************************************%*/
148
	// SERVICE METHODS
149
 
150
	/**
151
	 * Returns the number of closed workflow executions within the given domain that meet the
152
	 * specified filtering criteria.
153
	 *
154
	 * <p class="note">
155
	 * This operation is eventually consistent. The results are best effort and may not exactly
156
	 * reflect recent updates and changes.
157
	 * </p>
158
	 *
159
	 * @param array $opt (Optional) An associative array of parameters that can have the following keys: <ul>
160
	 * 	<li><code>domain</code> - <code>string</code> - Required - The name of the domain containing the workflow executions to count.</li>
161
	 * 	<li><code>startTimeFilter</code> - <code>array</code> - Optional - If specified, only workflow executions that meet the start time criteria of the filter are counted. <p class="note"> <code>startTimeFilter</code> and <code>closeTimeFilter</code> are mutually exclusive. You must specify one of these in a request but not both.</p> <ul>
162
	 * 		<li><code>x</code> - <code>array</code> - Optional - This represents a simple array index. <ul>
163
	 * 			<li><code>oldestDate</code> - <code>string</code> - Required - Specifies the oldest start or close date and time to return. May be passed as a number of seconds since UNIX Epoch, or any string compatible with <php:strtotime()>.</li>
164
	 * 			<li><code>latestDate</code> - <code>string</code> - Optional - Specifies the latest start or close date and time to return. May be passed as a number of seconds since UNIX Epoch, or any string compatible with <php:strtotime()>.</li>
165
	 * 		</ul></li>
166
	 * 	</ul></li>
167
	 * 	<li><code>closeTimeFilter</code> - <code>array</code> - Optional - If specified, only workflow executions that meet the close time criteria of the filter are counted. <p class="note"> <code>startTimeFilter</code> and <code>closeTimeFilter</code> are mutually exclusive. You must specify one of these in a request but not both.</p> <ul>
168
	 * 		<li><code>x</code> - <code>array</code> - Optional - This represents a simple array index. <ul>
169
	 * 			<li><code>oldestDate</code> - <code>string</code> - Required - Specifies the oldest start or close date and time to return. May be passed as a number of seconds since UNIX Epoch, or any string compatible with <php:strtotime()>.</li>
170
	 * 			<li><code>latestDate</code> - <code>string</code> - Optional - Specifies the latest start or close date and time to return. May be passed as a number of seconds since UNIX Epoch, or any string compatible with <php:strtotime()>.</li>
171
	 * 		</ul></li>
172
	 * 	</ul></li>
173
	 * 	<li><code>executionFilter</code> - <code>array</code> - Optional - If specified, only workflow executions matching the <code>WorkflowId</code> in the filter are counted. <p class="note"> <code>closeStatusFilter</code>, <code>executionFilter</code>, <code>typeFilter</code> and <code>tagFilter</code> are mutually exclusive. You can specify at most one of these in a request.</p> <ul>
174
	 * 		<li><code>x</code> - <code>array</code> - Optional - This represents a simple array index. <ul>
175
	 * 			<li><code>workflowId</code> - <code>string</code> - Required - The workflowId to pass of match the criteria of this filter.</li>
176
	 * 		</ul></li>
177
	 * 	</ul></li>
178
	 * 	<li><code>typeFilter</code> - <code>array</code> - Optional - If specified, indicates the type of the workflow executions to be counted. <p class="note"> <code>closeStatusFilter</code>, <code>executionFilter</code>, <code>typeFilter</code> and <code>tagFilter</code> are mutually exclusive. You can specify at most one of these in a request.</p> <ul>
179
	 * 		<li><code>x</code> - <code>array</code> - Optional - This represents a simple array index. <ul>
180
	 * 			<li><code>name</code> - <code>string</code> - Required - Name of the workflow type. This field is required.</li>
181
	 * 			<li><code>version</code> - <code>string</code> - Optional - Version of the workflow type.</li>
182
	 * 		</ul></li>
183
	 * 	</ul></li>
184
	 * 	<li><code>tagFilter</code> - <code>array</code> - Optional - If specified, only executions that have a tag that matches the filter are counted. <p class="note"> <code>closeStatusFilter</code>, <code>executionFilter</code>, <code>typeFilter</code> and <code>tagFilter</code> are mutually exclusive. You can specify at most one of these in a request.</p> <ul>
185
	 * 		<li><code>x</code> - <code>array</code> - Optional - This represents a simple array index. <ul>
186
	 * 			<li><code>tag</code> - <code>string</code> - Required - Specifies the tag that must be associated with the execution for it to meet the filter criteria. This field is required.</li>
187
	 * 		</ul></li>
188
	 * 	</ul></li>
189
	 * 	<li><code>closeStatusFilter</code> - <code>array</code> - Optional - If specified, only workflow executions that match this close status are counted. This filter has an affect only if <code>executionStatus</code> is specified as <code>CLOSED</code>. <p class="note"> <code>closeStatusFilter</code>, <code>executionFilter</code>, <code>typeFilter</code> and <code>tagFilter</code> are mutually exclusive. You can specify at most one of these in a request.</p> <ul>
190
	 * 		<li><code>x</code> - <code>array</code> - Optional - This represents a simple array index. <ul>
191
	 * 			<li><code>status</code> - <code>string</code> - Required - The close status that must match the close status of an execution for it to meet the criteria of this filter. This field is required. [Allowed values: <code>COMPLETED</code>, <code>FAILED</code>, <code>CANCELED</code>, <code>TERMINATED</code>, <code>CONTINUED_AS_NEW</code>, <code>TIMED_OUT</code>]</li>
192
	 * 		</ul></li>
193
	 * 	</ul></li>
194
	 * 	<li><code>curlopts</code> - <code>array</code> - Optional - A set of values to pass directly into <code>curl_setopt()</code>, where the key is a pre-defined <code>CURLOPT_*</code> constant.</li>
195
	 * 	<li><code>returnCurlHandle</code> - <code>boolean</code> - Optional - A private toggle specifying that the cURL handle be returned rather than actually completing the request. This toggle is useful for manually managed batch requests.</li></ul>
196
	 * @return CFResponse A <CFResponse> object containing a parsed HTTP response.
197
	 */
198
	public function count_closed_workflow_executions($opt = null)
199
	{
200
		if (!$opt) $opt = array();
201
 
202
		$opt = json_encode($opt);
203
		return $this->authenticate('CountClosedWorkflowExecutions', $opt);
204
	}
205
 
206
	/**
207
	 * Returns the number of open workflow executions within the given domain that meet the specified
208
	 * filtering criteria.
209
	 *
210
	 * <p class="note">
211
	 * This operation is eventually consistent. The results are best effort and may not exactly
212
	 * reflect recent updates and changes.
213
	 * </p>
214
	 *
215
	 * @param array $opt (Optional) An associative array of parameters that can have the following keys: <ul>
216
	 * 	<li><code>domain</code> - <code>string</code> - Required - The name of the domain containing the workflow executions to count.</li>
217
	 * 	<li><code>startTimeFilter</code> - <code>array</code> - Required - Specifies the start time criteria that workflow executions must meet in order to be counted. <ul>
218
	 * 		<li><code>x</code> - <code>array</code> - Optional - This represents a simple array index. <ul>
219
	 * 			<li><code>oldestDate</code> - <code>string</code> - Required - Specifies the oldest start or close date and time to return. May be passed as a number of seconds since UNIX Epoch, or any string compatible with <php:strtotime()>.</li>
220
	 * 			<li><code>latestDate</code> - <code>string</code> - Optional - Specifies the latest start or close date and time to return. May be passed as a number of seconds since UNIX Epoch, or any string compatible with <php:strtotime()>.</li>
221
	 * 		</ul></li>
222
	 * 	</ul></li>
223
	 * 	<li><code>typeFilter</code> - <code>array</code> - Optional - Specifies the type of the workflow executions to be counted. <p class="note"> <code>executionFilter</code>, <code>typeFilter</code> and <code>tagFilter</code> are mutually exclusive. You can specify at most one of these in a request.</p> <ul>
224
	 * 		<li><code>x</code> - <code>array</code> - Optional - This represents a simple array index. <ul>
225
	 * 			<li><code>name</code> - <code>string</code> - Required - Name of the workflow type. This field is required.</li>
226
	 * 			<li><code>version</code> - <code>string</code> - Optional - Version of the workflow type.</li>
227
	 * 		</ul></li>
228
	 * 	</ul></li>
229
	 * 	<li><code>tagFilter</code> - <code>array</code> - Optional - If specified, only executions that have a tag that matches the filter are counted. <p class="note"> <code>executionFilter</code>, <code>typeFilter</code> and <code>tagFilter</code> are mutually exclusive. You can specify at most one of these in a request.</p> <ul>
230
	 * 		<li><code>x</code> - <code>array</code> - Optional - This represents a simple array index. <ul>
231
	 * 			<li><code>tag</code> - <code>string</code> - Required - Specifies the tag that must be associated with the execution for it to meet the filter criteria. This field is required.</li>
232
	 * 		</ul></li>
233
	 * 	</ul></li>
234
	 * 	<li><code>executionFilter</code> - <code>array</code> - Optional - If specified, only workflow executions matching the <code>WorkflowId</code> in the filter are counted. <p class="note"> <code>executionFilter</code>, <code>typeFilter</code> and <code>tagFilter</code> are mutually exclusive. You can specify at most one of these in a request.</p> <ul>
235
	 * 		<li><code>x</code> - <code>array</code> - Optional - This represents a simple array index. <ul>
236
	 * 			<li><code>workflowId</code> - <code>string</code> - Required - The workflowId to pass of match the criteria of this filter.</li>
237
	 * 		</ul></li>
238
	 * 	</ul></li>
239
	 * 	<li><code>curlopts</code> - <code>array</code> - Optional - A set of values to pass directly into <code>curl_setopt()</code>, where the key is a pre-defined <code>CURLOPT_*</code> constant.</li>
240
	 * 	<li><code>returnCurlHandle</code> - <code>boolean</code> - Optional - A private toggle specifying that the cURL handle be returned rather than actually completing the request. This toggle is useful for manually managed batch requests.</li></ul>
241
	 * @return CFResponse A <CFResponse> object containing a parsed HTTP response.
242
	 */
243
	public function count_open_workflow_executions($opt = null)
244
	{
245
		if (!$opt) $opt = array();
246
 
247
		$opt = json_encode($opt);
248
		return $this->authenticate('CountOpenWorkflowExecutions', $opt);
249
	}
250
 
251
	/**
252
	 * Returns the estimated number of activity tasks in the specified task list. The count returned
253
	 * is an approximation and is not guaranteed to be exact. If you specify a task list that no
254
	 * activity task was ever scheduled in then 0 will be returned.
255
	 *
256
	 * @param array $opt (Optional) An associative array of parameters that can have the following keys: <ul>
257
	 * 	<li><code>domain</code> - <code>string</code> - Required - The name of the domain that contains the task list.</li>
258
	 * 	<li><code>taskList</code> - <code>array</code> - Required - The name of the task list. <ul>
259
	 * 		<li><code>x</code> - <code>array</code> - Optional - This represents a simple array index. <ul>
260
	 * 			<li><code>name</code> - <code>string</code> - Required - The name of the task list.</li>
261
	 * 		</ul></li>
262
	 * 	</ul></li>
263
	 * 	<li><code>curlopts</code> - <code>array</code> - Optional - A set of values to pass directly into <code>curl_setopt()</code>, where the key is a pre-defined <code>CURLOPT_*</code> constant.</li>
264
	 * 	<li><code>returnCurlHandle</code> - <code>boolean</code> - Optional - A private toggle specifying that the cURL handle be returned rather than actually completing the request. This toggle is useful for manually managed batch requests.</li></ul>
265
	 * @return CFResponse A <CFResponse> object containing a parsed HTTP response.
266
	 */
267
	public function count_pending_activity_tasks($opt = null)
268
	{
269
		if (!$opt) $opt = array();
270
 
271
		$opt = json_encode($opt);
272
		return $this->authenticate('CountPendingActivityTasks', $opt);
273
	}
274
 
275
	/**
276
	 * Returns the estimated number of decision tasks in the specified task list. The count returned
277
	 * is an approximation and is not guaranteed to be exact. If you specify a task list that no
278
	 * decision task was ever scheduled in then 0 will be returned.
279
	 *
280
	 * @param array $opt (Optional) An associative array of parameters that can have the following keys: <ul>
281
	 * 	<li><code>domain</code> - <code>string</code> - Required - The name of the domain that contains the task list.</li>
282
	 * 	<li><code>taskList</code> - <code>array</code> - Required - The name of the task list. <ul>
283
	 * 		<li><code>x</code> - <code>array</code> - Optional - This represents a simple array index. <ul>
284
	 * 			<li><code>name</code> - <code>string</code> - Required - The name of the task list.</li>
285
	 * 		</ul></li>
286
	 * 	</ul></li>
287
	 * 	<li><code>curlopts</code> - <code>array</code> - Optional - A set of values to pass directly into <code>curl_setopt()</code>, where the key is a pre-defined <code>CURLOPT_*</code> constant.</li>
288
	 * 	<li><code>returnCurlHandle</code> - <code>boolean</code> - Optional - A private toggle specifying that the cURL handle be returned rather than actually completing the request. This toggle is useful for manually managed batch requests.</li></ul>
289
	 * @return CFResponse A <CFResponse> object containing a parsed HTTP response.
290
	 */
291
	public function count_pending_decision_tasks($opt = null)
292
	{
293
		if (!$opt) $opt = array();
294
 
295
		$opt = json_encode($opt);
296
		return $this->authenticate('CountPendingDecisionTasks', $opt);
297
	}
298
 
299
	/**
300
	 * Deprecates the specified <em>activity type</em>. After an activity type has been deprecated,
301
	 * you cannot create new tasks of that activity type. Tasks of this type that were scheduled
302
	 * before the type was deprecated will continue to run.
303
	 *
304
	 * <p class="note">
305
	 * This operation is eventually consistent. The results are best effort and may not exactly
306
	 * reflect recent updates and changes.
307
	 * </p>
308
	 *
309
	 * @param array $opt (Optional) An associative array of parameters that can have the following keys: <ul>
310
	 * 	<li><code>domain</code> - <code>string</code> - Required - The name of the domain in which the activity type is registered.</li>
311
	 * 	<li><code>activityType</code> - <code>array</code> - Required - The activity type to deprecate. <ul>
312
	 * 		<li><code>x</code> - <code>array</code> - Optional - This represents a simple array index. <ul>
313
	 * 			<li><code>name</code> - <code>string</code> - Required - The name of this activity. <p class="note">The combination of activity type name and version must be unique within a domain.</p></li>
314
	 * 			<li><code>version</code> - <code>string</code> - Required - The version of this activity. <p class="note">The combination of activity type name and version must be unique with in a domain.</p></li>
315
	 * 		</ul></li>
316
	 * 	</ul></li>
317
	 * 	<li><code>curlopts</code> - <code>array</code> - Optional - A set of values to pass directly into <code>curl_setopt()</code>, where the key is a pre-defined <code>CURLOPT_*</code> constant.</li>
318
	 * 	<li><code>returnCurlHandle</code> - <code>boolean</code> - Optional - A private toggle specifying that the cURL handle be returned rather than actually completing the request. This toggle is useful for manually managed batch requests.</li></ul>
319
	 * @return CFResponse A <CFResponse> object containing a parsed HTTP response.
320
	 */
321
	public function deprecate_activity_type($opt = null)
322
	{
323
		if (!$opt) $opt = array();
324
 
325
		$opt = json_encode($opt);
326
		return $this->authenticate('DeprecateActivityType', $opt);
327
	}
328
 
329
	/**
330
	 * Deprecates the specified domain. After a domain has been deprecated it cannot be used to create
331
	 * new workflow executions or register new types. However, you can still use visibility actions on
332
	 * this domain. Deprecating a domain also deprecates all activity and workflow types registered in
333
	 * the domain. Executions that were started before the domain was deprecated will continue to run.
334
	 *
335
	 * <p class="note">
336
	 * This operation is eventually consistent. The results are best effort and may not exactly
337
	 * reflect recent updates and changes.
338
	 * </p>
339
	 *
340
	 * @param array $opt (Optional) An associative array of parameters that can have the following keys: <ul>
341
	 * 	<li><code>name</code> - <code>string</code> - Required - The name of the domain to deprecate.</li>
342
	 * 	<li><code>curlopts</code> - <code>array</code> - Optional - A set of values to pass directly into <code>curl_setopt()</code>, where the key is a pre-defined <code>CURLOPT_*</code> constant.</li>
343
	 * 	<li><code>returnCurlHandle</code> - <code>boolean</code> - Optional - A private toggle specifying that the cURL handle be returned rather than actually completing the request. This toggle is useful for manually managed batch requests.</li></ul>
344
	 * @return CFResponse A <CFResponse> object containing a parsed HTTP response.
345
	 */
346
	public function deprecate_domain($opt = null)
347
	{
348
		if (!$opt) $opt = array();
349
 
350
		$opt = json_encode($opt);
351
		return $this->authenticate('DeprecateDomain', $opt);
352
	}
353
 
354
	/**
355
	 * Deprecates the specified <em>workflow type</em>. After a workflow type has been deprecated, you
356
	 * cannot create new executions of that type. Executions that were started before the type was
357
	 * deprecated will continue to run. A deprecated workflow type may still be used when calling
358
	 * visibility actions.
359
	 *
360
	 * <p class="note">
361
	 * This operation is eventually consistent. The results are best effort and may not exactly
362
	 * reflect recent updates and changes.
363
	 * </p>
364
	 *
365
	 * @param array $opt (Optional) An associative array of parameters that can have the following keys: <ul>
366
	 * 	<li><code>domain</code> - <code>string</code> - Required - The name of the domain in which the workflow type is registered.</li>
367
	 * 	<li><code>workflowType</code> - <code>array</code> - Required - The workflow type to deprecate. <ul>
368
	 * 		<li><code>x</code> - <code>array</code> - Optional - This represents a simple array index. <ul>
369
	 * 			<li><code>name</code> - <code>string</code> - Required - The name of the workflow type. This field is required. <p class="note">The combination of workflow type name and version must be unique with in a domain.</p></li>
370
	 * 			<li><code>version</code> - <code>string</code> - Required - The version of the workflow type. This field is required. <p class="note">The combination of workflow type name and version must be unique with in a domain.</p></li>
371
	 * 		</ul></li>
372
	 * 	</ul></li>
373
	 * 	<li><code>curlopts</code> - <code>array</code> - Optional - A set of values to pass directly into <code>curl_setopt()</code>, where the key is a pre-defined <code>CURLOPT_*</code> constant.</li>
374
	 * 	<li><code>returnCurlHandle</code> - <code>boolean</code> - Optional - A private toggle specifying that the cURL handle be returned rather than actually completing the request. This toggle is useful for manually managed batch requests.</li></ul>
375
	 * @return CFResponse A <CFResponse> object containing a parsed HTTP response.
376
	 */
377
	public function deprecate_workflow_type($opt = null)
378
	{
379
		if (!$opt) $opt = array();
380
 
381
		$opt = json_encode($opt);
382
		return $this->authenticate('DeprecateWorkflowType', $opt);
383
	}
384
 
385
	/**
386
	 * Returns information about the specified activity type. This includes configuration settings
387
	 * provided at registration time as well as other general information about the type.
388
	 *
389
	 * @param array $opt (Optional) An associative array of parameters that can have the following keys: <ul>
390
	 * 	<li><code>domain</code> - <code>string</code> - Required - The name of the domain in which the activity type is registered.</li>
391
	 * 	<li><code>activityType</code> - <code>array</code> - Required - The activity type to describe. <ul>
392
	 * 		<li><code>x</code> - <code>array</code> - Optional - This represents a simple array index. <ul>
393
	 * 			<li><code>name</code> - <code>string</code> - Required - The name of this activity. <p class="note">The combination of activity type name and version must be unique within a domain.</p></li>
394
	 * 			<li><code>version</code> - <code>string</code> - Required - The version of this activity. <p class="note">The combination of activity type name and version must be unique with in a domain.</p></li>
395
	 * 		</ul></li>
396
	 * 	</ul></li>
397
	 * 	<li><code>curlopts</code> - <code>array</code> - Optional - A set of values to pass directly into <code>curl_setopt()</code>, where the key is a pre-defined <code>CURLOPT_*</code> constant.</li>
398
	 * 	<li><code>returnCurlHandle</code> - <code>boolean</code> - Optional - A private toggle specifying that the cURL handle be returned rather than actually completing the request. This toggle is useful for manually managed batch requests.</li></ul>
399
	 * @return CFResponse A <CFResponse> object containing a parsed HTTP response.
400
	 */
401
	public function describe_activity_type($opt = null)
402
	{
403
		if (!$opt) $opt = array();
404
 
405
		$opt = json_encode($opt);
406
		return $this->authenticate('DescribeActivityType', $opt);
407
	}
408
 
409
	/**
410
	 * Returns information about the specified domain including description and status.
411
	 *
412
	 * @param array $opt (Optional) An associative array of parameters that can have the following keys: <ul>
413
	 * 	<li><code>name</code> - <code>string</code> - Required - The name of the domain to describe.</li>
414
	 * 	<li><code>curlopts</code> - <code>array</code> - Optional - A set of values to pass directly into <code>curl_setopt()</code>, where the key is a pre-defined <code>CURLOPT_*</code> constant.</li>
415
	 * 	<li><code>returnCurlHandle</code> - <code>boolean</code> - Optional - A private toggle specifying that the cURL handle be returned rather than actually completing the request. This toggle is useful for manually managed batch requests.</li></ul>
416
	 * @return CFResponse A <CFResponse> object containing a parsed HTTP response.
417
	 */
418
	public function describe_domain($opt = null)
419
	{
420
		if (!$opt) $opt = array();
421
 
422
		$opt = json_encode($opt);
423
		return $this->authenticate('DescribeDomain', $opt);
424
	}
425
 
426
	/**
427
	 * Returns information about the specified workflow execution including its type and some
428
	 * statistics.
429
	 *
430
	 * <p class="note">
431
	 * This operation is eventually consistent. The results are best effort and may not exactly
432
	 * reflect recent updates and changes.
433
	 * </p>
434
	 *
435
	 * @param array $opt (Optional) An associative array of parameters that can have the following keys: <ul>
436
	 * 	<li><code>domain</code> - <code>string</code> - Required - The name of the domain containing the workflow execution.</li>
437
	 * 	<li><code>execution</code> - <code>array</code> - Required - The workflow execution to describe. <ul>
438
	 * 		<li><code>x</code> - <code>array</code> - Optional - This represents a simple array index. <ul>
439
	 * 			<li><code>workflowId</code> - <code>string</code> - Required - The user defined identifier associated with the workflow execution.</li>
440
	 * 			<li><code>runId</code> - <code>string</code> - Required - A system generated unique identifier for the workflow execution.</li>
441
	 * 		</ul></li>
442
	 * 	</ul></li>
443
	 * 	<li><code>curlopts</code> - <code>array</code> - Optional - A set of values to pass directly into <code>curl_setopt()</code>, where the key is a pre-defined <code>CURLOPT_*</code> constant.</li>
444
	 * 	<li><code>returnCurlHandle</code> - <code>boolean</code> - Optional - A private toggle specifying that the cURL handle be returned rather than actually completing the request. This toggle is useful for manually managed batch requests.</li></ul>
445
	 * @return CFResponse A <CFResponse> object containing a parsed HTTP response.
446
	 */
447
	public function describe_workflow_execution($opt = null)
448
	{
449
		if (!$opt) $opt = array();
450
 
451
		$opt = json_encode($opt);
452
		return $this->authenticate('DescribeWorkflowExecution', $opt);
453
	}
454
 
455
	/**
456
	 * Returns information about the specified <em>workflow type</em>. This includes configuration
457
	 * settings specified when the type was registered and other information such as creation date,
458
	 * current status, etc.
459
	 *
460
	 * @param array $opt (Optional) An associative array of parameters that can have the following keys: <ul>
461
	 * 	<li><code>domain</code> - <code>string</code> - Required - The name of the domain in which this workflow type is registered.</li>
462
	 * 	<li><code>workflowType</code> - <code>array</code> - Required - The workflow type to describe. <ul>
463
	 * 		<li><code>x</code> - <code>array</code> - Optional - This represents a simple array index. <ul>
464
	 * 			<li><code>name</code> - <code>string</code> - Required - The name of the workflow type. This field is required. <p class="note">The combination of workflow type name and version must be unique with in a domain.</p></li>
465
	 * 			<li><code>version</code> - <code>string</code> - Required - The version of the workflow type. This field is required. <p class="note">The combination of workflow type name and version must be unique with in a domain.</p></li>
466
	 * 		</ul></li>
467
	 * 	</ul></li>
468
	 * 	<li><code>curlopts</code> - <code>array</code> - Optional - A set of values to pass directly into <code>curl_setopt()</code>, where the key is a pre-defined <code>CURLOPT_*</code> constant.</li>
469
	 * 	<li><code>returnCurlHandle</code> - <code>boolean</code> - Optional - A private toggle specifying that the cURL handle be returned rather than actually completing the request. This toggle is useful for manually managed batch requests.</li></ul>
470
	 * @return CFResponse A <CFResponse> object containing a parsed HTTP response.
471
	 */
472
	public function describe_workflow_type($opt = null)
473
	{
474
		if (!$opt) $opt = array();
475
 
476
		$opt = json_encode($opt);
477
		return $this->authenticate('DescribeWorkflowType', $opt);
478
	}
479
 
480
	/**
481
	 * Returns the history of the specified workflow execution. The results may be split into multiple
482
	 * pages. To retrieve subsequent pages, make the call again using the <code>nextPageToken</code>
483
	 * returned by the initial call.
484
	 *
485
	 * <p class="note">
486
	 * This operation is eventually consistent. The results are best effort and may not exactly
487
	 * reflect recent updates and changes.
488
	 * </p>
489
	 *
490
	 * @param array $opt (Optional) An associative array of parameters that can have the following keys: <ul>
491
	 * 	<li><code>domain</code> - <code>string</code> - Required - The name of the domain containing the workflow execution.</li>
492
	 * 	<li><code>execution</code> - <code>array</code> - Required - Specifies the workflow execution for which to return the history. <ul>
493
	 * 		<li><code>x</code> - <code>array</code> - Optional - This represents a simple array index. <ul>
494
	 * 			<li><code>workflowId</code> - <code>string</code> - Required - The user defined identifier associated with the workflow execution.</li>
495
	 * 			<li><code>runId</code> - <code>string</code> - Required - A system generated unique identifier for the workflow execution.</li>
496
	 * 		</ul></li>
497
	 * 	</ul></li>
498
	 * 	<li><code>nextPageToken</code> - <code>string</code> - Optional - If a <code>NextPageToken</code> is returned, the result has more than one pages. To get the next page, repeat the call and specify the nextPageToken with all other arguments unchanged.</li>
499
	 * 	<li><code>maximumPageSize</code> - <code>integer</code> - Optional - Specifies the maximum number of history events returned in one page. The next page in the result is identified by the <code>NextPageToken</code> returned. By default 100 history events are returned in a page but the caller can override this value to a page size <em>smaller</em> than the default. You cannot specify a page size larger than 100.</li>
500
	 * 	<li><code>reverseOrder</code> - <code>boolean</code> - Optional - When set to <code>true</code>, returns the events in reverse order. By default the results are returned in ascending order of the <code>eventTimeStamp</code> of the events.</li>
501
	 * 	<li><code>curlopts</code> - <code>array</code> - Optional - A set of values to pass directly into <code>curl_setopt()</code>, where the key is a pre-defined <code>CURLOPT_*</code> constant.</li>
502
	 * 	<li><code>returnCurlHandle</code> - <code>boolean</code> - Optional - A private toggle specifying that the cURL handle be returned rather than actually completing the request. This toggle is useful for manually managed batch requests.</li></ul>
503
	 * @return CFResponse A <CFResponse> object containing a parsed HTTP response.
504
	 */
505
	public function get_workflow_execution_history($opt = null)
506
	{
507
		if (!$opt) $opt = array();
508
 
509
		$opt = json_encode($opt);
510
		return $this->authenticate('GetWorkflowExecutionHistory', $opt);
511
	}
512
 
513
	/**
514
	 * Returns information about all activities registered in the specified domain that match the
515
	 * specified name and registration status. The result includes information like creation date,
516
	 * current status of the activity, etc. The results may be split into multiple pages. To retrieve
517
	 * subsequent pages, make the call again using the <code>nextPageToken</code> returned by the
518
	 * initial call.
519
	 *
520
	 * @param array $opt (Optional) An associative array of parameters that can have the following keys: <ul>
521
	 * 	<li><code>domain</code> - <code>string</code> - Required - The name of the domain in which the activity types have been registered.</li>
522
	 * 	<li><code>name</code> - <code>string</code> - Optional - If specified, only lists the activity types that have this name.</li>
523
	 * 	<li><code>registrationStatus</code> - <code>string</code> - Required - Specifies the registration status of the activity types to list. [Allowed values: <code>REGISTERED</code>, <code>DEPRECATED</code>]</li>
524
	 * 	<li><code>nextPageToken</code> - <code>string</code> - Optional - If on a previous call to this method a <code>NextResultToken</code> was returned, the results have more than one page. To get the next page of results, repeat the call with the <code>nextPageToken</code> and keep all other arguments unchanged.</li>
525
	 * 	<li><code>maximumPageSize</code> - <code>integer</code> - Optional - The maximum number of results returned in each page. The default is 100, but the caller can override this value to a page size <em>smaller</em> than the default. You cannot specify a page size greater than 100.</li>
526
	 * 	<li><code>reverseOrder</code> - <code>boolean</code> - Optional - When set to <code>true</code>, returns the results in reverse order. By default the results are returned in ascending alphabetical order of the <code>name</code> of the activity types.</li>
527
	 * 	<li><code>curlopts</code> - <code>array</code> - Optional - A set of values to pass directly into <code>curl_setopt()</code>, where the key is a pre-defined <code>CURLOPT_*</code> constant.</li>
528
	 * 	<li><code>returnCurlHandle</code> - <code>boolean</code> - Optional - A private toggle specifying that the cURL handle be returned rather than actually completing the request. This toggle is useful for manually managed batch requests.</li></ul>
529
	 * @return CFResponse A <CFResponse> object containing a parsed HTTP response.
530
	 */
531
	public function list_activity_types($opt = null)
532
	{
533
		if (!$opt) $opt = array();
534
 
535
		$opt = json_encode($opt);
536
		return $this->authenticate('ListActivityTypes', $opt);
537
	}
538
 
539
	/**
540
	 * Returns a list of closed workflow executions in the specified domain that meet the filtering
541
	 * criteria. The results may be split into multiple pages. To retrieve subsequent pages, make the
542
	 * call again using the nextPageToken returned by the initial call.
543
	 *
544
	 * <p class="note">
545
	 * This operation is eventually consistent. The results are best effort and may not exactly
546
	 * reflect recent updates and changes.
547
	 * </p>
548
	 *
549
	 * @param array $opt (Optional) An associative array of parameters that can have the following keys: <ul>
550
	 * 	<li><code>domain</code> - <code>string</code> - Required - The name of the domain that contains the workflow executions to list.</li>
551
	 * 	<li><code>startTimeFilter</code> - <code>array</code> - Optional - If specified, the workflow executions are included in the returned results based on whether their start times are within the range specified by this filter. Also, if this parameter is specified, the returned results are ordered by their start times. <p class="note"> <code>startTimeFilter</code> and <code>closeTimeFilter</code> are mutually exclusive. You must specify one of these in a request but not both.</p> <ul>
552
	 * 		<li><code>x</code> - <code>array</code> - Optional - This represents a simple array index. <ul>
553
	 * 			<li><code>oldestDate</code> - <code>string</code> - Required - Specifies the oldest start or close date and time to return. May be passed as a number of seconds since UNIX Epoch, or any string compatible with <php:strtotime()>.</li>
554
	 * 			<li><code>latestDate</code> - <code>string</code> - Optional - Specifies the latest start or close date and time to return. May be passed as a number of seconds since UNIX Epoch, or any string compatible with <php:strtotime()>.</li>
555
	 * 		</ul></li>
556
	 * 	</ul></li>
557
	 * 	<li><code>closeTimeFilter</code> - <code>array</code> - Optional - If specified, the workflow executions are included in the returned results based on whether their close times are within the range specified by this filter. Also, if this parameter is specified, the returned results are ordered by their close times. <p class="note"> <code>startTimeFilter</code> and <code>closeTimeFilter</code> are mutually exclusive. You must specify one of these in a request but not both.</p> <ul>
558
	 * 		<li><code>x</code> - <code>array</code> - Optional - This represents a simple array index. <ul>
559
	 * 			<li><code>oldestDate</code> - <code>string</code> - Required - Specifies the oldest start or close date and time to return. May be passed as a number of seconds since UNIX Epoch, or any string compatible with <php:strtotime()>.</li>
560
	 * 			<li><code>latestDate</code> - <code>string</code> - Optional - Specifies the latest start or close date and time to return. May be passed as a number of seconds since UNIX Epoch, or any string compatible with <php:strtotime()>.</li>
561
	 * 		</ul></li>
562
	 * 	</ul></li>
563
	 * 	<li><code>executionFilter</code> - <code>array</code> - Optional - If specified, only workflow executions matching the workflow id specified in the filter are returned. <p class="note"> <code>closeStatusFilter</code>, <code>executionFilter</code>, <code>typeFilter</code> and <code>tagFilter</code> are mutually exclusive. You can specify at most one of these in a request.</p> <ul>
564
	 * 		<li><code>x</code> - <code>array</code> - Optional - This represents a simple array index. <ul>
565
	 * 			<li><code>workflowId</code> - <code>string</code> - Required - The workflowId to pass of match the criteria of this filter.</li>
566
	 * 		</ul></li>
567
	 * 	</ul></li>
568
	 * 	<li><code>closeStatusFilter</code> - <code>array</code> - Optional - If specified, only workflow executions that match this <em>close status</em> are listed. For example, if TERMINATED is specified, then only TERMINATED workflow executions are listed. <p class="note"> <code>closeStatusFilter</code>, <code>executionFilter</code>, <code>typeFilter</code> and <code>tagFilter</code> are mutually exclusive. You can specify at most one of these in a request.</p> <ul>
569
	 * 		<li><code>x</code> - <code>array</code> - Optional - This represents a simple array index. <ul>
570
	 * 			<li><code>status</code> - <code>string</code> - Required - The close status that must match the close status of an execution for it to meet the criteria of this filter. This field is required. [Allowed values: <code>COMPLETED</code>, <code>FAILED</code>, <code>CANCELED</code>, <code>TERMINATED</code>, <code>CONTINUED_AS_NEW</code>, <code>TIMED_OUT</code>]</li>
571
	 * 		</ul></li>
572
	 * 	</ul></li>
573
	 * 	<li><code>typeFilter</code> - <code>array</code> - Optional - If specified, only executions of the type specified in the filter are returned. <p class="note"> <code>closeStatusFilter</code>, <code>executionFilter</code>, <code>typeFilter</code> and <code>tagFilter</code> are mutually exclusive. You can specify at most one of these in a request.</p> <ul>
574
	 * 		<li><code>x</code> - <code>array</code> - Optional - This represents a simple array index. <ul>
575
	 * 			<li><code>name</code> - <code>string</code> - Required - Name of the workflow type. This field is required.</li>
576
	 * 			<li><code>version</code> - <code>string</code> - Optional - Version of the workflow type.</li>
577
	 * 		</ul></li>
578
	 * 	</ul></li>
579
	 * 	<li><code>tagFilter</code> - <code>array</code> - Optional - If specified, only executions that have the matching tag are listed. <p class="note"> <code>closeStatusFilter</code>, <code>executionFilter</code>, <code>typeFilter</code> and <code>tagFilter</code> are mutually exclusive. You can specify at most one of these in a request.</p> <ul>
580
	 * 		<li><code>x</code> - <code>array</code> - Optional - This represents a simple array index. <ul>
581
	 * 			<li><code>tag</code> - <code>string</code> - Required - Specifies the tag that must be associated with the execution for it to meet the filter criteria. This field is required.</li>
582
	 * 		</ul></li>
583
	 * 	</ul></li>
584
	 * 	<li><code>nextPageToken</code> - <code>string</code> - Optional - If on a previous call to this method a <code>NextPageToken</code> was returned, the results are being paginated. To get the next page of results, repeat the call with the returned token and all other arguments unchanged.</li>
585
	 * 	<li><code>maximumPageSize</code> - <code>integer</code> - Optional - The maximum number of results returned in each page. The default is 100, but the caller can override this value to a page size <em>smaller</em> than the default. You cannot specify a page size greater than 100.</li>
586
	 * 	<li><code>reverseOrder</code> - <code>boolean</code> - Optional - When set to <code>true</code>, returns the results in reverse order. By default the results are returned in descending order of the start or the close time of the executions.</li>
587
	 * 	<li><code>curlopts</code> - <code>array</code> - Optional - A set of values to pass directly into <code>curl_setopt()</code>, where the key is a pre-defined <code>CURLOPT_*</code> constant.</li>
588
	 * 	<li><code>returnCurlHandle</code> - <code>boolean</code> - Optional - A private toggle specifying that the cURL handle be returned rather than actually completing the request. This toggle is useful for manually managed batch requests.</li></ul>
589
	 * @return CFResponse A <CFResponse> object containing a parsed HTTP response.
590
	 */
591
	public function list_closed_workflow_executions($opt = null)
592
	{
593
		if (!$opt) $opt = array();
594
 
595
		$opt = json_encode($opt);
596
		return $this->authenticate('ListClosedWorkflowExecutions', $opt);
597
	}
598
 
599
	/**
600
	 * Returns the list of domains registered in the account. The results may be split into multiple
601
	 * pages. To retrieve subsequent pages, make the call again using the nextPageToken returned by
602
	 * the initial call.
603
	 *
604
	 * <p class="note">
605
	 * This operation is eventually consistent. The results are best effort and may not exactly
606
	 * reflect recent updates and changes.
607
	 * </p>
608
	 *
609
	 * @param array $opt (Optional) An associative array of parameters that can have the following keys: <ul>
610
	 * 	<li><code>nextPageToken</code> - <code>string</code> - Optional - If on a previous call to this method a <code>NextPageToken</code> was returned, the result has more than one page. To get the next page of results, repeat the call with the returned token and all other arguments unchanged.</li>
611
	 * 	<li><code>registrationStatus</code> - <code>string</code> - Required - Specifies the registration status of the domains to list. [Allowed values: <code>REGISTERED</code>, <code>DEPRECATED</code>]</li>
612
	 * 	<li><code>maximumPageSize</code> - <code>integer</code> - Optional - The maximum number of results returned in each page. The default is 100, but the caller can override this value to a page size <em>smaller</em> than the default. You cannot specify a page size greater than 100.</li>
613
	 * 	<li><code>reverseOrder</code> - <code>boolean</code> - Optional - When set to <code>true</code>, returns the results in reverse order. By default the results are returned in ascending alphabetical order of the <code>name</code> of the domains.</li>
614
	 * 	<li><code>curlopts</code> - <code>array</code> - Optional - A set of values to pass directly into <code>curl_setopt()</code>, where the key is a pre-defined <code>CURLOPT_*</code> constant.</li>
615
	 * 	<li><code>returnCurlHandle</code> - <code>boolean</code> - Optional - A private toggle specifying that the cURL handle be returned rather than actually completing the request. This toggle is useful for manually managed batch requests.</li></ul>
616
	 * @return CFResponse A <CFResponse> object containing a parsed HTTP response.
617
	 */
618
	public function list_domains($opt = null)
619
	{
620
		if (!$opt) $opt = array();
621
 
622
		$opt = json_encode($opt);
623
		return $this->authenticate('ListDomains', $opt);
624
	}
625
 
626
	/**
627
	 * Returns a list of open workflow executions in the specified domain that meet the filtering
628
	 * criteria. The results may be split into multiple pages. To retrieve subsequent pages, make the
629
	 * call again using the nextPageToken returned by the initial call.
630
	 *
631
	 * <p class="note">
632
	 * This operation is eventually consistent. The results are best effort and may not exactly
633
	 * reflect recent updates and changes.
634
	 * </p>
635
	 *
636
	 * @param array $opt (Optional) An associative array of parameters that can have the following keys: <ul>
637
	 * 	<li><code>domain</code> - <code>string</code> - Required - The name of the domain that contains the workflow executions to list.</li>
638
	 * 	<li><code>startTimeFilter</code> - <code>array</code> - Required - Workflow executions are included in the returned results based on whether their start times are within the range specified by this filter. <ul>
639
	 * 		<li><code>x</code> - <code>array</code> - Optional - This represents a simple array index. <ul>
640
	 * 			<li><code>oldestDate</code> - <code>string</code> - Required - Specifies the oldest start or close date and time to return. May be passed as a number of seconds since UNIX Epoch, or any string compatible with <php:strtotime()>.</li>
641
	 * 			<li><code>latestDate</code> - <code>string</code> - Optional - Specifies the latest start or close date and time to return. May be passed as a number of seconds since UNIX Epoch, or any string compatible with <php:strtotime()>.</li>
642
	 * 		</ul></li>
643
	 * 	</ul></li>
644
	 * 	<li><code>typeFilter</code> - <code>array</code> - Optional - If specified, only executions of the type specified in the filter are returned. <p class="note"> <code>executionFilter</code>, <code>typeFilter</code> and <code>tagFilter</code> are mutually exclusive. You can specify at most one of these in a request.</p> <ul>
645
	 * 		<li><code>x</code> - <code>array</code> - Optional - This represents a simple array index. <ul>
646
	 * 			<li><code>name</code> - <code>string</code> - Required - Name of the workflow type. This field is required.</li>
647
	 * 			<li><code>version</code> - <code>string</code> - Optional - Version of the workflow type.</li>
648
	 * 		</ul></li>
649
	 * 	</ul></li>
650
	 * 	<li><code>tagFilter</code> - <code>array</code> - Optional - If specified, only executions that have the matching tag are listed. <p class="note"> <code>executionFilter</code>, <code>typeFilter</code> and <code>tagFilter</code> are mutually exclusive. You can specify at most one of these in a request.</p> <ul>
651
	 * 		<li><code>x</code> - <code>array</code> - Optional - This represents a simple array index. <ul>
652
	 * 			<li><code>tag</code> - <code>string</code> - Required - Specifies the tag that must be associated with the execution for it to meet the filter criteria. This field is required.</li>
653
	 * 		</ul></li>
654
	 * 	</ul></li>
655
	 * 	<li><code>nextPageToken</code> - <code>string</code> - Optional - If on a previous call to this method a <code>NextPageToken</code> was returned, the results are being paginated. To get the next page of results, repeat the call with the returned token and all other arguments unchanged.</li>
656
	 * 	<li><code>maximumPageSize</code> - <code>integer</code> - Optional - The maximum number of results returned in each page. The default is 100, but the caller can override this value to a page size <em>smaller</em> than the default. You cannot specify a page size greater than 100.</li>
657
	 * 	<li><code>reverseOrder</code> - <code>boolean</code> - Optional - When set to <code>true</code>, returns the results in reverse order. By default the results are returned in descending order of the start time of the executions.</li>
658
	 * 	<li><code>executionFilter</code> - <code>array</code> - Optional - If specified, only workflow executions matching the workflow id specified in the filter are returned. <p class="note"> <code>executionFilter</code>, <code>typeFilter</code> and <code>tagFilter</code> are mutually exclusive. You can specify at most one of these in a request.</p> <ul>
659
	 * 		<li><code>x</code> - <code>array</code> - Optional - This represents a simple array index. <ul>
660
	 * 			<li><code>workflowId</code> - <code>string</code> - Required - The workflowId to pass of match the criteria of this filter.</li>
661
	 * 		</ul></li>
662
	 * 	</ul></li>
663
	 * 	<li><code>curlopts</code> - <code>array</code> - Optional - A set of values to pass directly into <code>curl_setopt()</code>, where the key is a pre-defined <code>CURLOPT_*</code> constant.</li>
664
	 * 	<li><code>returnCurlHandle</code> - <code>boolean</code> - Optional - A private toggle specifying that the cURL handle be returned rather than actually completing the request. This toggle is useful for manually managed batch requests.</li></ul>
665
	 * @return CFResponse A <CFResponse> object containing a parsed HTTP response.
666
	 */
667
	public function list_open_workflow_executions($opt = null)
668
	{
669
		if (!$opt) $opt = array();
670
 
671
		$opt = json_encode($opt);
672
		return $this->authenticate('ListOpenWorkflowExecutions', $opt);
673
	}
674
 
675
	/**
676
	 * Returns information about workflow types in the specified domain. The results may be split into
677
	 * multiple pages that can be retrieved by making the call repeatedly.
678
	 *
679
	 * @param array $opt (Optional) An associative array of parameters that can have the following keys: <ul>
680
	 * 	<li><code>domain</code> - <code>string</code> - Required - The name of the domain in which the workflow types have been registered.</li>
681
	 * 	<li><code>name</code> - <code>string</code> - Optional - If specified, lists the workflow type with this name.</li>
682
	 * 	<li><code>registrationStatus</code> - <code>string</code> - Required - Specifies the registration status of the workflow types to list. [Allowed values: <code>REGISTERED</code>, <code>DEPRECATED</code>]</li>
683
	 * 	<li><code>nextPageToken</code> - <code>string</code> - Optional - If on a previous call to this method a <code>NextPageToken</code> was returned, the results are being paginated. To get the next page of results, repeat the call with the returned token and all other arguments unchanged.</li>
684
	 * 	<li><code>maximumPageSize</code> - <code>integer</code> - Optional - The maximum number of results returned in each page. The default is 100, but the caller can override this value to a page size <em>smaller</em> than the default. You cannot specify a page size greater than 100.</li>
685
	 * 	<li><code>reverseOrder</code> - <code>boolean</code> - Optional - When set to <code>true</code>, returns the results in reverse order. By default the results are returned in ascending alphabetical order of the <code>name</code> of the workflow types.</li>
686
	 * 	<li><code>curlopts</code> - <code>array</code> - Optional - A set of values to pass directly into <code>curl_setopt()</code>, where the key is a pre-defined <code>CURLOPT_*</code> constant.</li>
687
	 * 	<li><code>returnCurlHandle</code> - <code>boolean</code> - Optional - A private toggle specifying that the cURL handle be returned rather than actually completing the request. This toggle is useful for manually managed batch requests.</li></ul>
688
	 * @return CFResponse A <CFResponse> object containing a parsed HTTP response.
689
	 */
690
	public function list_workflow_types($opt = null)
691
	{
692
		if (!$opt) $opt = array();
693
 
694
		$opt = json_encode($opt);
695
		return $this->authenticate('ListWorkflowTypes', $opt);
696
	}
697
 
698
	/**
699
	 * Used by workers to get an <code>ActivityTask</code> from the specified activity
700
	 * <code>taskList</code>. This initiates a long poll, where the service holds the HTTP connection
701
	 * open and responds as soon as a task becomes available. The maximum time the service holds on to
702
	 * the request before responding is 60 seconds. If no task is available within 60 seconds, the
703
	 * poll will return an empty result. An empty result, in this context, means that an ActivityTask
704
	 * is returned, but that the value of taskToken is an empty string. If a task is returned, the
705
	 * worker should use its type to identify and process it correctly.
706
	 *
707
	 * <p class="important">
708
	 * Workers should set their client side socket timeout to at least 70 seconds (10 seconds higher
709
	 * than the maximum time service may hold the poll request).
710
	 * </p>
711
	 *
712
	 * @param array $opt (Optional) An associative array of parameters that can have the following keys: <ul>
713
	 * 	<li><code>domain</code> - <code>string</code> - Required - The name of the domain that contains the task lists being polled.</li>
714
	 * 	<li><code>taskList</code> - <code>array</code> - Required - Specifies the task list to poll for activity tasks. The specified string must not start or end with whitespace. It must not contain a <code>:</code> (colon), <code>/</code> (slash), <code>|</code> (vertical bar), or any control characters (\u0000-\u001f | \u007f - \u009f). Also, it must not contain the literal string "arn". <ul>
715
	 * 		<li><code>x</code> - <code>array</code> - Optional - This represents a simple array index. <ul>
716
	 * 			<li><code>name</code> - <code>string</code> - Required - The name of the task list.</li>
717
	 * 		</ul></li>
718
	 * 	</ul></li>
719
	 * 	<li><code>identity</code> - <code>string</code> - Optional - Identity of the worker making the request, which is recorded in the <code>ActivityTaskStarted</code> event in the workflow history. This enables diagnostic tracing when problems arise. The form of this identity is user defined.</li>
720
	 * 	<li><code>curlopts</code> - <code>array</code> - Optional - A set of values to pass directly into <code>curl_setopt()</code>, where the key is a pre-defined <code>CURLOPT_*</code> constant.</li>
721
	 * 	<li><code>returnCurlHandle</code> - <code>boolean</code> - Optional - A private toggle specifying that the cURL handle be returned rather than actually completing the request. This toggle is useful for manually managed batch requests.</li></ul>
722
	 * @return CFResponse A <CFResponse> object containing a parsed HTTP response.
723
	 */
724
	public function poll_for_activity_task($opt = null)
725
	{
726
		if (!$opt) $opt = array();
727
 
728
		$opt = json_encode($opt);
729
		return $this->authenticate('PollForActivityTask', $opt);
730
	}
731
 
732
	/**
733
	 * Used by deciders to get a <code>DecisionTask</code> from the specified decision
734
	 * <code>taskList</code>. A decision task may be returned for any open workflow execution that is
735
	 * using the specified task list. The task includes a paginated view of the history of the
736
	 * workflow execution. The decider should use the workflow type and the history to determine how
737
	 * to properly handle the task.
738
	 *
739
	 * This action initiates a long poll, where the service holds the HTTP connection open and
740
	 * responds as soon a task becomes available. If no decision task is available in the specified
741
	 * task list before the timeout of 60 seconds expires, an empty result is returned. An empty
742
	 * result, in this context, means that a DecisionTask is returned, but that the value of taskToken
743
	 * is an empty string.
744
	 *
745
	 * <p class="important">
746
	 * Deciders should set their client side socket timeout to at least 70 seconds (10 seconds higher
747
	 * than the timeout).
748
	 * </p>
749
	 * <p class="important">
750
	 * Because the number of workflow history events for a single workflow execution might be very
751
	 * large, the result returned might be split up across a number of pages. To retrieve subsequent
752
	 * pages, make additional calls to <code>PollForDecisionTask</code> using the
753
	 * <code>nextPageToken</code> returned by the initial call. Note that you do <strong>not</strong>
754
	 * call <code>GetWorkflowExecutionHistory</code> with this <code>nextPageToken</code>. Instead,
755
	 * call <code>PollForDecisionTask</code> again.
756
	 * </p>
757
	 *
758
	 * @param array $opt (Optional) An associative array of parameters that can have the following keys: <ul>
759
	 * 	<li><code>domain</code> - <code>string</code> - Required - The name of the domain containing the task lists to poll.</li>
760
	 * 	<li><code>taskList</code> - <code>array</code> - Required - Specifies the task list to poll for decision tasks. The specified string must not start or end with whitespace. It must not contain a <code>:</code> (colon), <code>/</code> (slash), <code>|</code> (vertical bar), or any control characters (\u0000-\u001f | \u007f - \u009f). Also, it must not contain the literal string "arn". <ul>
761
	 * 		<li><code>x</code> - <code>array</code> - Optional - This represents a simple array index. <ul>
762
	 * 			<li><code>name</code> - <code>string</code> - Required - The name of the task list.</li>
763
	 * 		</ul></li>
764
	 * 	</ul></li>
765
	 * 	<li><code>identity</code> - <code>string</code> - Optional - Identity of the decider making the request, which is recorded in the DecisionTaskStarted event in the workflow history. This enables diagnostic tracing when problems arise. The form of this identity is user defined.</li>
766
	 * 	<li><code>nextPageToken</code> - <code>string</code> - Optional - If on a previous call to this method a <code>NextPageToken</code> was returned, the results are being paginated. To get the next page of results, repeat the call with the returned token and all other arguments unchanged. <p class="note">The <code>nextPageToken</code> returned by this action cannot be used with <code>GetWorkflowExecutionHistory</code> to get the next page. You must call <code>PollForDecisionTask</code> again (with the <code>nextPageToken</code>) to retrieve the next page of history records. Calling <code>PollForDecisionTask</code> with a <code>nextPageToken</code> will not return a new decision task.</p> .</li>
767
	 * 	<li><code>maximumPageSize</code> - <code>integer</code> - Optional - The maximum number of history events returned in each page. The default is 100, but the caller can override this value to a page size <em>smaller</em> than the default. You cannot specify a page size greater than 100.</li>
768
	 * 	<li><code>reverseOrder</code> - <code>boolean</code> - Optional - When set to <code>true</code>, returns the events in reverse order. By default the results are returned in ascending order of the <code>eventTimestamp</code> of the events.</li>
769
	 * 	<li><code>curlopts</code> - <code>array</code> - Optional - A set of values to pass directly into <code>curl_setopt()</code>, where the key is a pre-defined <code>CURLOPT_*</code> constant.</li>
770
	 * 	<li><code>returnCurlHandle</code> - <code>boolean</code> - Optional - A private toggle specifying that the cURL handle be returned rather than actually completing the request. This toggle is useful for manually managed batch requests.</li></ul>
771
	 * @return CFResponse A <CFResponse> object containing a parsed HTTP response.
772
	 */
773
	public function poll_for_decision_task($opt = null)
774
	{
775
		if (!$opt) $opt = array();
776
 
777
		$opt = json_encode($opt);
778
		return $this->authenticate('PollForDecisionTask', $opt);
779
	}
780
 
781
	/**
782
	 * Used by activity workers to report to the service that the <code>ActivityTask</code>
783
	 * represented by the specified <code>taskToken</code> is still making progress. The worker can
784
	 * also (optionally) specify details of the progress, for example percent complete, using the
785
	 * <code>details</code> parameter. This action can also be used by the worker as a mechanism to
786
	 * check if cancellation is being requested for the activity task. If a cancellation is being
787
	 * attempted for the specified task, then the boolean <code>cancelRequested</code> flag returned
788
	 * by the service is set to <code>true</code>.
789
	 *
790
	 * This action resets the <code>taskHeartbeatTimeout</code> clock. The
791
	 * <code>taskHeartbeatTimeout</code> is specified in <code>RegisterActivityType</code>.
792
	 *
793
	 * This action does not in itself create an event in the workflow execution history. However, if
794
	 * the task times out, the workflow execution history will contain a
795
	 * <code>ActivityTaskTimedOut</code> event that contains the information from the last heartbeat
796
	 * generated by the activity worker.
797
	 *
798
	 * <p class="note">
799
	 * The <code>taskStartToCloseTimeout</code> of an activity type is the maximum duration of an
800
	 * activity task, regardless of the number of <code>RecordActivityTaskHeartbeat</code> requests
801
	 * received. The <code>taskStartToCloseTimeout</code> is also specified in
802
	 * <code>RegisterActivityType</code>.
803
	 * </p>
804
	 * <p class="note">
805
	 * This operation is only useful for long-lived activities to report liveliness of the task and to
806
	 * determine if a cancellation is being attempted.
807
	 * </p>
808
	 * <p class="important">
809
	 * If the <code>cancelRequested</code> flag returns <code>true</code>, a cancellation is being
810
	 * attempted. If the worker can cancel the activity, it should respond with
811
	 * <code>RespondActivityTaskCanceled</code>. Otherwise, it should ignore the cancellation request.
812
	 * </p>
813
	 *
814
	 * @param array $opt (Optional) An associative array of parameters that can have the following keys: <ul>
815
	 * 	<li><code>taskToken</code> - <code>string</code> - Required - The <code>taskToken</code> of the <code>ActivityTask</code>. <p class="important">The <code>taskToken</code> is generated by the service and should be treated as an opaque value. If the task is passed to another process, its <code>taskToken</code> must also be passed. This enables it to provide its progress and respond with results.</p></li>
816
	 * 	<li><code>details</code> - <code>string</code> - Optional - If specified, contains details about the progress of the task.</li>
817
	 * 	<li><code>curlopts</code> - <code>array</code> - Optional - A set of values to pass directly into <code>curl_setopt()</code>, where the key is a pre-defined <code>CURLOPT_*</code> constant.</li>
818
	 * 	<li><code>returnCurlHandle</code> - <code>boolean</code> - Optional - A private toggle specifying that the cURL handle be returned rather than actually completing the request. This toggle is useful for manually managed batch requests.</li></ul>
819
	 * @return CFResponse A <CFResponse> object containing a parsed HTTP response.
820
	 */
821
	public function record_activity_task_heartbeat($opt = null)
822
	{
823
		if (!$opt) $opt = array();
824
 
825
		$opt = json_encode($opt);
826
		return $this->authenticate('RecordActivityTaskHeartbeat', $opt);
827
	}
828
 
829
	/**
830
	 * Registers a new <em>activity type</em> along with its configuration settings in the specified
831
	 * domain.
832
	 *
833
	 * <p class="important">
834
	 * A <code>TypeAlreadyExists</code> fault is returned if the type already exists in the domain.
835
	 * You cannot change any configuration settings of the type after its registration, and it must be
836
	 * registered as a new version.
837
	 * </p>
838
	 *
839
	 * @param array $opt (Optional) An associative array of parameters that can have the following keys: <ul>
840
	 * 	<li><code>domain</code> - <code>string</code> - Required - The name of the domain in which this activity is to be registered.</li>
841
	 * 	<li><code>name</code> - <code>string</code> - Required - The name of the activity type within the domain. The specified string must not start or end with whitespace. It must not contain a <code>:</code> (colon), <code>/</code> (slash), <code>|</code> (vertical bar), or any control characters (\u0000-\u001f | \u007f - \u009f). Also, it must not contain the literal string "arn".</li>
842
	 * 	<li><code>version</code> - <code>string</code> - Required - The version of the activity type. <p class="note">The activity type consists of the name and version, the combination of which must be unique within the domain.</p> The specified string must not start or end with whitespace. It must not contain a <code>:</code> (colon), <code>/</code> (slash), <code>|</code> (vertical bar), or any control characters (\u0000-\u001f | \u007f - \u009f). Also, it must not contain the literal string "arn".</li>
843
	 * 	<li><code>description</code> - <code>string</code> - Optional - A textual description of the activity type.</li>
844
	 * 	<li><code>defaultTaskStartToCloseTimeout</code> - <code>string</code> - Optional - If set, specifies the default maximum duration that a worker can take to process tasks of this activity type. This default can be overridden when scheduling an activity task using the <code>ScheduleActivityTask</code> <code>Decision</code>. The valid values are integers greater than or equal to <code>0</code>. An integer value can be used to specify the duration in seconds while <code>NONE</code> can be used to specify unlimited duration.</li>
845
	 * 	<li><code>defaultTaskHeartbeatTimeout</code> - <code>string</code> - Optional - If set, specifies the default maximum time before which a worker processing a task of this type must report progress by calling <code>RecordActivityTaskHeartbeat</code>. If the timeout is exceeded, the activity task is automatically timed out. This default can be overridden when scheduling an activity task using the <code>ScheduleActivityTask</code> <code>Decision</code>. If the activity worker subsequently attempts to record a heartbeat or returns a result, the activity worker receives an <code>UnknownResource</code> fault. In this case, Amazon SWF no longer considers the activity task to be valid; the activity worker should clean up the activity task. The valid values are integers greater than or equal to <code>0</code>. An integer value can be used to specify the duration in seconds while <code>NONE</code> can be used to specify unlimited duration.</li>
846
	 * 	<li><code>defaultTaskList</code> - <code>array</code> - Optional - If set, specifies the default task list to use for scheduling tasks of this activity type. This default task list is used if a task list is not provided when a task is scheduled through the <code>ScheduleActivityTask</code> <code>Decision</code>. <ul>
847
	 * 		<li><code>x</code> - <code>array</code> - Optional - This represents a simple array index. <ul>
848
	 * 			<li><code>name</code> - <code>string</code> - Required - The name of the task list.</li>
849
	 * 		</ul></li>
850
	 * 	</ul></li>
851
	 * 	<li><code>defaultTaskScheduleToStartTimeout</code> - <code>string</code> - Optional - If set, specifies the default maximum duration that a task of this activity type can wait before being assigned to a worker. This default can be overridden when scheduling an activity task using the <code>ScheduleActivityTask</code> <code>Decision</code>. The valid values are integers greater than or equal to <code>0</code>. An integer value can be used to specify the duration in seconds while <code>NONE</code> can be used to specify unlimited duration.</li>
852
	 * 	<li><code>defaultTaskScheduleToCloseTimeout</code> - <code>string</code> - Optional - If set, specifies the default maximum duration for a task of this activity type. This default can be overridden when scheduling an activity task using the <code>ScheduleActivityTask</code> <code>Decision</code>. The valid values are integers greater than or equal to <code>0</code>. An integer value can be used to specify the duration in seconds while <code>NONE</code> can be used to specify unlimited duration.</li>
853
	 * 	<li><code>curlopts</code> - <code>array</code> - Optional - A set of values to pass directly into <code>curl_setopt()</code>, where the key is a pre-defined <code>CURLOPT_*</code> constant.</li>
854
	 * 	<li><code>returnCurlHandle</code> - <code>boolean</code> - Optional - A private toggle specifying that the cURL handle be returned rather than actually completing the request. This toggle is useful for manually managed batch requests.</li></ul>
855
	 * @return CFResponse A <CFResponse> object containing a parsed HTTP response.
856
	 */
857
	public function register_activity_type($opt = null)
858
	{
859
		if (!$opt) $opt = array();
860
 
861
		$opt = json_encode($opt);
862
		return $this->authenticate('RegisterActivityType', $opt);
863
	}
864
 
865
	/**
866
	 * Registers a new domain.
867
	 *
868
	 * @param array $opt (Optional) An associative array of parameters that can have the following keys: <ul>
869
	 * 	<li><code>name</code> - <code>string</code> - Required - Name of the domain to register. The name must be unique. The specified string must not start or end with whitespace. It must not contain a <code>:</code> (colon), <code>/</code> (slash), <code>|</code> (vertical bar), or any control characters (\u0000-\u001f | \u007f - \u009f). Also, it must not contain the literal string "arn".</li>
870
	 * 	<li><code>description</code> - <code>string</code> - Optional - Textual description of the domain.</li>
871
	 * 	<li><code>workflowExecutionRetentionPeriodInDays</code> - <code>string</code> - Required - Specifies the duration-- <strong><em>in days</em></strong> --for which the record (including the history) of workflow executions in this domain should be kept by the service. After the retention period, the workflow execution will not be available in the results of visibility calls. If a duration of <code>NONE</code> is specified, the records for workflow executions in this domain are not retained at all. The valid values are integers greater than or equal to <code>0</code>. An integer value can be used to specify the duration in seconds while <code>NONE</code> can be used to specify unlimited duration.</li>
872
	 * 	<li><code>curlopts</code> - <code>array</code> - Optional - A set of values to pass directly into <code>curl_setopt()</code>, where the key is a pre-defined <code>CURLOPT_*</code> constant.</li>
873
	 * 	<li><code>returnCurlHandle</code> - <code>boolean</code> - Optional - A private toggle specifying that the cURL handle be returned rather than actually completing the request. This toggle is useful for manually managed batch requests.</li></ul>
874
	 * @return CFResponse A <CFResponse> object containing a parsed HTTP response.
875
	 */
876
	public function register_domain($opt = null)
877
	{
878
		if (!$opt) $opt = array();
879
 
880
		$opt = json_encode($opt);
881
		return $this->authenticate('RegisterDomain', $opt);
882
	}
883
 
884
	/**
885
	 * Registers a new <em>workflow type</em> and its configuration settings in the specified domain.
886
	 *
887
	 * <p class="important">
888
	 * If the type already exists, then a <code>TypeAlreadyExists</code> fault is returned. You cannot
889
	 * change the configuration settings of a workflow type once it is registered and it must be
890
	 * registered as a new version.
891
	 * </p>
892
	 *
893
	 * @param array $opt (Optional) An associative array of parameters that can have the following keys: <ul>
894
	 * 	<li><code>domain</code> - <code>string</code> - Required - The name of the domain in which to register the workflow type.</li>
895
	 * 	<li><code>name</code> - <code>string</code> - Required - The name of the workflow type. The specified string must not start or end with whitespace. It must not contain a <code>:</code> (colon), <code>/</code> (slash), <code>|</code> (vertical bar), or any control characters (\u0000-\u001f | \u007f - \u009f). Also, it must not contain the literal string "arn".</li>
896
	 * 	<li><code>version</code> - <code>string</code> - Required - The version of the workflow type. <p class="note">The workflow type consists of the name and version, the combination of which must be unique within the domain. To get a list of all currently registered workflow types, use the <code>ListWorkflowTypes</code> action.</p> The specified string must not start or end with whitespace. It must not contain a <code>:</code> (colon), <code>/</code> (slash), <code>|</code> (vertical bar), or any control characters (\u0000-\u001f | \u007f - \u009f). Also, it must not contain the literal string "arn".</li>
897
	 * 	<li><code>description</code> - <code>string</code> - Optional - Textual description of the workflow type.</li>
898
	 * 	<li><code>defaultTaskStartToCloseTimeout</code> - <code>string</code> - Optional - If set, specifies the default maximum duration of decision tasks for this workflow type. This default can be overridden when starting a workflow execution using the <code>StartWorkflowExecution</code> action or the <code>StartChildWorkflowExecution</code> <code>Decision</code>. The valid values are integers greater than or equal to <code>0</code>. An integer value can be used to specify the duration in seconds while <code>NONE</code> can be used to specify unlimited duration.</li>
899
	 * 	<li><code>defaultExecutionStartToCloseTimeout</code> - <code>string</code> - Optional - If set, specifies the default maximum duration for executions of this workflow type. You can override this default when starting an execution through the <code>StartWorkflowExecution</code> Action or <code>StartChildWorkflowExecution</code> <code>Decision</code>. The duration is specified in seconds. The valid values are integers greater than or equal to 0. Unlike some of the other timeout parameters in Amazon SWF, you cannot specify a value of "NONE" for <code>defaultExecutionStartToCloseTimeout</code>; there is a one-year max limit on the time that a workflow execution can run. Exceeding this limit will always cause the workflow execution to time out.</li>
900
	 * 	<li><code>defaultTaskList</code> - <code>array</code> - Optional - If set, specifies the default task list to use for scheduling decision tasks for executions of this workflow type. This default is used only if a task list is not provided when starting the execution through the <code>StartWorkflowExecution</code> Action or <code>StartChildWorkflowExecution</code> <code>Decision</code>. <ul>
901
	 * 		<li><code>x</code> - <code>array</code> - Optional - This represents a simple array index. <ul>
902
	 * 			<li><code>name</code> - <code>string</code> - Required - The name of the task list.</li>
903
	 * 		</ul></li>
904
	 * 	</ul></li>
905
	 * 	<li><code>defaultChildPolicy</code> - <code>string</code> - Optional - If set, specifies the default policy to use for the child workflow executions when a workflow execution of this type is terminated, by calling the <code>TerminateWorkflowExecution</code> action explicitly or due to an expired timeout. This default can be overridden when starting a workflow execution using the <code>StartWorkflowExecution</code> action or the <code>StartChildWorkflowExecution</code> <code>Decision</code>. The supported child policies are:<ul><li> <strong>TERMINATE:</strong> the child executions will be terminated.</li><li> <strong>REQUEST_CANCEL:</strong> a request to cancel will be attempted for each child execution by recording a <code>WorkflowExecutionCancelRequested</code> event in its history. It is up to the decider to take appropriate actions when it receives an execution history with this event.</li><li> <strong>ABANDON:</strong> no action will be taken. The child executions will continue to run.</li></ul> [Allowed values: <code>TERMINATE</code>, <code>REQUEST_CANCEL</code>, <code>ABANDON</code>]</li>
906
	 * 	<li><code>curlopts</code> - <code>array</code> - Optional - A set of values to pass directly into <code>curl_setopt()</code>, where the key is a pre-defined <code>CURLOPT_*</code> constant.</li>
907
	 * 	<li><code>returnCurlHandle</code> - <code>boolean</code> - Optional - A private toggle specifying that the cURL handle be returned rather than actually completing the request. This toggle is useful for manually managed batch requests.</li></ul>
908
	 * @return CFResponse A <CFResponse> object containing a parsed HTTP response.
909
	 */
910
	public function register_workflow_type($opt = null)
911
	{
912
		if (!$opt) $opt = array();
913
 
914
		$opt = json_encode($opt);
915
		return $this->authenticate('RegisterWorkflowType', $opt);
916
	}
917
 
918
	/**
919
	 * Records a <code>WorkflowExecutionCancelRequested</code> event in the currently running workflow
920
	 * execution identified by the given domain, workflowId, and runId. This logically requests the
921
	 * cancellation of the workflow execution as a whole. It is up to the decider to take appropriate
922
	 * actions when it receives an execution history with this event.
923
	 *
924
	 * <p class="note">
925
	 * If the runId is not specified, the <code>WorkflowExecutionCancelRequested</code> event is
926
	 * recorded in the history of the current open workflow execution with the specified workflowId in
927
	 * the domain.
928
	 * </p>
929
	 * <p class="note">
930
	 * Because this action allows the workflow to properly clean up and gracefully close, it should be
931
	 * used instead of <code>TerminateWorkflowExecution</code> when possible.
932
	 * </p>
933
	 *
934
	 * @param array $opt (Optional) An associative array of parameters that can have the following keys: <ul>
935
	 * 	<li><code>domain</code> - <code>string</code> - Required - The name of the domain containing the workflow execution to cancel.</li>
936
	 * 	<li><code>workflowId</code> - <code>string</code> - Required - The workflowId of the workflow execution to cancel.</li>
937
	 * 	<li><code>runId</code> - <code>string</code> - Optional - The runId of the workflow execution to cancel.</li>
938
	 * 	<li><code>curlopts</code> - <code>array</code> - Optional - A set of values to pass directly into <code>curl_setopt()</code>, where the key is a pre-defined <code>CURLOPT_*</code> constant.</li>
939
	 * 	<li><code>returnCurlHandle</code> - <code>boolean</code> - Optional - A private toggle specifying that the cURL handle be returned rather than actually completing the request. This toggle is useful for manually managed batch requests.</li></ul>
940
	 * @return CFResponse A <CFResponse> object containing a parsed HTTP response.
941
	 */
942
	public function request_cancel_workflow_execution($opt = null)
943
	{
944
		if (!$opt) $opt = array();
945
 
946
		$opt = json_encode($opt);
947
		return $this->authenticate('RequestCancelWorkflowExecution', $opt);
948
	}
949
 
950
	/**
951
	 * Used by workers to tell the service that the <code>ActivityTask</code> identified by the
952
	 * <code>taskToken</code> was successfully canceled. Additional <code>details</code> can be
953
	 * optionally provided using the <code>details</code> argument.
954
	 *
955
	 * These <code>details</code> (if provided) appear in the <code>ActivityTaskCanceled</code> event
956
	 * added to the workflow history.
957
	 *
958
	 * <p class="important">
959
	 * Only use this operation if the <code>canceled</code> flag of a
960
	 * <code>RecordActivityTaskHeartbeat</code> request returns <code>true</code> and if the activity
961
	 * can be safely undone or abandoned.
962
	 * </p>
963
	 *
964
	 * @param array $opt (Optional) An associative array of parameters that can have the following keys: <ul>
965
	 * 	<li><code>taskToken</code> - <code>string</code> - Required - The <code>taskToken</code> of the <code>ActivityTask</code>. <p class="important">The <code>taskToken</code> is generated by the service and should be treated as an opaque value. If the task is passed to another process, its <code>taskToken</code> must also be passed. This enables it to provide its progress and respond with results.</p></li>
966
	 * 	<li><code>details</code> - <code>string</code> - Optional - Optional information about the cancellation.</li>
967
	 * 	<li><code>curlopts</code> - <code>array</code> - Optional - A set of values to pass directly into <code>curl_setopt()</code>, where the key is a pre-defined <code>CURLOPT_*</code> constant.</li>
968
	 * 	<li><code>returnCurlHandle</code> - <code>boolean</code> - Optional - A private toggle specifying that the cURL handle be returned rather than actually completing the request. This toggle is useful for manually managed batch requests.</li></ul>
969
	 * @return CFResponse A <CFResponse> object containing a parsed HTTP response.
970
	 */
971
	public function respond_activity_task_canceled($opt = null)
972
	{
973
		if (!$opt) $opt = array();
974
 
975
		$opt = json_encode($opt);
976
		return $this->authenticate('RespondActivityTaskCanceled', $opt);
977
	}
978
 
979
	/**
980
	 * Used by workers to tell the service that the <code>ActivityTask</code> identified by the
981
	 * <code>taskToken</code> completed successfully with a <code>result</code> (if provided).
982
	 *
983
	 * The <code>result</code> appears in the <code>ActivityTaskCompleted</code> event in the workflow
984
	 * history.
985
	 *
986
	 * <p class="important">
987
	 * If the requested task does not complete successfully, use
988
	 * <code>RespondActivityTaskFailed</code> instead. If the worker finds that the task is canceled
989
	 * through the <code>canceled</code> flag returned by <code>RecordActivityTaskHeartbeat</code>, it
990
	 * should cancel the task, clean up and then call <code>RespondActivityTaskCanceled</code>.
991
	 * </p>
992
	 *
993
	 * @param array $opt (Optional) An associative array of parameters that can have the following keys: <ul>
994
	 * 	<li><code>taskToken</code> - <code>string</code> - Required - The <code>taskToken</code> of the <code>ActivityTask</code>. <p class="important">The <code>taskToken</code> is generated by the service and should be treated as an opaque value. If the task is passed to another process, its <code>taskToken</code> must also be passed. This enables it to provide its progress and respond with results.</p></li>
995
	 * 	<li><code>result</code> - <code>string</code> - Optional - The result of the activity task. It is a free form string that is implementation specific.</li>
996
	 * 	<li><code>curlopts</code> - <code>array</code> - Optional - A set of values to pass directly into <code>curl_setopt()</code>, where the key is a pre-defined <code>CURLOPT_*</code> constant.</li>
997
	 * 	<li><code>returnCurlHandle</code> - <code>boolean</code> - Optional - A private toggle specifying that the cURL handle be returned rather than actually completing the request. This toggle is useful for manually managed batch requests.</li></ul>
998
	 * @return CFResponse A <CFResponse> object containing a parsed HTTP response.
999
	 */
1000
	public function respond_activity_task_completed($opt = null)
1001
	{
1002
		if (!$opt) $opt = array();
1003
 
1004
		$opt = json_encode($opt);
1005
		return $this->authenticate('RespondActivityTaskCompleted', $opt);
1006
	}
1007
 
1008
	/**
1009
	 * Used by workers to tell the service that the <code>ActivityTask</code> identified by the
1010
	 * <code>taskToken</code> has failed with <code>reason</code> (if specified).
1011
	 *
1012
	 * The <code>reason</code> and <code>details</code> appear in the <code>ActivityTaskFailed</code>
1013
	 * event added to the workflow history.
1014
	 *
1015
	 * @param array $opt (Optional) An associative array of parameters that can have the following keys: <ul>
1016
	 * 	<li><code>taskToken</code> - <code>string</code> - Required - The <code>taskToken</code> of the <code>ActivityTask</code>. <p class="important">The <code>taskToken</code> is generated by the service and should be treated as an opaque value. If the task is passed to another process, its <code>taskToken</code> must also be passed. This enables it to provide its progress and respond with results.</p></li>
1017
	 * 	<li><code>reason</code> - <code>string</code> - Optional - Description of the error that may assist in diagnostics.</li>
1018
	 * 	<li><code>details</code> - <code>string</code> - Optional - Optional detailed information about the failure.</li>
1019
	 * 	<li><code>curlopts</code> - <code>array</code> - Optional - A set of values to pass directly into <code>curl_setopt()</code>, where the key is a pre-defined <code>CURLOPT_*</code> constant.</li>
1020
	 * 	<li><code>returnCurlHandle</code> - <code>boolean</code> - Optional - A private toggle specifying that the cURL handle be returned rather than actually completing the request. This toggle is useful for manually managed batch requests.</li></ul>
1021
	 * @return CFResponse A <CFResponse> object containing a parsed HTTP response.
1022
	 */
1023
	public function respond_activity_task_failed($opt = null)
1024
	{
1025
		if (!$opt) $opt = array();
1026
 
1027
		$opt = json_encode($opt);
1028
		return $this->authenticate('RespondActivityTaskFailed', $opt);
1029
	}
1030
 
1031
	/**
1032
	 * Used by deciders to tell the service that the <code>DecisionTask</code> identified by the
1033
	 * <code>taskToken</code> has successfully completed. The <code>decisions</code> argument
1034
	 * specifies the list of decisions made while processing the task.
1035
	 *
1036
	 * A <code>DecisionTaskCompleted</code> event is added to the workflow history. The
1037
	 * <code>executionContext</code> specified is attached to the event in the workflow execution
1038
	 * history.
1039
	 *
1040
	 * @param array $opt (Optional) An associative array of parameters that can have the following keys: <ul>
1041
	 * 	<li><code>taskToken</code> - <code>string</code> - Required - The <code>taskToken</code> from the <code>DecisionTask</code>. <p class="important">The <code>taskToken</code> is generated by the service and should be treated as an opaque value. If the task is passed to another process, its <code>taskToken</code> must also be passed. This enables it to provide its progress and respond with results.</p></li>
1042
	 * 	<li><code>decisions</code> - <code>array</code> - Optional - The list of decisions (possibly empty) made by the decider while processing this decision task. See the docs for the <code>Decision</code> structure for details. <ul>
1043
	 * 		<li><code>x</code> - <code>array</code> - Optional - This represents a simple array index. <ul>
1044
	 * 			<li><code>decisionType</code> - <code>string</code> - Required - Specifies the type of the decision. [Allowed values: <code>ScheduleActivityTask</code>, <code>RequestCancelActivityTask</code>, <code>CompleteWorkflowExecution</code>, <code>FailWorkflowExecution</code>, <code>CancelWorkflowExecution</code>, <code>ContinueAsNewWorkflowExecution</code>, <code>RecordMarker</code>, <code>StartTimer</code>, <code>CancelTimer</code>, <code>SignalExternalWorkflowExecution</code>, <code>RequestCancelExternalWorkflowExecution</code>, <code>StartChildWorkflowExecution</code>]</li>
1045
	 * 			<li><code>scheduleActivityTaskDecisionAttributes</code> - <code>array</code> - Optional - Provides details of the <code>ScheduleActivityTask</code> decision. It is not set for other decision types. <ul>
1046
	 * 				<li><code>x</code> - <code>array</code> - Optional - This represents a simple array index. <ul>
1047
	 * 					<li><code>activityType</code> - <code>array</code> - Required - The type of the activity task to schedule. This field is required. <ul>
1048
	 * 						<li><code>x</code> - <code>array</code> - Optional - This represents a simple array index. <ul>
1049
	 * 							<li><code>name</code> - <code>string</code> - Required - The name of this activity. <p class="note">The combination of activity type name and version must be unique within a domain.</p></li>
1050
	 * 							<li><code>version</code> - <code>string</code> - Required - The version of this activity. <p class="note">The combination of activity type name and version must be unique with in a domain.</p></li>
1051
	 * 						</ul></li>
1052
	 * 					</ul></li>
1053
	 * 					<li><code>activityId</code> - <code>string</code> - Required - The <code>activityId</code> of the activity task. This field is required. The specified string must not start or end with whitespace. It must not contain a <code>:</code> (colon), <code>/</code> (slash), <code>|</code> (vertical bar), or any control characters (\u0000-\u001f | \u007f - \u009f). Also, it must not contain the literal string "arn".</li>
1054
	 * 					<li><code>control</code> - <code>string</code> - Optional - Optional data attached to the event that can be used by the decider in subsequent workflow tasks. This data is not sent to the activity.</li>
1055
	 * 					<li><code>input</code> - <code>string</code> - Optional - The input provided to the activity task.</li>
1056
	 * 					<li><code>scheduleToCloseTimeout</code> - <code>string</code> - Optional - The maximum duration for this activity task. The valid values are integers greater than or equal to <code>0</code>. An integer value can be used to specify the duration in seconds while <code>NONE</code> can be used to specify unlimited duration. <p class="note">A schedule-to-close timeout for this activity task must be specified either as a default for the activity type or through this field. If neither this field is set nor a default schedule-to-close timeout was specified at registration time then a fault will be returned.</p></li>
1057
	 * 					<li><code>taskList</code> - <code>array</code> - Optional - If set, specifies the name of the task list in which to schedule the activity task. If not specified, the <code>defaultTaskList</code> registered with the activity type will be used. <p class="note">A task list for this activity task must be specified either as a default for the activity type or through this field. If neither this field is set nor a default task list was specified at registration time then a fault will be returned.</p> The specified string must not start or end with whitespace. It must not contain a <code>:</code> (colon), <code>/</code> (slash), <code>|</code> (vertical bar), or any control characters (\u0000-\u001f | \u007f - \u009f). Also, it must not contain the literal string "arn". <ul>
1058
	 * 						<li><code>x</code> - <code>array</code> - Optional - This represents a simple array index. <ul>
1059
	 * 							<li><code>name</code> - <code>string</code> - Required - The name of the task list.</li>
1060
	 * 						</ul></li>
1061
	 * 					</ul></li>
1062
	 * 					<li><code>scheduleToStartTimeout</code> - <code>string</code> - Optional - If set, specifies the maximum duration the activity task can wait to be assigned to a worker. This overrides the default schedule-to-start timeout specified when registering the activity type using <code>RegisterActivityType</code>. The valid values are integers greater than or equal to <code>0</code>. An integer value can be used to specify the duration in seconds while <code>NONE</code> can be used to specify unlimited duration. <p class="note">A schedule-to-start timeout for this activity task must be specified either as a default for the activity type or through this field. If neither this field is set nor a default schedule-to-start timeout was specified at registration time then a fault will be returned.</p></li>
1063
	 * 					<li><code>startToCloseTimeout</code> - <code>string</code> - Optional - If set, specifies the maximum duration a worker may take to process this activity task. This overrides the default start-to-close timeout specified when registering the activity type using <code>RegisterActivityType</code>. The valid values are integers greater than or equal to <code>0</code>. An integer value can be used to specify the duration in seconds while <code>NONE</code> can be used to specify unlimited duration. <p class="note">A start-to-close timeout for this activity task must be specified either as a default for the activity type or through this field. If neither this field is set nor a default start-to-close timeout was specified at registration time then a fault will be returned.</p></li>
1064
	 * 					<li><code>heartbeatTimeout</code> - <code>string</code> - Optional - If set, specifies the maximum time before which a worker processing a task of this type must report progress by calling <code>RecordActivityTaskHeartbeat</code>. If the timeout is exceeded, the activity task is automatically timed out. If the worker subsequently attempts to record a heartbeat or returns a result, it will be ignored. This overrides the default heartbeat timeout specified when registering the activity type using <code>RegisterActivityType</code>. The valid values are integers greater than or equal to <code>0</code>. An integer value can be used to specify the duration in seconds while <code>NONE</code> can be used to specify unlimited duration.</li>
1065
	 * 				</ul></li>
1066
	 * 			</ul></li>
1067
	 * 			<li><code>requestCancelActivityTaskDecisionAttributes</code> - <code>array</code> - Optional - Provides details of the <code>RequestCancelActivityTask</code> decision. It is not set for other decision types. <ul>
1068
	 * 				<li><code>x</code> - <code>array</code> - Optional - This represents a simple array index. <ul>
1069
	 * 					<li><code>activityId</code> - <code>string</code> - Required - The <code>activityId</code> of the activity task to be canceled.</li>
1070
	 * 				</ul></li>
1071
	 * 			</ul></li>
1072
	 * 			<li><code>completeWorkflowExecutionDecisionAttributes</code> - <code>array</code> - Optional - Provides details of the <code>CompleteWorkflowExecution</code> decision. It is not set for other decision types. <ul>
1073
	 * 				<li><code>x</code> - <code>array</code> - Optional - This represents a simple array index. <ul>
1074
	 * 					<li><code>result</code> - <code>string</code> - Optional - The result of the workflow execution. The form of the result is implementation defined.</li>
1075
	 * 				</ul></li>
1076
	 * 			</ul></li>
1077
	 * 			<li><code>failWorkflowExecutionDecisionAttributes</code> - <code>array</code> - Optional - Provides details of the <code>FailWorkflowExecution</code> decision. It is not set for other decision types. <ul>
1078
	 * 				<li><code>x</code> - <code>array</code> - Optional - This represents a simple array index. <ul>
1079
	 * 					<li><code>reason</code> - <code>string</code> - Optional - A descriptive reason for the failure that may help in diagnostics.</li>
1080
	 * 					<li><code>details</code> - <code>string</code> - Optional - Optional details of the failure.</li>
1081
	 * 				</ul></li>
1082
	 * 			</ul></li>
1083
	 * 			<li><code>cancelWorkflowExecutionDecisionAttributes</code> - <code>array</code> - Optional - Provides details of the <code>CancelWorkflowExecution</code> decision. It is not set for other decision types. <ul>
1084
	 * 				<li><code>x</code> - <code>array</code> - Optional - This represents a simple array index. <ul>
1085
	 * 					<li><code>details</code> - <code>string</code> - Optional - Optional details of the cancellation.</li>
1086
	 * 				</ul></li>
1087
	 * 			</ul></li>
1088
	 * 			<li><code>continueAsNewWorkflowExecutionDecisionAttributes</code> - <code>array</code> - Optional - Provides details of the <code>ContinueAsNewWorkflowExecution</code> decision. It is not set for other decision types. <ul>
1089
	 * 				<li><code>x</code> - <code>array</code> - Optional - This represents a simple array index. <ul>
1090
	 * 					<li><code>input</code> - <code>string</code> - Optional - The input provided to the new workflow execution.</li>
1091
	 * 					<li><code>executionStartToCloseTimeout</code> - <code>string</code> - Optional - If set, specifies the total duration for this workflow execution. This overrides the <code>defaultExecutionStartToCloseTimeout</code> specified when registering the workflow type. The valid values are integers greater than or equal to <code>0</code>. An integer value can be used to specify the duration in seconds while <code>NONE</code> can be used to specify unlimited duration. <p class="note">An execution start-to-close timeout for this workflow execution must be specified either as a default for the workflow type or through this field. If neither this field is set nor a default execution start-to-close timeout was specified at registration time then a fault will be returned.</p></li>
1092
	 * 					<li><code>taskList</code> - <code>array</code> - Optional - Represents a task list. <ul>
1093
	 * 						<li><code>x</code> - <code>array</code> - Optional - This represents a simple array index. <ul>
1094
	 * 							<li><code>name</code> - <code>string</code> - Required - The name of the task list.</li>
1095
	 * 						</ul></li>
1096
	 * 					</ul></li>
1097
	 * 					<li><code>taskStartToCloseTimeout</code> - <code>string</code> - Optional - Specifies the maximum duration of decision tasks for the new workflow execution. This parameter overrides the <code>defaultTaskStartToCloseTimout</code> specified when registering the workflow type using <code>RegisterWorkflowType</code>. The valid values are integers greater than or equal to <code>0</code>. An integer value can be used to specify the duration in seconds while <code>NONE</code> can be used to specify unlimited duration. <p class="note">A task start-to-close timeout for the new workflow execution must be specified either as a default for the workflow type or through this parameter. If neither this parameter is set nor a default task start-to-close timeout was specified at registration time then a fault will be returned.</p></li>
1098
	 * 					<li><code>childPolicy</code> - <code>string</code> - Optional - If set, specifies the policy to use for the child workflow executions of the new execution if it is terminated by calling the <code>TerminateWorkflowExecution</code> action explicitly or due to an expired timeout. This policy overrides the default child policy specified when registering the workflow type using <code>RegisterWorkflowType</code>. The supported child policies are:<ul><li> <strong>TERMINATE:</strong> the child executions will be terminated.</li><li> <strong>REQUEST_CANCEL:</strong> a request to cancel will be attempted for each child execution by recording a <code>WorkflowExecutionCancelRequested</code> event in its history. It is up to the decider to take appropriate actions when it receives an execution history with this event.</li><li> <strong>ABANDON:</strong> no action will be taken. The child executions will continue to run.</li></ul> <p class="note">A child policy for the new workflow execution must be specified either as a default registered for its workflow type or through this field. If neither this field is set nor a default child policy was specified at registration time then a fault will be returned.</p> [Allowed values: <code>TERMINATE</code>, <code>REQUEST_CANCEL</code>, <code>ABANDON</code>]</li>
1099
	 * 					<li><code>tagList</code> - <code>string|array</code> - Optional - The list of tags to associate with the new workflow execution. A maximum of 5 tags can be specified. You can list workflow executions with a specific tag by calling <code>ListOpenWorkflowExecutions</code> or <code>ListClosedWorkflowExecutions</code> and specifying a <code>TagFilter</code>. Pass a string for a single value, or an indexed array for multiple values.</li>
1100
	 * 					<li><code>workflowTypeVersion</code> - <code>string</code> - Optional - </li>
1101
	 * 				</ul></li>
1102
	 * 			</ul></li>
1103
	 * 			<li><code>recordMarkerDecisionAttributes</code> - <code>array</code> - Optional - Provides details of the <code>RecordMarker</code> decision. It is not set for other decision types. <ul>
1104
	 * 				<li><code>x</code> - <code>array</code> - Optional - This represents a simple array index. <ul>
1105
	 * 					<li><code>markerName</code> - <code>string</code> - Required - The name of the marker. This filed is required.</li>
1106
	 * 					<li><code>details</code> - <code>string</code> - Optional - Optional details of the marker.</li>
1107
	 * 				</ul></li>
1108
	 * 			</ul></li>
1109
	 * 			<li><code>startTimerDecisionAttributes</code> - <code>array</code> - Optional - Provides details of the <code>StartTimer</code> decision. It is not set for other decision types. <ul>
1110
	 * 				<li><code>x</code> - <code>array</code> - Optional - This represents a simple array index. <ul>
1111
	 * 					<li><code>timerId</code> - <code>string</code> - Required - The unique Id of the timer. This field is required. The specified string must not start or end with whitespace. It must not contain a <code>:</code> (colon), <code>/</code> (slash), <code>|</code> (vertical bar), or any control characters (\u0000-\u001f | \u007f - \u009f). Also, it must not contain the literal string "arn".</li>
1112
	 * 					<li><code>control</code> - <code>string</code> - Optional - Optional data attached to the event that can be used by the decider in subsequent workflow tasks.</li>
1113
	 * 					<li><code>startToFireTimeout</code> - <code>string</code> - Required - The duration to wait before firing the timer. This field is required. The duration is specified in seconds. The valid values are integers greater than or equal to 0.</li>
1114
	 * 				</ul></li>
1115
	 * 			</ul></li>
1116
	 * 			<li><code>cancelTimerDecisionAttributes</code> - <code>array</code> - Optional - Provides details of the <code>CancelTimer</code> decision. It is not set for other decision types. <ul>
1117
	 * 				<li><code>x</code> - <code>array</code> - Optional - This represents a simple array index. <ul>
1118
	 * 					<li><code>timerId</code> - <code>string</code> - Required - The unique Id of the timer to cancel. This field is required.</li>
1119
	 * 				</ul></li>
1120
	 * 			</ul></li>
1121
	 * 			<li><code>signalExternalWorkflowExecutionDecisionAttributes</code> - <code>array</code> - Optional - Provides details of the <code>SignalExternalWorkflowExecution</code> decision. It is not set for other decision types. <ul>
1122
	 * 				<li><code>x</code> - <code>array</code> - Optional - This represents a simple array index. <ul>
1123
	 * 					<li><code>workflowId</code> - <code>string</code> - Required - The <code>workflowId</code> of the workflow execution to be signaled. This field is required.</li>
1124
	 * 					<li><code>runId</code> - <code>string</code> - Optional - The <code>runId</code> of the workflow execution to be signaled.</li>
1125
	 * 					<li><code>signalName</code> - <code>string</code> - Required - The name of the signal.The target workflow execution will use the signal name and input to process the signal. This field is required.</li>
1126
	 * 					<li><code>input</code> - <code>string</code> - Optional - Optional input to be provided with the signal.The target workflow execution will use the signal name and input to process the signal.</li>
1127
	 * 					<li><code>control</code> - <code>string</code> - Optional - Optional data attached to the event that can be used by the decider in subsequent decision tasks.</li>
1128
	 * 				</ul></li>
1129
	 * 			</ul></li>
1130
	 * 			<li><code>requestCancelExternalWorkflowExecutionDecisionAttributes</code> - <code>array</code> - Optional - Provides details of the <code>RequestCancelExternalWorkflowExecution</code> decision. It is not set for other decision types. <ul>
1131
	 * 				<li><code>x</code> - <code>array</code> - Optional - This represents a simple array index. <ul>
1132
	 * 					<li><code>workflowId</code> - <code>string</code> - Required - The <code>workflowId</code> of the external workflow execution to cancel. This field is required.</li>
1133
	 * 					<li><code>runId</code> - <code>string</code> - Optional - The <code>runId</code> of the external workflow execution to cancel.</li>
1134
	 * 					<li><code>control</code> - <code>string</code> - Optional - Optional data attached to the event that can be used by the decider in subsequent workflow tasks.</li>
1135
	 * 				</ul></li>
1136
	 * 			</ul></li>
1137
	 * 			<li><code>startChildWorkflowExecutionDecisionAttributes</code> - <code>array</code> - Optional - Provides details of the <code>StartChildWorkflowExecution</code> decision. It is not set for other decision types. <ul>
1138
	 * 				<li><code>x</code> - <code>array</code> - Optional - This represents a simple array index. <ul>
1139
	 * 					<li><code>workflowType</code> - <code>array</code> - Required - The type of the workflow execution to be started. This field is required. <ul>
1140
	 * 						<li><code>x</code> - <code>array</code> - Optional - This represents a simple array index. <ul>
1141
	 * 							<li><code>name</code> - <code>string</code> - Required - The name of the workflow type. This field is required. <p class="note">The combination of workflow type name and version must be unique with in a domain.</p></li>
1142
	 * 							<li><code>version</code> - <code>string</code> - Required - The version of the workflow type. This field is required. <p class="note">The combination of workflow type name and version must be unique with in a domain.</p></li>
1143
	 * 						</ul></li>
1144
	 * 					</ul></li>
1145
	 * 					<li><code>workflowId</code> - <code>string</code> - Required - The <code>workflowId</code> of the workflow execution. This field is required. The specified string must not start or end with whitespace. It must not contain a <code>:</code> (colon), <code>/</code> (slash), <code>|</code> (vertical bar), or any control characters (\u0000-\u001f | \u007f - \u009f). Also, it must not contain the literal string "arn".</li>
1146
	 * 					<li><code>control</code> - <code>string</code> - Optional - Optional data attached to the event that can be used by the decider in subsequent workflow tasks. This data is not sent to the child workflow execution.</li>
1147
	 * 					<li><code>input</code> - <code>string</code> - Optional - The input to be provided to the workflow execution.</li>
1148
	 * 					<li><code>executionStartToCloseTimeout</code> - <code>string</code> - Optional - The total duration for this workflow execution. This overrides the defaultExecutionStartToCloseTimeout specified when registering the workflow type. The valid values are integers greater than or equal to <code>0</code>. An integer value can be used to specify the duration in seconds while <code>NONE</code> can be used to specify unlimited duration. <p class="note">An execution start-to-close timeout for this workflow execution must be specified either as a default for the workflow type or through this parameter. If neither this parameter is set nor a default execution start-to-close timeout was specified at registration time then a fault will be returned.</p></li>
1149
	 * 					<li><code>taskList</code> - <code>array</code> - Optional - The name of the task list to be used for decision tasks of the child workflow execution. <p class="note">A task list for this workflow execution must be specified either as a default for the workflow type or through this parameter. If neither this parameter is set nor a default task list was specified at registration time then a fault will be returned.</p> The specified string must not start or end with whitespace. It must not contain a <code>:</code> (colon), <code>/</code> (slash), <code>|</code> (vertical bar), or any control characters (\u0000-\u001f | \u007f - \u009f). Also, it must not contain the literal string "arn". <ul>
1150
	 * 						<li><code>x</code> - <code>array</code> - Optional - This represents a simple array index. <ul>
1151
	 * 							<li><code>name</code> - <code>string</code> - Required - The name of the task list.</li>
1152
	 * 						</ul></li>
1153
	 * 					</ul></li>
1154
	 * 					<li><code>taskStartToCloseTimeout</code> - <code>string</code> - Optional - Specifies the maximum duration of decision tasks for this workflow execution. This parameter overrides the <code>defaultTaskStartToCloseTimout</code> specified when registering the workflow type using <code>RegisterWorkflowType</code>. The valid values are integers greater than or equal to <code>0</code>. An integer value can be used to specify the duration in seconds while <code>NONE</code> can be used to specify unlimited duration. <p class="note">A task start-to-close timeout for this workflow execution must be specified either as a default for the workflow type or through this parameter. If neither this parameter is set nor a default task start-to-close timeout was specified at registration time then a fault will be returned.</p></li>
1155
	 * 					<li><code>childPolicy</code> - <code>string</code> - Optional - If set, specifies the policy to use for the child workflow executions if the workflow execution being started is terminated by calling the <code>TerminateWorkflowExecution</code> action explicitly or due to an expired timeout. This policy overrides the default child policy specified when registering the workflow type using <code>RegisterWorkflowType</code>. The supported child policies are:<ul><li> <strong>TERMINATE:</strong> the child executions will be terminated.</li><li> <strong>REQUEST_CANCEL:</strong> a request to cancel will be attempted for each child execution by recording a <code>WorkflowExecutionCancelRequested</code> event in its history. It is up to the decider to take appropriate actions when it receives an execution history with this event.</li><li> <strong>ABANDON:</strong> no action will be taken. The child executions will continue to run.</li></ul> <p class="note">A child policy for the workflow execution being started must be specified either as a default registered for its workflow type or through this field. If neither this field is set nor a default child policy was specified at registration time then a fault will be returned.</p> [Allowed values: <code>TERMINATE</code>, <code>REQUEST_CANCEL</code>, <code>ABANDON</code>]</li>
1156
	 * 					<li><code>tagList</code> - <code>string|array</code> - Optional - The list of tags to associate with the child workflow execution. A maximum of 5 tags can be specified. You can list workflow executions with a specific tag by calling <code>ListOpenWorkflowExecutions</code> or <code>ListClosedWorkflowExecutions</code> and specifying a <code>TagFilter</code>. Pass a string for a single value, or an indexed array for multiple values.</li>
1157
	 * 				</ul></li>
1158
	 * 			</ul></li>
1159
	 * 		</ul></li>
1160
	 * 	</ul></li>
1161
	 * 	<li><code>executionContext</code> - <code>string</code> - Optional - User defined context to add to workflow execution.</li>
1162
	 * 	<li><code>curlopts</code> - <code>array</code> - Optional - A set of values to pass directly into <code>curl_setopt()</code>, where the key is a pre-defined <code>CURLOPT_*</code> constant.</li>
1163
	 * 	<li><code>returnCurlHandle</code> - <code>boolean</code> - Optional - A private toggle specifying that the cURL handle be returned rather than actually completing the request. This toggle is useful for manually managed batch requests.</li></ul>
1164
	 * @return CFResponse A <CFResponse> object containing a parsed HTTP response.
1165
	 */
1166
	public function respond_decision_task_completed($opt = null)
1167
	{
1168
		if (!$opt) $opt = array();
1169
 
1170
		$opt = json_encode($opt);
1171
		return $this->authenticate('RespondDecisionTaskCompleted', $opt);
1172
	}
1173
 
1174
	/**
1175
	 * Records a <code>WorkflowExecutionSignaled</code> event in the workflow execution history and
1176
	 * creates a decision task for the workflow execution identified by the given domain, workflowId
1177
	 * and runId. The event is recorded with the specified user defined signalName and input (if
1178
	 * provided).
1179
	 *
1180
	 * <p class="note">
1181
	 * If a runId is not specified, then the <code>WorkflowExecutionSignaled</code> event is recorded
1182
	 * in the history of the current open workflow with the matching workflowId in the domain.
1183
	 * </p>
1184
	 * <p class="note">
1185
	 * If the specified workflow execution is not open, this method fails with
1186
	 * <code>UnknownResource</code>.
1187
	 * </p>
1188
	 *
1189
	 * @param array $opt (Optional) An associative array of parameters that can have the following keys: <ul>
1190
	 * 	<li><code>domain</code> - <code>string</code> - Required - The name of the domain containing the workflow execution to signal.</li>
1191
	 * 	<li><code>workflowId</code> - <code>string</code> - Required - The workflowId of the workflow execution to signal.</li>
1192
	 * 	<li><code>runId</code> - <code>string</code> - Optional - The runId of the workflow execution to signal.</li>
1193
	 * 	<li><code>signalName</code> - <code>string</code> - Required - The name of the signal. This name must be meaningful to the target workflow.</li>
1194
	 * 	<li><code>input</code> - <code>string</code> - Optional - Data to attach to the <code>WorkflowExecutionSignaled</code> event in the target workflow execution's history.</li>
1195
	 * 	<li><code>curlopts</code> - <code>array</code> - Optional - A set of values to pass directly into <code>curl_setopt()</code>, where the key is a pre-defined <code>CURLOPT_*</code> constant.</li>
1196
	 * 	<li><code>returnCurlHandle</code> - <code>boolean</code> - Optional - A private toggle specifying that the cURL handle be returned rather than actually completing the request. This toggle is useful for manually managed batch requests.</li></ul>
1197
	 * @return CFResponse A <CFResponse> object containing a parsed HTTP response.
1198
	 */
1199
	public function signal_workflow_execution($opt = null)
1200
	{
1201
		if (!$opt) $opt = array();
1202
 
1203
		$opt = json_encode($opt);
1204
		return $this->authenticate('SignalWorkflowExecution', $opt);
1205
	}
1206
 
1207
	/**
1208
	 * Starts an execution of the workflow type in the specified domain using the provided
1209
	 * <code>workflowId</code> and input data.
1210
	 *
1211
	 * This action returns the newly started workflow execution.
1212
	 *
1213
	 * @param array $opt (Optional) An associative array of parameters that can have the following keys: <ul>
1214
	 * 	<li><code>domain</code> - <code>string</code> - Required - The name of the domain in which the workflow execution is created.</li>
1215
	 * 	<li><code>workflowId</code> - <code>string</code> - Required - The user defined identifier associated with the workflow execution. You can use this to associate a custom identifier with the workflow execution. You may specify the same identifier if a workflow execution is logically a <em>restart</em> of a previous execution. You cannot have two open workflow executions with the same <code>workflowId</code> at the same time. The specified string must not start or end with whitespace. It must not contain a <code>:</code> (colon), <code>/</code> (slash), <code>|</code> (vertical bar), or any control characters (\u0000-\u001f | \u007f - \u009f). Also, it must not contain the literal string "arn".</li>
1216
	 * 	<li><code>workflowType</code> - <code>array</code> - Required - The type of the workflow to start. <ul>
1217
	 * 		<li><code>x</code> - <code>array</code> - Optional - This represents a simple array index. <ul>
1218
	 * 			<li><code>name</code> - <code>string</code> - Required - The name of the workflow type. This field is required. <p class="note">The combination of workflow type name and version must be unique with in a domain.</p></li>
1219
	 * 			<li><code>version</code> - <code>string</code> - Required - The version of the workflow type. This field is required. <p class="note">The combination of workflow type name and version must be unique with in a domain.</p></li>
1220
	 * 		</ul></li>
1221
	 * 	</ul></li>
1222
	 * 	<li><code>taskList</code> - <code>array</code> - Optional - The task list to use for the decision tasks generated for this workflow execution. This overrides the <code>defaultTaskList</code> specified when registering the workflow type. <p class="note">A task list for this workflow execution must be specified either as a default for the workflow type or through this parameter. If neither this parameter is set nor a default task list was specified at registration time then a fault will be returned.</p> The specified string must not start or end with whitespace. It must not contain a <code>:</code> (colon), <code>/</code> (slash), <code>|</code> (vertical bar), or any control characters (\u0000-\u001f | \u007f - \u009f). Also, it must not contain the literal string "arn". <ul>
1223
	 * 		<li><code>x</code> - <code>array</code> - Optional - This represents a simple array index. <ul>
1224
	 * 			<li><code>name</code> - <code>string</code> - Required - The name of the task list.</li>
1225
	 * 		</ul></li>
1226
	 * 	</ul></li>
1227
	 * 	<li><code>input</code> - <code>string</code> - Optional - The input for the workflow execution. This is a free form string which should be meaningful to the workflow you are starting. This <code>input</code> is made available to the new workflow execution in the <code>WorkflowExecutionStarted</code> history event.</li>
1228
	 * 	<li><code>executionStartToCloseTimeout</code> - <code>string</code> - Optional - The total duration for this workflow execution. This overrides the defaultExecutionStartToCloseTimeout specified when registering the workflow type. The duration is specified in seconds. The valid values are integers greater than or equal to 0. Exceeding this limit will cause the workflow execution to time out. Unlike some of the other timeout parameters in Amazon SWF, you cannot specify a value of "NONE" for this timeout; there is a one-year max limit on the time that a workflow execution can run. <p class="note">An execution start-to-close timeout must be specified either through this parameter or as a default when the workflow type is registered. If neither this parameter nor a default execution start-to-close timeout is specified, a fault is returned.</p></li>
1229
	 * 	<li><code>tagList</code> - <code>string|array</code> - Optional - The list of tags to associate with the workflow execution. You can specify a maximum of 5 tags. You can list workflow executions with a specific tag by calling <code>ListOpenWorkflowExecutions</code> or <code>ListClosedWorkflowExecutions</code> and specifying a <code>TagFilter</code>. Pass a string for a single value, or an indexed array for multiple values.</li>
1230
	 * 	<li><code>taskStartToCloseTimeout</code> - <code>string</code> - Optional - Specifies the maximum duration of decision tasks for this workflow execution. This parameter overrides the <code>defaultTaskStartToCloseTimout</code> specified when registering the workflow type using <code>RegisterWorkflowType</code>. The valid values are integers greater than or equal to <code>0</code>. An integer value can be used to specify the duration in seconds while <code>NONE</code> can be used to specify unlimited duration. <p class="note">A task start-to-close timeout for this workflow execution must be specified either as a default for the workflow type or through this parameter. If neither this parameter is set nor a default task start-to-close timeout was specified at registration time then a fault will be returned.</p></li>
1231
	 * 	<li><code>childPolicy</code> - <code>string</code> - Optional - If set, specifies the policy to use for the child workflow executions of this workflow execution if it is terminated, by calling the <code>TerminateWorkflowExecution</code> action explicitly or due to an expired timeout. This policy overrides the default child policy specified when registering the workflow type using <code>RegisterWorkflowType</code>. The supported child policies are:<ul><li> <strong>TERMINATE:</strong> the child executions will be terminated.</li><li> <strong>REQUEST_CANCEL:</strong> a request to cancel will be attempted for each child execution by recording a <code>WorkflowExecutionCancelRequested</code> event in its history. It is up to the decider to take appropriate actions when it receives an execution history with this event.</li><li> <strong>ABANDON:</strong> no action will be taken. The child executions will continue to run.</li></ul> <p class="note">A child policy for this workflow execution must be specified either as a default for the workflow type or through this parameter. If neither this parameter is set nor a default child policy was specified at registration time then a fault will be returned.</p> [Allowed values: <code>TERMINATE</code>, <code>REQUEST_CANCEL</code>, <code>ABANDON</code>]</li>
1232
	 * 	<li><code>curlopts</code> - <code>array</code> - Optional - A set of values to pass directly into <code>curl_setopt()</code>, where the key is a pre-defined <code>CURLOPT_*</code> constant.</li>
1233
	 * 	<li><code>returnCurlHandle</code> - <code>boolean</code> - Optional - A private toggle specifying that the cURL handle be returned rather than actually completing the request. This toggle is useful for manually managed batch requests.</li></ul>
1234
	 * @return CFResponse A <CFResponse> object containing a parsed HTTP response.
1235
	 */
1236
	public function start_workflow_execution($opt = null)
1237
	{
1238
		if (!$opt) $opt = array();
1239
 
1240
		// List (non-map)
1241
		if (isset($opt['tagList']))
1242
		{
1243
			$opt['tagList'] = (is_array($opt['tagList']) ? $opt['tagList'] : array($opt['tagList']));
1244
		}
1245
 
1246
		$opt = json_encode($opt);
1247
		return $this->authenticate('StartWorkflowExecution', $opt);
1248
	}
1249
 
1250
	/**
1251
	 * Records a <code>WorkflowExecutionTerminated</code> event and forces closure of the workflow
1252
	 * execution identified by the given domain, runId, and workflowId. The child policy, registered
1253
	 * with the workflow type or specified when starting this execution, is applied to any open child
1254
	 * workflow executions of this workflow execution.
1255
	 *
1256
	 * <p class="important">
1257
	 * If the identified workflow execution was in progress, it is terminated immediately.
1258
	 * </p>
1259
	 * <p class="note">
1260
	 * If a runId is not specified, then the <code>WorkflowExecutionTerminated</code> event is
1261
	 * recorded in the history of the current open workflow with the matching workflowId in the
1262
	 * domain.
1263
	 * </p>
1264
	 * <p class="note">
1265
	 * You should consider using <code>RequestCancelWorkflowExecution</code> action instead because it
1266
	 * allows the workflow to gracefully close while <code>TerminateWorkflowExecution</code> does not.
1267
	 * </p>
1268
	 *
1269
	 * @param array $opt (Optional) An associative array of parameters that can have the following keys: <ul>
1270
	 * 	<li><code>domain</code> - <code>string</code> - Required - The domain of the workflow execution to terminate.</li>
1271
	 * 	<li><code>workflowId</code> - <code>string</code> - Required - The workflowId of the workflow execution to terminate.</li>
1272
	 * 	<li><code>runId</code> - <code>string</code> - Optional - The runId of the workflow execution to terminate.</li>
1273
	 * 	<li><code>reason</code> - <code>string</code> - Optional - An optional descriptive reason for terminating the workflow execution.</li>
1274
	 * 	<li><code>details</code> - <code>string</code> - Optional - Optional details for terminating the workflow execution.</li>
1275
	 * 	<li><code>childPolicy</code> - <code>string</code> - Optional - If set, specifies the policy to use for the child workflow executions of the workflow execution being terminated. This policy overrides the child policy specified for the workflow execution at registration time or when starting the execution. The supported child policies are:<ul><li> <strong>TERMINATE:</strong> the child executions will be terminated.</li><li> <strong>REQUEST_CANCEL:</strong> a request to cancel will be attempted for each child execution by recording a <code>WorkflowExecutionCancelRequested</code> event in its history. It is up to the decider to take appropriate actions when it receives an execution history with this event.</li><li> <strong>ABANDON:</strong> no action will be taken. The child executions will continue to run.</li></ul> <p class="note">A child policy for this workflow execution must be specified either as a default for the workflow type or through this parameter. If neither this parameter is set nor a default child policy was specified at registration time, a fault will be returned.</p> [Allowed values: <code>TERMINATE</code>, <code>REQUEST_CANCEL</code>, <code>ABANDON</code>]</li>
1276
	 * 	<li><code>curlopts</code> - <code>array</code> - Optional - A set of values to pass directly into <code>curl_setopt()</code>, where the key is a pre-defined <code>CURLOPT_*</code> constant.</li>
1277
	 * 	<li><code>returnCurlHandle</code> - <code>boolean</code> - Optional - A private toggle specifying that the cURL handle be returned rather than actually completing the request. This toggle is useful for manually managed batch requests.</li></ul>
1278
	 * @return CFResponse A <CFResponse> object containing a parsed HTTP response.
1279
	 */
1280
	public function terminate_workflow_execution($opt = null)
1281
	{
1282
		if (!$opt) $opt = array();
1283
 
1284
		$opt = json_encode($opt);
1285
		return $this->authenticate('TerminateWorkflowExecution', $opt);
1286
	}
1287
}
1288
 
1289
 
1290
/*%******************************************************************************************%*/
1291
// EXCEPTIONS
1292
 
1293
class SWF_Exception extends Exception {}