Managing flows

This section contains key information to help you manage your published flows.

An overview of the Flows screen and how to manage your flows in Connect.

Start, Stop, Edit, Delete

These basic actions may be done via the UI, and via the API. Note that when you start a Flow, the latest Flow version is used.

Start, Stop, Edit, Delete via the UI

To start, stop, edit and delete a Flow via the UI, navigate to Flows. Here you can see all your Flows, identify the required stopped Flow by name (1) and start (2) it:

Start flow

Also you can run Flow on demand (1) or stop (2) a started Flow:

Run or stop

Edit or delete the Flow by opening the settings menu (1) of the selected Flow, and clicking Edit Flow (2) or Delete Flow (3):

Settings menu

Alternatively, you can navigate to the Flow itself by clicking on its name:

Click on flows name

Then click the corresponding buttons to start (1), edit (2) or delete (3) Flow.

Corresponding buttons

In case you need to stop a running Flow, click the stop button.

If you Stop a flow any unprocessed messages will be lost:

Stop a running Flow

Start, Stop, Edit, Delete via the API

To start a Flow via the API, we will use the following request:

POST https://api.connect.squiz.cloud/v2/flows/{FLOW_ID}/start

Below are request parameters:

URL Parameter Required Description

FLOW_ID

yes

Flow ID

To stop a Flow via the API, we will use the following request:

POST https://api.connect.squiz.cloud/v2/flows/{FLOW_ID}/stop

Below are request parameters:

URL Parameter Required Description

FLOW_ID

yes

Flow ID

To delete a Flow via the API, we will use the following request:

DELETE https://api.connect.squiz.cloud/v2/flows/{FLOW_ID}

Below are request parameters:

URL Parameter Required Description

FLOW_ID

yes

Flow ID

To edit a Flow to some extent via the API, we will use the following request:

PATCH https://api.connect.squiz.cloud/v2/flows/{FLOW_ID}

Below are request parameters:

URL Parameter Required Description

FLOW_ID

yes

Flow ID

Payload Parameter Required Description

type

yes

Allowed value: flow

id

yes

Flow ID

attributes.name

no

Flow name

attributes.type

no

Flow type. Allowed values: ordinary, `long_running `

attributes.graph

no

Flow graph representing component connections

attributes.cron

no

CRON expression representing Flow timing

Copy flow

To copy a Flow within the same Workspace, navigate to see your Flows. Then click on the corresponding icon to open the settings menu of the selected Flow:

You should copy a flow if you need a second similar flow. If you simply need to create a new version of a flow, use the Flow Versioning feature described below instead of making a copy.
Delete flow

Alternatively, you can navigate to the Flow itself by clicking on its name, then switch to Implement tab (1) and click the command (2) to copy it to clipboard, and create a copy of the Flow via the API:

Implement tab

Switch flow type

Top level admins may see the option to change the flow type to Real Time. There is a cost associated with real time flows, and in most cases they are not required. If you think you need a real time flow, use the in app Chat to reach out to the Customer Success team for assistance.

Subscribe to errors

You configure the platform to send you emails for errors in your flows. Note that for errors that repeat you will not receive an email for every error. Depending on the error type you will receive one email per hour, or one per 24 hours.

To subscribe to errors, use the settings menu (1) of the corresponding Flow and click Subscribe to Errors (2):

Subscribe to Errors

Use the same page to unsubscribe.

Scheduling

You can schedule your flow to run using CRON expressions. This can only be done in Draft mode.

While editing the Flow, switch to Settings tab (1), use CRON expression to schedule the Flow, and click Save:

Settings - Scheduling

The default CRON expression is */3 * * * *, meaning "every 3 minutes". The positions in the expression from left to right represent:

  • Minutes (allowed values: from 0 to 59)

  • Hours (allowed values: from 0 to 23)

  • Days of the month (allowed values: from 1 to 31)

  • Months (allowed values: from 1 to 12 or from JAN to DEC)

  • Days of the week (allowed values: from 0 to 6 or from MON to SUN)

The month and weekday abbreviations are not case-sensitive. Also, the following special characters are in use:

  • * - wildcard, means any value

EXAMPLE: * * * * * means every minute of every day of every week, etc.

  • , - value list separator

EXAMPLE: * * * * MON,WED,FRI means every Monday, Wednesday and Friday.

  • - - defines a range of values

EXAMPLE: * 2-5 * * * means every hour between 2 and 5 AM.

  • / - specifies repetition steps

EXAMPLE: * * * */2 * means every two months.

Feel free to use the hint below the CRON expression field for reference. Otherwise, you can always click Run Now or use a:

POST https://api.connect.squiz.cloud/v2/flows/{FLOW_ID}/run-now

request to run the Flow on demand.

The Next Occurrences pane will help you judge whether your CRON expression was written correctly:

Next Occurrences

Flow versioning

The Platform allows you to create different versions of a Flow and switch between them if required. There are two Flow states in the Flow editing process: draft mode and published version. Every time you publish a draft, you create a new Flow version.

In the draft state you can edit or add steps, verify credentials, retrieve data samples and configure CRON expressions. You can then publish the draft and test-run your flow. A new draft is created when you create a new Flow, or edit an existing one. This means that you can safely edit a draft version without impacting an active flow.

To publish a draft, use the Publish button as per below. This button will only be active if all of the required steps are completed.

Publish draft

Use the History tab (2) to see a list of all versions of the flow including the published (1) version and all historic versions.

Published draft - History

You can revert to an old version by selecting it, creating a draft and publishing it.

Select the required version

You can work on one draft of a given Flow at a time. If you try to create another one, the Platform will ask you if you want to overwrite the existing one.

When you publish a draft of an active Flow, it stops immediately, and restarts as a new version.

Reset snapshot

A Snapshot is the data saved by a Component during its execution. When the Component is run next time, it will read the Snapshot to continue the process from the point it finished last time. You can manually reset this Snapshot, so the Component starts from scratch next time. Note that you can only reset Snapshot for a stopped Flow. To do this, click the settings button on the Flow (1), and select Reset Snapshot (2):

Reset Snapshot

This is the only way to delete an existing snapshot.

© 2015- Squiz Pty Ltd