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.


Namespace:

IYOPRO.Api

Assembly:

IYOPRO.Api (in IYOPRO.Api.dll)


Syntax

       class ProcessInstances()


Members

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



Sample

// Load list of tasks

Session session = ...;

Guid myid = ...;


ProcessInstances.ProcessInstanceLoadedEvent handler = null;

handler = (s, args) =>

{

session.ProcessInstances.ProcessInstanceLoaded -= handler;

Data = args.Data;

       ...

};

session.ProcessInstances.ProcessInstanceLoaded += handler;

session.ProcessInstances.Load(myid);