Please ensure Javascript is enabled for purposes of website accessibility
Powered by Zoomin Software. For more details please contactZoomin

AVEVA™ Work Tasks

Get All the Published Versions of a Workflow

  • Last UpdatedJun 10, 2024
  • 1 minute read

PROCEDURE

Dll REFERENCE

Workflow.Net.NET2

Skelta.Forms.Core

NAMESPACE USED

Workflow.NET

Skelta.Repository.List

Skelta.Forms.Core.Controls

The code below demonstrates how to get all the published versions for a specified workflow.

//Namespaces

using Skelta.Repository.List;

using Skelta.Forms.Core.Controls;

using Workflow.NET;


//Class level Variables

string _applicationName = "MyRepo1";  //Repository Name

string _listName = "Workflow"; //This value is fixed for workflow list

string Workflow="TestWf";  //Workflow name for which all published version information is required


//Create an object of ListDefinition class (_listDef) by passing //Repository name and List name(Workflow) or Guid as parameters

ListDefinition _listDef=new ListDefinition.GetList(new Skelta.Core.ApplicationObject(_applicationName), _listName);



//Id of the ListItem to import the workflow

 //This Id is obtained from the table SKEWorkflow, value fo the column Id corresponding to your Repository Name(Application) and Workflow Name(Title)

Guid WfId = new Guid("65caf315-889e-4c46-b8d4-ea9b0e09013b");


//ListItem object for the specified workflow by passing ListDefinition object(_listDef) and ListItem id(WFId)

Skelta.Repository.List.ListItem WFlistItem = new Skelta.Repository.List.ListItem(_listDef, WFId);


//Get all the Published versions information for a specified workflow

ListItemVersion[] versionColl= WFlistItem.GetAllPublishedVersionsInformation();


//Creating a List for saving all the published version information for a specified workflow

List<ListItemVersion> versionList=new List<ListItemVersion>(versionColl);  


Related Links
TitleResults for “How to create a CRG?”Also Available in