Interface WorkflowInitiationSession
- All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession
This session provides methods for initiating a workflow.
-
Method Summary
Modifier and TypeMethodDescriptionbooleanTests if this user can initiate a workflow.booleancanInitiateWorkflowForProcess(Id processId) Tests if this user can initiate a workflow in a process.getAvailableWork(Id processId) Gets the list of available work for this workflow.Gets theOfficeassociated with this session.Gets theOfficeIdassociated with this session.voidstartWorkflow(Id processId, Id workId) Starts a work in the workflow at the initial step of the process.Methods inherited from interface OsidSession
closeMethods inherited from interface OsidSession
getAuthenticatedAgent, getAuthenticatedAgentId, getClockRate, getDate, getEffectiveAgent, getEffectiveAgentId, getFormatType, getLocale, isAuthenticated, startTransaction, supportsTransactionsModifier and TypeMethodDescriptionGets the agent authenticated to this session.Gets theIdof the agent authenticated to this session.Gets the rate of the service clock.getDate()Gets the service date which may be the current date or the effective date in which this session exists.Gets the effective agent in use by this session.Gets theIdof the effective agent in use by this session.Gets theDisplayTextformatTypepreference in effect for this session.Gets the locale indicating the localization preferences in effect for this session.booleanTests if an agent is authenticated to this session.Starts a new transaction for this sesson.booleanTests for the availability of transactions.
-
Method Details
-
getOfficeId
Id getOfficeId()Gets theOfficeIdassociated with this session.- Returns:
- the
Office Idassociated with this session - Compliance:
mandatory- This method must be implemented.
-
getOffice
Gets theOfficeassociated with this session.- Returns:
- the office
- Throws:
OperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
canInitiateWorkflow
boolean canInitiateWorkflow()Tests if this user can initiate a workflow. A return of true does not guarantee successful authorization. A return of false indicates that it is known all methods in this session will result in aPERMISSION_DENIED. This is intended as a hint to an application that may opt not to offer workflow operations to unauthorized users.- Returns:
falseif workflow initiation methods are not authorized,trueotherwise- Compliance:
mandatory- This method must be implemented.
-
canInitiateWorkflowForProcess
Tests if this user can initiate a workflow in a process. A return of true does not guarantee successful authorization. A return of false indicates that it is known all methods in this session will result in aPERMISSION_DENIED. This is intended as a hint to an application that may opt not to offer workflow operations to unauthorized users.- Parameters:
processId- a processId- Returns:
falseif workflow initiation methods are not authorized,trueotherwise- Throws:
NullArgumentException-processIdisnull- Compliance:
mandatory- This method must be implemented.
-
getAvailableWork
WorkList getAvailableWork(Id processId) throws NotFoundException, OperationFailedException, PermissionDeniedException Gets the list of available work for this workflow. Available work isWorkthat is compatible with thisProcessbut not currently part of thisProcess.- Parameters:
processId- a processId- Returns:
- the returned
Worklist - Throws:
NotFoundException-processIdis not foundNullArgumentException-processIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
startWorkflow
void startWorkflow(Id processId, Id workId) throws NotFoundException, OperationFailedException, PermissionDeniedException Starts a work in the workflow at the initial step of the process.- Parameters:
processId- a processIdworkId- a workId- Throws:
NotFoundException-processIdorworkIdis not foundNullArgumentException-processIdorworkIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-