public interface ProcessFlowService
A process flow is a collection of tasks and elements that can be assigned or executed based on the underlying process flow definition. A process flow is identified by a name and context, and is associated with and scoped to a context in which it is defined. Examples of a process flow context are organization, project, and analysis.
Modifier and Type | Method and Description |
---|---|
ProcessFlow |
activateProcessFlow(String id)
Activates the specified process flow.
|
void |
clearSearchResults()
Releases any cached information about the query that is associated with the current search.
|
ProcessFlow |
copyProcessFlow(ProcessFlowCopyInfo copyInfo)
Copies the process flow using the specified source process flow id.
|
ProcessFlow |
createProcessFlow(String contextId,
String processFlowName,
String processDefinitionKey)
Creates a process flow at the context using the latest deployed version of the process flow definition.
|
String |
createProcessFlowManifest(String id,
FileCreateInfo manifestFileCreateInfo)
Creates a process flow manifest file for the process flow with the identifier in the repository.
|
void |
deleteProcessFlow(String id)
Deletes the process flow with the specified identifier.
|
boolean |
exists(String contextId,
String processFlowName)
Indicates whether the process flow with the specified name exists at the context.
|
Set<ProcessFlowDescriptor> |
getAllProcessFlowDescriptors()
Gets all process flows that the user is authorized to view.
|
Set<ProcessFlowDescriptor> |
getMyProcessFlowDescriptors()
Gets all of the process flows that the user is authorized to view.
|
Set<ProcessFlowDescriptor> |
getMyProcessFlowDescriptorsByContext(String contextId,
boolean includeChildren)
Gets all of the process flows that are owned by the current user at a context, and (optionally) below.
|
ProcessFlow |
getProcessFlowById(String id)
Gets the process flow with the specified identifier.
|
ProcessFlow |
getProcessFlowByNameAndContext(String contextId,
String processFlowName)
Gets process flow with the name at the context.
|
Set<ProcessFlowDescriptor> |
getProcessFlowDescriptorsByContext(String contextId,
boolean includeChildren)
Gets the process flows at the context and (optionally) below.
|
int |
getSearchPageSizeLimit()
Gets the maximum number of process flow results to return in a single request.
|
List<ProcessFlowSearchResultItem> |
getSearchResults(int fromRow,
int toRow)
Gets a range of results after calling
search(ProcessFlowQuery) . |
SearchResultsInfo |
search(ProcessFlowQuery query)
Searches process flows based on the specified query.
|
ProcessFlow |
suspendProcessFlow(String id)
Suspends the specified process flow.
|
ProcessFlow |
updateProcessFlow(ProcessFlow processFlow)
Updates the process flow.
|
Set<ProcessFlowDescriptor> getProcessFlowDescriptorsByContext(String contextId, boolean includeChildren) throws ProcessFlowContextNotFoundException
contextId
- The identifier of the context.includeChildren
- Indicates whether to retrieve the process flows for the context's children.ProcessFlowNotFoundException
- Thrown when a process flow does not exist at the specified context.ProcessFlowContextNotFoundException
Set<ProcessFlowDescriptor> getAllProcessFlowDescriptors()
Set<ProcessFlowDescriptor> getMyProcessFlowDescriptors()
Set<ProcessFlowDescriptor> getMyProcessFlowDescriptorsByContext(String contextId, boolean includeChildren) throws ProcessFlowContextNotFoundException
contextId
- The identifier of the context.includeChildren
- Indicates whether the context children's process flows are retrieved.ProcessFlowContextNotFoundException
boolean exists(String contextId, String processFlowName)
contextId
- The identifier of context.processFlowName
- The name of the process flow.ProcessFlow getProcessFlowByNameAndContext(String contextId, String processFlowName) throws ProcessFlowNotFoundException
contextId
- The identifier of the context.processFlowName
- The name of the process flow.ProcessFlowNotFoundException
- Thrown when a process flow with the specified name does not exist at the
specified context.ProcessFlow getProcessFlowById(String id) throws ProcessFlowNotFoundException, ProcessFlowException
id
- The identifier of the process flow.ProcessFlowNotFoundException
- Thrown when a process flow with the identifier does not exist.ProcessFlowException
- Thrown when there is an issue when getting the process flow.ProcessFlow createProcessFlow(String contextId, String processFlowName, String processDefinitionKey) throws ProcessFlowExistsException, ProcessDefinitionNotFoundException, ProcessFlowContextNotFoundException
contextId
- The identifier of the context in which to create the process flow.processFlowName
- The name of the process flow.processDefinitionKey
- The key of the process flow definition. This is the id value in the process flow
definition file.ProcessFlowExistsException
- Thrown when a process flow with the name exists in the context.ProcessDefinitionNotFoundException
- Thrown when a deployed process flow definition does not exist with the
identifier in the context.ProcessFlowContextNotFoundException
- Thrown when the process flow context does not exist.ProcessFlow updateProcessFlow(ProcessFlow processFlow) throws ProcessFlowNotFoundException, InvalidProcessFlowStateException, ProcessFlowException, ProcessFlowExistsException
processFlow
- The process flow.ProcessFlowNotFoundException
- Thrown when a process flow with the identifier does not exist.InvalidProcessFlowStateException
- Thrown when the process flow is in an invalid state to update the
process flow.ProcessFlowException
- Thrown when there is an issue when updating the process flow.ProcessFlowExistsException
- Thrown when a process flow with the name exists at the context.void deleteProcessFlow(String id) throws ProcessFlowNotFoundException, ProcessFlowException
id
- The identifier of the process flow.ProcessFlowNotFoundException
- Thrown when a process flow with the identifier does not exist at the
context.ProcessFlowException
- Thrown when there is an issue when deleting the process flow.String createProcessFlowManifest(String id, FileCreateInfo manifestFileCreateInfo) throws ProcessFlowNotFoundException, ProcessFlowManifestCreateException, ProcessFlowException
id
- The identifier of the process flow.manifestFileCreateInfo
- The method to add the new process flow manifest file (such as major version or
minor version). Specifying null defaults to a major version.ProcessFlowNotFoundException
- Thrown when a process flow with the identifier does not exist at the
context.ProcessFlowManifestCreateException
- Thrown when there is an issue when creating a process flow manifest
file.ProcessFlowException
- Thrown when there is an issue when creating the process flow manifest file.ProcessFlow activateProcessFlow(String id) throws ProcessFlowNotFoundException, ProcessFlowException
id
- The identifier of the process flow.ProcessFlowNotFoundException
- Thrown when a process flow with the identifier does not exist.ProcessFlowException
- Thrown when there is an issue when activating the process flow.ProcessFlow suspendProcessFlow(String id) throws ProcessFlowNotFoundException, ProcessFlowException
id
- The identifier of the process flow.ProcessFlowNotFoundException
- Thrown when a process flow with the identifier does not exist.ProcessFlowException
- Thrown when there is an issue suspending the process flow.ProcessFlow copyProcessFlow(ProcessFlowCopyInfo copyInfo) throws ProcessFlowNotFoundException, ProcessFlowExistsException, ProcessFlowCopyException
copyInfo
- The options and details needed for copying a process flow.ProcessFlowNotFoundException
- Thrown when a process flow with the identifier does not exist.ProcessFlowExistsException
- Thrown when a process flow with the name exists in the context.ProcessFlowCopyException
- Thrown when there is an issue copying the process flow.SearchResultsInfo search(ProcessFlowQuery query) throws ProcessFlowSearchException
getSearchResults(int, int)
. When the results are no longer
required, call clearSearchResults()
to release any server-side resources related with the query.
Note: Only one query can be active at a time for each client. The results generated for the query can be used to
iterate through the results by calling getSearchResults(int, int)
, but if the same client calls this
method again, a new set of results are generated and the previous results are no longer valid.
query
- The criteria for querying process flows.ProcessFlowSearchException
- Thrown when there is an issue searching process flows.List<ProcessFlowSearchResultItem> getSearchResults(int fromRow, int toRow) throws ProcessFlowSearchException
search(ProcessFlowQuery)
. The from row
and to row
values should be between 1 and the total rows that are retrieved by the query. This is considered a page
of results, and therefore, a pageable
results model.
Note: The maximum number of records that can be returned for a single page is determined by
getSearchPageSizeLimit()
. The default maximum is 5000.
fromRow
- The starting row number to include in the results. Must be greater than 0.toRow
- The ending row number to include in the results. Must be less than or equal to the total row count.
The total number retrieved must be less than or equal to the page size limit.ProcessFlowSearchException
- Thrown when there is an issue searching process flows.void clearSearchResults()
finally
block for each call to search(ProcessFlowQuery)
. If the results no longer
exist when this method is called, then this method returns without further action.int getSearchPageSizeLimit()
<i>Copyright (c) 2020, SAS Institute Inc., Cary, NC, USA</i>