Interface WorkflowManagementSession
- All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession
- All Known Subinterfaces:
ManualWorkflowSession
This session provides methods for managing a workflow.
-
Method Summary
Modifier and TypeMethodDescriptionvoidcancelWork(Id processId, Id workId) Cancels a work in this process removing it from the workflow.booleanTests if this user can manage a workflow.booleancanManageWorkflowForProcess(Id processId) Tests if this user can manage a workflow for a process.Gets theOfficeassociated with this session.Gets theOfficeIdassociated with this session.voidresumeWork(Id processId, Id workId) Resumes a work in this process.voidsuspendWork(Id processId, Id workId) Suspends a work in this process leaving it at its current step.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.
-
canManageWorkflow
boolean canManageWorkflow()Tests if this user can manage 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 management methods are not authorized,trueotherwise- Compliance:
mandatory- This method must be implemented.
-
canManageWorkflowForProcess
Tests if this user can manage a workflow for 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 management methods are not authorized,trueotherwise- Throws:
NullArgumentException-processIdisnull- Compliance:
mandatory- This method must be implemented.
-
suspendWork
void suspendWork(Id processId, Id workId) throws NotFoundException, OperationFailedException, PermissionDeniedException Suspends a work in this process leaving it at its current step.- 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.
-
resumeWork
void resumeWork(Id processId, Id workId) throws NotFoundException, OperationFailedException, PermissionDeniedException Resumes a work in this 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.
-
cancelWork
void cancelWork(Id processId, Id workId) throws NotFoundException, OperationFailedException, PermissionDeniedException Cancels a work in this process removing it from the workflow.- 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.
-