I have a batch process (using batch API) that runs when a user on my site tries to launch a non signed Java applet. The batch process does all the needed codesigning and other things and then redirects the user to the applet when it is finished. This all works well but if the user hits back from the applet page they get this nasty error with the text from my batch_error function.
It seems that this occurs because when you hit back you end up trying to run a batch process that no longer exists. Is there anyway to avoid this?
EDIT:
Here is my function that sets up the batch process:
function batch_codesign($node) {
$batch = array(
'operations' => array(
array('batch_codesign_process', array("create_jar_files", $node)),
array('batch_codesign_process', array("output_new_agentsheets_applet_html", $node)),
),
'finished' => 'batch_codesign_finished',
'title' => t('Codesigning'),
'init_message' => t('Codesigning ' . $node->title .'.'),
'progress_message' => t('Processed @current out of @total.'),
'error_message' => t('An error has occured while condesigning the project, please try again.'),
);
batch_set($batch);
$nid = $node->nid;
batch_process("path/to/endpoint");
}