String mode = ctrl.getKeyValueWithDefault("DESPATCH CONFIRM THREAD", "True", "Use background thread to confirm").toUpperCase();
Boolean threadmode = Boolean.valueOf(mode);
if (threadmode)
{
DespatchConfirmThread despconfirmThread = new DespatchConfirmThread(getHostID(), getSessionID(), getDespatchNo());
despconfirmThread.setName("C4J Despatch Confirm Thread");
despconfirmThread.start();
} else
{
for (int j = 0; j < assignedList.size(); j++)
{