Set-KFFinalModerationState [-ModerationState] <moderation-state> [-ThrowErrors[:$true]]
>= kenaflow 1.0.0
This cmdlet is used to set the final moderation state after kenaflow finished processing of the current list item.
This cmdlet is only available in SharePoint list and state machine workflows.
The moderation state is only relevant to lists or libraries that have "content approval" enabled. If so the "view only" users will not see unpublished and/or not-approved (rejected) items or files.
You can use the cmdlet multiple times in the workflow script, but only the last set values are used.
When a value other than
DoNotSet is specified the moderation state will be written to the currently processed list item.
In case of setting the moderation state it is not possible to rewrite the last "Editor" and last "Modified" timespamp. The list item will be - for example - approved but with the name of the workflow execution account, normally the kenaflow service account.
The moderation state. Valid values:
DoNotSet: The moderation state will NOT be set at the end of the current item processing.
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.