Sepasoft batch script

Currently, I am facing a challenge with the transition expression character limit. I need to match approximately 30 conditions after the 'And End', which exceeds the character limit provided in the transition expression field. I am exploring alternative solutions to address this limitation while avoiding the use of repetitive 'UPxx.complete' statements for each condition. Therefore, I do use call script function. Ex:{script:myscriptName}

In the MES batch module>In the recipe module>In the transition expression.
I do call script that under the MES script batch script part.
and the script is

def do_batch_scripts(batchParams):
	"""
	This script is called from a Batch Script Phase. Return a dictionary where the keys are parameter names to write to output parameters.

	Arguments:
		batchParams: 	A dictionary containing input parameters on the Script Phase.
	"""
	batchID = system.tag.readBlocking('[MES]New Enterprise/Site/Area/Process Cell/LPC_Step/Batch Details/Batch_ID')[0].value
	bqe = system.mes.batch.queue.getEntry(batchID)
	for i in range(3, 30):
		path = "/Pall_30seq/P2:UP{}.Complete".format(i)
		val = system.mes.batch.queue.getParameterValueAsString(bqe, path)
#		val = system.mes.batch.queue.getParameterValueAsString('cwb', "/Pall_30seq/P2:UP5.Complete")
	logger = system.util.getLogger("myLogger")
	logger.info(("{}".format(i)+val))	
# here will write the if statement to check is all complete or not
	return True

but the log error is
Caused by: com.inductiveautomation.ignition.common.script.JythonExecException: Traceback (most recent call last): File "", line 15, in do_batch_scripts TypeError: getParameterValueAsString(): 1st arg can't be coerced to com.sepasoft.production.gateway.manager.misc.BatchQueueEntry

seems do not understand system.mes.batch.queue........

Specifically, I want to understand how I can enable a batch script to recognize the completion status of steps within the same layer of the recipe sequence. But I'm not sure what kind of the data type or syntax this script can understand.

thank you all