Source for file WorkflowManager.php

Documentation is available at WorkflowManager.php

  1. <?php
  2. include_once(dirname(__FILE__)."/../OsidManager.php");
  3. /**
  4. * <p>
  5. * WorkflowManager handles the management of Processes and the discovery of
  6. * unfinished or completed work.
  7. * </p>
  8. *
  9. * <p>
  10. * All implementations of OsidManager (manager) provide methods for accessing
  11. * and manipulating the various objects defined in the OSID package. A manager
  12. * defines an implementation of an OSID. All other OSID objects come either
  13. * directly or indirectly from the manager. New instances of the OSID objects
  14. * are created either directly or indirectly by the manager. Because the OSID
  15. * objects are defined using interfaces, create methods must be used instead
  16. * of the new operator to create instances of the OSID objects. Create methods
  17. * are used both to instantiate and persist OSID objects. Using the
  18. * OsidManager class to define an OSID's implementation allows the application
  19. * to change OSID implementations by changing the OsidManager package name
  20. * used to load an implementation. Applications developed using managers
  21. * permit OSID implementation substitution without changing the application
  22. * source code. As with all managers, use the OsidLoader to load an
  23. * implementation of this interface.
  24. * </p>
  25. *
  26. * <p></p>
  27. *
  28. * <p>
  29. * OSID Version: 2.0
  30. * </p>
  31. *
  32. * <p>
  33. * Licensed under the {@link org.osid.SidImplementationLicenseMIT MIT}
  34. * O.K.I&#46; OSID Definition License}.
  35. * </p>
  36. *
  37. * @package org.osid.workflow
  38. */
  39. class WorkflowManager
  40. extends OsidManager
  41. {
  42. /**
  43. * Create a process. An unique Id is generated for this Process by the
  44. * implementation.
  45. *
  46. * @param string $displayName
  47. * @param string $description
  48. *
  49. * @return object Process
  50. *
  51. * @throws object WorkflowException An exception with one of the
  52. * following messages defined in
  53. * org.osid.workflow.WorkflowException may be thrown: {@link }
  54. * org.osid.workflow.WorkflowException#OPERATION_FAILED
  55. * OPERATION_FAILED}, {@link }
  56. * org.osid.workflow.WorkflowException#PERMISSION_DENIED
  57. * PERMISSION_DENIED}, {@link }
  58. * org.osid.workflow.WorkflowException#CONFIGURATION_ERROR
  59. * CONFIGURATION_ERROR}, {@link }
  60. * org.osid.workflow.WorkflowException#UNIMPLEMENTED
  61. * UNIMPLEMENTED}, {@link }
  62. * org.osid.workflow.WorkflowException#NULL_ARGUMENT
  63. * NULL_ARGUMENT}
  64. *
  65. * @access public
  66. */
  67. function createProcess ( $displayName, $description ) {
  68. die ("Method <b>".__FUNCTION__."()</b> declared in interface<b> ".__CLASS__."</b> has not been overloaded in a child class.");
  69. }
  70.  
  71. /**
  72. * Copy a known Process and provide a new Display Name and Description. A
  73. * new unique Id is generated by the implementation. All elements of the
  74. * original Process are included in the copy.
  75. *
  76. * @param object Id $originalProcessId
  77. * @param string $newDisplayName
  78. * @param string $newDescription
  79. *
  80. * @return object Process
  81. *
  82. * @throws object WorkflowException An exception with one of the
  83. * following messages defined in
  84. * org.osid.workflow.WorkflowException may be thrown: {@link }
  85. * org.osid.workflow.WorkflowException#OPERATION_FAILED
  86. * OPERATION_FAILED}, {@link }
  87. * org.osid.workflow.WorkflowException#PERMISSION_DENIED
  88. * PERMISSION_DENIED}, {@link }
  89. * org.osid.workflow.WorkflowException#CONFIGURATION_ERROR
  90. * CONFIGURATION_ERROR}, {@link }
  91. * org.osid.workflow.WorkflowException#UNIMPLEMENTED
  92. * UNIMPLEMENTED}, {@link }
  93. * org.osid.workflow.WorkflowException#NULL_ARGUMENT
  94. * NULL_ARGUMENT}, {@link }
  95. * org.osid.workflow.WorkflowException#UNKNOWN_ID UNKNOWN_ID}
  96. *
  97. * @access public
  98. */
  99. function copyProcess ( $originalProcessId, $newDisplayName, $newDescription ) {
  100. die ("Method <b>".__FUNCTION__."()</b> declared in interface<b> ".__CLASS__."</b> has not been overloaded in a child class.");
  101. }
  102.  
  103. /**
  104. * Delete a process by unique Id.
  105. *
  106. * @param object Id $processId
  107. *
  108. * @throws object WorkflowException An exception with one of the
  109. * following messages defined in
  110. * org.osid.workflow.WorkflowException may be thrown: {@link }
  111. * org.osid.workflow.WorkflowException#OPERATION_FAILED
  112. * OPERATION_FAILED}, {@link }
  113. * org.osid.workflow.WorkflowException#PERMISSION_DENIED
  114. * PERMISSION_DENIED}, {@link }
  115. * org.osid.workflow.WorkflowException#CONFIGURATION_ERROR
  116. * CONFIGURATION_ERROR}, {@link }
  117. * org.osid.workflow.WorkflowException#UNIMPLEMENTED
  118. * UNIMPLEMENTED}, {@link }
  119. * org.osid.workflow.WorkflowException#NULL_ARGUMENT
  120. * NULL_ARGUMENT}, {@link }
  121. * org.osid.workflow.WorkflowException#UNKNOWN_ID UNKNOWN_ID}
  122. *
  123. * @access public
  124. */
  125. function deleteProcess ( $processId ) {
  126. die ("Method <b>".__FUNCTION__."()</b> declared in interface<b> ".__CLASS__."</b> has not been overloaded in a child class.");
  127. }
  128.  
  129. /**
  130. * Get a Process by unique Id.
  131. *
  132. * @param object Id $processId
  133. *
  134. * @return object Process
  135. *
  136. * @throws object WorkflowException An exception with one of the
  137. * following messages defined in
  138. * org.osid.workflow.WorkflowException may be thrown: {@link }
  139. * org.osid.workflow.WorkflowException#OPERATION_FAILED
  140. * OPERATION_FAILED}, {@link }
  141. * org.osid.workflow.WorkflowException#PERMISSION_DENIED
  142. * PERMISSION_DENIED}, {@link }
  143. * org.osid.workflow.WorkflowException#CONFIGURATION_ERROR
  144. * CONFIGURATION_ERROR}, {@link }
  145. * org.osid.workflow.WorkflowException#UNIMPLEMENTED
  146. * UNIMPLEMENTED}, {@link }
  147. * org.osid.workflow.WorkflowException#NULL_ARGUMENT
  148. * NULL_ARGUMENT}, {@link }
  149. * org.osid.workflow.WorkflowException#UNKNOWN_ID UNKNOWN_ID}
  150. *
  151. * @access public
  152. */
  153. function getProcess ( $processId ) {
  154. die ("Method <b>".__FUNCTION__."()</b> declared in interface<b> ".__CLASS__."</b> has not been overloaded in a child class.");
  155. }
  156.  
  157. /**
  158. * Get all known Processes.
  159. *
  160. * @return object ProcessIterator
  161. *
  162. * @throws object WorkflowException An exception with one of the
  163. * following messages defined in
  164. * org.osid.workflow.WorkflowException may be thrown: {@link }
  165. * org.osid.workflow.WorkflowException#OPERATION_FAILED
  166. * OPERATION_FAILED}, {@link }
  167. * org.osid.workflow.WorkflowException#PERMISSION_DENIED
  168. * PERMISSION_DENIED}, {@link }
  169. * org.osid.workflow.WorkflowException#CONFIGURATION_ERROR
  170. * CONFIGURATION_ERROR}, {@link }
  171. * org.osid.workflow.WorkflowException#UNIMPLEMENTED
  172. * UNIMPLEMENTED}
  173. *
  174. * @access public
  175. */
  176. function getProcesses () {
  177. die ("Method <b>".__FUNCTION__."()</b> declared in interface<b> ".__CLASS__."</b> has not been overloaded in a child class.");
  178. }
  179.  
  180. /**
  181. * Get all the known Expressions.
  182. *
  183. * @return object ExpressionIterator
  184. *
  185. * @throws object WorkflowException An exception with one of the
  186. * following messages defined in
  187. * org.osid.workflow.WorkflowException may be thrown: {@link }
  188. * org.osid.workflow.WorkflowException#OPERATION_FAILED
  189. * OPERATION_FAILED}, {@link }
  190. * org.osid.workflow.WorkflowException#PERMISSION_DENIED
  191. * PERMISSION_DENIED}, {@link }
  192. * org.osid.workflow.WorkflowException#CONFIGURATION_ERROR
  193. * CONFIGURATION_ERROR}, {@link }
  194. * org.osid.workflow.WorkflowException#UNIMPLEMENTED
  195. * UNIMPLEMENTED}
  196. *
  197. * @access public
  198. */
  199. function getExpressions () {
  200. die ("Method <b>".__FUNCTION__."()</b> declared in interface<b> ".__CLASS__."</b> has not been overloaded in a child class.");
  201. }
  202.  
  203. /**
  204. * Get all the known Expressions of the specified Type.
  205. *
  206. * @param object Type $expressionType
  207. *
  208. * @return object ExpressionIterator
  209. *
  210. * @throws object WorkflowException An exception with one of the
  211. * following messages defined in
  212. * org.osid.workflow.WorkflowException may be thrown: {@link }
  213. * org.osid.workflow.WorkflowException#OPERATION_FAILED
  214. * OPERATION_FAILED}, {@link }
  215. * org.osid.workflow.WorkflowException#PERMISSION_DENIED
  216. * PERMISSION_DENIED}, {@link }
  217. * org.osid.workflow.WorkflowException#CONFIGURATION_ERROR
  218. * CONFIGURATION_ERROR}, {@link }
  219. * org.osid.workflow.WorkflowException#UNIMPLEMENTED
  220. * UNIMPLEMENTED}, {@link }
  221. * org.osid.workflow.WorkflowException#NULL_ARGUMENT
  222. * NULL_ARGUMENT}, {@link }
  223. * org.osid.workflow.WorkflowException#UNKNOWN_TYPE UNKNOWN_TYPE}
  224. *
  225. * @access public
  226. */
  227. function getExpressionsByType ( $expressionType ) {
  228. die ("Method <b>".__FUNCTION__."()</b> declared in interface<b> ".__CLASS__."</b> has not been overloaded in a child class.");
  229. }
  230.  
  231. /**
  232. * Get all the work unfinished to be acted on by anyone.
  233. *
  234. * @param object Id $processId
  235. *
  236. * @return object WorkIterator
  237. *
  238. * @throws object WorkflowException An exception with one of the
  239. * following messages defined in
  240. * org.osid.workflow.WorkflowException may be thrown: {@link }
  241. * org.osid.workflow.WorkflowException#OPERATION_FAILED
  242. * OPERATION_FAILED}, {@link }
  243. * org.osid.workflow.WorkflowException#PERMISSION_DENIED
  244. * PERMISSION_DENIED}, {@link }
  245. * org.osid.workflow.WorkflowException#CONFIGURATION_ERROR
  246. * CONFIGURATION_ERROR}, {@link }
  247. * org.osid.workflow.WorkflowException#UNIMPLEMENTED
  248. * UNIMPLEMENTED}, {@link }
  249. * org.osid.workflow.WorkflowException#NULL_ARGUMENT
  250. * NULL_ARGUMENT}, {@link }
  251. * org.osid.workflow.WorkflowException#UNKNOWN_ID UNKNOWN_ID}
  252. *
  253. * @access public
  254. */
  255. function getUnfinishedWork ( $processId ) {
  256. die ("Method <b>".__FUNCTION__."()</b> declared in interface<b> ".__CLASS__."</b> has not been overloaded in a child class.");
  257. }
  258.  
  259. /**
  260. * Get the Work that has been completed for the specified Process.
  261. *
  262. * @param object Id $processId
  263. *
  264. * @return object WorkIterator
  265. *
  266. * @throws object WorkflowException An exception with one of the
  267. * following messages defined in
  268. * org.osid.workflow.WorkflowException may be thrown: {@link }
  269. * org.osid.workflow.WorkflowException#OPERATION_FAILED
  270. * OPERATION_FAILED}, {@link }
  271. * org.osid.workflow.WorkflowException#PERMISSION_DENIED
  272. * PERMISSION_DENIED}, {@link }
  273. * org.osid.workflow.WorkflowException#CONFIGURATION_ERROR
  274. * CONFIGURATION_ERROR}, {@link }
  275. * org.osid.workflow.WorkflowException#UNIMPLEMENTED
  276. * UNIMPLEMENTED}, {@link }
  277. * org.osid.workflow.WorkflowException#NULL_ARGUMENT
  278. * NULL_ARGUMENT}, {@link }
  279. * org.osid.workflow.WorkflowException#UNKNOWN_ID UNKNOWN_ID}
  280. *
  281. * @access public
  282. */
  283. function getCompletedWork ( $processId ) {
  284. die ("Method <b>".__FUNCTION__."()</b> declared in interface<b> ".__CLASS__."</b> has not been overloaded in a child class.");
  285. }
  286.  
  287. /**
  288. * Get all the output states for this Step.
  289. *
  290. * @return object StringIterator
  291. *
  292. * @throws object WorkflowException An exception with one of the
  293. * following messages defined in
  294. * org.osid.workflow.WorkflowException may be thrown: {@link }
  295. * org.osid.workflow.WorkflowException#OPERATION_FAILED
  296. * OPERATION_FAILED}, {@link }
  297. * org.osid.workflow.WorkflowException#PERMISSION_DENIED
  298. * PERMISSION_DENIED}, {@link }
  299. * org.osid.workflow.WorkflowException#CONFIGURATION_ERROR
  300. * CONFIGURATION_ERROR}, {@link }
  301. * org.osid.workflow.WorkflowException#UNIMPLEMENTED
  302. * UNIMPLEMENTED}
  303. *
  304. * @access public
  305. */
  306. function getOutputStates () {
  307. die ("Method <b>".__FUNCTION__."()</b> declared in interface<b> ".__CLASS__."</b> has not been overloaded in a child class.");
  308. }
  309.  
  310. /**
  311. * Get all the Expression Types supported by this implementation.
  312. *
  313. * @return object TypeIterator
  314. *
  315. * @throws object WorkflowException An exception with one of the
  316. * following messages defined in
  317. * org.osid.workflow.WorkflowException may be thrown: {@link }
  318. * org.osid.workflow.WorkflowException#OPERATION_FAILED
  319. * OPERATION_FAILED}, {@link }
  320. * org.osid.workflow.WorkflowException#PERMISSION_DENIED
  321. * PERMISSION_DENIED}, {@link }
  322. * org.osid.workflow.WorkflowException#CONFIGURATION_ERROR
  323. * CONFIGURATION_ERROR}, {@link }
  324. * org.osid.workflow.WorkflowException#UNIMPLEMENTED
  325. * UNIMPLEMENTED}
  326. *
  327. * @access public
  328. */
  329. function getExpressionTypes () {
  330. die ("Method <b>".__FUNCTION__."()</b> declared in interface<b> ".__CLASS__."</b> has not been overloaded in a child class.");
  331. }
  332.  
  333. /**
  334. * This method indicates whether this implementation supports
  335. * WorkflowManager methods: copyProcess, createProcess, deleteProcess.
  336. * Process methods: createInitialStep, createStep, deleteStep, isEnabled,
  337. * updateDescription, updateDisplayName, updateEnabled. Step methods:
  338. * addPredecessor, removePredecessor, updateDescription,
  339. * updateDisplayName, updateInputConditions, updateOutputStates,
  340. * updateRoleId.
  341. *
  342. * @return boolean
  343. *
  344. * @throws object WorkflowException An exception with one of the
  345. * following messages defined in
  346. * org.osid.workflow.WorkflowException may be thrown: {@link }
  347. * org.osid.workflow.WorkflowException#OPERATION_FAILED
  348. * OPERATION_FAILED}, {@link }
  349. * org.osid.workflow.WorkflowException#PERMISSION_DENIED
  350. * PERMISSION_DENIED}, {@link }
  351. * org.osid.workflow.WorkflowException#CONFIGURATION_ERROR
  352. * CONFIGURATION_ERROR}, {@link }
  353. * org.osid.workflow.WorkflowException#UNIMPLEMENTED
  354. * UNIMPLEMENTED}
  355. *
  356. * @access public
  357. */
  358. function supportsDesign () {
  359. die ("Method <b>".__FUNCTION__."()</b> declared in interface<b> ".__CLASS__."</b> has not been overloaded in a child class.");
  360. }
  361.  
  362. /**
  363. * This method indicates whether this implementation supports
  364. * WorkflowManager methods: getCompletedWork, getExpressions,
  365. * getExpressionsByType, getExpressionTypes, getOutputStates, getProcess,
  366. * getProcesses, getUnfinishedWork. Process methods: createWork,
  367. * deleteWork, getAvailableWork, getAvailableWorkForRole,
  368. * getAvailableWorkForStep, getDescription, getDisplayName, getId,
  369. * getStep, getSteps, getUnfinishedWork, getUnfinishedWorkForRole,
  370. * getUnfinishedWorkForStep, getWork, getAllWork, haltWork, resumeWork.
  371. * Step methods: getSuccessors, getDescription, getDisplayName, getId,
  372. * getInputConditions, getOutputState, getPredecessors, getRoleId,
  373. * isInitial, isTerminal. Work methods: getDescription, getDisplayName,
  374. * getHistory, getId, updateDescription, updateDisplayName, getNextSteps,
  375. * getNextStepsForRole, getQualifierId, updateStepOutputState.
  376. *
  377. * @return boolean
  378. *
  379. * @throws object WorkflowException An exception with one of the
  380. * following messages defined in
  381. * org.osid.workflow.WorkflowException may be thrown: {@link }
  382. * org.osid.workflow.WorkflowException#OPERATION_FAILED
  383. * OPERATION_FAILED}, {@link }
  384. * org.osid.workflow.WorkflowException#PERMISSION_DENIED
  385. * PERMISSION_DENIED}, {@link }
  386. * org.osid.workflow.WorkflowException#CONFIGURATION_ERROR
  387. * CONFIGURATION_ERROR}, {@link }
  388. * org.osid.workflow.WorkflowException#UNIMPLEMENTED
  389. * UNIMPLEMENTED}
  390. *
  391. * @access public
  392. */
  393. function supportsMaintenance () {
  394. die ("Method <b>".__FUNCTION__."()</b> declared in interface<b> ".__CLASS__."</b> has not been overloaded in a child class.");
  395. }
  396. }
  397.  
  398. ?>

Documentation generated on Wed, 19 Sep 2007 10:28:13 -0400 by phpDocumentor 1.3.0RC3