Get-KFDBData

Syntax

Get-KFDBData
  [-Key] <key>
  [-RelatedToWorkflow[:$true]] 
  [-RelatedToItem[:$true]]
  [-ThrowErrors[:$true]]

Support

>= kenaflow 1.0.0

Return

Object.

Description

This cmdlet retrieves the data persisted with Set-KFDBData.

You get a PowerShell object from the deserialized data that is retrieved from the kenaflow SQLite database.

If the requested object does not exist, then $null is returned. An exception is not thrown.

We have described this in article Persisting Data, section "kenaflow SQLite Persistence".

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

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

Discussion