Comment 6 for bug 1468419

Revision history for this message
Nikolay Makhotkin (nmakhotkin) wrote :

Yes. Simple task spec is dict in TaskExecution object and we can create it using:

TaskExecution(
name='task1',
spec={
                "version": '2.0',
                'name': 'task1',
                'with-items': 'var in [1]',
                'type': 'direct'
            }
)

and then we can import parser in dataflow.py and get the TaskSpec object:

from mistral.workbook import parser

...

task_spec = parser.get_task_spec(task_ex.spec)