If you set up an event handler on a node, work item or graph (using
pdg.Node.addEventHandler, pdg.WorkItem.addEventHandler or pdg.GraphContext.addEventHandler),
PDG passes an
Event object to the handler when the corresponding event occurs as the PDG graph is cooking.
The PDG graph context that emitted the event, or contains the pdg.Node that emitted the event.
If the event is a work item event, this is set to the current state of the work item.
If the event is a dependency or parent change event, this is the id of the dependency/parent work item
If the event is a work item state change event, this is set to the previous work item state.
If the event is a warning or error, this string contains the message associated with that warning/error.
The node that the event was emitted from, or
None if it as a top level
The event type
The id of the work item, if the event is a work item related event. This can be passed to pdg.Graph.workItemById.