Interface Workflow

All Superinterfaces:
Remote, Serializable
All Known Implementing Classes:
WorkflowImpl

public interface Workflow extends Remote, Serializable
A workflow is a set of procedures that can be performed on a document in the repository. These procedures can be accessed by obtaining a Workflow implementation from the WorkflowManager. Calling a method that is defined by an interface extending the Workflow interface causes such a workflow step (procedure) to be executed. Which workflow is active on a document depends amongst others on the type of document. Therefor the Workflow interface itself defines no workflow actions, but any Workflow instance should be cast to a document-specific interface. The implementation of these document-specific workflows can be provided at run-time to the repository. Therefor there is no standard set of workflows available. There are a number of commonly available workflows, but these are not mandatory. See all known sub-interfaces of the Workflow interface, or org.hippoecm.repository.standardworkflow.FolderWorkflow for an example.

Implementors of this interface should never return subclasses of the Document class in their interface. It is allowed to return an instance of a subclass of a Document, but the repository will force recreating the object returned as a direct instance of an Document.

  • Method Summary

    Modifier and Type
    Method
    Description
    The hints method is not an actual workflow call, but a method by which information can be retrieved from the workflow.
  • Method Details

    • hints

      The hints method is not an actual workflow call, but a method by which information can be retrieved from the workflow. All implementations must implement this call as a pure function, no modification may be made, nor no state may be maintained and and in principle no additional lookups of data is allowed. This allows for caching the result as long as the document on which the workflow operates isn't modified. By convention, keys that are names or signatures of methods implemented by the workflow provide information to the application program whether the workflow method is available this time, or will result in a WorkflowException. The value for these keys will often be a Boolean to indicate the enabled status of the method.

      Non-standard keys in this map should be prefixed with the implementation package name using dot seperations.

      Returns:
      a map containing hints given by the workflow, the data in this map may be considered valid until the document itself changes
      Throws:
      WorkflowException - thrown in case the implementing workflow encounters an error, this exception should normally never be thrown by implementations for the hints method.
      RemoteException - a connection error with the repository
      RepositoryException - a generic error communicating with the repository