Import Workflow

Import a Workflow into your Catalytic team using a .catalytic file, created by the Export Workflow method or via the Catalytic WebApp. This method returns the newly created Workflow.

Method Signature

Workflow ImportWorkflow(File importFile);
Workflow ImportWorkflow(File importFile, String password);

Parameters

ParameterTypeDescription
importFilejava.io.FileThe Workflow export file to use to create the Workflow
passwordStringOptional Password used to secure the export file
returnsWorkflowThe imported Workflow

Example

/*
 * This example demonstrates importing a Workflow from a password-secured  
 * `.catalytic` Workflow export file.
 */

import org.catalytic.sdk.CatalyticClient;
import org.catalytic.sdk.entities.Workflow;

public class Program {
  
    public static void main(String[] args) throws Exception {
      
      	// Create and initialize the Catalytic SDK Client
        CatalyticClient catalytic = new CatalyticClient();
      
        File importFile = new File("/path/to/export/file.catalytic");
      	String password = "my-export-password";
      
      	// Import the workflow
        Workflow workflow = catalytic.workflows().importWorkflow(importFile, password);
    }
}