From 56b1d98e273a8a8438b0bef8c15d0ad505505753 Mon Sep 17 00:00:00 2001 From: Carlos Ruiz Date: Thu, 29 Aug 2019 13:12:51 +0200 Subject: [PATCH] IDEMPIERE-3998 Execute Toolbar Process / add info about parameter *RecordIDs* when using this new feature - for logging purposes --- .../WEB-INF/src/org/adempiere/webui/apps/WProcessCtl.java | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/WProcessCtl.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/WProcessCtl.java index ae9bf79adc..65abff97be 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/WProcessCtl.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/WProcessCtl.java @@ -28,6 +28,7 @@ import org.adempiere.webui.session.SessionManager; import org.compiere.apps.AbstractProcessCtl; import org.compiere.apps.IProcessParameter; import org.compiere.model.MPInstance; +import org.compiere.model.MPInstancePara; import org.compiere.process.ProcessInfo; import org.compiere.util.CLogger; import org.compiere.util.DB; @@ -152,10 +153,10 @@ public class WProcessCtl extends AbstractProcessCtl { */ public static void process(IProcessUI aProcessUI, int WindowNo, IProcessParameter parameter, ProcessInfo pi, Trx trx) { - if (log.isLoggable(Level.FINE)) log.fine("WindowNo=" + WindowNo + " - " + pi); + if (log.isLoggable(Level.FINE)) log.fine("WindowNo=" + WindowNo + " - " + pi); + MPInstance instance = null; if (pi.getAD_PInstance_ID() < 1) { //red1 bypass if PInstance exists - MPInstance instance = null; try { instance = new MPInstance(Env.getCtx(), pi.getAD_Process_ID(), pi.getRecord_ID()); @@ -196,6 +197,8 @@ public class WProcessCtl extends AbstractProcessCtl { if (pi.getRecord_IDs() != null && pi.getRecord_IDs().size() > 0) { DB.createT_Selection(pi.getAD_PInstance_ID(), pi.getRecord_IDs(), null); + MPInstancePara ip = instance.createParameter(-1, "*RecordIDs*", pi.getRecord_IDs().toString()); + ip.saveEx(); } // execute