1、程序的编写与要求(部分摘自博客低调的奢华)
import oracle.apps.fnd.cp.request.*;
import oracle.apps.fnd.util.*;
//Class 需要实现 JavaConcurrentProgram 这个 interface
public class Class1 implements JavaConcurrentProgram{
public Class1() {
}
//实现interface 中的runProgram方法,参数有且只能为 CpContext
public void runProgram(CpContext cpcontext)
{
//取得并发程序传入的参数列表
ParameterList lPara = cpcontext.getParameterList();
ReqCompletion lrc = cpcontext.getReqCompletion();
try
{
//把参数名字和参数的值分别在log和output中打印出来
while(lPara.hasMoreElements())
{
NameValueType nvt = lPara.nextParameter();
cpcontext.getOutFile().writeln(nvt.getName() + ":" + nvt.getValue());
cpcontext.getLogFile().write(nvt.getName() + ":" + nvt.getValue(), LogFile.STATEMENT);
//完成打印的步骤后,设置程序的结束状态