You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

56 lines
1.8 KiB
Java

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

package weaver.interfaces.workflow.action.javacode;
import weaver.conn.RecordSet;
import weaver.conn.RecordSetTrans;
import weaver.general.StringUtil;
import weaver.interfaces.workflow.action.Action;
import weaver.general.BaseBean;
import weaver.soa.workflow.request.RequestInfo;
/**
* Online custom action interface
* 修改流程紧急程度(测试环境)
*/
public class Action20231027060156 extends BaseBean implements Action{
/**
* After selecting aciton after the process path node, this method will be executed after the node is submitted.
*/
public static final String updateReqLevel = "update workflow_requestbase set requestlevel = 2 where requestid= ?";
public String execute(RequestInfo request) {
//1:Log
writeLog("in my online edited action");
//2Exception
// boolean error=true;
// if(error) {
// request.getRequestManager().setMessageid("90001");
// request.getRequestManager().setMessagecontent("System Abnormal Termination Process Submission");
// }
//3Get requestid
String requestId = request.getRequestid();
if(StringUtil.isEmpty(requestId)){
return Action.SUCCESS;
}
RecordSetTrans rs = request.getRequestManager() .getRsTrans();
// RecordSet rs = new RecordSet();
try {
// rs.setAutoCommit(false);
rs.executeUpdate(updateReqLevel,requestId);
int updateCount = rs.getUpdateCount();
writeLog("更新条数==>",updateCount);
// if(updateCount > 1){
// // rs.rollback();
// }else{
// // rs.commit();
// }
} catch (Exception e) {
// rs.rollback();
e.printStackTrace();
}
return Action.SUCCESS;
}
}