ProcessInstances class

Parent Previous Next

The ProcessInstances object specifies a collection of loaded ProcessInstances objects. An instance of the ProcessInstances collection is provided by the Session object.




IYOPRO.Api (in IYOPRO.Api.dll)


       class ProcessInstances()


void Load(Guid piid, object userdata = null)

Retrieves the process instance for the given id.

Userdata will be provided in the ProcessInstanceLoadedEventEventArgs

void Load(DateTime startDate, DateTime endDate,ProcessInstanceState state, List<string> names, List<string> variables, object userdata = null)

Provides a list of the available process instances

Userdata will be provided in the ProcessInstancesLoadedEventArgs

event ProcessInstanceLoadedEvent ProcessInstanceLoaded

The ProcessInstanceLoaded event is triggered if the Load method has finished

event ProcessInstancesLoadedEvent ProcessInstancesLoaded

The ProcessInstancesLoaded event is triggered if the Load method has finished


// Load the process instance with the specified id

Session session = ...;

Guid myid = ...;

ProcessInstances.ProcessInstanceLoadedEvent handler = null;

handler = (s, args) =>


session.ProcessInstances.ProcessInstanceLoaded -= handler;

Data = args.Data;



session.ProcessInstances.ProcessInstanceLoaded += handler;


This sample shows how to load process instances that have a specific name and status and are within a specific time period


import clr


import IYOPRO.Api

import System

s = IYOPRO.Api.Session(Workflow)

start = System.DateTime(2020,1,1)

end = System.DateTime(2021,12,31)

names = System.Collections.Generic.List[str](["<process instance name>"])

vars = System.Collections.Generic.List[str]([])

e = s.ProcessInstances.Load(start,end,IYOPRO.Api.ProcessInstanceState.Finished,names,vars)