Creating a WorkflowDefinition from a Workflow with an empty task list causes a crash.
Steps to reproduce:
Workflow workflow = WorkflowBuilder.workflow().tasks().build();
WorkflowDefinition.of(application, workflow);
Actual behavior:
TaskExecutorHelper.createExecutorList() calls iterator.next() without checking hasNext() on the empty task map, resulting in a NoSuchElementException.
Creating a WorkflowDefinition from a Workflow with an empty task list causes a crash.
Steps to reproduce:
Actual behavior:
TaskExecutorHelper.createExecutorList() calls iterator.next() without checking hasNext() on the empty task map, resulting in a NoSuchElementException.