Documentation > CMS Template API Library > Asset > GetWorkflowByWorkflowId(Int32)

GetWorkflowByWorkflowId

Gets information about a workflow from its workflow id. This can be found on the general properties page of assets that use this workflow as the "Workflow Id" or in the "Points To Workflow" field of a worfklow asset.

public CrownPeak.CMSAPI.Workflow GetWorkflowByWorkflowId(Int32)


Returns

A Workflow object

Parameters

NameDescriptionType
workflowId The actual workflow id not the asset if of the workflow asset. See summary for an explanation. System.Int32

Code Example

C#

Sample:
	Workflow wf = Asset.GetWorkflowByWorkflowId(11);
	Out.WriteLine("AssetId: " + wf.AssetId + "<br />");		
	Out.WriteLine("Description: " + wf.Description + "<br />");
	Out.WriteLine("Name: " + wf.Name + "<br />");
	Out.WriteLine("WorkflowId: " + wf.WorkflowId + "<br />");

Connect with Crownpeak