Created
December 18, 2017 15:36
-
-
Save dudelis/3ccd8886c63f119abd3b7883d26b1a90 to your computer and use it in GitHub Desktop.
K2: Update Process Instance folio
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Function Update-Folio ([int]$procInstId, [string]$folio){ | |
if(-not($procInstId)) { Throw "You must supply a value for -procInstId" } | |
if(-not($folio)) { Throw "You must supply a value for -folioName" } | |
Add-Type -AssemblyName ('SourceCode.Workflow.Client, Version=4.0.0.0, Culture=neutral, PublicKeyToken=16a2c5aaaa1b130d') | |
$k2con = New-Object -TypeName SourceCode.Workflow.Client.Connection | |
$k2con.Open("localhost") | |
$procInst = $k2con.OpenProcessInstance($procInstId); | |
$procInst.Folio = $folio; | |
$procInst.Update() | |
$k2con.Close() | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment