Modification on JS API functions: getTaskRun and createTaskRun