I am trying to create template code to sort variables in an array by control flow (initial node to first action then first action to second action and so forth) within an activity diagram. Is there a sort function that uses source to target control flows? What would that code look like?