Set-KFSkipItem

Syntax

Set-KFSkipItem
  [-ThrowErrors[:$true]]

Support

>= kenaflow 4.0.28

Only for SharePoint Workflows that support items (list workflow or state machine workflow).

Return

Nothing.

Description

After each item processing the workflow engine has to execute some cleanup tasks.

In some cases the item processing needs to be skipped because it would fail.

For example if you process a SharePoint file item from a library and you move this item to another library than the original list item - THE CURRENTLY PROCESSED ITEM - does not exist any more. In this situation you need to use this cmdlet to skip item post-processing.

Move-PnPFile -SourceUrl $item.File.ServerRelativeUrl -TargetUrl $web.ServerRelativeUrl + "/DifferentLibrary"  -Force | Out-Null
Set-KFSkipItem
Stop-KFScript 

Parameters

[-ThrowErrors[:$true]]

This is a default parameter for all kenaflow cmdlets. If set to $true (default!) the engine will pass exception within the cmdlet to the script for further handling.