Interface WorkflowSession
- All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession
This session provides methods for looking at a workflow.
-
Method Summary
Modifier and TypeMethodDescriptionbooleanTests if this user can access a workflow.booleancanAccessWorkflowForProcess(Id processId) Tests if this user can access a workflow in a process.getCanceledWork(Id processId) Gets the work canceled in a process.getCanceledWorkByDate(Id processId, DateTime start, DateTime end) Gets the work canceled in a process within the given date range inclusive.Gets theOfficeassociated with this session.Gets theOfficeIdassociated with this session.getProcessesForWork(Id workId) Gets the processes a work is in.getStepForWork(Id processId, Id workId) Gets the step corresponding to a work in a process.getSuspendedWork(Id processId) Gets all the suspended work in a process.getSuspendedWorkAtStep(Id stepId) Gets the suspended work at a step in a process.getWorkAtStep(Id stepId) Getsall the work at a step in a 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.
-
canAccessWorkflow
boolean canAccessWorkflow()Tests if this user can access 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.
-
canAccessWorkflowForProcess
Tests if this user can access 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 process Id- Returns:
falseif workflow initiation methods are not authorized,trueotherwise- Throws:
NullArgumentException-processIdisnull- Compliance:
mandatory- This method must be implemented.
-
getProcessesForWork
ProcessList getProcessesForWork(Id workId) throws OperationFailedException, PermissionDeniedException Gets the processes a work is in.- Parameters:
workId- a workId- Returns:
- the
Processes - Throws:
NullArgumentException-workIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getStepForWork
Step getStepForWork(Id processId, Id workId) throws NotFoundException, OperationFailedException, PermissionDeniedException Gets the step corresponding to a work in a process.- Parameters:
processId- a processIdworkId- a workId- Returns:
- the returned
Step - Throws:
NotFoundException-processIdnot found orworkIdis not active in the processNullArgumentException-processIdorworkIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getWorkAtStep
WorkList getWorkAtStep(Id stepId) throws NotFoundException, OperationFailedException, PermissionDeniedException Getsall the work at a step in a process.- Parameters:
stepId- a stepId- Returns:
- the returned
WorkList - Throws:
NotFoundException-stepIdis not foundNullArgumentException-stepIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getSuspendedWork
WorkList getSuspendedWork(Id processId) throws NotFoundException, OperationFailedException, PermissionDeniedException Gets all the suspended work in a process.- Parameters:
processId- a processId- Returns:
- the returned
WorkList - Throws:
NotFoundException-processIdnot foundNullArgumentException-processIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getSuspendedWorkAtStep
WorkList getSuspendedWorkAtStep(Id stepId) throws NotFoundException, OperationFailedException, PermissionDeniedException Gets the suspended work at a step in a process.- Parameters:
stepId- a stepId- Returns:
- the returned
WorkList - Throws:
NotFoundException-stepIdis not foundNullArgumentException-stepIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getCanceledWork
WorkList getCanceledWork(Id processId) throws NotFoundException, OperationFailedException, PermissionDeniedException Gets the work canceled in a process.- Parameters:
processId- a processId- Returns:
- the returned
WorkList - Throws:
NotFoundException-processIdnot foundNullArgumentException-processIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getCanceledWorkByDate
WorkList getCanceledWorkByDate(Id processId, DateTime start, DateTime end) throws NotFoundException, OperationFailedException, PermissionDeniedException Gets the work canceled in a process within the given date range inclusive.- Parameters:
processId- a processIdstart- start rangeend- end range- Returns:
- the returned
WorkList - Throws:
InvalidArgumentException-startis greater thanendNotFoundException-processIdnot foundNullArgumentException-processId, startorendisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-