workflows: hotfix unittest

* Improves tests stability.

* Simplifies workflow engine.

* Fixes the endlessy working workflow engine bug.

Signed-off-by: Guillaume Lastecoueres <guillaume.lastecoueres@cern.ch>
Co-authored-by: Jan Aage Lavik <jan.age.lavik@cern.ch>
What if we would like to use `workflows` for non-record data?

Proposal:
1. update API 
```python
def get_formatted_data(self, formatter):
```
2. move lines 494-534 outside this module to `formatter`?