File tree Expand file tree Collapse file tree 1 file changed +16
-8
lines changed
core/src/main/java/com/netflix/conductor/core/execution/mapper Expand file tree Collapse file tree 1 file changed +16
-8
lines changed Original file line number Diff line number Diff line change @@ -227,15 +227,23 @@ public List<TaskModel> getMappedTasks(TaskMapperContext taskMapperContext)
227227 }
228228
229229 for (TaskModel forkedTask : forkedTasks ) {
230- Map <String , Object > forkedTaskInput =
231- tasksInput .get (forkedTask .getReferenceTaskName ());
232- if (forkedTask .getInputData () == null ) {
233- forkedTask .setInputData (new HashMap <>());
230+ try {
231+ Map <String , Object > forkedTaskInput =
232+ tasksInput .get (forkedTask .getReferenceTaskName ());
233+ if (forkedTask .getInputData () == null ) {
234+ forkedTask .setInputData (new HashMap <>());
235+ }
236+ if (forkedTaskInput == null ) {
237+ forkedTaskInput = new HashMap <>();
238+ }
239+ forkedTask .getInputData ().putAll (forkedTaskInput );
240+ } catch (Exception e ) {
241+ String reason =
242+ String .format (
243+ "Tasks could not be dynamically forked due to invalid input: %s" ,
244+ e .getMessage ());
245+ throw new TerminateWorkflowException (reason );
234246 }
235- if (forkedTaskInput == null ) {
236- forkedTaskInput = new HashMap <>();
237- }
238- forkedTask .getInputData ().putAll (forkedTaskInput );
239247 }
240248 mappedTasks .addAll (forkedTasks );
241249 // Get the last of the dynamic tasks so that the join can be performed once this
You can’t perform that action at this time.
0 commit comments