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