Validate workflows #2. TODO: check DAG for cycles.