A ticket for all helpers that make life easier
Workflow.updateAndReturnNewElement(updateFn(updateFnParams)){
returns {workflow: newWorkflow, element: newlyAddedElement}
}
monkey patch:
static updateWorkflowAndReturnChangedElementId(workflow, fn) {
const existingIds = GraphTools.getAllElementIds(workflow)
const newWorkflow = fn(this, arguments)
const newIds = GraphTools.getAllElementIds(newWorkflow)
if (existingIds.length < newIds.length) {
return {
workflow: newWorkflow,
changedId: newIds.find(id => !existingIds.includes(id)),
}
}
if (existingIds.length > newIds.length) {
return {
workflow: newWorkflow,
changedId: existingIds.find(id => !newIds.includes(id)),
}
}
}
static validateFlow(workflow,flowId){
}
Workflow.validate does not work when gradually building a workflow, (e.g adding a new phase then connecting one end at a time
A ticket for all helpers that make life easier
Workflow.updateAndReturnNewElement(updateFn(updateFnParams)){
returns {workflow: newWorkflow, element: newlyAddedElement}
}
monkey patch:
Workflow.validate does not work when gradually building a workflow, (e.g adding a new phase then connecting one end at a time