Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mikerodionov/6e0920781025cceaba4c3c6a01b1ae18 to your computer and use it in GitHub Desktop.
Save mikerodionov/6e0920781025cceaba4c3c6a01b1ae18 to your computer and use it in GitHub Desktop.
-- Get Process Name by Process Instance ID
USE K2 -- Adjust your K2 DB name if necessarry
DECLARE @PInstID INT
DECLARE @ProcID INT
SET @PInstID=1 -- Specify your Process Instance ID Here
SET @ProcID = (SELECT ProcID FROM Server.ProcInst WHERE ID=@PInstID)
SELECT [Name] FROM Server.[ProcSet] WHERE ID = (SELECT ProcSetID FROM Server.[Proc] WHERE ID=@ProcID)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment