@SuppressWarnings("static-access")
	public void run() {
		while (true) {
			try {
				Thread.currentThread().sleep(sleepSeconds * 1000);
			} catch (InterruptedException e) {
				logger.warn(e);
			}
			if (logger.isDebugEnabled())
				logger
						.debug("begin run processTimer to invoke expire all expired taskInstances!");
			List<ProcessTaskInstance> tasks = this.engineFactory
					.getProcessPersistence().findExpiredLimitedOpenTasks();
			if(tasks==null)
				continue;
			for (ProcessTaskInstance task : tasks) {
				try {
					ProcessEngine engine = this.engineFactory
							.getProcessEngine(task);
					ProcessNode pn = engine.getProcessConfig()
							.getProcessNodeById(task.getProcessNode());
					if (pn.getTask() != null
							&& pn.getTask().getExpireInvoker() != null) {
						ProcessContext context = ProcessContext
								.build(engine, task.getProcessInstanceId(), pn,
										new HashMap<String, Object>(), task
												.getForkId());
						// 为了跟踪流程流转日志，必须记录任务的父级日志ID
						context.setParentLogId(task.getParentLogId_Internal());
						context.getUserVariables().put(ProcessTaskInstance.EXPIRED_TASK_INSTANCE, task);
						engine.invoke(pn.getTask().getExpireInvoker(), context);
					}
				} catch (Exception e) {
					e.printStackTrace();
					logger.error(e);
				}
			}
		}

	}