Interface SyntheticWorkflowRunner

  • All Superinterfaces:
    com.day.cq.workflow.WorkflowService

    @ProviderType
    public interface SyntheticWorkflowRunner
    extends com.day.cq.workflow.WorkflowService
    • Method Detail

      • execute

        void execute​(org.apache.sling.api.resource.ResourceResolver resourceResolver,
                     String payloadPath,
                     String[] workflowProcessLabels)
              throws com.day.cq.workflow.WorkflowException
        Process a payload path using using the provided Workflow Processes. Convenience method for calling: > execute(resourceResolver, payloadPath, workflowProcessLabels, null, false, false);
        Parameters:
        resourceResolver - the resourceResolver object that provides access to the JCR for WF operations
        payloadPath - the path to execute the workflow against
        workflowProcessLabels - the process.labels of the workflow to execute in order against the payloadPath resource
        Throws:
        com.day.cq.workflow.WorkflowException
      • execute

        void execute​(org.apache.sling.api.resource.ResourceResolver resourceResolver,
                     String payloadPath,
                     SyntheticWorkflowModel syntheticWorkflowModel,
                     boolean autoSaveAfterEachWorkflowProcess,
                     boolean autoSaveAtEnd)
              throws com.day.cq.workflow.WorkflowException
        Execute the provided Synthetic Workflow Model in the context of Synthetic Workflow.
        Parameters:
        resourceResolver - the resourceResolver object that provides access to the JCR for WF operations
        payloadPath - the path to execute the workflow against
        syntheticWorkflowModel - the Synthetic Workflow Model to execute
        autoSaveAfterEachWorkflowProcess - persist changes to JCR after each Workflow Process completes
        autoSaveAtEnd - persist changes to JCR after all Workflow Process complete
        Throws:
        com.day.cq.workflow.WorkflowException
      • getSyntheticWorkflowModel

        SyntheticWorkflowModel getSyntheticWorkflowModel​(org.apache.sling.api.resource.ResourceResolver resourceResolver,
                                                         String workflowModelId,
                                                         boolean ignoreIncompatibleTypes)
                                                  throws com.day.cq.workflow.WorkflowException
        Generates the SyntheticWorkflowModel that represents the AEM Workflow Model to execute in the context of Synthetic Workflow.
        Parameters:
        resourceResolver - the resourceResolver object that provides access to the JCR for WF operations
        workflowModelId - the AEM Workflow Model ID
        ignoreIncompatibleTypes - ignore incompatible workflow node types to the best of Synthetic Workflow ability
        Returns:
        the Synthetic Workflow Model
        Throws:
        com.day.cq.workflow.WorkflowException
      • getSyntheticWorkflowStep

        SyntheticWorkflowStep getSyntheticWorkflowStep​(String id,
                                                       SyntheticWorkflowRunner.WorkflowProcessIdType type)
        Gets the Synthetic Workflow Step that represents the label. This method sets the MetadataMap to empty.
        Parameters:
        id - the workflow process id
        type - the type of workflow process id (name or label)
        Returns:
        the SyntheticWorkflowStep object