snaker-core/src/main/java/org/snaker/engine/impl/SchedulerInterceptor.java
public void intercept(Execution execution) {
		if(!isScheduled) return;
		for(Task task : execution.getTasks()) {
			String id = execution.getProcess().getId() 
					+ "-" + execution.getOrder().getId() 
					+ "-" + task.getId();
			Date expireDate = task.getExpireDate();
			if(expireDate != null) {
				schedule(id, task, expireDate, JobType.EXECUTER.ordinal(), execution.getArgs());
			}
			Date remindDate = task.getRemindDate();
			if(remindDate != null) {
				schedule(id, task, remindDate, JobType.REMINDER.ordinal(), execution.getArgs());
			}
		}
	}
public void intercept(Execution execution) {
		if(!isScheduled) return;
		for(Task task : execution.getTasks()) {
			String id = execution.getProcess().getId() 
					+ "-" + execution.getOrder().getId() 
					+ "-" + task.getId();
			Date expireDate = task.getExpireDate();
			if(expireDate != null) {
				schedule(id, task, expireDate, JobType.EXECUTER.ordinal(), execution.getArgs());
			}
			Date remindDate = task.getRemindDate();
			if(remindDate != null) {
				schedule(id, task, remindDate, JobType.REMINDER.ordinal(), execution.getArgs());
			}
		}
	}
public void intercept ( Execution execution ) { if ( ! isScheduled ) return ; for ( Task task : execution . getTasks ( ) ) { String id = execution . getProcess ( ) . getId ( ) + "-" + execution . getOrder ( ) . getId ( ) + "-" + task . getId ( ) ; Date expireDate = task . getExpireDate ( ) ; if ( expireDate != null ) { schedule ( id , task , expireDate , JobType . EXECUTER . ordinal ( ) , execution . getArgs ( ) ) ; } Date remindDate = task . getRemindDate ( ) ; if ( remindDate != null ) { schedule ( id , task , remindDate , JobType . REMINDER . ordinal ( ) , execution . getArgs ( ) ) ; } } }
时限控制拦截方法
时限控制拦截方法