Hi in the events OnTaskFinished(Sender: TObject;ATaskIns: TTaskInstance); and OnTaskCreated(Sender: TObject;ATaskIns: TTaskInstance) is there a way to understand what is the instance of WorkFlowDefinition to which the ATaskIns belongs (the parameter of the event)?
The ATaskIns.Owner is nil and so i don't understand more!
Exactly, from what you answered to me in my previous thread, i need to read the values of the variables passed initially to the WorkFlow, at the end of the task instance (before its destruction so in the OnTaskFinished). But i need to reach the TWorkflowDefinition and from it the TWorkflowInstance and so all its variables.
TTaskInstance class has two properties: WorkInsKey and DefinitionKey. You can use those to retrieve both workflow instance and workflow definition