View Javadoc

1   /**
2    * Copyright 2005-2011 The Kuali Foundation
3    *
4    * Licensed under the Educational Community License, Version 2.0 (the "License");
5    * you may not use this file except in compliance with the License.
6    * You may obtain a copy of the License at
7    *
8    * http://www.opensource.org/licenses/ecl2.php
9    *
10   * Unless required by applicable law or agreed to in writing, software
11   * distributed under the License is distributed on an "AS IS" BASIS,
12   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13   * See the License for the specific language governing permissions and
14   * limitations under the License.
15   */
16  package org.kuali.rice.kew.api.action;
17  
18  import java.util.List;
19  import java.util.Set;
20  
21  import javax.jws.WebMethod;
22  import javax.jws.WebParam;
23  import javax.jws.WebResult;
24  import javax.jws.WebService;
25  import javax.jws.soap.SOAPBinding;
26  import javax.xml.bind.annotation.XmlElement;
27  import javax.xml.bind.annotation.XmlElementWrapper;
28  
29  import org.kuali.rice.core.api.exception.RiceIllegalArgumentException;
30  import org.kuali.rice.kew.api.KewApiConstants;
31  import org.kuali.rice.kew.api.WorkflowDocument;
32  import org.kuali.rice.kew.api.doctype.IllegalDocumentTypeException;
33  import org.kuali.rice.kew.api.document.Document;
34  import org.kuali.rice.kew.api.document.DocumentContentUpdate;
35  import org.kuali.rice.kew.api.document.DocumentDetail;
36  import org.kuali.rice.kew.api.document.DocumentStatus;
37  import org.kuali.rice.kew.api.document.DocumentUpdate;
38  import org.kuali.rice.kew.api.document.InvalidDocumentContentException;
39  import org.kuali.rice.kew.api.document.attribute.WorkflowAttributeDefinition;
40  import org.kuali.rice.kew.api.document.attribute.WorkflowAttributeValidationError;
41  import org.kuali.rice.kew.api.document.WorkflowDocumentService;
42  import org.kuali.rice.kew.api.rule.Rule;
43  import org.kuali.rice.kew.api.rule.RuleReportCriteria;
44  
45  /**
46   * This service defines various operations which are used to perform actions against a workflow
47   * {@link Document}. These actions include creation, routing, approval, acknowledgment, saving,
48   * updating document data, etc.
49   * 
50   * <p>
51   * It also includes operations that allow for loading of information about which actions a given
52   * principal is permitted to execute against a given document ({@link ValidActions}), as well as
53   * providing information about what actions a particular principal has been requested to execute
54   * against a given document ({@link RequestedActions}).
55   * 
56   * <p>
57   * This service can be used in conjunction with the {@link WorkflowDocumentService} which provides
58   * additional operations that relate to documents (but not document actions).
59   * 
60   * <p>
61   * Unless otherwise specified, all parameters to all methods must not be null. If the argument is a
62   * string value it must also not be "blank" (either the empty string or a string of only
63   * whitespace). In the cases where this is violated, a {@link RiceIllegalArgumentException} will be
64   * thrown. Additionally, unless otherwise specified, all methods will return non-null return values.
65   * In the case of collections, an empty collection will be returned in preference to a null
66   * collection value. All collections which are returned from methods on this service will be
67   * unmodifiable collections.
68   * 
69   * <p>
70   * Many of the actions trigger processing by the workflow engine. Unless otherwise specified, any
71   * method on this service which performs an action against the document will also submit the
72   * document to the workflow engine after performing the action. This may trigger the workflow
73   * document to transition to the next node in the workflow process or activate additional action
74   * requests depending on what the current state of the active node instance(s) is on the document.
75   * 
76   * <p>
77   * Workflow engine processing may happen either asynchronously or synchronously depending on
78   * configuration and capabilities of the back end workflow engine implementation. However,
79   * asynchronous operation is suggested for most use cases. This means that when operating in
80   * asynchronous mode, after an action is submitted against the document there may be a delay in
81   * state changes to the document. For example, if a principal submits an approve against a document
82   * that triggers transition to the next node in the workflow process (generating new action requests
83   * in the process) those new actions requests will not be represented in the information returned in
84   * the {@link DocumentActionResult} result object. Though future invocations of
85   * {@link #determineRequestedActions(String, String)} and similar methods may yield such
86   * information, though it may do so after an non-deterministic amount of time since the workflow
87   * engine makes no guarantees about how quickly it will complete processing. Additionally,
88   * asynchronous workflow processing is scheduled in a work queue and therefore it may not be picked
89   * up for processing immediately depending on system load and other factors.
90   * 
91   * <p>
92   * If there is an error during asynchronous workflow processing then the document will be put into
93   * exception routing (which can be executed in various ways depending on how the document type
94   * defines it's exception policy). Regardless of the exact process that gets triggered during
95   * exception routing, the end result is a set of {@link ActionRequestType#COMPLETE} requests to
96   * those principals who are capable of resolving the exception scenario as well as the document's
97   * status being transitioned to {@link DocumentStatus#EXCEPTION}. Once they have resolved any
98   * barriers to successful processing of the document, they can take the
99   * {@link #complete(DocumentActionParameters)} action against the document in order to satisfy the
100  * outstanding exception request(s) and send the document back through the workflow engine.
101  * 
102  * <p>
103  * In contrast, when operating the workflow engine in synchronous mode, processing will happen
104  * immediately and control will not be returned to the caller until all outstanding processing has
105  * completed. As a result, the information returned in the {@link DocumentActionResult} will always
106  * be in a consistent state after each action is performed. When operating in synchronous mode, the
107  * process of exception routing does not occur when failures are encountered during workflow engine
108  * processing, rather any exceptions that are raised during processing will instead be thrown back
109  * to the calling code.
110  * 
111  * <p>
112  * Implementations of this service are required to be thread-safe and should be able to be invoked
113  * either locally or remotely.
114  * 
115  * @see WorkflowDocumentService
116  * @see WorkflowDocument
117  * 
118  * @author Kuali Rice Team (rice.collab@kuali.org)
119  * 
120  */
121 @WebService(name = "workflowDocumentActionsService", targetNamespace = KewApiConstants.Namespaces.KEW_NAMESPACE_2_0)
122 @SOAPBinding(style = SOAPBinding.Style.DOCUMENT, use = SOAPBinding.Use.LITERAL, parameterStyle = SOAPBinding.ParameterStyle.WRAPPED)
123 public interface WorkflowDocumentActionsService {
124 
125     /**
126      * Creates a new document instance from the given document type. The initiator of the resulting
127      * document will be the same as the initiator that is passed to this method. Optional
128      * {@link DocumentUpdate} and {@link DocumentContentUpdate} parameters can be supplied in order
129      * to create the document with these additional pieces of data already set.
130      * 
131      * <p>
132      * By default, if neither the {@link DocumentUpdate} or {@link DocumentContentUpdate} is passed
133      * to this method, the document that is created and returned from this operation will have the
134      * following initial state:
135      * 
136      * <ul>
137      * <ol>
138      * {@code status} set to {@link DocumentStatus#INITIATED}
139      * </ol>
140      * <ol>
141      * {@code createDate} and {@code dateLastModified} set to the current date and time
142      * </ol>
143      * <ol>
144      * {@code current} set to 'true'
145      * </ol>
146      * <ol>
147      * {@code documentContent} set to the default and empty content
148      * </ol>
149      * </ul>
150      * 
151      * <p>
152      * Additionally, the initial {@link org.kuali.rice.kew.api.document.node.RouteNodeInstance} for the workflow process on the document
153      * will be created and linked to the document as it's initial node. Once the document is
154      * created, the {@link #route(DocumentActionParameters)} operation must be invoked in order to
155      * submit it to the workflow engine for initial processing.
156      * 
157      * <p>
158      * In certain situations, the given principal may not be permitted to initiate documents of the
159      * given type. In these cases an {@link InvalidActionTakenException} will be thrown.
160      * 
161      * @param documentTypeName the name of the document type from which to create this document
162      * @param initiatorPrincipalId the id of the principal who is initiating this document
163      * @param documentUpdate specifies additional document to set on the document upon creation,
164      *        this is optional and if null is passed then the document will be created with the
165      *        default document state
166      * @param documentContentUpdate defines what the initial document content for the document
167      *        should be, this is optional if null is passed then the document will be created with
168      *        the default empty document content
169      * 
170      * @return the document that was created
171      * 
172      * @throws RiceIllegalArgumentException if {@code principalId} is null or blank
173      * @throws RiceIllegalArgumentException if {@code principalId} does not identify a valid
174      *         principal
175      * @throws RiceIllegalArgumentException if {@code documentTypeName} is null or blank
176      * @throws RiceIllegalArgumentException if {@code documentTypeName} does not identify an
177      *         existing document type
178      * @throws IllegalDocumentTypeException if the specified document type is not active
179      * @throws IllegalDocumentTypeException if the specified document type does not support document
180      *         creation (in other words, it's a document type that is only used as a parent)
181      * @throws InvalidActionTakenException if the supplied principal is not allowed to execute this
182      *         action
183      */
184     @WebMethod(operationName = "create")
185     @WebResult(name = "document")
186     @XmlElement(name = "document", required = true)
187     Document create(
188             @WebParam(name = "documentTypeName") String documentTypeName,
189             @WebParam(name = "initiatorPrincipalId") String initiatorPrincipalId,
190             @WebParam(name = "documentUpdate") DocumentUpdate documentUpdate,
191             @WebParam(name = "documentContentUpdate") DocumentContentUpdate documentContentUpdate)
192             throws RiceIllegalArgumentException, IllegalDocumentTypeException, InvalidActionTakenException;
193 
194     /**
195      * Determines which actions against the document with the given id are valid for the principal
196      * with the given id.
197      * 
198      * @param documentId the id of the document for which to determine valid actions
199      * @param principalId the id of the principal for which to determine valid actions against the
200      *        given document
201      * 
202      * @return a {@link ValidActions} object which contains the valid actions for the given
203      *         principal against the given document
204      * 
205      * @throws RiceIllegalArgumentException if {@code documentId} is null or blank
206      * @throws RiceIllegalArgumentException if document with the given {@code documentId} does not
207      *         exist
208      * @throws RiceIllegalArgumentException if {@code principalId} is null or blank
209      * @throws RiceIllegalArgumentException if principal with the given {@code principalId} does not
210      *         exist
211      */
212     @WebMethod(operationName = "determineValidActions")
213     @WebResult(name = "validActions")
214     @XmlElement(name = "validActions", required = true)
215     ValidActions determineValidActions(
216             @WebParam(name = "documentId") String documentId,
217             @WebParam(name = "principalId") String principalId)
218             throws RiceIllegalArgumentException;
219 
220     /**
221      * Determines which actions are requested against the document with the given id for the
222      * principal with the given id. These are generally derived based on action requests that are
223      * currently pending against the document.
224      * 
225      * <p>
226      * This method is distinguished from {@link #determineValidActions(String, String)} in that fact
227      * that valid actions are the actions that the principal is permitted to take, while requested
228      * actions are those that the principal is specifically being asked to take. Note that the
229      * actions that are requested are used when assembling valid actions but are not necessarily the
230      * only authoritative source for determination of valid actions for the principal, as
231      * permissions and other configuration can also come into play.
232      * 
233      * @param documentId the id of the document for which to determine requested actions
234      * @param principalId the id of the principal for which to determine requested actions against
235      *        the given document
236      * 
237      * @return a {@link RequestedActions} object which contains the actions that are being requested
238      *         from the given principal against the given document
239      * 
240      * @throws RiceIllegalArgumentException if {@code documentId} is null or blank
241      * @throws RiceIllegalArgumentException if document with the given {@code documentId} does not
242      *         exist
243      * @throws RiceIllegalArgumentException if {@code principalId} is null or blank
244      * @throws RiceIllegalArgumentException if principal with the given {@code principalId} does not
245      *         exist
246      */
247     @WebMethod(operationName = "determineRequestedActions")
248     @WebResult(name = "requestedActions")
249     @XmlElement(name = "requestedActions", required = true)
250     RequestedActions determineRequestedActions(
251             @WebParam(name = "documentId") String documentId,
252             @WebParam(name = "principalId") String principalId)
253             throws RiceIllegalArgumentException;
254 
255     /**
256      * Executes an {@link ActionType#ACKNOWLEDGE} action for the given principal and document
257      * specified in the supplied parameters. When a principal acknowledges a document, any of the
258      * principal's pending action requests at or below the acknowledge level (which includes fyi
259      * requests as well) will be satisfied by the principal's action. The principal's action should
260      * be recorded with the document as an {@link ActionTaken}.
261      * 
262      * <p>
263      * Depending on document type policy, a pending action request at or below the acknowledge level
264      * may have to exist on the document in order for the principal to take this action. Otherwise
265      * an {@link InvalidActionTakenException} may be thrown. In order to determine if an acknowledge
266      * action is valid, the {@link ValidActions} or {@link RequestedActions} for the document can be
267      * checked.
268      * 
269      * @param parameters the parameters which indicate which principal is executing the action
270      *        against which document, as well as additional operations to take against the document,
271      *        such as updating document data
272      * 
273      * @return the result of executing the action, including a view on the updated state of the
274      *         document and related actions
275      * 
276      * @throws RiceIllegalArgumentException if {@code parameters} is null
277      * @throws RiceIllegalArgumentException if no document with the {@code documentId} specified in
278      *         {@code parameters} exists
279      * @throws RiceIllegalArgumentException if no principal with the {@code principalId} specified
280      *         in {@code parameters} exists
281      * @throws InvalidDocumentContentException if the document content on the
282      *         {@link DocumentContentUpdate} supplied with the {@code parameters} is invalid.
283      * @throws InvalidActionTakenException if the supplied principal is not allowed to execute this
284      *         action
285      */
286     @WebMethod(operationName = "acknowledge")
287     @WebResult(name = "documentActionResult")
288     @XmlElement(name = "documentActionResult", required = true)
289     DocumentActionResult acknowledge(@WebParam(name = "parameters") DocumentActionParameters parameters)
290             throws RiceIllegalArgumentException, InvalidDocumentContentException, InvalidActionTakenException;
291 
292     /**
293      * Executes an {@link ActionType#APPROVE} action for the given principal and document specified
294      * in the supplied parameters. When a principal approves a document, any of the principal's
295      * pending action requests at or below the approve level (which includes complete, acknowledge,
296      * and fyi requests as well) will be satisfied by the principal's action. The principal's action
297      * should be recorded with the document as an {@link ActionTaken}.
298      * 
299      * <p>
300      * Depending on document type policy, a pending action request at or below the approve level may
301      * have to exist on the document in order for the principal to take this action. Otherwise an
302      * {@link InvalidActionTakenException} may be thrown. In order to determine if an approve action
303      * is valid, the {@link ValidActions} or {@link RequestedActions} for the document can be
304      * checked.
305      * 
306      * @param parameters the parameters which indicate which principal is executing the action
307      *        against which document, as well as additional operations to take against the document,
308      *        such as updating document data
309      * 
310      * @return the result of executing the action, including a view on the updated state of the
311      *         document and related actions
312      * 
313      * @throws RiceIllegalArgumentException if {@code parameters} is null
314      * @throws RiceIllegalArgumentException if no document with the {@code documentId} specified in
315      *         {@code parameters} exists
316      * @throws RiceIllegalArgumentException if no principal with the {@code principalId} specified
317      *         in {@code parameters} exists
318      * @throws InvalidDocumentContentException if the document content on the
319      *         {@link DocumentContentUpdate} supplied with the {@code parameters} is invalid.
320      * @throws InvalidActionTakenException if the supplied principal is not allowed to execute this
321      *         action
322      */
323     @WebMethod(operationName = "approve")
324     @WebResult(name = "documentActionResult")
325     @XmlElement(name = "documentActionResult", required = true)
326     DocumentActionResult approve(@WebParam(name = "parameters") DocumentActionParameters parameters)
327             throws RiceIllegalArgumentException, InvalidDocumentContentException, InvalidActionTakenException;
328 
329     /**
330      * Executes an {@link ActionType#ADHOC_REQUEST} action for the given principal and document
331      * specified in the supplied parameters to create an ad hoc action request to the target
332      * principal specified in the {@code AdHocToPrincipal}.
333      * 
334      * <p>
335      * Operates as per {@link #adHocToGroup(DocumentActionParameters, AdHocToGroup)} with the
336      * exception that this method is used to send an adhoc request to principal instead of a group.
337      * 
338      * <p>
339      * Besides this difference, the same rules that are in play for sending ad hoc requests to group
340      * apply for sending ad hoc requests to principals.
341      * 
342      * @param parameters the parameters which indicate which principal is executing the action
343      *        against which document, as well as additional operations to take against the document,
344      *        such as updating document data
345      * @param adHocToPrincipal defines various pieces of information that informs what type of ad
346      *        hoc request should be created
347      * 
348      * @return the result of executing the action, including a view on the updated state of the
349      *         document and related actions
350      * 
351      * @throws RiceIllegalArgumentException if {@code parameters} is null
352      * @throws RiceIllegalArgumentException if {@code adHocToPrincipal} is null
353      * @throws RiceIllegalArgumentException if no document with the {@code documentId} specified in
354      *         {@code parameters} exists
355      * @throws RiceIllegalArgumentException if no principal with the {@code principalId} specified
356      *         in {@code parameters} exists
357      * @throws InvalidDocumentContentException if the document content on the
358      *         {@link DocumentContentUpdate} supplied with the {@code parameters} is invalid.
359      * @throws InvalidActionTakenException if the supplied principal is not allowed to execute this
360      *         action
361      * @throws InvalidActionTakenException if the target principal is not permitted to receive ad
362      *         hoc requests on documents of this type
363      * @throws InvalidActionTakenException if the specified ad hoc request cannot be generated
364      *         because the current state of the document would result in an illegal request being
365      *         generated
366      * 
367      * @see #adHocToGroup(DocumentActionParameters, AdHocToGroup)
368      */
369     @WebMethod(operationName = "adHocToPrincipal")
370     @WebResult(name = "documentActionResult")
371     @XmlElement(name = "documentActionResult", required = true)
372     DocumentActionResult adHocToPrincipal(
373             @WebParam(name = "parameters") DocumentActionParameters parameters,
374             @WebParam(name = "adHocToPrincipal") AdHocToPrincipal adHocToPrincipal)
375             throws RiceIllegalArgumentException, InvalidDocumentContentException, InvalidActionTakenException;
376 
377     /**
378      * Executes an {@link ActionType#ADHOC_REQUEST} action for the given group and document
379      * specified in the supplied parameters to create an ad hoc action request to the target group
380      * specified in the {@code AdHocToGroup}. The {@code AdHocToGroup} contains additional
381      * information on how the ad hoc action request should be created, including the type of request
382      * to generate, at which node it should generated, etc.
383      * 
384      * <p>
385      * The policy for how ad hoc actions handle request generation and interact with the workflow
386      * engine is different depending on the state of the document when the request to generate the
387      * ad hoc is submitted. There are also different scenarios under which certain types of ad hoc
388      * actions are allowed to be executed (throwing {@link InvalidActionTakenException} in
389      * situations where the actions are not permitted). The rules are defined as follows:
390      * 
391      * <ol>
392      * <li>If the status of the document is {@link DocumentStatus#INITIATED} then the action request
393      * will be generated with a status of {@link ActionRequestStatus#INITIALIZED} and no processing
394      * directives will be submitted to the workflow engine. When the document is routed, these ad
395      * hoc requests will get activated</li>
396      * <li>If the ad hoc request being created is an {@link ActionRequestType#COMPLETE} or
397      * {@link ActionRequestType#APPROVE} and the document is in a "terminal" state (either
398      * {@link DocumentStatus#CANCELED}, {@link DocumentStatus#DISAPPROVED},
399      * {@link DocumentStatus#PROCESSED}, {@link DocumentStatus#FINAL}) or is in
400      * {@link DocumentStatus#EXCEPTION} status, then an {@link InvalidActionTakenException} will be
401      * thrown. This is because submitting such an action with a document in that state would result
402      * in creation of an illegal action request.</li>
403      * <li>If the document is in a "terminal" state (see above for definition) then the request will
404      * be immediately (and synchronously) activated.</li>
405      * <li>Otherwise, after creating the ad hoc request it will be in the
406      * {@link ActionRequestStatus#INITIALIZED} status, and the document will be immediately
407      * forwarded to the workflow engine for processing at which point the ad hoc request will
408      * activated at the appropriate time.</li>
409      * </ol>
410      * 
411      * <p>
412      * Unlink other actions, ad hoc actions don't result in the recording of an {@link ActionTaken}
413      * against the document. Instead, only the requested ad hoc {@link ActionRequest} is created.
414      * 
415      * @param parameters the parameters which indicate which principal is executing the action
416      *        against which document, as well as additional operations to take against the document,
417      *        such as updating document data
418      * @param adHocToGroup defines various pieces of information that informs what type of ad hoc
419      *        request should be created
420      * 
421      * @return the result of executing the action, including a view on the updated state of the
422      *         document and related actions
423      * 
424      * @throws RiceIllegalArgumentException if {@code parameters} is null
425      * @throws RiceIllegalArgumentException if {@code adHocToGroup} is null
426      * @throws RiceIllegalArgumentException if no document with the {@code documentId} specified in
427      *         {@code parameters} exists
428      * @throws RiceIllegalArgumentException if no principal with the {@code principalId} specified
429      *         in {@code parameters} exists
430      * @throws InvalidDocumentContentException if the document content on the
431      *         {@link DocumentContentUpdate} supplied with the {@code parameters} is invalid.
432      * @throws InvalidActionTakenException if the supplied principals i is not allowed to execute
433      *         this action
434      * @throws InvalidActionTakenException if any of the principals in the target group are not
435      *         permitted to receive ad hoc requests on documents of this type
436      * @throws InvalidActionTakenException if the specified ad hoc request cannot be generated
437      *         because the current state of the document would result in an illegal request being
438      *         generated
439      */
440     @WebMethod(operationName = "adHocToGroup")
441     @WebResult(name = "documentActionResult")
442     @XmlElement(name = "documentActionResult", required = true)
443     DocumentActionResult adHocToGroup(
444             @WebParam(name = "parameters") DocumentActionParameters parameters,
445             @WebParam(name = "adHocToGroup") AdHocToGroup adHocToGroup)
446             throws RiceIllegalArgumentException, InvalidDocumentContentException, InvalidActionTakenException;
447 
448     /**
449      * Executes an {@link ActionType#ADHOC_REQUEST_REVOKE} action for the given principal and
450      * document specified in the supplied parameters against the action request with the given id.
451      * The process of revoking an ad hoc request simply deactivates the request associating the
452      * generated {@link ActionTaken} of the revoke action with the deactivated request (this allows
453      * for it to be determined what caused the ad hoc request to be deactivated). As with other
454      * actions, this action taken is then recorded with the document.
455      * 
456      * @param parameters the parameters which indicate which principal is executing the action
457      *        against which document, as well as additional operations to take against the document,
458      *        such as updating document data
459      * @param actionRequestId the id of the action request to revoke
460      * 
461      * @return the result of executing the action, including a view on the updated state of the
462      *         document and related actions
463      * 
464      * @throws RiceIllegalArgumentException if {@code parameters} is null
465      * @throws RiceIllegalArgumentException if {@code actionRequestId} is null or blank
466      * @throws RiceIllegalArgumentException if no document with the {@code documentId} specified in
467      *         {@code parameters} exists
468      * @throws RiceIllegalArgumentException if no principal with the {@code principalId} specified
469      *         in {@code parameters} exists
470      * @throws InvalidDocumentContentException if the document content on the
471      *         {@link DocumentContentUpdate} supplied with the {@code parameters} is invalid.
472      * @throws InvalidActionTakenException if the supplied principal is not allowed to execute this
473      *         action
474      * @throws InvalidActionTakenException if a pending ad hoc request with the given
475      *         {@code actionRequestId} does not exist on the specified document, this could mean
476      *         that the action request id is invalid, or that the action request has already been
477      *         deactivated and is no longer pending
478      */
479     @WebMethod(operationName = "revokeAdHocRequestById")
480     @WebResult(name = "documentActionResult")
481     @XmlElement(name = "documentActionResult", required = true)
482     DocumentActionResult revokeAdHocRequestById(
483             @WebParam(name = "parameters") DocumentActionParameters parameters,
484             @WebParam(name = "actionRequestId") String actionRequestId)
485             throws RiceIllegalArgumentException, InvalidDocumentContentException, InvalidActionTakenException;
486 
487     /**
488      * Executes an {@link ActionType#ADHOC_REQUEST_REVOKE} action which revokes all pending ad hoc
489      * action requests that match the supplied {@link AdHocRevoke} criteria for the given principal
490      * and document specified in the supplied parameters. The process of revoking an ad hoc requests
491      * simply deactivates all ad hoc requests that match the given {@code AdHocRevoke} criteria,
492      * associating the generated {@link ActionTaken} of the revoke action with the deactivated
493      * requests (this allows for it to be determined what caused the ad hoc request to be
494      * deactivated). As with other actions, this action taken is then recorded with the document.
495      * 
496      * <p>
497      * It's possible that the given ad hoc revoke command will match no action requests on the
498      * document, in which case this method will complete successfully but no requests will be
499      * deactivated.
500      * 
501      * @param parameters the parameters which indicate which principal is executing the action
502      *        against which document, as well as additional operations to take against the document,
503      *        such as updating document data
504      * @param revoke the criteria for matching ad hoc action requests on the specified document that
505      *        should be revoked
506      * 
507      * @return the result of executing the action, including a view on the updated state of the
508      *         document and related actions
509      * 
510      * @throws RiceIllegalArgumentException if {@code parameters} is null
511      * @throws RiceIllegalArgumentException if {@code revoke} is null
512      * @throws RiceIllegalArgumentException if no document with the {@code documentId} specified in
513      *         {@code parameters} exists
514      * @throws RiceIllegalArgumentException if no principal with the {@code principalId} specified
515      *         in {@code parameters} exists
516      * @throws InvalidDocumentContentException if the document content on the
517      *         {@link DocumentContentUpdate} supplied with the {@code parameters} is invalid.
518      * @throws InvalidActionTakenException if the supplied principal is not allowed to execute this
519      *         action
520      */
521     @WebMethod(operationName = "revokeAdHocRequests")
522     @WebResult(name = "documentActionResult")
523     @XmlElement(name = "documentActionResult", required = true)
524     DocumentActionResult revokeAdHocRequests(
525             @WebParam(name = "parameters") DocumentActionParameters parameters,
526             @WebParam(name = "revoke") AdHocRevoke revoke)
527             throws RiceIllegalArgumentException, InvalidDocumentContentException, InvalidActionTakenException;
528 
529     /**
530      * Executes an {@link ActionType#ADHOC_REQUEST_REVOKE} action which revokes all pending ad hoc
531      * action requests for the given principal and document specified in the supplied parameters.
532      * This process of revoking all ad hoc requests will simply deactivate all ad hoc requests on
533      * the specified document, associating the generated {@link ActionTaken} of the revoke action
534      * with the deactivated requests (this allows for it to be determined what caused the ad hoc
535      * request to be deactivated). As with other actions, this action taken is then recorded with
536      * the document.
537      * 
538      * <p>
539      * It's possible that the specified document will have no pending adhoc requests, in which case
540      * this method will complete successfully but no requests will be deactivated.
541      * 
542      * @param parameters the parameters which indicate which principal is executing the action
543      *        against which document, as well as additional operations to take against the document,
544      *        such as updating document data
545      * 
546      * @return the result of executing the action, including a view on the updated state of the
547      *         document and related actions
548      * 
549      * @throws RiceIllegalArgumentException if {@code parameters} is null
550      * @throws RiceIllegalArgumentException if no document with the {@code documentId} specified in
551      *         {@code parameters} exists
552      * @throws RiceIllegalArgumentException if no principal with the {@code principalId} specified
553      *         in {@code parameters} exists
554      * @throws InvalidDocumentContentException if the document content on the
555      *         {@link DocumentContentUpdate} supplied with the {@code parameters} is invalid.
556      * @throws InvalidActionTakenException if the supplied principal is not allowed to execute this
557      *         action
558      */
559     @WebMethod(operationName = "revokeAllAdHocRequests")
560     @WebResult(name = "documentActionResult")
561     @XmlElement(name = "documentActionResult", required = true)
562     DocumentActionResult revokeAllAdHocRequests(@WebParam(name = "parameters") DocumentActionParameters parameters)
563             throws RiceIllegalArgumentException, InvalidDocumentContentException, InvalidActionTakenException;
564 
565     /**
566      * Executes a {@link ActionType#CANCEL} action for the given principal and document specified in
567      * the supplied parameters. When a principal cancels a document, all pending action requests on
568      * the document are deactivated and the the principal's action will be recorded on the document
569      * as an {@link ActionTaken}. Additionally, the document will be (synchronously) transitioned to
570      * the {@link DocumentStatus#CANCELED} status.
571      * 
572      * <p>
573      * In order to cancel a document, the principal must have permission to cancel documents of the
574      * appropriate type, and one of the following must hold true:
575      * 
576      * <ol>
577      * <li>The document must have a status of {@link DocumentStatus#INITIATED} <strong>or</strong></li>
578      * <li>The document must have a status of {@link DocumentStatus#SAVED} <strong>or</strong></li>
579      * <li>The principal must have a pending "complete" or "approve" request on the document.
580      * 
581      * @param parameters the parameters which indicate which principal is executing the action
582      *        against which document, as well as additional operations to take against the document,
583      *        such as updating document data
584      * 
585      * @return the result of executing the action, including a view on the updated state of the
586      *         document and related actions
587      * 
588      * @throws RiceIllegalArgumentException if {@code parameters} is null
589      * @throws RiceIllegalArgumentException if no document with the {@code documentId} specified in
590      *         {@code parameters} exists
591      * @throws RiceIllegalArgumentException if no principal with the {@code principalId} specified
592      *         in {@code parameters} exists
593      * @throws InvalidDocumentContentException if the document content on the
594      *         {@link DocumentContentUpdate} supplied with the {@code parameters} is invalid.
595      * @throws InvalidActionTakenException if the supplied principal is not allowed to execute this
596      *         action
597      */
598     @WebMethod(operationName = "cancel")
599     @WebResult(name = "documentActionResult")
600     @XmlElement(name = "documentActionResult", required = true)
601     DocumentActionResult cancel(@WebParam(name = "parameters") DocumentActionParameters parameters)
602             throws RiceIllegalArgumentException, InvalidDocumentContentException, InvalidActionTakenException;
603 
604     /**
605      * Executes an {@link ActionType#FYI} action for the given principal and document specified in
606      * the supplied parameters. When a principal clears fyis on a document, any of the principal's
607      * pending fyis will be satisfied by the principal's action. The principal's action should be
608      * recorded with the document as an {@link ActionTaken}.
609      * 
610      * <p>
611      * Depending on document type policy, a pending fyi request may have to exist on the document in
612      * order for the principal to take this action. Otherwise an {@link InvalidActionTakenException}
613      * may be thrown. In order to determine if an fyi action is valid, the {@link ValidActions} or
614      * {@link RequestedActions} for the document can be checked.
615      * 
616      * @param parameters the parameters which indicate which principal is executing the action
617      *        against which document, as well as additional operations to take against the document,
618      *        such as updating document data
619      * 
620      * @return the result of executing the action, including a view on the updated state of the
621      *         document and related actions
622      * 
623      * @throws RiceIllegalArgumentException if {@code parameters} is null
624      * @throws RiceIllegalArgumentException if no document with the {@code documentId} specified in
625      *         {@code parameters} exists
626      * @throws RiceIllegalArgumentException if no principal with the {@code principalId} specified
627      *         in {@code parameters} exists
628      * @throws InvalidDocumentContentException if the document content on the
629      *         {@link DocumentContentUpdate} supplied with the {@code parameters} is invalid.
630      * @throws InvalidActionTakenException if the supplied principal is not allowed to execute this
631      *         action
632      */
633     @WebMethod(operationName = "clearFyi")
634     @WebResult(name = "documentActionResult")
635     @XmlElement(name = "documentActionResult", required = true)
636     DocumentActionResult clearFyi(@WebParam(name = "parameters") DocumentActionParameters parameters)
637             throws RiceIllegalArgumentException, InvalidDocumentContentException, InvalidActionTakenException;
638 
639     /**
640      * Executes an {@link ActionType#COMPLETE} action for the given principal and document specified
641      * in the supplied parameters. When a principal completes a document, any of the principal's
642      * pending action requests at or below the complete level (which includes approve, acknowledge,
643      * and fyi requests as well) will be satisfied by the principal's action. The principal's action
644      * should be recorded with the document as an {@link ActionTaken}.
645      * 
646      * <p>
647      * Depending on document type policy, a pending action request at or below the complete level
648      * may have to exist on the document in order for the principal to take this action. Otherwise
649      * an {@link InvalidActionTakenException} may be thrown. In order to determine if an complete
650      * action is valid, the {@link ValidActions} or {@link RequestedActions} for the document can be
651      * checked.
652      * 
653      * @param parameters the parameters which indicate which principal is executing the action
654      *        against which document, as well as additional operations to take against the document,
655      *        such as updating document data
656      * 
657      * @return the result of executing the action, including a view on the updated state of the
658      *         document and related actions
659      * 
660      * @throws RiceIllegalArgumentException if {@code parameters} is null
661      * @throws RiceIllegalArgumentException if no document with the {@code documentId} specified in
662      *         {@code parameters} exists
663      * @throws RiceIllegalArgumentException if no principal with the {@code principalId} specified
664      *         in {@code parameters} exists
665      * @throws InvalidDocumentContentException if the document content on the
666      *         {@link DocumentContentUpdate} supplied with the {@code parameters} is invalid.
667      * @throws InvalidActionTakenException if the supplied principal is not allowed to execute this
668      *         action
669      */
670     @WebMethod(operationName = "complete")
671     @WebResult(name = "documentActionResult")
672     @XmlElement(name = "documentActionResult", required = true)
673     DocumentActionResult complete(@WebParam(name = "parameters") DocumentActionParameters parameters)
674             throws RiceIllegalArgumentException, InvalidDocumentContentException, InvalidActionTakenException;
675 
676     /**
677      * Executes a {@link ActionType#DISAPPROVE} action for the given principal and document
678      * specified in the supplied parameters. When a principal disapproves a document, all pending
679      * action requests on the document are deactivated and the the principal's action will be
680      * recorded on the document as an {@link ActionTaken}. Additionally, the document will be
681      * (synchronously) transitioned to the {@link DocumentStatus#DISAPPROVED} status.
682      * 
683      * <p>
684      * Depending on document type policy and configuration, notifications may be sent to past
685      * approvers of the document. By default, an "acknowledge" request will be sent to each
686      * principal who took an "approve" or "complete" action on the document previously.
687      * 
688      * <p>
689      * In order to disapprove a document, the principal must have a pending approve or complete
690      * request on the document.
691      * 
692      * @param parameters the parameters which indicate which principal is executing the action
693      *        against which document, as well as additional operations to take against the document,
694      *        such as updating document data
695      * 
696      * @return the result of executing the action, including a view on the updated state of the
697      *         document and related actions
698      * 
699      * @throws RiceIllegalArgumentException if {@code parameters} is null
700      * @throws RiceIllegalArgumentException if no document with the {@code documentId} specified in
701      *         {@code parameters} exists
702      * @throws RiceIllegalArgumentException if no principal with the {@code principalId} specified
703      *         in {@code parameters} exists
704      * @throws InvalidDocumentContentException if the document content on the
705      *         {@link DocumentContentUpdate} supplied with the {@code parameters} is invalid.
706      * @throws InvalidActionTakenException if the supplied principal is not allowed to execute this
707      *         action
708      */
709     @WebMethod(operationName = "disapprove")
710     @WebResult(name = "documentActionResult")
711     @XmlElement(name = "documentActionResult", required = true)
712     DocumentActionResult disapprove(@WebParam(name = "parameters") DocumentActionParameters parameters)
713             throws RiceIllegalArgumentException, InvalidDocumentContentException, InvalidActionTakenException;
714 
715     /**
716      * Submits a document that is in either the "initiated" or "saved" state to the workflow engine
717      * for processing. The route action triggers the beginning of the routing process and
718      * (synchronously) switches the status of the document to {@link DocumentStatus#ENROUTE}. It
719      * then queues up a request to the workflow engine to process the document.
720      * 
721      * <p>
722      * When the route action is executed, an {@link ActionType#COMPLETE} action is recorded on the
723      * document for the principal who executed the route action. At this point in time, any action
724      * requests that are currently on the document in an "initialized" state will be activated.
725      * Requests of this nature can commonly exist if ad hoc requests have been attached to the
726      * document prior to execution of the route action.
727      * 
728      * <p>
729      * By default, the principal who initiated the document is the same principal who must submit
730      * the route command. However, a document type policy can be set which will relax this
731      * constraint.
732      * 
733      * <p>
734      * The route action should ideally only ever be executed once for a given document. Depending on
735      * document type policy, attempting to execute a "route" action against a document which is
736      * already enroute or in a terminal state may result in an {@link InvalidActionTakenException}
737      * being thrown.
738      * 
739      * @param parameters the parameters which indicate which principal is executing the action
740      *        against which document, as well as additional operations to take against the document,
741      *        such as updating document data
742      * 
743      * @return the result of executing the action, including a view on the updated state of the
744      *         document and related actions
745      * 
746      * @throws RiceIllegalArgumentException if {@code parameters} is null
747      * @throws RiceIllegalArgumentException if no document with the {@code documentId} specified in
748      *         {@code parameters} exists
749      * @throws RiceIllegalArgumentException if no principal with the {@code principalId} specified
750      *         in {@code parameters} exists
751      * @throws InvalidDocumentContentException if the document content on the
752      *         {@link DocumentContentUpdate} supplied with the {@code parameters} is invalid.
753      * @throws InvalidActionTakenException if the supplied principal is not allowed to execute this
754      *         action
755      */
756     @WebMethod(operationName = "route")
757     @WebResult(name = "documentActionResult")
758     @XmlElement(name = "documentActionResult", required = true)
759     DocumentActionResult route(@WebParam(name = "parameters") DocumentActionParameters parameters)
760             throws RiceIllegalArgumentException, InvalidDocumentContentException, InvalidActionTakenException;
761 
762     /**
763      * Triggers the execution of a full {@link ActionType#BLANKET_APPROVE} action for the given
764      * principal and document specified in the supplied parameters. Blanket approval will
765      * orchestrate a document from it's current node all the way to the end of the document's
766      * workflow process. During this process, it will automatically act on all "approve" and
767      * "complete" requests, effectively bypassing them. When it does this, it will notify the
768      * original recipients of these requests by routing acknowledge requests to them.
769      * 
770      * <p>
771      * Blanket approve processing is handled by a special mode of the workflow engine which runs the
772      * document through it's full processing lifecycle, ensuring that it makes it's way to the end
773      * of it's route path (by bypassing any steps that would cause the process to halt, such as
774      * approval requests). Because of this nature, blanket approve processing behavior is governed
775      * by the same configuration as the rest of the workflow engine. So depending on whether the
776      * engine is configured or synchronous or asynchronous operation, the blanket approve processing
777      * will behave in the same manner.
778      * 
779      * <p>
780      * In order to execute a blanket approve operation, the principal must have permissions to do
781      * so.
782      * 
783      * @param parameters the parameters which indicate which principal is executing the action
784      *        against which document, as well as additional operations to take against the document,
785      *        such as updating document data
786      * 
787      * @return the result of executing the action, including a view on the updated state of the
788      *         document and related actions
789      * 
790      * @throws RiceIllegalArgumentException if {@code parameters} is null
791      * @throws RiceIllegalArgumentException if no document with the {@code documentId} specified in
792      *         {@code parameters} exists
793      * @throws RiceIllegalArgumentException if no principal with the {@code principalId} specified
794      *         in {@code parameters} exists
795      * @throws InvalidDocumentContentException if the document content on the
796      *         {@link DocumentContentUpdate} supplied with the {@code parameters} is invalid.
797      * @throws InvalidActionTakenException if the supplied principal is not allowed to execute this
798      *         action
799      */
800     @WebMethod(operationName = "blanketApprove")
801     @WebResult(name = "documentActionResult")
802     @XmlElement(name = "documentActionResult", required = true)
803     DocumentActionResult blanketApprove(@WebParam(name = "parameters") DocumentActionParameters parameters)
804             throws RiceIllegalArgumentException, InvalidDocumentContentException, InvalidActionTakenException;
805 
806     /**
807      * Triggers the execution of a {@link ActionType#BLANKET_APPROVE} action which orchestrates the
808      * document to the given set of node names for the given principal and document specified in the
809      * supplied parameters. This method functions the same as
810      * {@link #blanketApprove(DocumentActionParameters)} with the exception that the blanket approve
811      * process will be halted once all node names in the given set have been reached.
812      * 
813      * <p>
814      * If null or an empty set is passed for {@code nodeNames} on this method, it's behavior will be
815      * equivalent to {@link #blanketApprove(DocumentActionParameters)}.
816      * 
817      * @param parameters the parameters which indicate which principal is executing the action
818      *        against which document, as well as additional operations to take against the document,
819      *        such as updating document data
820      * @param nodeNames a set of node names to which to blanket approve the given document
821      * 
822      * @return the result of executing the action, including a view on the updated state of the
823      *         document and related actions
824      * 
825      * @throws RiceIllegalArgumentException if {@code parameters} is null
826      * @throws RiceIllegalArgumentException if no document with the {@code documentId} specified in
827      *         {@code parameters} exists
828      * @throws RiceIllegalArgumentException if no principal with the {@code principalId} specified
829      *         in {@code parameters} exists
830      * @throws InvalidDocumentContentException if the document content on the
831      *         {@link DocumentContentUpdate} supplied with the {@code parameters} is invalid.
832      * @throws InvalidActionTakenException if the supplied principal is not allowed to execute this
833      *         action
834      */
835     @WebMethod(operationName = "blanketApproveToNodes")
836     @WebResult(name = "documentActionResult")
837     @XmlElement(name = "documentActionResult", required = true)
838     DocumentActionResult blanketApproveToNodes(
839             @WebParam(name = "parameters") DocumentActionParameters parameters,
840             @WebParam(name = "nodeName") Set<String> nodeNames)
841             throws RiceIllegalArgumentException, InvalidDocumentContentException, InvalidActionTakenException;
842 
843     /**
844      * Triggers the execution of a {@link ActionType#RETURN_TO_PREVIOUS} action for the given
845      * principal and document specified in the supplied parameters. Return a document to a previous
846      * node will allow for the document to be pushed back to an earlier node in the process based on
847      * the criteria present in the {@link ReturnPoint} that is passed to this method.
848      * 
849      * <p>
850      * The document is synchronously returned to the suggested return point (assuming the desired
851      * return point can be identified for the given document), and then the document will be
852      * submitted to the engine for further processing (effectively, re-establishing the flow of the
853      * document from the target return point).
854      * 
855      * <p>
856      * Return the document to the first node in the document is treated as a special case and,
857      * rather then transitioning the document back to the "initiated" status, will route a
858      * "complete" request to the initiator of the document. The effectively enacts a return to the
859      * document initiator in these cases.
860      * 
861      * @param parameters the parameters which indicate which principal is executing the action
862      *        against which document, as well as additional operations to take against the document,
863      *        such as updating document data
864      * 
865      * @return the result of executing the action, including a view on the updated state of the
866      *         document and related actions
867      * 
868      * @throws RiceIllegalArgumentException if {@code parameters} is null
869      * @throws RiceIllegalArgumentException if no document with the {@code documentId} specified in
870      *         {@code parameters} exists
871      * @throws RiceIllegalArgumentException if no principal with the {@code principalId} specified
872      *         in {@code parameters} exists
873      * @throws InvalidDocumentContentException if the document content on the
874      *         {@link DocumentContentUpdate} supplied with the {@code parameters} is invalid.
875      * @throws InvalidActionTakenException if the supplied principal is not allowed to execute this
876      *         action
877      */
878     @WebMethod(operationName = "returnToPreviousNode")
879     @WebResult(name = "documentActionResult")
880     @XmlElement(name = "documentActionResult", required = true)
881     DocumentActionResult returnToPreviousNode(
882             @WebParam(name = "parameters") DocumentActionParameters parameters,
883             @WebParam(name = "returnPoint") ReturnPoint returnPoint)
884             throws RiceIllegalArgumentException, InvalidDocumentContentException, InvalidActionTakenException;
885 
886 
887     /**
888      * Triggers the execution of a {@link ActionType#MOVE} action for the given
889      * principal and document specified in the supplied parameters. Move a document to a
890      * node will allow for the document to be pushed to a different node in the process based on
891      * the criteria present in the {@link MovePoint} that is passed to this method.
892      *
893      * <p />
894      * The document is synchronously moved to the suggested move point (assuming the desired
895      * move point can be identified for the given document), and then the document will be
896      * submitted to the engine for further processing (effectively, re-establishing the flow of the
897      * document from the target return point).
898      *
899      *
900      * @param parameters the parameters which indicate which principal is executing the action
901      *        against which document, as well as additional operations to take against the document,
902      *        such as updating document data
903      * @param movePoint the point to move the document
904      *
905      * @return the result of executing the action, including a view on the updated state of the
906      *         document and related actions
907      *
908      * @throws RiceIllegalArgumentException if {@code parameters} is null
909      * @throws RiceIllegalArgumentException if no document with the {@code documentId} specified in
910      *         {@code parameters} exists
911      * @throws RiceIllegalArgumentException if no principal with the {@code principalId} specified
912      *         in {@code parameters} exists
913      * @throws InvalidDocumentContentException if the document content on the
914      *         {@link DocumentContentUpdate} supplied with the {@code parameters} is invalid.
915      * @throws InvalidActionTakenException if the supplied principal is not allowed to execute this
916      *         action
917      */
918     @WebMethod(operationName = "move")
919     @WebResult(name = "documentActionResult")
920     @XmlElement(name = "documentActionResult", required = true)
921     DocumentActionResult move(
922             @WebParam(name = "parameters") DocumentActionParameters parameters,
923             @WebParam(name = "movePoint") MovePoint movePoint)
924             throws RiceIllegalArgumentException, InvalidDocumentContentException, InvalidActionTakenException;
925 
926     /**
927      * Triggers the execution of a {@link ActionType#TAKE_GROUP_AUTHORITY} action for the given
928      * principal and document specified in the supplied parameters. Takes authority of a group by a
929      * member of that group.
930      *
931      * @param parameters the parameters which indicate which principal is executing the action
932      *        against which document, as well as additional operations to take against the document,
933      *        such as updating document data
934      * @param groupId the group id to take authority of
935      *
936      * @return the result of executing the action, including a view on the updated state of the
937      *         document and related actions
938      *
939      * @throws RiceIllegalArgumentException if {@code parameters} is null
940      * @throws RiceIllegalArgumentException if no document with the {@code documentId} specified in
941      *         {@code parameters} exists
942      * @throws RiceIllegalArgumentException if no principal with the {@code principalId} specified
943      *         in {@code parameters} exists
944      * @throws InvalidDocumentContentException if the document content on the
945      *         {@link DocumentContentUpdate} supplied with the {@code parameters} is invalid.
946      * @throws InvalidActionTakenException if the supplied principal is not allowed to execute this
947      *         action
948      */
949     @WebMethod(operationName = "takeGroupAuthority")
950     @WebResult(name = "documentActionResult")
951     @XmlElement(name = "documentActionResult", required = true)
952     DocumentActionResult takeGroupAuthority(
953             @WebParam(name = "parameters") DocumentActionParameters parameters,
954             @WebParam(name = "groupId") String groupId)
955             throws RiceIllegalArgumentException, InvalidDocumentContentException, InvalidActionTakenException;
956 
957     /**
958      * Triggers the execution of a {@link ActionType#RELEASE_GROUP_AUTHORITY} action for the given
959      * principal and document specified in the supplied parameters. Releases authority of a group by a
960      * member of that group.
961      *
962      * @param parameters the parameters which indicate which principal is executing the action
963      *        against which document, as well as additional operations to take against the document,
964      *        such as updating document data
965      * @param groupId the group id to take authority of
966      *
967      * @return the result of executing the action, including a view on the updated state of the
968      *         document and related actions
969      *
970      * @throws RiceIllegalArgumentException if {@code parameters} is null
971      * @throws RiceIllegalArgumentException if no document with the {@code documentId} specified in
972      *         {@code parameters} exists
973      * @throws RiceIllegalArgumentException if no principal with the {@code principalId} specified
974      *         in {@code parameters} exists
975      * @throws InvalidDocumentContentException if the document content on the
976      *         {@link DocumentContentUpdate} supplied with the {@code parameters} is invalid.
977      * @throws InvalidActionTakenException if the supplied principal is not allowed to execute this
978      *         action
979      */
980     @WebMethod(operationName = "releaseGroupAuthority")
981     @WebResult(name = "documentActionResult")
982     @XmlElement(name = "documentActionResult", required = true)
983     DocumentActionResult releaseGroupAuthority(
984             @WebParam(name = "parameters") DocumentActionParameters parameters,
985             @WebParam(name = "groupId") String groupId)
986             throws RiceIllegalArgumentException, InvalidDocumentContentException, InvalidActionTakenException;
987 
988     /**
989      * Triggers the execution of a {@link ActionType#SAVE} action for the given
990      * principal and document specified in the supplied parameters. Saves a document to a
991      * at the current point.
992      *
993      * @param parameters the parameters which indicate which principal is executing the action
994      *        against which document, as well as additional operations to take against the document,
995      *        such as updating document data
996      *
997      * @return the result of executing the action, including a view on the updated state of the
998      *         document and related actions
999      *
1000      * @throws RiceIllegalArgumentException if {@code parameters} is null
1001      * @throws RiceIllegalArgumentException if no document with the {@code documentId} specified in
1002      *         {@code parameters} exists
1003      * @throws RiceIllegalArgumentException if no principal with the {@code principalId} specified
1004      *         in {@code parameters} exists
1005      * @throws InvalidDocumentContentException if the document content on the
1006      *         {@link DocumentContentUpdate} supplied with the {@code parameters} is invalid.
1007      * @throws InvalidActionTakenException if the supplied principal is not allowed to execute this
1008      *         action
1009      */
1010     @WebMethod(operationName = "save")
1011     @WebResult(name = "documentActionResult")
1012     @XmlElement(name = "documentActionResult", required = true)
1013     DocumentActionResult save(@WebParam(name = "parameters") DocumentActionParameters parameters)
1014             throws RiceIllegalArgumentException, InvalidDocumentContentException, InvalidActionTakenException;
1015 
1016     /**
1017      * Triggers the execution of a {@link ActionType#SAVE} action for the given
1018      * principal and document specified in the supplied parameters. Saves the current document data for
1019      * the document.  Note that passing an annotation to this will have no effect because it is not
1020      * recorded in the route log
1021      *
1022      * @param parameters the parameters which indicate which principal is executing the action
1023      *        against which document, as well as additional operations to take against the document,
1024      *        such as updating document data
1025      *
1026      * @return the result of executing the action, including a view on the updated state of the
1027      *         document and related actions
1028      *
1029      * @throws RiceIllegalArgumentException if {@code parameters} is null
1030      * @throws RiceIllegalArgumentException if no document with the {@code documentId} specified in
1031      *         {@code parameters} exists
1032      * @throws RiceIllegalArgumentException if no principal with the {@code principalId} specified
1033      *         in {@code parameters} exists
1034      * @throws InvalidDocumentContentException if the document content on the
1035      *         {@link DocumentContentUpdate} supplied with the {@code parameters} is invalid.
1036      * @throws InvalidActionTakenException if the supplied principal is not allowed to execute this
1037      *         action
1038      */
1039     @WebMethod(operationName = "saveDocumentData")
1040     @WebResult(name = "documentActionResult")
1041     @XmlElement(name = "documentActionResult", required = true)
1042     DocumentActionResult saveDocumentData(@WebParam(name = "parameters") DocumentActionParameters parameters)
1043             throws RiceIllegalArgumentException, InvalidDocumentContentException, InvalidActionTakenException;
1044 
1045     /**
1046      * Deletes the document.
1047      *
1048      * @param documentId the unique id of the document to delete
1049      * @param principalId
1050      *
1051      * @return the document that was removed from the system
1052      *
1053      * @throws RiceIllegalArgumentException if {@code documentId} is null
1054      * @throws RiceIllegalArgumentException if {@code principalId} is null
1055      * @throws RiceIllegalArgumentException if no document with the {@code documentId} exists
1056      * @throws InvalidActionTakenException if the supplied principal is not allowed to execute this
1057      *         action
1058      */
1059     @WebMethod(operationName = "delete")
1060     @WebResult(name = "document")
1061     @XmlElement(name = "document", required = true)
1062     Document delete(
1063             @WebParam(name = "documentId") String documentId,
1064             @WebParam(name = "principalId") String principalId)
1065             throws RiceIllegalArgumentException, InvalidActionTakenException;
1066 
1067     /**
1068      * Records the non-routed document action. - Checks to make sure the document status
1069      * allows the action. Records the action.
1070      *
1071      * @param documentId the unique id of the document to delete
1072      * @param principalId
1073      *
1074      * @return the document that was removed from the system
1075      *
1076      * @throws RiceIllegalArgumentException if {@code documentId} is null
1077      * @throws RiceIllegalArgumentException if {@code principalId} is null
1078      * @throws RiceIllegalArgumentException if {@code annotation} is null
1079      * @throws RiceIllegalArgumentException if no document with the {@code documentId} exists
1080      * @throws InvalidActionTakenException if the supplied principal is not allowed to execute this
1081      *         action
1082      */
1083     @WebMethod(operationName = "logAnnotation")
1084     void logAnnotation(
1085             @WebParam(name = "documentId") String documentId,
1086             @WebParam(name = "principalId") String principalId,
1087             @WebParam(name = "annotation") String annotation)
1088             throws RiceIllegalArgumentException, InvalidActionTakenException;
1089 
1090     // TODO  finish javadoc
1091     /**
1092      *
1093      *
1094      * @param documentId the unique id of the document to delete
1095      *
1096      * @throws RiceIllegalArgumentException if {@code documentId} is null
1097      */
1098     @WebMethod(operationName = "initiateIndexing")
1099     void initiateIndexing(@WebParam(name = "documentId") String documentId)
1100             throws RiceIllegalArgumentException;
1101 
1102 
1103     /**
1104      * Triggers the execution of a {@link ActionType#SU_BLANKET_APPROVE} action for the given
1105      * principal and document specified in the supplied parameters. Does a blanket approve for a super user
1106      * and runs post-processing depending on {@code executePostProcessor}
1107      *
1108      * @param parameters the parameters which indicate which principal is executing the action
1109      *        against which document, as well as additional operations to take against the document,
1110      *        such as updating document data
1111      * @param executePostProcessor boolean value determining if the post-processor should be run or not
1112      *
1113      * @return the result of executing the action, including a view on the updated state of the
1114      *         document and related actions
1115      *
1116      * @throws RiceIllegalArgumentException if {@code parameters} is null
1117      * @throws RiceIllegalArgumentException if no document with the {@code documentId} specified in
1118      *         {@code parameters} exists
1119      * @throws RiceIllegalArgumentException if no principal with the {@code principalId} specified
1120      *         in {@code parameters} exists
1121      * @throws InvalidDocumentContentException if the document content on the
1122      *         {@link DocumentContentUpdate} supplied with the {@code parameters} is invalid.
1123      * @throws InvalidActionTakenException if the supplied principal is not allowed to execute this
1124      *         action
1125      */
1126     @WebMethod(operationName = "superUserBlanketApprove")
1127     @WebResult(name = "documentActionResult")
1128     @XmlElement(name = "documentActionResult", required = true)
1129     DocumentActionResult superUserBlanketApprove(
1130             @WebParam(name = "parameters") DocumentActionParameters parameters,
1131             @WebParam(name = "executePostProcessor") boolean executePostProcessor)
1132             throws RiceIllegalArgumentException, InvalidDocumentContentException, InvalidActionTakenException;
1133 
1134     /**
1135      * Triggers the execution of a {@link ActionType#SU_APPROVE} action for the given
1136      * principal and document specified in the supplied parameters. Does an approve for a super user
1137      * on a node and runs post-processing depending on {@code executePostProcessor}
1138      *
1139      * @param parameters the parameters which indicate which principal is executing the action
1140      *        against which document, as well as additional operations to take against the document,
1141      *        such as updating document data
1142      * @param executePostProcessor boolean value determining if the post-processor should be run or not
1143      *
1144      * @return the result of executing the action, including a view on the updated state of the
1145      *         document and related actions
1146      *
1147      * @throws RiceIllegalArgumentException if {@code parameters} is null
1148      * @throws RiceIllegalArgumentException if no document with the {@code documentId} specified in
1149      *         {@code parameters} exists
1150      * @throws RiceIllegalArgumentException if no principal with the {@code principalId} specified
1151      *         in {@code parameters} exists
1152      * @throws InvalidDocumentContentException if the document content on the
1153      *         {@link DocumentContentUpdate} supplied with the {@code parameters} is invalid.
1154      * @throws InvalidActionTakenException if the supplied principal is not allowed to execute this
1155      *         action
1156      */
1157     @WebMethod(operationName = "superUserNodeApprove")
1158     @WebResult(name = "documentActionResult")
1159     @XmlElement(name = "documentActionResult", required = true)
1160     DocumentActionResult superUserNodeApprove(
1161             @WebParam(name = "parameters") DocumentActionParameters parameters,
1162             @WebParam(name = "executePostProcessor") boolean executePostProcessor,
1163             @WebParam(name = "nodeName") String nodeName)
1164             throws RiceIllegalArgumentException, InvalidDocumentContentException, InvalidActionTakenException;
1165 
1166     /**
1167      * Triggers the execution of a {@link ActionType#SU_APPROVE} action for the given
1168      * actionRequestId and principal and document specified in the supplied parameters. Does an approve for a super user
1169      * on a node and runs post-processing depending on {@code executePostProcessor}
1170      *
1171      * @param parameters the parameters which indicate which principal is executing the action
1172      *        against which document, as well as additional operations to take against the document,
1173      *        such as updating document data
1174      * @param actionRequestId unique Id of an action request to take action on
1175      * @param executePostProcessor boolean value determining if the post-processor should be run or not
1176      *
1177      * @return the result of executing the action, including a view on the updated state of the
1178      *         document and related actions
1179      *
1180      * @throws RiceIllegalArgumentException if {@code parameters} is null
1181      * @throws RiceIllegalArgumentException if (@code actionRequestId}
1182      * @throws RiceIllegalArgumentException if no document with the {@code documentId} specified in
1183      *         {@code parameters} exists
1184      * @throws RiceIllegalArgumentException if no principal with the {@code principalId} specified
1185      *         in {@code parameters} exists
1186      * @throws InvalidDocumentContentException if the document content on the
1187      *         {@link DocumentContentUpdate} supplied with the {@code parameters} is invalid.
1188      * @throws InvalidActionTakenException if the supplied principal is not allowed to execute this
1189      *         action
1190      */
1191     @WebMethod(operationName = "superUserTakeRequestedAction")
1192     @WebResult(name = "documentActionResult")
1193     @XmlElement(name = "documentActionResult", required = true)
1194     DocumentActionResult superUserTakeRequestedAction(
1195             @WebParam(name = "parameters") DocumentActionParameters parameters,
1196             @WebParam(name = "executePostProcessor") boolean executePostProcessor,
1197             @WebParam(name = "actionRequestId") String actionRequestId)
1198             throws RiceIllegalArgumentException, InvalidDocumentContentException, InvalidActionTakenException;
1199 
1200     /**
1201      * Triggers the execution of a {@link ActionType#SU_DISAPPROVE} action for the given
1202      * principal and document specified in the supplied parameters. Does a disapprove for a super user
1203      * on a node and runs post-processing depending on {@code executePostProcessor}
1204      *
1205      * @param parameters the parameters which indicate which principal is executing the action
1206      *        against which document, as well as additional operations to take against the document,
1207      *        such as updating document data
1208      * @param executePostProcessor boolean value determining if the post-processor should be run or not
1209      *
1210      * @return the result of executing the action, including a view on the updated state of the
1211      *         document and related actions
1212      *
1213      * @throws RiceIllegalArgumentException if {@code parameters} is null
1214      * @throws RiceIllegalArgumentException if no document with the {@code documentId} specified in
1215      *         {@code parameters} exists
1216      * @throws RiceIllegalArgumentException if no principal with the {@code principalId} specified
1217      *         in {@code parameters} exists
1218      * @throws InvalidDocumentContentException if the document content on the
1219      *         {@link DocumentContentUpdate} supplied with the {@code parameters} is invalid.
1220      * @throws InvalidActionTakenException if the supplied principal is not allowed to execute this
1221      *         action
1222      */
1223     @WebMethod(operationName = "superUserDisapprove")
1224     @WebResult(name = "documentActionResult")
1225     @XmlElement(name = "documentActionResult", required = true)
1226     DocumentActionResult superUserDisapprove(
1227             @WebParam(name = "parameters") DocumentActionParameters parameters,
1228             @WebParam(name = "executePostProcessor") boolean executePostProcessor)
1229             throws RiceIllegalArgumentException, InvalidDocumentContentException, InvalidActionTakenException;
1230 
1231     /**
1232      * Triggers the execution of a {@link ActionType#SU_CANCEL} action for the given
1233      * principal and document specified in the supplied parameters. Does an cancel for a super user
1234      * on a node and runs post-processing depending on {@code executePostProcessor}
1235      *
1236      * @param parameters the parameters which indicate which principal is executing the action
1237      *        against which document, as well as additional operations to take against the document,
1238      *        such as updating document data
1239      * @param executePostProcessor boolean value determining if the post-processor should be run or not
1240      *
1241      * @return the result of executing the action, including a view on the updated state of the
1242      *         document and related actions
1243      *
1244      * @throws RiceIllegalArgumentException if {@code parameters} is null
1245      * @throws RiceIllegalArgumentException if no document with the {@code documentId} specified in
1246      *         {@code parameters} exists
1247      * @throws RiceIllegalArgumentException if no principal with the {@code principalId} specified
1248      *         in {@code parameters} exists
1249      * @throws InvalidDocumentContentException if the document content on the
1250      *         {@link DocumentContentUpdate} supplied with the {@code parameters} is invalid.
1251      * @throws InvalidActionTakenException if the supplied principal is not allowed to execute this
1252      *         action
1253      */
1254     @WebMethod(operationName = "superUserCancel")
1255     @WebResult(name = "documentActionResult")
1256     @XmlElement(name = "documentActionResult", required = true)
1257     DocumentActionResult superUserCancel(
1258             @WebParam(name = "parameters") DocumentActionParameters parameters,
1259             @WebParam(name = "executePostProcessor") boolean executePostProcessor)
1260             throws RiceIllegalArgumentException, InvalidDocumentContentException, InvalidActionTakenException;
1261 
1262     /**
1263      * Triggers the execution of a {@link ActionType#SU_RETURN_TO_PREVIOUS} action for the given
1264      * principal and document specified in the supplied parameters. Returns the document to the
1265      * previous node for a super user on a node and runs post-processing depending on {@code executePostProcessor}
1266      *
1267      * @param parameters the parameters which indicate which principal is executing the action
1268      *        against which document, as well as additional operations to take against the document,
1269      *        such as updating document data
1270      * @param executePostProcessor boolean value determining if the post-processor should be run or not
1271      * @param returnPoint point to return to
1272      *
1273      * @return the result of executing the action, including a view on the updated state of the
1274      *         document and related actions
1275      *
1276      * @throws RiceIllegalArgumentException if {@code parameters} is null
1277      * @throws RiceIllegalArgumentException if no document with the {@code documentId} specified in
1278      *         {@code parameters} exists
1279      * @throws RiceIllegalArgumentException if no principal with the {@code principalId} specified
1280      *         in {@code parameters} exists
1281      * @throws InvalidDocumentContentException if the document content on the
1282      *         {@link DocumentContentUpdate} supplied with the {@code parameters} is invalid.
1283      * @throws InvalidActionTakenException if the supplied principal is not allowed to execute this
1284      *         action
1285      */
1286     @WebMethod(operationName = "superUserReturnToPreviousNode")
1287     @WebResult(name = "documentActionResult")
1288     @XmlElement(name = "documentActionResult", required = true)
1289     DocumentActionResult superUserReturnToPreviousNode(
1290             @WebParam(name = "parameters") DocumentActionParameters parameters,
1291             @WebParam(name = "executePostProcessor") boolean executePostProcessor,
1292             @WebParam(name = "returnPoint") ReturnPoint returnPoint)
1293             throws RiceIllegalArgumentException, InvalidDocumentContentException, InvalidActionTakenException;
1294 
1295     /**
1296      * Places a document in exception routing or the given principal and document specified in the supplied parameters.
1297      *
1298      * @param parameters the parameters which indicate which principal is executing the action
1299      *        against which document, as well as additional operations to take against the document,
1300      *        such as updating document data
1301      *
1302      * @return the result of executing the action, including a view on the updated state of the
1303      *         document and related actions
1304      *
1305      * @throws RiceIllegalArgumentException if {@code parameters} is null
1306      * @throws RiceIllegalArgumentException if no document with the {@code documentId} specified in
1307      *         {@code parameters} exists
1308      * @throws RiceIllegalArgumentException if no principal with the {@code principalId} specified
1309      *         in {@code parameters} exists
1310      * @throws InvalidDocumentContentException if the document content on the
1311      *         {@link DocumentContentUpdate} supplied with the {@code parameters} is invalid.
1312      * @throws InvalidActionTakenException if the supplied principal is not allowed to execute this
1313      *         action
1314      */
1315     @WebMethod(operationName = "placeInExceptionRouting")
1316     @WebResult(name = "documentActionResult")
1317     @XmlElement(name = "documentActionResult", required = true)
1318     DocumentActionResult placeInExceptionRouting(@WebParam(name = "parameters") DocumentActionParameters parameters)
1319             throws RiceIllegalArgumentException, InvalidDocumentContentException, InvalidActionTakenException;
1320 
1321     /**
1322      * Validates a workflow attribute definition and returns a list of validation errors
1323      *
1324      * @param definition WorkflowAttributeDefinition to validate
1325      *
1326      * @return a list of WorkflowAttributeValidationErrors caused by validation of the passed in {@code definition}
1327      *
1328      * @throws RiceIllegalArgumentException if {@code parameters} is null
1329      * @throws RiceIllegalArgumentException if no document with the {@code documentId} specified in
1330      *         {@code parameters} exists
1331      * @throws RiceIllegalArgumentException if no principal with the {@code principalId} specified
1332      *         in {@code parameters} exists
1333      * @throws InvalidDocumentContentException if the document content on the
1334      *         {@link DocumentContentUpdate} supplied with the {@code parameters} is invalid.
1335      * @throws InvalidActionTakenException if the supplied principal is not allowed to execute this
1336      *         action
1337      */
1338     @WebMethod(operationName = "validateWorkflowAttributeDefinition")
1339     @WebResult(name = "validationErrors")
1340     @XmlElementWrapper(name = "validationErrors", required = true)
1341     @XmlElement(name = "validationError", required = true)
1342     List<WorkflowAttributeValidationError> validateWorkflowAttributeDefinition(
1343             @WebParam(name = "definition") WorkflowAttributeDefinition definition)
1344             throws RiceIllegalArgumentException;
1345 
1346     // TODO add, annotate, and javadoc the following methods to this service
1347     /**
1348      * Determines if a passed in user exists in a document's route log or future route depending on the passed in
1349      * {@code lookFuture} value
1350      *
1351      * @param documentId unique Id of document
1352      * @param principalId unique Id of Principal to look for in document's route log
1353      * @param lookFuture boolean value determines whether or not to look at the future route log
1354      *
1355      * @return boolean value representing if a principal exists in a Document's route log
1356      *
1357      * @throws RiceIllegalArgumentException if {@code documentId} is null
1358      * @throws RiceIllegalArgumentException if {@code principalId} is null
1359      * @throws RiceIllegalArgumentException if no document with the {@code documentId} specified in
1360      *         {@code parameters} exists
1361      * @throws RiceIllegalArgumentException if no principal with the {@code principalId} specified
1362      *         in {@code parameters} exists
1363      */
1364     @WebMethod(operationName = "isUserInRouteLog")
1365     @WebResult(name = "userInRouteLog")
1366     boolean isUserInRouteLog(
1367             @WebParam(name = "documentId") String documentId,
1368             @WebParam(name = "principalId") String principalId,
1369             @WebParam(name = "lookFuture") boolean lookFuture)
1370             throws RiceIllegalArgumentException;
1371 
1372     /**
1373      * Determines if a passed in user exists in a document's route log or future route depending on the passed in
1374      * {@code lookFuture} value and {@code flattenNodes}
1375      *
1376      * @param documentId unique Id of document
1377      * @param principalId unique Id of Principal to look for in document's route log
1378      * @param lookFuture boolean value determines whether or not to look at the future route log
1379      *
1380      * @return boolean value representing if a principal exists in a Document's route log
1381      *
1382      * @throws RiceIllegalArgumentException if {@code documentId} is null
1383      * @throws RiceIllegalArgumentException if {@code principalId} is null
1384      * @throws RiceIllegalArgumentException if no document with the {@code documentId} specified in
1385      *         {@code parameters} exists
1386      * @throws RiceIllegalArgumentException if no principal with the {@code principalId} specified
1387      *         in {@code parameters} exists
1388      */
1389     @WebMethod(operationName = "isUserInRouteLogWithOptionalFlattening")
1390     @WebResult(name = "userInRouteLogWithOptionalFlattening")
1391     boolean isUserInRouteLogWithOptionalFlattening(
1392             @WebParam(name = "documentId") String documentId,
1393             @WebParam(name = "principalId") String principalId,
1394             @WebParam(name = "lookFuture") boolean lookFuture,
1395             @WebParam(name = "flattenNodes") boolean flattenNodes)
1396             throws RiceIllegalArgumentException;
1397 
1398     /**
1399      * Re-resolves the given role for all documents for the given document type (including children).
1400      *
1401      * @param documentTypeName documentTypeName of DocuemntType for role
1402      * @param roleName name of Role to reresolve
1403      * @param qualifiedRoleNameLabel qualified role name label
1404      *
1405      * @throws RiceIllegalArgumentException if {@code documentTypeName} is null
1406      * @throws RiceIllegalArgumentException if {@code roleName} is null
1407      * @throws RiceIllegalArgumentException if {@code qualifiedRoleNameLable} is null
1408      */
1409     @WebMethod(operationName = "reResolveRoleByDocTypeName")
1410     void reResolveRoleByDocTypeName(
1411     		@WebParam(name = "documentTypeName") String documentTypeName,
1412     		@WebParam(name = "roleName") String roleName,
1413     		@WebParam(name = "qualifiedRoleNameLabel") String qualifiedRoleNameLabel)
1414             throws RiceIllegalArgumentException;
1415 
1416     /**
1417      * Re-resolves the given role for all documents for the given document id (including children).
1418      *
1419      * @param documentId documentId of Docuemnt for role
1420      * @param roleName name of Role to reresolve
1421      * @param qualifiedRoleNameLabel qualified role name label
1422      *
1423      * @throws RiceIllegalArgumentException if {@code documentTypeName} is null
1424      * @throws RiceIllegalArgumentException if {@code roleName} is null
1425      * @throws RiceIllegalArgumentException if {@code qualifiedRoleNameLable} is null
1426      */
1427     @WebMethod(operationName = "reResolveRoleByDocumentId")
1428     void reResolveRoleByDocumentId(
1429     		@WebParam(name = "documentId") String documentId,
1430     		@WebParam(name = "roleName") String roleName,
1431     		@WebParam(name = "qualifiedRoleNameLabel") String qualifiedRoleNameLabel)
1432             throws RiceIllegalArgumentException;
1433 
1434     /**
1435      * Executes a simulation of a document to get all previous and future route information
1436      *
1437      * @param reportCriteria criteria for the simulation to follow
1438      *
1439      * @return DocumentDetail object representing the results of the simulation
1440      *
1441      * @throws RiceIllegalArgumentException if {@code reportCriteria} is null
1442      */
1443     @WebMethod(operationName = "executeSimulation")
1444     @WebResult(name = "documentDetail")
1445     DocumentDetail executeSimulation(
1446             @WebParam(name = "reportCriteria") RoutingReportCriteria reportCriteria)
1447             throws RiceIllegalArgumentException;
1448 
1449     /**
1450      * Determines if a passed in user is the final approver for a document
1451      *
1452      * @param documentId unique Id of the document
1453      * @param principalId unique Id of Principal to look for in document's route log
1454      *
1455      * @return boolean value representing if a principal is the final approver for a document
1456      *
1457      * @throws RiceIllegalArgumentException if {@code documentId} is null
1458      * @throws RiceIllegalArgumentException if {@code principalId} is null
1459      */
1460     @WebMethod(operationName = "isFinalApprover")
1461     @WebResult(name = "finalApprover")
1462     boolean isFinalApprover(
1463         	@WebParam(name = "documentId") String documentId,
1464     		@WebParam(name = "principalId") String principalId)
1465             throws RiceIllegalArgumentException;
1466 
1467     /**
1468      * Determines if a passed in user is the last approver at a specified route node
1469      *
1470      * @param documentId unique Id of the document
1471      * @param principalId unique Id of Principal to look for in document's route log
1472      * @param nodeName name of route node to determine last approver for
1473      *
1474      * @return boolean value representing if a principal is the last approver at the specified route node
1475      *
1476      * @throws RiceIllegalArgumentException if {@code documentId} is null
1477      * @throws RiceIllegalArgumentException if {@code principalId} is null
1478      * @throws RiceIllegalArgumentException if {@code nodeName} is null
1479      */
1480     @WebMethod(operationName = "isLastApproverAtNode")
1481     @WebResult(name = "lastApproverAtNode")
1482     boolean isLastApproverAtNode(
1483     		@WebParam(name = "documentId") String documentId,
1484     		@WebParam(name = "principalId") String principalId,
1485     		@WebParam(name = "nodeName") String nodeName)
1486             throws RiceIllegalArgumentException;
1487 
1488     /**
1489      * Determines if a route node has an 'approve action' request
1490      *
1491      * @param docType document type of document
1492      * @param docContent string representing content of document
1493      * @param nodeName name of route node to determine if approve action request exists
1494      *
1495      * @return boolean value representing if a route node has an 'approve action' request
1496      *
1497      * @throws RiceIllegalArgumentException if {@code docType} is null
1498      * @throws RiceIllegalArgumentException if {@code docContent} is null
1499      * @throws RiceIllegalArgumentException if {@code nodeName} is null
1500      */
1501     @WebMethod(operationName = "routeNodeHasApproverActionRequest")
1502     @WebResult(name = "routeNodeHasApproverActionRequest")
1503     boolean routeNodeHasApproverActionRequest(
1504     		@WebParam(name = "docType") String docType,
1505     		@WebParam(name = "docContent") String docContent,
1506     		@WebParam(name = "nodeName") String nodeName)
1507             throws RiceIllegalArgumentException;
1508 
1509     /**
1510      * Determines if a document has at least one action request
1511      *
1512      * @param reportCriteria criteria for routing report
1513      * @param actionRequestedCodes list of action request codes to see if they exist for the document
1514      * @param ignoreCurrentActionRequests boolean value to determine if current action requests should be ignored
1515      *
1516      * @return boolean value representing if a document will have at least one action request
1517      *
1518      * @throws RiceIllegalArgumentException if {@code docType} is null
1519      * @throws RiceIllegalArgumentException if {@code docContent} is null
1520      * @throws RiceIllegalArgumentException if {@code nodeName} is null
1521      */
1522     @WebMethod(operationName = "documentWillHaveAtLeastOneActionRequest")
1523     @WebResult(name = "documentWillHaveAtLeastOneActionRequest")
1524     boolean documentWillHaveAtLeastOneActionRequest(
1525     		@WebParam(name = "reportCriteria") RoutingReportCriteria reportCriteria,
1526     		@WebParam(name = "actionRequestedCodes") List<String> actionRequestedCodes,
1527     		@WebParam(name = "ignoreCurrentActionRequests") boolean ignoreCurrentActionRequests)
1528             throws RiceIllegalArgumentException;
1529 
1530     /**
1531      * Returns a list of principal Ids that exist in a route log
1532      *
1533      * @param documentId unique id of the document to get the route log for
1534      * @param lookFuture boolean value that determines if the method should look at future action requests
1535      *
1536      * @return list of principal ids that exist in a route log
1537      *
1538      * @throws RiceIllegalArgumentException if {@code documentId} is null
1539      */
1540     @WebMethod(operationName = "getPrincipalIdsInRouteLog")
1541     @WebResult(name = "principalIds")
1542     @XmlElementWrapper(name = "principalIds", required = true)
1543     @XmlElement(name = "principalId", required = true)
1544     List<String> getPrincipalIdsInRouteLog(
1545     		@WebParam(name = "documentId") String documentId,
1546     		@WebParam(name = "lookFuture") boolean lookFuture)
1547             throws RiceIllegalArgumentException;
1548 
1549 }