Please read comments
String task_id = WebUI.getText(findTestObject(‘abc/tasknumber’))
KeywordUtil.logInfo(task_id) //task value in printing in console like 12345
completeTask(task_id) //calling tear down method
//tear down method begins
@com.kms.katalon.core.annotation.TearDown
def completeTask(String task_id)
{
KeywordUtil.logInfo(task_id) //doesn’t print anything
}