Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Workflow running Running workflows can be stopped by following in several ways:

Table of Contents
minLevel1
maxLevel24

Programmable stop

You can stop running of workflow block by fx.stopAfterThisBlock function

...

Code Block
var v = getVariables();
var src = await api.get('myst2/eventordersbystatus?status='+v['status']);
if (!src || !fx.any(src)) {
  fx.stopAfterThisBlock(false); // false - stops workflow after current block and does not update dateLastRun
}

...

Result

Stop by click button

You can stop workflow running on workflow edit page by click on workflow button.

...

Choose needed option and then click to Stop button

Safe stop

The option is proposed for the case when you want to wait untill the currend block will be finished with processing and the workflow will be stopped then.

It is recomended option and set as default.

...

Result

  • The workflow and block are in Redy statusesSafeStop status at the beginning and moved to Stopped status then

  • Response and User Log are availabled

  • Session objects are availabled

  • DateLastRun is updated or not: it depence on input parameter for stopAfterThisBlocknot updated

  • Session.vault and Session.vaultGlobal are not moved or not into myVault: it depence on input parameter for stopAfterThisBlock

Stop immediately

The option is proposed for the case when you want to stop processing immediatly and do not wait untill it will be finished. There is a restriction that it can be stopped just in places which call any asyncronius code. It is not a Canvas restriction, it is a Node.js restriction with blocked operations. This description you can get by this link.

It is not recomended option because the bahaivour of integration result may be unpredicted. For example, if you post some data into target application and stopped running before saving in myVault. In this case duplicates can be created next time. Please use this option just in case if integration result are predicted.

Result

Auto stop

The workflow can be stopped automatically by Canvas block processor, if processor was restarted during processing. One of restarting reason can be a memory exception. If your block was moved to Stopped automatically please contact to CMA support team.

Result

\uD83D\uDCCB Related articles

You can get the full list of block statuses by this link

You can get Canvas vocabulary you can get by this link