📄 processdetaillist.bsh
字号:
import java.util.*;import org.ofbiz.base.util.*;import org.ofbiz.shark.container.*;import org.ofbiz.shark.requester.*;import org.enhydra.shark.api.client.wfservice.*;import org.enhydra.shark.api.client.wfmodel.*;userLogin = session.getAttribute("userLogin");// get the admin toolsadmin = SharkContainer.getAdminInterface();exMgr = admin.getExecutionAdministration();if (userLogin == null) { request.setAttribute("_ERROR_MESSAGE_", "UserLogin object not found."); return;}// connect to the engineexMgr.connect(userLogin.getString("userLoginId"), userLogin.getString("currentPassword"), null, null);// start a processif (request.getParameter("start") != null) { try { procId = request.getParameter("start"); proc = exMgr.getProcess(procId); proc.start(); } catch (Exception e) { request.setAttribute("_ERROR_MESSAGE_", e.getMessage()); }}// suspend a processif (request.getParameter("suspend") != null) { try { procId = request.getParameter("suspend"); proc = exMgr.getProcess(procId); proc.suspend(); } catch (Exception e) { request.setAttribute("_ERROR_MESSAGE_", e.getMessage()); }}// resume a processif (request.getParameter("resume") != null) { try { procId = request.getParameter("resume"); proc = exMgr.getProcess(procId); proc.resume(); } catch (Exception e) { request.setAttribute("_ERROR_MESSAGE_", e.getMessage()); }}// abort a processif (request.getParameter("abort") != null) { try { procId = request.getParameter("abort"); proc = exMgr.getProcess(procId); proc.abort(); } catch (Exception e) { request.setAttribute("_ERROR_MESSAGE_", e.getMessage()); }}// terminate a processif (request.getParameter("terminate") != null) { try { procId = request.getParameter("terminate"); proc = exMgr.getProcess(procId); proc.terminate(); } catch (Exception e) { request.setAttribute("_ERROR_MESSAGE_", e.getMessage()); }}// manager namemgrName = request.getParameter("manager");if (mgrName != null) { context.put("manager", mgrName); // get the process manager mgr = exMgr.getProcessMgr(mgrName); if (mgr != null) { // get the processes count = mgr.how_many_process(); procs = mgr.get_sequence_process(count); context.put("processes", procs); }}// disconnect from the engineexMgr.disconnect();
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -