@startuml process_branches actor oc_scheduler as oc participant graph as graph participant argoBuilder as argo entity list_branches as branches entity graph as argoGraph oc -> graph : loadGraphFrom(nom_workflow) activate oc activate graph graph --> oc : Graph oc -> graph : generateArgo() graph -> graph : createBranches graph -> argo : new ArgoBuilder(Graph,list_branches) activate argo argo -> argo : create list of nodes already written note top : a node is a component in a link object,\n represented by its ID argo -> argo note bottom : We want to prepare the list of branches by removing\n nodes that appears several times\ne.g : two branches :\n1 - 2 2 - 3 3 - 4\n1 - 2 2 - 3 3 - 5\nWe will iterate over each branch to create the component's YAML\n and don't want to create components 1 2 et 3 twice or more loop branch in branches group if Source first link is not in list node written loop while link Source is shared argo -> argo : create an object representing the component argo -> argo : add component to list of created nodes end end end loop branch in branches loop link in branch group if link.Destination not in list of nodes already written argo -> argoGraph : get component argoGraph --> argo : component argo -> argo : generate YAML depending on type (attributes) argo -> argo : add ID to list of node already written end end end loop for each struct created argo -> argo : Marshal into yaml argo -> argo : write the marshalled string to a file end @enduml