WorkflowStudio: Loops => Duplicate tasks


I've noticed that Workflow Studio exhibits strange behaviour if you define a workflow containing loops - if the loop is taken, tasks are duplicated.

To reproduce:
- create a new workflow definition containing Start, Task1, Task2, End
- add 2 status to Task1: open, *finished
- add 3 status to Task2: open, *accepted, *rejected
- add transitions:
  Start -> Task1
  Task1 -> Task2 (finished)
  Task2 -> End(accepted)
  Task2 -> Task1(rejected)
- run a new workflow
- set Task1 instance to finished
- set Task2 instance to rejected
- set Task1 instance to finished
- set Task2 instance to accepted
- in the task list, click View -> show all
=> the task list contains duplicates, also select * from wstaskinstances

I consider this a bug - or am I not supposed to add loops in workflow definitions? If not, how can I simulate such a workflow (a QC group that either accepts a task or rejects it, reassigning it to the original employee)

Kind regards

This is by design.
Whenever a task block is reached, a new task is created. The meaning of a task block is to generate a new task, and you are expecting it to be a representation of a single task, which is not correct.
I don't see a problem with creating a new task? Actually if the QC rejected the previous work, then a new work must be done. Be aware that although there is a new "task" (in the meaning of "something to do"), the variables of a workflow instance remain global for the whole workflow instance lifetime. So creating a new task but pointing them to the same variables or attachments will not duplicate those variables and/or attachments.

Wagner R. Landgraf
TMS Software Team