/*
* Determine provider
*/
Scheduler scheduler = getScheduler(context);
context.getExecutionContext().getNotifier().startSchedule(context);
Provider provider = scheduler.schedule(context);
context.getExecutionContext().getNotifier().finishSchedule(context);
log.debug("After scheduling, try to run data chain");
/*
* Load data necessary data
*/
buildChains(getDataChains(context)).start(context);
log.debug("After data chain, try to init provider");
/*
* Init
*/
provider.initialize(context);
log.debug("After provider initialization, try to run pre-execution chain");
/*
* Pre-Execution
*/
buildChains(getPreExecutionSteps(context)).start(context);
log.debug("After pre-execution chain, try to execute provider");
try {
/*
* Execute
*/
Map<String, ?> result = provider.execute(context);
log.debug("After provider execution, try to run post-execution chain");
/*
* Fill MessageContext with the output from Provider
*/
for (Entry<String, ?> entry : result.entrySet()) {
context.getOutput().setValue(entry.getKey(), entry.getValue());
}
/*
* Post-Execution
*/
buildChains(getPostExecuteSteps(context)).start(context);
log.debug("After pre-execution chain, try to dispose provider");
} finally {
/*
* Destroy
*/
provider.dispose(context);
log.debug("After provider disposal, try to run postprocess");
}
/*