EAS 流程终止代码
public void actionAbort_actionPerformed(ActionEvent e) throws Exception{
checkSelected();
if (checkOperateProcessPermission("wf_report_Monitor_OperateAbort")) {
if (MsgBox.showConfirm2(this, ReportResourceUtil.getReportMultiLanguageResource("ABORT_CONFIRM")) != 0)
return;
String reason = InputBox.read();
if (reason == null)
return;
try {
int size = this.tblMain.getSelectManager().size();
IWfUtil util = (IWfUtil)RpcProxy.wrapRequired(IWfUtil.class, WfUtil.class.getName());
for (int i = 0; i < size; ++i) {
KDTSelectBlock sb = this.tblMain.getSelectManager().get(i);
for (int j = sb.getTop(); j <= sb.getBottom(); ++j) {
String state = getProcessInstanceState(j);
if ((!(state.equals(WfState.SUSPENDED.getValue()))) && (!(state.equals(WfState.BLOCKED.getValue()))) && (!(state.equals(WfState.RUNNING.getValue())))){
continue;
}
util.abort(getProcessInstanceID(j), reason);
}
}
refreshList();
initButtonState();
} catch (Exception e1) {
handleException("abortProcessErrMsg");
}
}else{
MsgBox.showWarning(this, ReportResourceUtil.getReportMultiLanguageResource("DonotSuspended"));
}
}