Get-KFLink

Syntax

Get-KFLink
  [-Item <list-item> (the currently processed one)]
  [-WorkflowId (the current workflows id)]
  [-Anonymous[:$false]]
  [-ValidUntil <datetime>]
  [-WithAnswer[:$true]]
  [-Metadata <hashtable> ($null)]
  [-ThrowErrors[:$true]]

Support

>= kenaflow 1.0.0

Return

A string that represents the "rich link".

Description

This cmdlet can be used to create "rich links". If the user clicks the generated link a "link remote event" is fired. The browser opens and the users gets a generic answer or an answer from the workflow.

The cmdlet is only available in SharePoint workflows!

Please read this article for details: Links.

Parameters

[-Item <list-item> (the currently processed one)]

You can specify a different list item for which you want to create a rich link. Default is the currently processed item.

[-WorkflowId (the current workflows id)]

You can specify the ID of a workflow that should process the link remote event.

[-Anonymous[:$false]]

if specified the link will point to a http endpoint that does not require authentication. The user is unknown to the workflow in this case.

[-ValidUntil <datetime>]

You can specify a "lifetime" for the link. If it is expired the user gets a generic answer in the browser when he/she clicks the link.

[-WithAnswer[:$true]]

If $true (default) the browser opens and waits for the answer of the workflow. This is required to be a HTML page.

[-Metadata <hashtable> ($null)]

You can transfer data to the workflow. This data is serialized.

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

Get-KFLink -Metadata @{Action="accepted"} -ValidUntil ([DateTime]::Now.AddDays(1))

Discussion