public interface WorkflowManager
Workspace
to a HippoWorkspace
, where the HippoWorkspace.getWorkflowManager()
method
returns the work-flow manager for the session. The Workspace
itself is obtained though the Session.getWorkspace()
.
From the work-flow manager, you might directly obtain access to a work-flow, or obtain a reference (a WorkflowDescriptor) to the
work-flow, which is a cheaper operation. This WorkflowDescriptor allows some querying to introspect the work-flow available.
The work-flow descriptor may be used to obtain the actual work-flow again from the work-flow manager.
The methods to obtain either the work-flow directly or a descriptor allow you to access a work-flow based on a Document object or on
a Node
. In the latter case, the indicated node should be of a hippo:document (or derived) node type or of a hippo:request
(or derived) node type. There are some internal-only exceptions, such as the root node, but in all cases the node must be
referenceable and contain no pending changes in the current session.Modifier and Type | Method and Description |
---|---|
javax.jcr.Session |
getSession()
Workflow Managers are associated with an authenticated session, even though most of the operations executed by workflows
are executed from a seperated (unaccessible) session with higher credentials.
|
Workflow |
getWorkflow(String category,
Document document)
Obtains the workflow for the document as indicated Document instance in the specified category.
|
Workflow |
getWorkflow(String category,
javax.jcr.Node item)
Obtains the workflow for the document as indicated by the javax.jcr.Node instance in the specified category.
|
Workflow |
getWorkflow(WorkflowDescriptor descriptor)
Obtains the workflow for the previously requested workflow descriptor within the same session.
|
WorkflowDescriptor |
getWorkflowDescriptor(String category,
Document document)
Obtains a reference to the workflow for the document as indicated Document instance in the specified category.
|
WorkflowDescriptor |
getWorkflowDescriptor(String category,
javax.jcr.Node item)
Obtains a reference to the workflow for the document as indicated by the javax.jcr.Node in the specified category.
|
javax.jcr.Session getSession() throws javax.jcr.RepositoryException
javax.jcr.RepositoryException
WorkflowDescriptor getWorkflowDescriptor(String category, javax.jcr.Node item) throws javax.jcr.RepositoryException
category
- category in which to look for the workflowitem
- the document or request for which to obtain the workflowjavax.jcr.RepositoryException
WorkflowDescriptor getWorkflowDescriptor(String category, Document document) throws javax.jcr.RepositoryException
category
- category in which to look for the workflowdocument
- the document for which to obtain the workflowjavax.jcr.RepositoryException
Workflow getWorkflow(String category, javax.jcr.Node item) throws MappingException, javax.jcr.RepositoryException
category
- category in which to look for the workflowitem
- MappingException
javax.jcr.RepositoryException
Workflow getWorkflow(String category, Document document) throws MappingException, javax.jcr.RepositoryException
category
- category in which to look for the workflowdocument
- the document for which to obtain the workflowMappingException
javax.jcr.RepositoryException
Workflow getWorkflow(WorkflowDescriptor descriptor) throws MappingException, javax.jcr.RepositoryException
descriptor
- the workflow descriptor obtained from the same workflow manager earlierMappingException
javax.jcr.RepositoryException
Copyright © 2007–2019 Hippo B.V. (http://www.onehippo.com). All rights reserved.