use of com.walmartlabs.concord.runtime.v2.runner.context.TaskContext in project concord by walmartlabs.
the class TaskV2Provider method createTask.
@Override
public Task createTask(Context ctx, String key) {
Class<? extends Task> klass = holder.get(key);
if (klass == null) {
return null;
}
Map<String, Object> defaultVariables = defaultTaskVariables.get(key);
TaskContext taskContext = new TaskContext(ctx, new MapBackedVariables(defaultVariables));
return ContextProvider.withContext(taskContext, () -> injector.getInstance(klass));
}
Aggregations