Aspose.Workflow will same the history data for a process instance also with tasks of the instance. Aspose.Workflow allows its users to Read these History Data at runtime using its simple API.
Reading Task History by intance id
An example is given below to demonstrate about accessing task history by instance id.
Example:
[C#]
//Instantiate an object of EngineManager
EngineManager manager = EngineManager.Instance;
//Configure the EngineManager object
manager.Configure();
//Create an object of IEngine interface
IEngine engine = manager.Engine;
//Login to the Aspose.Workflow engine
engine.Login("aspose","aspose");
//Create an instance of IHistoryAdmin interface
IHistoryAdmin historyAdmin = engine.Historydmin;
//Accessing a task history data using its instance Id
ITaskHistory[] histories =
historyAdmin.GetInstanceTaskHistories("instanceId");
[VB.NET]
'Instantiate an object of EngineManager
Dim manager As EngineManager = EngineManager.Instance
'Configure the EngineManager object
manager.Configure()
'Create an object of IEngine interface
Dim engine As IEngine = manager.Engine
'Login to the Aspose.Workflow engine
engine.Login("aspose","aspose")
'Create an instance of IHistoryAdmin interface
Dim historyAdmin As IHistoryAdmin = engine.HistoryAdmin
'Accessing a task history data using its instance Id
Dim histories As ITaskHistory[] = historyAdmin.GetInstanceTaskHistories("instanceId")