Workflow running Running workflows can be stopped by following in several ways:
Table of Contents | ||||
---|---|---|---|---|
|
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
The workflow and block are in Redy status
Session objects are availabled
DateLastRun is updated or not: it depence on input parameter for stopAfterThisBlock
Session.vault and Session.vaultGlobal are moved or not into myVault: it depence on input parameter for stopAfterThisBlock
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 SafeStop status at the beginning and moved to Stopped status then
Session objects are availabled
DateLastRun is not updated
Session.vault and Session.vaultGlobal are not moved into myVault
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
The workflow and block are in ImmediatlyStop status at the beginning and moved to Stopped status then
Session objects are not availabled
DateLastRun is not updated
Session.vault and Session.vaultGlobal are not moved into myVault
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
The workflow and block are in AutoStop status
Session objects are not availabled
DateLastRun is not updated
Session.vault and Session.vaultGlobal are not moved into myVault
\uD83D\uDCCB Related articles
You can get the full list of block statuses by this link
You can get Canvas vocabulary by this link