开发步骤
com.actionsoft.bpms.schedule.IJob
接口该示例在AWS SDK API接口验证
(com.actionsoft.apps.poc.api)中提供源码。
package com.actionsoft.apps.poc.api.local.job;
import org.quartz.JobExecutionContext;
import org.quartz.JobExecutionException;
import com.actionsoft.bpms.schedule.IJob;
import com.actionsoft.sdk.local.SDK;
public class HelloJob implements IJob {
public void execute(JobExecutionContext jobExecutionContext)
throws JobExecutionException {
// 读管理员配置的扩展参数串,支持简单的@公式
String param = SDK.getJobAPI().getJobParameter(jobExecutionContext);
System.out.println("Hello AWS PaaS Job Demo! Param = " + param);
}
}
JobExecutionContext是Quartz提供的任务执行上下文对象,相关信息可通过Quartz网站了解更多
相关API
参见这里
当配置的触发策略被执行后,在AWS的后端控制台将打印输出:
Hello AWS PaaS Job Demo! Param = Today is 2015-08-19