PageRenderTime 59ms CodeModel.GetById 27ms RepoModel.GetById 0ms app.codeStats 0ms

/wp-content/plugins/backupbuddy/destinations/stash/lib/aws-sdk/services/swf.class.php

https://bitbucket.org/betaimages/chakalos
PHP | 1313 lines | 189 code | 89 blank | 1035 comment | 33 complexity | 597dab98a21a896622cc9c0f65ae14a3 MD5 | raw file
Possible License(s): BSD-3-Clause

Large files files are truncated, but you can click here to view the full file

  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. * The Amazon Simple Workflow Service API Reference is intended for programmers who need detailed
  18. * information about the Amazon SWF actions and data types.
  19. *
  20. * For an broader overview of the Amazon SWF programming model, please go to the <a href=
  21. * "http://docs.amazonwebservices.com/amazonswf/latest/developerguide/">Amazon SWF Developer
  22. * Guide</a>.
  23. *
  24. * This section provides an overview of Amazon SWF actions.
  25. *
  26. * <strong>Action Categories</strong>
  27. *
  28. * The Amazon SWF actions can be grouped into the following major categories.
  29. *
  30. * <ul>
  31. * <li>Actions related to Activities</li>
  32. * <li>Actions related to Deciders</li>
  33. * <li>Actions related to Workflow Executions</li>
  34. * <li>Actions related to Administration</li>
  35. * <li>Actions related to Visibility</li>
  36. * </ul>
  37. *
  38. * <strong>Actions related to Activities</strong>
  39. *
  40. * The following are actions that are performed by activity workers:
  41. *
  42. * <ul>
  43. * <li><a href="API_PollForActivityTask.html" title=
  44. * "PollForActivityTask">PollForActivityTask</a></li>
  45. * <li><a href="API_RespondActivityTaskCompleted.html" title=
  46. * "RespondActivityTaskCompleted">RespondActivityTaskCompleted</a></li>
  47. * <li><a href="API_RespondActivityTaskFailed.html" title=
  48. * "RespondActivityTaskFailed">RespondActivityTaskFailed</a></li>
  49. * <li><a href="API_RespondActivityTaskCanceled.html" title=
  50. * "RespondActivityTaskCanceled">RespondActivityTaskCanceled</a></li>
  51. * <li><a href="API_RecordActivityTaskHeartbeat.html" title=
  52. * "RecordActivityTaskHeartbeat">RecordActivityTaskHeartbeat</a></li>
  53. * </ul>
  54. *
  55. * Activity workers use the <a href="API_PollForActivityTask.html" title=
  56. * "PollForActivityTask">PollForActivityTask</a> to get new activity tasks. After a worker
  57. * receives an activity task from Amazon SWF, it performs the task and responds using <a href=
  58. * "API_RespondActivityTaskCompleted.html" title=
  59. * "RespondActivityTaskCompleted">RespondActivityTaskCompleted</a> if successful or <a href=
  60. * "API_RespondActivityTaskFailed.html" title=
  61. * "RespondActivityTaskFailed">RespondActivityTaskFailed</a> if unsuccessful.
  62. *
  63. * <strong>Actions related to Deciders</strong>
  64. *
  65. * The following are actions that are performed by deciders:
  66. *
  67. * <ul>
  68. * <li><a href="API_PollForDecisionTask.html" title=
  69. * "PollForDecisionTask">PollForDecisionTask</a></li>
  70. * <li><a href="API_RespondDecisionTaskCompleted.html" title=
  71. * "RespondDecisionTaskCompleted">RespondDecisionTaskCompleted</a></li>
  72. * </ul>
  73. *
  74. * Deciders use <a href="API_PollForDecisionTask.html" title=
  75. * "PollForDecisionTask">PollForDecisionTask</a> to get decision tasks. After a decider receives a
  76. * decision task from Amazon SWF, it examines its workflow execution history and decides what to
  77. * do next. It calls <a href="API_RespondDecisionTaskCompleted.html" title=
  78. * "RespondDecisionTaskCompleted">RespondDecisionTaskCompleted</a> to complete the decision task
  79. * and provide zero or more next decisions.
  80. *
  81. * <strong>Actions related to Workflow Executions</strong>
  82. *
  83. * The following actions operate on a workflow execution:
  84. *
  85. * <ul>
  86. * <li><a href="API_RequestCancelWorkflowExecution.html" title=
  87. * "RequestCancelWorkflowExecution">RequestCancelWorkflowExecution</a></li>
  88. * <li><a href="API_StartWorkflowExecution.html" title=
  89. * "StartWorkflowExecution">StartWorkflowExecution</a></li>
  90. * <li><a href="API_SignalWorkflowExecution.html" title=
  91. * "SignalWorkflowExecution">SignalWorkflowExecution</a></li>
  92. * <li><a href="API_TerminateWorkflowExecution.html" title=
  93. * "TerminateWorkflowExecution">TerminateWorkflowExecution</a></li>
  94. * </ul>
  95. *
  96. * <strong>Actions related to Administration</strong>
  97. *
  98. * Although you can perform administrative tasks from the Amazon SWF console, you can use the
  99. * actions in this section to automate functions or build your own administrative tools.
  100. *
  101. * <strong>Activity Management</strong>
  102. *
  103. * <ul>
  104. * <li><a href="API_RegisterActivityType.html" title=
  105. * "RegisterActivityType">RegisterActivityType</a></li>
  106. * <li><a href="API_DeprecateActivityType.html" title=
  107. * "DeprecateActivityType">DeprecateActivityType</a></li>
  108. * </ul>
  109. *
  110. * <strong>Workflow Management</strong>
  111. *
  112. * <ul>
  113. * <li><a href="API_RegisterWorkflowType.html" title=
  114. * "RegisterWorkflowType">RegisterWorkflowType</a></li>
  115. * <li><a href="API_DeprecateWorkflowType.html" title=
  116. * "DeprecateWorkflowType">DeprecateWorkflowType</a></li>
  117. * </ul>
  118. *
  119. * <strong>Domain Management</strong>
  120. *
  121. * <ul>
  122. * <li><a href="API_RegisterDomain.html" title="RegisterDomain">RegisterDomain</a></li>
  123. * <li><a href="API_DeprecateDomain.html" title="DeprecateDomain">DeprecateDomain</a></li>
  124. * </ul>
  125. *
  126. * <strong>Workflow Execution Management</strong>
  127. *
  128. * <ul>
  129. * <li><a href="API_RequestCancelWorkflowExecution.html" title=
  130. * "RequestCancelWorkflowExecution">RequestCancelWorkflowExecution</a></li>
  131. * <li><a href="API_TerminateWorkflowExecution.html" title=
  132. * "TerminateWorkflowExecution">TerminateWorkflowExecution</a></li>
  133. * </ul>
  134. *
  135. * <strong>Visibility Actions</strong>
  136. *
  137. * Although you can perform visibility actions from the Amazon SWF console, you can use the
  138. * actions in this section to build your own console or administrative tools.
  139. *
  140. * <strong>Activity Visibility</strong>
  141. *
  142. * <ul>
  143. * <li><a href="API_ListActivityTypes.html" title="ListActivities">ListActivityTypes</a></li>
  144. * <li><a href="API_DescribeActivityType.html" title=
  145. * "DescribeActivityType">DescribeActivity</a></li>
  146. * </ul>
  147. *
  148. * <strong>Workflow Visibility</strong>
  149. *
  150. * <ul>
  151. * <li><a href="API_ListWorkflowTypes.html" title="ListWorkflowTypes">ListWorkflowTypes</a></li>
  152. * <li><a href="API_DescribeWorkflowType.html" title=
  153. * "DescribeWorkflowType">DescribeWorkflowType</a></li>
  154. * </ul>
  155. *
  156. * <strong>Workflow Execution Visibility</strong>
  157. *
  158. * <ul>
  159. * <li><a href="API_DescribeWorkflowExecution.html" title=
  160. * "DescribeWorkflowExecution">DescribeWorkflowExecution</a></li>
  161. * <li><a href="API_ListOpenWorkflowExecutions.html" title=
  162. * "ListOpenWorkflowExecutions">ListOpenWorkflowExecutions</a></li>
  163. * <li><a href="API_ListClosedWorkflowExecutions.html" title=
  164. * "ListClosedWorkflowExecutions">ListClosedWorkflowExecutions</a></li>
  165. * <li><a href="API_CountOpenWorkflowExecutions.html" title=
  166. * "CountOpenWorkflowExecutions">CountOpenWorkflowExecutions</a></li>
  167. * <li><a href="API_CountClosedWorkflowExecutions.html" title=
  168. * "CountClosedWorkflowExecutions">CountClosedWorkflowExecutions</a></li>
  169. * <li><a href="API_GetWorkflowExecutionHistory.html" title=
  170. * "GetWorkflowExecutionHistory">GetWorkflowExecutionHistory</a></li>
  171. * </ul>
  172. *
  173. * <strong>Domain Visibility</strong>
  174. *
  175. * <ul>
  176. * <li><a href="API_ListDomains.html" title="ListDomains">ListDomains</a></li>
  177. * <li><a href="API_DescribeDomain.html" title="DescribeDomain">DescribeDomain</a></li>
  178. * </ul>
  179. *
  180. * <strong>Task List Visibility</strong>
  181. *
  182. * <ul>
  183. * <li><a href="API_CountPendingActivityTasks.html" title=
  184. * "CountPendingActivityTasks">CountPendingActivityTasks</a></li>
  185. * <li><a href="API_CountPendingDecisionTasks.html" title=
  186. * "CountPendingDecisionTasks">CountPendingDecisionTasks</a></li>
  187. * </ul>
  188. *
  189. * @version 2012.05.31
  190. * @license See the included NOTICE.md file for complete information.
  191. * @copyright See the included NOTICE.md file for complete information.
  192. * @link http://aws.amazon.com/simpleworkflow/ Amazon Simple Workflow
  193. * @link http://aws.amazon.com/simpleworkflow/documentation/ Amazon Simple Workflow documentation
  194. */
  195. class AmazonSWF extends CFRuntime
  196. {
  197. /*%******************************************************************************************%*/
  198. // CLASS CONSTANTS
  199. /**
  200. * Specify the queue URL for the United States East (Northern Virginia) Region.
  201. */
  202. const REGION_US_E1 = 'swf.us-east-1.amazonaws.com';
  203. /**
  204. * Specify the queue URL for the United States East (Northern Virginia) Region.
  205. */
  206. const REGION_VIRGINIA = self::REGION_US_E1;
  207. /**
  208. * Default service endpoint.
  209. */
  210. const DEFAULT_URL = self::REGION_US_E1;
  211. /*%******************************************************************************************%*/
  212. // STATUS CONSTANTS
  213. /**
  214. * Status: Registered
  215. */
  216. const STATUS_REGISTERED = 'REGISTERED';
  217. /**
  218. * Status: Deprecated
  219. */
  220. const STATUS_DEPRECATED = 'DEPRECATED';
  221. /*%******************************************************************************************%*/
  222. // POLICY CONSTANTS
  223. /**
  224. * Policy: Terminate
  225. */
  226. const POLICY_TERMINATE = 'TERMINATE';
  227. /**
  228. * Policy: Request Cancel
  229. */
  230. const POLICY_REQUEST_CANCEL = 'REQUEST_CANCEL';
  231. /**
  232. * Policy: Abandon
  233. */
  234. const POLICY_ABANDON = 'ABANDON';
  235. /*%******************************************************************************************%*/
  236. // CONSTRUCTOR
  237. /**
  238. * Constructs a new instance of <AmazonSWF>.
  239. *
  240. * @param array $options (Optional) An associative array of parameters that can have the following keys: <ul>
  241. * <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>
  242. * <li><code>credentials</code> - <code>string</code> - Optional - The name of the credential set to use for authentication.</li>
  243. * <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>
  244. * <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>
  245. * <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>
  246. * <li><code>token</code> - <code>string</code> - Optional - An AWS session token.</li></ul>
  247. * @return void
  248. */
  249. public function __construct(array $options = array())
  250. {
  251. $this->api_version = '2012-01-25';
  252. $this->hostname = self::DEFAULT_URL;
  253. $this->auth_class = 'AuthV3JSON';
  254. $this->operation_prefix = "x-amz-target:SimpleWorkflowService.";
  255. return parent::__construct($options);
  256. }
  257. /*%******************************************************************************************%*/
  258. // SETTERS
  259. /**
  260. * This allows you to explicitly sets the region for the service to use.
  261. *
  262. * @param string $region (Required) The region to explicitly set. Available options are <REGION_US_E1>.
  263. * @return $this A reference to the current instance.
  264. */
  265. public function set_region($region)
  266. {
  267. // @codeCoverageIgnoreStart
  268. $this->set_hostname($region);
  269. return $this;
  270. // @codeCoverageIgnoreEnd
  271. }
  272. /*%******************************************************************************************%*/
  273. // SERVICE METHODS
  274. /**
  275. * Returns the number of closed workflow executions within the given domain that meet the
  276. * specified filtering criteria.
  277. *
  278. * <p class="note">
  279. * This operation is eventually consistent. The results are best effort and may not exactly
  280. * reflect recent updates and changes.
  281. * </p>
  282. *
  283. * @param array $opt (Optional) An associative array of parameters that can have the following keys: <ul>
  284. * <li><code>domain</code> - <code>string</code> - Required - The name of the domain containing the workflow executions to count.</li>
  285. * <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>
  286. * <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>
  287. * <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>
  288. * </ul></li>
  289. * <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>
  290. * <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>
  291. * <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>
  292. * </ul></li>
  293. * <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>
  294. * <li><code>workflowId</code> - <code>string</code> - Required - The workflowId to pass of match the criteria of this filter.</li>
  295. * </ul></li>
  296. * <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>
  297. * <li><code>name</code> - <code>string</code> - Required - Name of the workflow type. This field is required.</li>
  298. * <li><code>version</code> - <code>string</code> - Optional - Version of the workflow type.</li>
  299. * </ul></li>
  300. * <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>
  301. * <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>
  302. * </ul></li>
  303. * <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>
  304. * <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>
  305. * </ul></li>
  306. * <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>
  307. * <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>
  308. * @return CFResponse A <CFResponse> object containing a parsed HTTP response.
  309. */
  310. public function count_closed_workflow_executions($opt = null)
  311. {
  312. if (!$opt) $opt = array();
  313. return $this->authenticate('CountClosedWorkflowExecutions', $opt);
  314. }
  315. /**
  316. * Returns the number of open workflow executions within the given domain that meet the specified
  317. * filtering criteria.
  318. *
  319. * <p class="note">
  320. * This operation is eventually consistent. The results are best effort and may not exactly
  321. * reflect recent updates and changes.
  322. * </p>
  323. *
  324. * @param array $opt (Optional) An associative array of parameters that can have the following keys: <ul>
  325. * <li><code>domain</code> - <code>string</code> - Required - The name of the domain containing the workflow executions to count.</li>
  326. * <li><code>startTimeFilter</code> - <code>array</code> - Required - Specifies the start time criteria that workflow executions must meet in order to be counted. <ul>
  327. * <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>
  328. * <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>
  329. * </ul></li>
  330. * <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>
  331. * <li><code>name</code> - <code>string</code> - Required - Name of the workflow type. This field is required.</li>
  332. * <li><code>version</code> - <code>string</code> - Optional - Version of the workflow type.</li>
  333. * </ul></li>
  334. * <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>
  335. * <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>
  336. * </ul></li>
  337. * <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>
  338. * <li><code>workflowId</code> - <code>string</code> - Required - The workflowId to pass of match the criteria of this filter.</li>
  339. * </ul></li>
  340. * <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>
  341. * <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>
  342. * @return CFResponse A <CFResponse> object containing a parsed HTTP response.
  343. */
  344. public function count_open_workflow_executions($opt = null)
  345. {
  346. if (!$opt) $opt = array();
  347. return $this->authenticate('CountOpenWorkflowExecutions', $opt);
  348. }
  349. /**
  350. * Returns the estimated number of activity tasks in the specified task list. The count returned
  351. * is an approximation and is not guaranteed to be exact. If you specify a task list that no
  352. * activity task was ever scheduled in then 0 will be returned.
  353. *
  354. * @param array $opt (Optional) An associative array of parameters that can have the following keys: <ul>
  355. * <li><code>domain</code> - <code>string</code> - Required - The name of the domain that contains the task list.</li>
  356. * <li><code>taskList</code> - <code>array</code> - Required - The name of the task list. <ul>
  357. * <li><code>name</code> - <code>string</code> - Required - The name of the task list.</li>
  358. * </ul></li>
  359. * <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>
  360. * <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>
  361. * @return CFResponse A <CFResponse> object containing a parsed HTTP response.
  362. */
  363. public function count_pending_activity_tasks($opt = null)
  364. {
  365. if (!$opt) $opt = array();
  366. return $this->authenticate('CountPendingActivityTasks', $opt);
  367. }
  368. /**
  369. * Returns the estimated number of decision tasks in the specified task list. The count returned
  370. * is an approximation and is not guaranteed to be exact. If you specify a task list that no
  371. * decision task was ever scheduled in then 0 will be returned.
  372. *
  373. * @param array $opt (Optional) An associative array of parameters that can have the following keys: <ul>
  374. * <li><code>domain</code> - <code>string</code> - Required - The name of the domain that contains the task list.</li>
  375. * <li><code>taskList</code> - <code>array</code> - Required - The name of the task list. <ul>
  376. * <li><code>name</code> - <code>string</code> - Required - The name of the task list.</li>
  377. * </ul></li>
  378. * <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>
  379. * <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>
  380. * @return CFResponse A <CFResponse> object containing a parsed HTTP response.
  381. */
  382. public function count_pending_decision_tasks($opt = null)
  383. {
  384. if (!$opt) $opt = array();
  385. return $this->authenticate('CountPendingDecisionTasks', $opt);
  386. }
  387. /**
  388. * Deprecates the specified <em>activity type</em>. After an activity type has been deprecated,
  389. * you cannot create new tasks of that activity type. Tasks of this type that were scheduled
  390. * before the type was deprecated will continue to run.
  391. *
  392. * <p class="note">
  393. * This operation is eventually consistent. The results are best effort and may not exactly
  394. * reflect recent updates and changes.
  395. * </p>
  396. *
  397. * @param array $opt (Optional) An associative array of parameters that can have the following keys: <ul>
  398. * <li><code>domain</code> - <code>string</code> - Required - The name of the domain in which the activity type is registered.</li>
  399. * <li><code>activityType</code> - <code>array</code> - Required - The activity type to deprecate. <ul>
  400. * <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>
  401. * <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>
  402. * </ul></li>
  403. * <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>
  404. * <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>
  405. * @return CFResponse A <CFResponse> object containing a parsed HTTP response.
  406. */
  407. public function deprecate_activity_type($opt = null)
  408. {
  409. if (!$opt) $opt = array();
  410. return $this->authenticate('DeprecateActivityType', $opt);
  411. }
  412. /**
  413. * Deprecates the specified domain. After a domain has been deprecated it cannot be used to create
  414. * new workflow executions or register new types. However, you can still use visibility actions on
  415. * this domain. Deprecating a domain also deprecates all activity and workflow types registered in
  416. * the domain. Executions that were started before the domain was deprecated will continue to run.
  417. *
  418. * <p class="note">
  419. * This operation is eventually consistent. The results are best effort and may not exactly
  420. * reflect recent updates and changes.
  421. * </p>
  422. *
  423. * @param array $opt (Optional) An associative array of parameters that can have the following keys: <ul>
  424. * <li><code>name</code> - <code>string</code> - Required - The name of the domain to deprecate.</li>
  425. * <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>
  426. * <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>
  427. * @return CFResponse A <CFResponse> object containing a parsed HTTP response.
  428. */
  429. public function deprecate_domain($opt = null)
  430. {
  431. if (!$opt) $opt = array();
  432. return $this->authenticate('DeprecateDomain', $opt);
  433. }
  434. /**
  435. * Deprecates the specified <em>workflow type</em>. After a workflow type has been deprecated, you
  436. * cannot create new executions of that type. Executions that were started before the type was
  437. * deprecated will continue to run. A deprecated workflow type may still be used when calling
  438. * visibility actions.
  439. *
  440. * <p class="note">
  441. * This operation is eventually consistent. The results are best effort and may not exactly
  442. * reflect recent updates and changes.
  443. * </p>
  444. *
  445. * @param array $opt (Optional) An associative array of parameters that can have the following keys: <ul>
  446. * <li><code>domain</code> - <code>string</code> - Required - The name of the domain in which the workflow type is registered.</li>
  447. * <li><code>workflowType</code> - <code>array</code> - Required - The workflow type to deprecate. <ul>
  448. * <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>
  449. * <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>
  450. * </ul></li>
  451. * <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>
  452. * <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>
  453. * @return CFResponse A <CFResponse> object containing a parsed HTTP response.
  454. */
  455. public function deprecate_workflow_type($opt = null)
  456. {
  457. if (!$opt) $opt = array();
  458. return $this->authenticate('DeprecateWorkflowType', $opt);
  459. }
  460. /**
  461. * Returns information about the specified activity type. This includes configuration settings
  462. * provided at registration time as well as other general information about the type.
  463. *
  464. * @param array $opt (Optional) An associative array of parameters that can have the following keys: <ul>
  465. * <li><code>domain</code> - <code>string</code> - Required - The name of the domain in which the activity type is registered.</li>
  466. * <li><code>activityType</code> - <code>array</code> - Required - The activity type to describe. <ul>
  467. * <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>
  468. * <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>
  469. * </ul></li>
  470. * <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>
  471. * <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>
  472. * @return CFResponse A <CFResponse> object containing a parsed HTTP response.
  473. */
  474. public function describe_activity_type($opt = null)
  475. {
  476. if (!$opt) $opt = array();
  477. return $this->authenticate('DescribeActivityType', $opt);
  478. }
  479. /**
  480. * Returns information about the specified domain including description and status.
  481. *
  482. * @param array $opt (Optional) An associative array of parameters that can have the following keys: <ul>
  483. * <li><code>name</code> - <code>string</code> - Required - The name of the domain to describe.</li>
  484. * <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>
  485. * <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>
  486. * @return CFResponse A <CFResponse> object containing a parsed HTTP response.
  487. */
  488. public function describe_domain($opt = null)
  489. {
  490. if (!$opt) $opt = array();
  491. return $this->authenticate('DescribeDomain', $opt);
  492. }
  493. /**
  494. * Returns information about the specified workflow execution including its type and some
  495. * statistics.
  496. *
  497. * <p class="note">
  498. * This operation is eventually consistent. The results are best effort and may not exactly
  499. * reflect recent updates and changes.
  500. * </p>
  501. *
  502. * @param array $opt (Optional) An associative array of parameters that can have the following keys: <ul>
  503. * <li><code>domain</code> - <code>string</code> - Required - The name of the domain containing the workflow execution.</li>
  504. * <li><code>execution</code> - <code>array</code> - Required - The workflow execution to describe. <ul>
  505. * <li><code>workflowId</code> - <code>string</code> - Required - The user defined identifier associated with the workflow execution.</li>
  506. * <li><code>runId</code> - <code>string</code> - Required - A system generated unique identifier for the workflow execution.</li>
  507. * </ul></li>
  508. * <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>
  509. * <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>
  510. * @return CFResponse A <CFResponse> object containing a parsed HTTP response.
  511. */
  512. public function describe_workflow_execution($opt = null)
  513. {
  514. if (!$opt) $opt = array();
  515. return $this->authenticate('DescribeWorkflowExecution', $opt);
  516. }
  517. /**
  518. * Returns information about the specified <em>workflow type</em>. This includes configuration
  519. * settings specified when the type was registered and other information such as creation date,
  520. * current status, etc.
  521. *
  522. * @param array $opt (Optional) An associative array of parameters that can have the following keys: <ul>
  523. * <li><code>domain</code> - <code>string</code> - Required - The name of the domain in which this workflow type is registered.</li>
  524. * <li><code>workflowType</code> - <code>array</code> - Required - The workflow type to describe. <ul>
  525. * <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>
  526. * <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>
  527. * </ul></li>
  528. * <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>
  529. * <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>
  530. * @return CFResponse A <CFResponse> object containing a parsed HTTP response.
  531. */
  532. public function describe_workflow_type($opt = null)
  533. {
  534. if (!$opt) $opt = array();
  535. return $this->authenticate('DescribeWorkflowType', $opt);
  536. }
  537. /**
  538. * Returns the history of the specified workflow execution. The results may be split into multiple
  539. * pages. To retrieve subsequent pages, make the call again using the <code>nextPageToken</code>
  540. * returned by the initial call.
  541. *
  542. * <p class="note">
  543. * This operation is eventually consistent. The results are best effort and may not exactly
  544. * reflect recent updates and changes.
  545. * </p>
  546. *
  547. * @param array $opt (Optional) An associative array of parameters that can have the following keys: <ul>
  548. * <li><code>domain</code> - <code>string</code> - Required - The name of the domain containing the workflow execution.</li>
  549. * <li><code>execution</code> - <code>array</code> - Required - Specifies the workflow execution for which to return the history. <ul>
  550. * <li><code>workflowId</code> - <code>string</code> - Required - The user defined identifier associated with the workflow execution.</li>
  551. * <li><code>runId</code> - <code>string</code> - Required - A system generated unique identifier for the workflow execution.</li>
  552. * </ul></li>
  553. * <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>
  554. * <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. Note that the number of events may be less than the maxiumum page size, in which case, a smaller page size is returned.</li>
  555. * <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>
  556. * <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>
  557. * <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>
  558. * @return CFResponse A <CFResponse> object containing a parsed HTTP response.
  559. */
  560. public function get_workflow_execution_history($opt = null)
  561. {
  562. if (!$opt) $opt = array();
  563. return $this->authenticate('GetWorkflowExecutionHistory', $opt);
  564. }
  565. /**
  566. * Returns information about all activities registered in the specified domain that match the
  567. * specified name and registration status. The result includes information like creation date,
  568. * current status of the activity, etc. The results may be split into multiple pages. To retrieve
  569. * subsequent pages, make the call again using the <code>nextPageToken</code> returned by the
  570. * initial call.
  571. *
  572. * @param array $opt (Optional) An associative array of parameters that can have the following keys: <ul>
  573. * <li><code>domain</code> - <code>string</code> - Required - The name of the domain in which the activity types have been registered.</li>
  574. * <li><code>name</code> - <code>string</code> - Optional - If specified, only lists the activity types that have this name.</li>
  575. * <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>
  576. * <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>
  577. * <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. Note that the number of types may be less than the maxiumum page size, in which case, a smaller page size is returned.</li>
  578. * <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>
  579. * <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>
  580. * <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>
  581. * @return CFResponse A <CFResponse> object containing a parsed HTTP response.
  582. */
  583. public function list_activity_types($opt = null)
  584. {
  585. if (!$opt) $opt = array();
  586. return $this->authenticate('ListActivityTypes', $opt);
  587. }
  588. /**
  589. * Returns a list of closed workflow executions in the specified domain that meet the filtering
  590. * criteria. The results may be split into multiple pages. To retrieve subsequent pages, make the
  591. * call again using the nextPageToken returned by the initial call.
  592. *
  593. * <p class="note">
  594. * This operation is eventually consistent. The results are best effort and may not exactly
  595. * reflect recent updates and changes.
  596. * </p>
  597. *
  598. * @param array $opt (Optional) An associative array of parameters that can have the following keys: <ul>
  599. * <li><code>domain</code> - <code>string</code> - Required - The name of the domain that contains the workflow executions to list.</li>
  600. * <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>
  601. * <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>
  602. * <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>
  603. * </ul></li>
  604. * <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>
  605. * <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>
  606. * <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>
  607. * </ul></li>
  608. * <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>
  609. * <li><code>workflowId</code> - <code>string</code> - Required - The workflowId to pass of match the criteria of this filter.</li>
  610. * </ul></li>
  611. * <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>
  612. * <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>
  613. * </ul></li>
  614. * <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>
  615. * <li><code>name</code> - <code>string</code> - Required - Name of the workflow type. This field is required.</li>
  616. * <li><code>version</code> - <code>string</code> - Optional - Version of the workflow type.</li>
  617. * </ul></li>
  618. * <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>
  619. * <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>
  620. * </ul></li>
  621. * <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>
  622. * <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. Note that the number of executions may be less than the maxiumum page size, in which case, a smaller page size is returned.</li>
  623. * <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>
  624. * <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>
  625. * <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>
  626. * @return CFResponse A <CFResponse> object containing a parsed HTTP response.
  627. */
  628. public function list_closed_workflow_executions($opt = null)
  629. {
  630. if (!$opt) $opt = array();
  631. return $this->authenticate('ListClosedWorkflowExecutions', $opt);
  632. }
  633. /**
  634. * Returns the list of domains registered in the account. The results may be split into multiple
  635. * pages. To retrieve subsequent pages, make the call again using the nextPageToken returned by
  636. * the initial call.
  637. *
  638. * <p class="note">
  639. * This operation is eventually consistent. The results are best effort and may not exactly
  640. * reflect recent updates and changes.
  641. * </p>
  642. *
  643. * @param array $opt (Optional) An associative array of parameters that can have the following keys: <ul>
  644. * <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>
  645. * <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>
  646. * <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. Note that the number of domains may be less than the maxiumum page size, in which case, a smaller page size is returned.</li>
  647. * <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>
  648. * <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>
  649. * <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>
  650. * @return CFResponse A <CFResponse> object containing a parsed HTTP response.
  651. */
  652. public function list_domains($opt = null)
  653. {
  654. if (!$opt) $opt = array();
  655. return $this->authenticate('ListDomains', $opt);
  656. }
  657. /**
  658. * Returns a list of open workflow executions in the specified domain that meet the filtering
  659. * criteria. The results may be split into multiple pages. To retrieve subsequent pages, make the
  660. * call again using the nextPa…

Large files files are truncated, but you can click here to view the full file