Remove-KFSessionStorageData

Syntax

Remove-KFSessionStorageData
  [-Key] <key>
  [-RelatedToWorkflow[:$true]] 
  [-RelatedToItem[:$true]]
  [-ThrowErrors[:$true]]

Support

>= kenaflow 1.0.0

Return

Nothing.

Description

This cmdlet removes data perviously with Set-KFSessionStorageData persisted the the kenaflow session storage.

Please read the article about Storage.

By default -RelatedToWorkflow[:$true] and -RelatedToItem[:$true] are used - alone or in combination - to automatically add prefix(es) to your key.

Parameters

[-Key] <string>

The key that is used to read the serialized data.

[-RelatedToWorkflow[:$true]]

If you do not specify -RelatedToWorkflow:$false the workflow id will be used as prefix for your -Key. This is the default behaviour.

[-RelatedToItem[:$true]]

If you do not specify -RelatedToItem:$false the current item id will be used as prefix for your -Key. This is the default behaviour. The parameter is only available for SharePoint workflows! In SharePoint site workflows there is no item context.

[-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.

Example

This writes and reads serialized data to the session storage.

Set-KFSessionStorageData -Key "kenaflow" -Data @{"is" = "a workflow engine for SharePoint, Email and PowerShell"} -RelatedToItem:$false -RelatedToWorkflow:$false -AdditionalPassphare "cool"
Write-KFLog (Get-KFSessionStorageData -Key "kenaflow" -RelatedToItem:$false -RelatedToWorkflow:$false -AdditionalPassphare "cool")
Remove-KFSessionStorageData -Key "kenaflow" -RelatedToItem:$false -RelatedToWorkflow:$false

Discussion