Import a 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
import(filePath: string): Promise<Workflow>;
import(filePath: string, callback: (err?: Error, workflow: Workflow) => any): void;
import(filePath: string, password: string): Promise<Workflow>;
import(filePath: string, password: string, callback: (err?: Error, workflow: Workflow) => any): void;
Parameters
Parameter | Type | Description |
---|---|---|
filePath | string | The path to the Workflow Export File to use to create the Workflow |
password | string | Optional Password used to secure the export file |
callback | (err?: Error, workflow: Workflow) => any | Optional The callback |
returns | Workflow | The imported Workflow |
Example
/*
* This example demonstrates importing a Workflow from a password-secured
* `.catalytic` Workflow export file.
*/
const { CatalyticClient } = require('@catalytic/sdk');
const catalytic = new CatalyticClient();
const filePath = '/path/to/export/file.catalytic';
const password = 'MY_EXPORT_PASSWORD';
const workflow = await catalytic.workflows.import(filePath, password);
Updated almost 3 years ago