protected void updateSLA ( int seconds ) throws ActivityException { try { ProcessExecutor engine = this . getEngine ( ) ; super . loginfo ( "Update activity timeout as " + seconds + " seconds" ) ; InternalEvent delayMsg = InternalEvent . createActivityDelayMessage ( this . getActivityInstance ( ) , this . getMasterRequestId ( ) ) ; String eventName = ScheduledEvent . INTERNAL_EVENT_PREFIX + this . getActivityInstanceId ( ) + "timeout" ; engine . sendDelayedInternalEvent ( delayMsg , seconds , eventName , true ) ; } catch ( Exception e ) { throw new ActivityException ( - 1 , "Failed to update SLA for activity instance" + this . getActivityInstanceId ( ) , e ) ; } }
Update SLA of this