Now I use code like this:
ctx = node.context workitems = [i.state for n in ctx.graph.nodes() for i in n.workItems] completes = workitems.count(pdg.workItemState.CookedSuccess)
It works but sometimes the work item hanging on cooking state and never gets cooked. So is there any convenient way to do such thing?
Thanks.