Class WorkflowDefinitionManagerUtil

java.lang.Object
com.liferay.portal.workflow.util.WorkflowDefinitionManagerUtil

public class WorkflowDefinitionManagerUtil extends Object
  • Constructor Details

    • WorkflowDefinitionManagerUtil

      public WorkflowDefinitionManagerUtil()
  • Method Details

    • deployWorkflowDefinition

      public static com.liferay.portal.kernel.workflow.WorkflowDefinition deployWorkflowDefinition(String externalReferenceCode, long companyId, long userId, String title, String name, byte[] bytes) throws com.liferay.portal.kernel.workflow.WorkflowException
      Throws:
      com.liferay.portal.kernel.workflow.WorkflowException
    • getActiveWorkflowDefinitionsCount

      public static int getActiveWorkflowDefinitionsCount(long companyId) throws com.liferay.portal.kernel.workflow.WorkflowException
      Throws:
      com.liferay.portal.kernel.workflow.WorkflowException
    • getWorkflowDefinitionsCount

      public static int getWorkflowDefinitionsCount(long companyId, String name) throws com.liferay.portal.kernel.workflow.WorkflowException
      Throws:
      com.liferay.portal.kernel.workflow.WorkflowException
    • liberalGetActiveWorkflowDefinitions

      public static List<com.liferay.portal.kernel.workflow.WorkflowDefinition> liberalGetActiveWorkflowDefinitions(long companyId, int start, int end, com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.kernel.workflow.WorkflowDefinition> orderByComparator) throws com.liferay.portal.kernel.workflow.WorkflowException
      Throws:
      com.liferay.portal.kernel.workflow.WorkflowException
    • liberalGetLatestWorkflowDefinition

      public static com.liferay.portal.kernel.workflow.WorkflowDefinition liberalGetLatestWorkflowDefinition(long companyId, String name) throws com.liferay.portal.kernel.workflow.WorkflowException
      Throws:
      com.liferay.portal.kernel.workflow.WorkflowException
    • liberalGetLatestWorkflowDefinitions

      public static List<com.liferay.portal.kernel.workflow.WorkflowDefinition> liberalGetLatestWorkflowDefinitions(long companyId, int start, int end, com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.kernel.workflow.WorkflowDefinition> orderByComparator) throws com.liferay.portal.kernel.workflow.WorkflowException
      Throws:
      com.liferay.portal.kernel.workflow.WorkflowException
    • liberalGetWorkflowDefinition

      public static com.liferay.portal.kernel.workflow.WorkflowDefinition liberalGetWorkflowDefinition(long companyId, String name, int version) throws com.liferay.portal.kernel.exception.PortalException
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • liberalGetWorkflowDefinitions

      public static List<com.liferay.portal.kernel.workflow.WorkflowDefinition> liberalGetWorkflowDefinitions(long companyId, String name, int start, int end, com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.kernel.workflow.WorkflowDefinition> orderByComparator) throws com.liferay.portal.kernel.workflow.WorkflowException
      Throws:
      com.liferay.portal.kernel.workflow.WorkflowException
    • saveWorkflowDefinition

      public static com.liferay.portal.kernel.workflow.WorkflowDefinition saveWorkflowDefinition(String externalReferenceCode, long companyId, long userId, String title, String name, byte[] bytes) throws com.liferay.portal.kernel.workflow.WorkflowException
      Saves a workflow definition without activating it or validating its data. To save the definition, validate its data, and activate it, use
      invalid reference
      #deployWorkflowDefinition(long, long, String, String, byte[])
      instead.
      Parameters:
      companyId - the company ID of the workflow definition
      userId - the ID of the user saving the workflow definition
      title - the workflow definition's title
      name - the workflow definition's name
      bytes - the data saved as the workflow definition's content
      Returns:
      the workflow definition
      Throws:
      com.liferay.portal.kernel.workflow.WorkflowException - if there was an issue saving the workflow definition
    • updateActive

      public static com.liferay.portal.kernel.workflow.WorkflowDefinition updateActive(long companyId, long userId, String name, int version, boolean active) throws com.liferay.portal.kernel.workflow.WorkflowException
      Throws:
      com.liferay.portal.kernel.workflow.WorkflowException