System.out.println( "Running Schedule" );
Usecase usecase = UsecaseBuilder.newUsecase( "ScheduleRunner" );
UnitOfWork uow = module.newUnitOfWork( usecase );
try
{
Schedule schedule = uow.get( Schedule.class, this.schedule.scheduleIdentity );
Task task = schedule.task().get();
schedule = uow.get( Schedule.class, this.schedule.scheduleIdentity );
try
{
schedule.taskStarting();
task.run();
schedule.taskCompletedSuccessfully();
}
catch( RuntimeException ex )
{
schedule.taskCompletedWithException( ex );
}
schedulerMixin.dispatchForExecution( schedule );
uow.complete();
}
catch( UnitOfWorkCompletionException ex )