Bot task runs as it's own process, but fails as a part of a larger process

When I run the recording on it’s own in control tower, everything works. But when I run the bigger business process, of which this is the third bot task, it fails on the “Read File” action. The event log shows this error:

Step name ‘Save log file’ has failed. Reason: ‘org.webharvest.exception.ScriptException: Config line 12: single-column block groovy.lang.MissingPropertyException: No such property: success for class: Script24_genScript_154’

And then the event log shows this error:

Step name ‘Save log file’ has failed. Reason: ‘[urn:uuid:A9B8DA784345BED6F0159423250220191] robotics-flow executePlugin exception: [nodeId=] Error executing TemplateAction[templateName=FileReadAction.ftl,id=3,name=Optional[FileReadAction],parent=1,nextSibling=4,arguments=ActionArguments[path=[C:\Program Files (x86)\Cority\HR Integration Engine\meip.log.txt],targetVariable=[log_text],delay=[0],timeoutMs=[10000],xsi:type=[recorder:FileReadAction, recorder:FileReadAction],pollingInterval=[300],active=[true],comment=[reads the contents of the log file],encoding=[UTF-8],awaitTimeout=[5000]]]’

However, the file is being read correctly, because the bot continues to execute to the end, correctly. However, the business process does not continue on to execute the next bot in the process.

Same problem.

I found out that even though I published my bot to the control tower after making changes, control tower still wasn’t caught up with those changes and was trying to use variables that I had since deleted. (In this case, the variable “success”, as reflected in the error message). I fixed it by making a copy of each bot in studio, then publishing the new bots to the control tower and making a new business process out of them.