protected void _autoRunWF4PaymentOrder(Context ctx) throws BOSException,
EASBizException {
// 因为服务端Context默认为administrator,必须设置为职员,这里设置caller为职员,测试暂时为kingdee
ctx.setCaller(new ObjectUuidPK("xtxdwAh2SciaxSDLs/7zZhO33n8="));
IPaymentOrder iPaymentOrder = PaymentOrderFactory.getLocalInstance(ctx);
PaymentOrderCollection col = iPaymentOrder
.getPaymentOrderCollection("where state='"
+ PO_Enum.DRAFT_VALUE + "'");
if (col != null && col.size() > 0) {
try {
WfEventListenerStateManager.getInstance().enableEventListener();
for (int i = 0; i < col.size(); i++) {
PaymentOrderInfo info = col.get(i);
info.setState(PO_Enum.SUBMIT);
iPaymentOrder.submit(info);
}
} catch (EASBizException e) {
e.printStackTrace();
} finally {
WfEventListenerStateManager.getInstance()
.disableEventListener();
}
}
super._autoRunWF4PaymentOrder(ctx);
}
自动启动流程
最新推荐文章于 2021-11-04 23:30:04 发布