Interface WorkflowFacade

All Superinterfaces:
CoreWorkflowFacade
All Known Implementing Classes:
DefaultWorkflowFacade

public interface WorkflowFacade extends CoreWorkflowFacade
Facade used to fetch WorkflowModels.
  • Method Details

    • getWorkflows

      com.hybris.cockpitng.search.data.pageable.Pageable<WorkflowModel> getWorkflows(WorkflowSearchData workflowSearchData)
      Gets workflows based on given search data.
      Parameters:
      workflowSearchData - search data which allows to specify search criteria.
      Returns:
      pageable with workflows Pageable
    • getWorkflowActions

      List<WorkflowActionModel> getWorkflowActions()
      Gets workflow actions for the current user.
      Returns:
      workflow actions.
    • getAllVisibleWorkflowTemplatesForCurrentUser

      List<WorkflowTemplateModel> getAllVisibleWorkflowTemplatesForCurrentUser()
      Gets workflow templates visible for current user.
      Returns:
      list of workflow templates
    • createWorkflow

      Optional<WorkflowModel> createWorkflow(WorkflowTemplateModel workflowTemplate, Map<Locale,String> localizedName, Map<Locale,String> localizedDesc, List<ItemModel> attachments)
      Creates workflow from given template for current user.
      Parameters:
      workflowTemplate - template to start.
      localizedName - localized name.
      localizedDesc - localized workflow description.
      attachments - list of items to be attached to the workflow.
      Returns:
      created workflow.
    • createAdHocWorkflow

      Optional<WorkflowModel> createAdHocWorkflow(PrincipalModel assignee, Map<Locale,String> localizedName, Map<Locale,String> localizedDesc, List<ItemModel> attachments)
      Creates adHocWorkflow from given template for current user.
      Parameters:
      assignee - adHocTemplate assignee.
      localizedName - localized name.
      localizedDesc - localized workflow description.
      attachments - list of items to be attached to the workflow.
      Returns:
      if workflow is created with given assignee then it will return create workflow.
    • deleteWorkflow

      void deleteWorkflow(WorkflowModel workflow) throws com.hybris.cockpitng.dataaccess.facades.object.exceptions.ObjectDeletionException
      Deletes given workflow
      Parameters:
      workflow - workflow to delete
      Throws:
      com.hybris.cockpitng.dataaccess.facades.object.exceptions.ObjectDeletionException - when object cannot be deleted