Interface ProcessExecutionService

All Superinterfaces:
com.appiancorp.services.ContextSensitiveService, Service

public interface ProcessExecutionService extends com.appiancorp.services.ContextSensitiveService
Interface to the business logic for the process runtime.

A process is an instance of a process model. The nodes added to processes at design time are translated into activities at execution time. Activities may need to be attended by human actors (in which case they are also called "tasks") or may be unattended. Activities can be run asynchronously.

Processes may contain process variables, or process-scoped variables that may be used and set by activities. Process variables can also be set up as process parameters, or variables for which the value can be set upon starting the process (and may also be required).
See: #addProcessVariable(Long,ProcessVariable), #addProcessVariables(Long,ProcessVariable[]), getProcessParameter(Long,String), getProcessParameters(Long), getProcessVariable(Long,String), getProcessVariables(Long), #setProcessVariable(Long,ProcessVariable), and #setProcessVariables(Long,ProcessVariable[])

Nodes may be executed more than once if they are set up with recurrence.
See: skipRecurrence(Long,Long,Long), triggerRecurrence(Long,Long,Long), and getNextRecurrence(Long,Long)

Nodes may be set up with escalations, or actions that should be taken after a certain amount of time if the task is not complete.
See: skipTaskEscalation(Long,Long) and triggerTaskEscalation(Long,Long)

Processes can be archived, or saved to files, and unarchived.
See: archiveProcess(Long), archiveProcesses(Long[]), unarchiveProcess(Long), unarchiveProcesses(Long[])

The methods of this class may throw a PrivilegeException if the current user does not have privileges (permission) to perform an action, as specified in NodePermissions and ProcessModelPermissions *

Methods of service classes can all throw the unchecked exception ServiceException if any system-level error (for example, server failure) occurs, and will in general throw a checked exception (InvalidXXXException) when an entity to be retrieved is inaccessible, instead of returning null. Exceptions to this paradigm (including the use of ResultList as described below) are noted. All checked exceptions extend AppianException.

It may be necessary to retrieve a subset of results as opposed to an entire collection, and also to sort the subset by some property of the returned object. "Paging" methods which return a ResultPage are provided in certain instances for this purpose. The ResultPage will contain the sorted subset of results (via Result.getResults()), and the total number of items in the available result set (via ResultPage.getAvailableItems()).

It may also be necessary to retrieve some results, even if all results cannot be retrieved (for instance, some of the entities corresponding to a list of entity IDs may no longer exist). Methods which return a ResultList are provided for this purpose. The Result.getResults() method in this case will return all results which can be retrieved. In addition, there will be a list of result codes (ResultList.getResultCodes()) that represent the successful retrieval of an entity, or, if the entity could not be retrieved, the reason for the failure. See the CODE_XXX constants in ResultList for details.

See Also: