diff --git a/knotx/conf/routes/handlers/api-with-fragments.conf b/knotx/conf/routes/handlers/api-with-fragments.conf index 752ae39..6864a22 100644 --- a/knotx/conf/routes/handlers/api-with-fragments.conf +++ b/knotx/conf/routes/handlers/api-with-fragments.conf @@ -1,19 +1,34 @@ -tasks { - api-task { - action = example - onTransitions { - _success { - action = example-as-json +# task factories array order determines which factory creates a task for fragment +taskFactories = [ + { + factory = default + config { + tasks = { + api-task { + action = example + onTransitions { + _success { + action = example-as-json + } + } + } } + nodeFactories = [ + { + factory = action + config.actions = { + example { + factory = example-action + } + example-as-json { + factory = payload-to-body + } + } + } + { + factory = subtasks + } + ] } } -} - -actions { - example { - factory = example-action - } - example-as-json { - factory = payload-to-body - } -} +] \ No newline at end of file