I am trying to run a bulk import routine and run into conflicts with workflow timeout trying to happen at the same time. So I would like to pause this processing while this is processing. I have tried the following code but it throws a casting error:

boolean bJobsStopped = false;
Workspace wsZone = null;
WorkflowModuleImpl wfi = null;
try {
logger.info("before getting WorkflowModuleImpl");
wfi = (WorkflowModuleImpl)workflowModule;
logger.info("before trying to stop jobs");
wsZone = RequestContextHolder.getRequestContext().getZone() ;
if (wsZone != null) {
bJobsStopped = true;
logger.info("scheduled jobs stopped");
} catch(Exception e) {
logger.info("Could not stop scheduled jobs: " + e.getMessage());

Any one have any thoughts?