public void sendDelayEventsToWaitActivities ( String masterRequestId ) throws DataAccessException , ProcessException { TransactionWrapper transaction = null ; EngineDataAccessDB edao = new EngineDataAccessDB ( ) ; try { transaction = edao . startTransaction ( ) ; List < ProcessInstance > procInsts = edao . getProcessInstancesByMasterRequestId ( masterRequestId , null ) ; for ( ProcessInstance pi : procInsts ) { List < ActivityInstance > actInsts = edao . getActivityInstancesForProcessInstance ( pi . getId ( ) ) ; for ( ActivityInstance ai : actInsts ) { if ( ai . getStatusCode ( ) == WorkStatus . STATUS_WAITING . intValue ( ) ) { InternalEvent event = InternalEvent . createActivityDelayMessage ( ai , masterRequestId ) ; this . sendInternalEvent ( event , edao ) ; } } } } catch ( SQLException e ) { throw new ProcessException ( 0 , "Failed to send delay event wait activities runtime" , e ) ; } finally { edao . stopTransaction ( transaction ) ; } }
This is for regression tester only .