Interface WorkflowFacade

    • Method Detail

      • 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

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

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

        java.util.Optional<WorkflowModel> createWorkflow​(WorkflowTemplateModel workflowTemplate,
                                                         java.util.Map<java.util.Locale,​java.lang.String> localizedName,
                                                         java.util.Map<java.util.Locale,​java.lang.String> localizedDesc,
                                                         java.util.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

        java.util.Optional<WorkflowModel> createAdHocWorkflow​(PrincipalModel assignee,
                                                              java.util.Map<java.util.Locale,​java.lang.String> localizedName,
                                                              java.util.Map<java.util.Locale,​java.lang.String> localizedDesc,
                                                              java.util.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