com.silverpeas.workflow.engine.timeout
Class TimeoutManagerImpl

java.lang.Object
  extended by com.silverpeas.workflow.engine.timeout.TimeoutManagerImpl
All Implemented Interfaces:
SchedulerEventListener, TimeoutManager

public class TimeoutManagerImpl
extends Object
implements TimeoutManager, SchedulerEventListener

The workflow engine services relate to error management.


Constructor Summary
TimeoutManagerImpl()
           
 
Method Summary
 void doTimeoutManagement()
          This method is called periodically by the scheduler, it test for each peas of type processManager if associated model contains states with timeout events If so, all the instances of these peas that have the "timeout" states actives are read to check if timeout interval has been reached.
 void initialize()
          Initialize timeout manager
 void jobFailed(SchedulerEvent anEvent)
          Invoked when the normal execution thread of a job is broken by an exception.
 void jobSucceeded(SchedulerEvent anEvent)
          Invoked when the execution of a job has been completed correctly.
 void triggerFired(SchedulerEvent anEvent)
          Invoked when a job trigger fires the execution of a job.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TimeoutManagerImpl

public TimeoutManagerImpl()
Method Detail

initialize

public void initialize()
Initialize timeout manager

Specified by:
initialize in interface TimeoutManager

doTimeoutManagement

public void doTimeoutManagement()
This method is called periodically by the scheduler, it test for each peas of type processManager if associated model contains states with timeout events If so, all the instances of these peas that have the "timeout" states actives are read to check if timeout interval has been reached. In that case, the administrator can be notified, the active state and the instance are marked as timeout

Parameters:
currentDate - the date when the method is called by the scheduler
See Also:
for parameters,

triggerFired

public void triggerFired(SchedulerEvent anEvent)
                  throws Exception
Description copied from interface: SchedulerEventListener
Invoked when a job trigger fires the execution of a job. The call of this method occurs before the actual job execution. So, wether an error occurs during the processing of this call, it is considered as a job failure and as consequency an event about a job failure will be sent to the listener. The processing of this event can be, for example for preparing the resources before the job execution or performing the execution of the job itself (delegation).

Specified by:
triggerFired in interface SchedulerEventListener
Parameters:
anEvent - the event coming from the trigger firing.
Throws:
Exception

jobSucceeded

public void jobSucceeded(SchedulerEvent anEvent)
Description copied from interface: SchedulerEventListener
Invoked when the execution of a job has been completed correctly. The job execution is considered as completed when it ends without raising any exceptions. The processing of this call can be, for example, for freeing the resources after a job completion.

Specified by:
jobSucceeded in interface SchedulerEventListener
Parameters:
anEvent - the event coming from the job completion.

jobFailed

public void jobFailed(SchedulerEvent anEvent)
Description copied from interface: SchedulerEventListener
Invoked when the normal execution thread of a job is broken by an exception. When an exception is thrown by the job execution, the exception is catched by the scheduler that then considers the job has failed and thus send an event about that failure. The processing of this event can be, for example, for freeing correctly the resources after a job failure or to run a rollback or a retry process.

Specified by:
jobFailed in interface SchedulerEventListener
Parameters:
anEvent - the event coming from the job failure.


Copyright © 2016 Silverpeas. All Rights Reserved.