I wish to create a script (Python etc.) that will allow me to iterate through BPMN tasks collect custom attribute from each in sequence (like TTE) and sum the TTE for a given branch. In the case of binary gateways recurse each branch getting times through the chart for each decision possibility. Hence being able to determine the shortest and longest routes based on decision branching. So if a completely linear process has 5 tasks each 60 min then the whole process should take 300 min. With a single branch one branch may take 450 min (short route process) and the other take 600 min (extended route process).
Please advise. Thanks