The database structure however was quite good, and I noticed that it was being deleted and recreated each time the workflow was edited.
Adding a text mode was just a matter of parsing individual lines and persisting them on the database. No parser, just regex matching. Even an extra blank space was a syntax error. Something like that:
q1 = Question("Submit Request?")
a1 = Answer("Submit")
a2 = Answer("Reject")
Connect(q1, a1)
Connect(a1, a2)
c1 = Cancel("Cancel")
f2 = Finish("Finish")
Connect(a1, f1)
Connect(a2, c1)
It was implemented as an easter egg. Using text mode disabled the graphical part, since we lost the positions of each box. But nobody ever complained about that, of course.[1] Looked similar to this: https://archibus.ro/wp-content/uploads/2017/07/GWE.png