Interface ProcessFlowService


  • public interface ProcessFlowService
    The service that contains methods to manage process flows.

    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. It is associated with and scoped to a context in which it is defined. Examples of a process flow context are organization, project, and analysis.

    • Method Detail

      • getProcessFlowDescriptorsByContext

        java.util.Set<ProcessFlowDescriptor> getProcessFlowDescriptorsByContext​(java.lang.String contextId,
                                                                                boolean includeChildren)
                                                                         throws ProcessFlowContextNotFoundException
        Gets the process flows at the context and (optionally) below. This method requires the current user to have read access to the context. The current user must have either the Manage Process Flows privilege or the Administer Process Flows privilege to see the process flows that are owned by others. If the user does not have either of these privileges, only process flows that the user owns are returned. If the context does not exist, an empty set is returned.
        Parameters:
        contextId - The identifier of the context.
        includeChildren - Indicates whether to retrieve the process flows for the context's children.
        Returns:
        A set of process flows.
        Throws:
        ProcessFlowNotFoundException - Thrown when a process flow does not exist at the specified context.
        ProcessFlowContextNotFoundException
      • getAllProcessFlowDescriptors

        java.util.Set<ProcessFlowDescriptor> getAllProcessFlowDescriptors()
        Gets all process flows that the user is authorized to view.
        Returns:
        A set of process flows.
      • getMyProcessFlowDescriptors

        java.util.Set<ProcessFlowDescriptor> getMyProcessFlowDescriptors()
        Gets all of the process flows that the user is authorized to view.
        Returns:
        A set of process flows.
      • getMyProcessFlowDescriptorsByContext

        java.util.Set<ProcessFlowDescriptor> getMyProcessFlowDescriptorsByContext​(java.lang.String contextId,
                                                                                  boolean includeChildren)
                                                                           throws ProcessFlowContextNotFoundException
        Gets all of the process flows that are owned by the current user at a context, and (optionally) below. This method requires that the current user have Read access to the context. If the context does not exist, an empty set is returned.
        Parameters:
        contextId - The identifier of the context.
        includeChildren - Indicates whether the context children's process flows are retrieved.
        Returns:
        A set of ProcessFlowDescriptor objects.
        Throws:
        ProcessFlowContextNotFoundException
      • exists

        boolean exists​(java.lang.String contextId,
                       java.lang.String processFlowName)
        Indicates whether the process flow with the specified name exists at the context. Returns True, if the process flow exists and the user is authorized to view the process flow.
        Parameters:
        contextId - The identifier of context.
        processFlowName - The name of the process flow.
        Returns:
        True, if the process flow exists and the user is authorized to view the process flow, False otherwise.
      • getProcessFlowByNameAndContext

        ProcessFlow getProcessFlowByNameAndContext​(java.lang.String contextId,
                                                   java.lang.String processFlowName)
                                            throws ProcessFlowNotFoundException
        Gets the process flow with the specified name at the specified context.
        Parameters:
        contextId - The identifier of the context.
        processFlowName - The name of the process flow.
        Returns:
        The process flow.
        Throws:
        ProcessFlowNotFoundException - Thrown when a process flow with the specified name does not exist at the specified context.
      • createProcessFlowManifest

        java.lang.String createProcessFlowManifest​(java.lang.String id,
                                                   FileCreateInfo manifestFileCreateInfo)
                                            throws ProcessFlowNotFoundException,
                                                   ProcessFlowManifestCreateException,
                                                   ProcessFlowException
        Creates a process flow manifest file for the process flow with the identifier in the repository.
        Parameters:
        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.
        Returns:
        The path to the process flow manifest file.
        Throws:
        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.
      • search

        SearchResultsInfo search​(ProcessFlowQuery query)
                          throws ProcessFlowSearchException
        Searches the process flows based on the specified query. The returned results information contains the row count in which to request pageable lists of process flows by calling 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 that are 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 is generated and the previous results are no longer valid.

        Parameters:
        query - The criteria to query process flows.
        Returns:
        The results of a process flow search.
        Throws:
        ProcessFlowSearchException - Thrown when there is an issue when searching process flows.
      • getSearchResults

        java.util.List<ProcessFlowSearchResultItem> getSearchResults​(int fromRow,
                                                                     int toRow)
                                                              throws ProcessFlowSearchException
        Gets a range of results after calling search(ProcessFlowQuery). The from row and to row values must 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 available by calling getSearchPageSizeLimit(). The default maximum is 5000.

        Parameters:
        fromRow - The starting row number to include in the results. The value must be greater than 0.
        toRow - The ending row number to include in the results. The value must be less than or equal to the total row count. The total number that is retrieved must be less than or equal to the page size limit.
        Returns:
        The list of process flow items that satisfy the query and the rows that are specified.
        Throws:
        ProcessFlowSearchException - Thrown when there is an issue when searching process flows.
      • clearSearchResults

        void clearSearchResults()
        Releases any cached information about the query that is associated with the current search. This must be called once in a 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.
      • getSearchPageSizeLimit

        int getSearchPageSizeLimit()
        Gets the maximum number of process flow results to return in a single request. The default is 5000.
        Returns:
        The page size limit.