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)
Yes. Simple task spec is dict in TaskExecution object and we can create it using:
TaskExecution(
"version" : '2.0',
'name' : 'task1',
'with- items': 'var in [1]',
'type' : 'direct'
name='task1',
spec={
}
)
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)