public static List < String > validateInputParam ( Map < String , Object > input , String taskName , WorkflowDef workflow ) { ArrayList < String > errorList = new ArrayList <> ( ) ; for ( Entry < String , Object > e : input . entrySet ( ) ) { Object value = e . getValue ( ) ; if ( value instanceof String ) { errorList . addAll ( extractParamPathComponentsFromString ( e . getKey ( ) , value . toString ( ) , taskName , workflow ) ) ; } else if ( value instanceof Map ) { //recursive call errorList . addAll ( validateInputParam ( ( Map < String , Object > ) value , taskName , workflow ) ) ; } else if ( value instanceof List ) { errorList . addAll ( extractListInputParam ( e . getKey ( ) , ( List < ? > ) value , taskName , workflow ) ) ; } else { e . setValue ( value ) ; } } return errorList ; }
Validates inputParam and returns a list of errors if input is not valid .