Skip to content
Snippets Groups Projects
Commit 6dcaed44 authored by sanjaycal's avatar sanjaycal
Browse files

work with the new api where out is a list instead of just an id

parent 475d9977
Branches
Tags
No related merge requests found
......@@ -56,14 +56,13 @@ function generateNodes(workflow: any): any[] {
metadata: node?.metadata,
};
const nextNode = {
id: currentTask,
id: node.id,
type: 'customNode',
position: { x: 0, y: position },
data: data,
};
out.push(nextNode);
position += 120;
currentTask = node.out;
}
return out;
......@@ -98,16 +97,16 @@ function generateEdges(workflow: any) {
for (let i = 0; i < workflowConfig.nodes.length; i++) {
const currentNode = workflowConfig.nodes[i];
currentNode.out.forEach((nextId) => {
out.push({
id: ids,
source: currentTask,
target: currentNode.out,
source: currentNode.id,
target: nextId,
markerEnd: {
type: 'arrow',
},
});
ids += 1;
currentTask = currentNode.out;
});
}
return out;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment