Interface WorkflowManagementSession

All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession
All Known Subinterfaces:
ManualWorkflowSession

public interface WorkflowManagementSession extends OsidSession

This session provides methods for managing a workflow.

  • Method Details

    • getOfficeId

      Id getOfficeId()
      Gets the Office Id associated with this session.
      Returns:
      the Office Id associated with this session
      Compliance:
      mandatory - This method must be implemented.
    • getOffice

      Gets the Office associated with this session.
      Returns:
      the office
      Throws:
      OperationFailedException - unable to complete request
      PermissionDeniedException - 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 a PERMISSION_DENIED . This is intended as a hint to an application that may opt not to offer workflow operations to unauthorized users.
      Returns:
      false if workflow management methods are not authorized, true otherwise
      Compliance:
      mandatory - This method must be implemented.
    • canManageWorkflowForProcess

      boolean canManageWorkflowForProcess(Id processId)
      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 a PERMISSION_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:
      false if workflow management methods are not authorized, true otherwise
      Throws:
      NullArgumentException - processId is null
      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 process Id
      workId - a work Id
      Throws:
      NotFoundException - processId or workId is not found
      NullArgumentException - processId or workId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - 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 process Id
      workId - a work Id
      Throws:
      NotFoundException - processId or workId is not found
      NullArgumentException - processId or workId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - 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 process Id
      workId - a work Id
      Throws:
      NotFoundException - processId or workId is not found
      NullArgumentException - processId or workId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.