BOS+oracle
4.4.GUI性能脚本规范和示例4.4.1. 单据提交类Init: public void init(String xmlFileName) throws Exception { voucherUI = new TestVoucherUI(); //配置文件赋值 this.xmlFileName = xmlFileName; //UI界面 voucherUI.initLayout(); //UI加载 voucherUI.onLoad(); //通过XML文件获取对象 Object[] data = PerfTestDataReader.getObjectValue(xmlFileName); testData = (VoucherInfo)data[1]; } Action: public void action() throws Exception { //设置业务状态 testData.setBizStatus(VoucherStatusEnum.TEMP); //设置单据ID testData.setId(null); //设置单据状态 voucherUI.setOprtState(OprtState.ADDNEW); //清空单据NUMBER testData.setNumber(null); //绑定凭证对象 voucherUI.setDataObject(testData);try { //记录事务 LrWrapper.start_transaction("VoucherSubmit"); //凭证提交 voucherUI.actionSubmit_actionPerformed(null); LrWrapper.end_transaction("VoucherSubmit",0); } catch(Exception e) { LrWrapper.end_transaction("VoucherSubmit",1); throw e; }Copyright@ 2009 Kingdee第 20 页 共 38 页