IDEMPIERE-5643 - Error during document's workflows are not displayed on Workflow Activities form. (#1756)
* IDEMPIERE-5643 - Allows Workflow Activities form to throw Exceptions if an error occurs after user's approval * IDEMPIERE-5643 - show message in wf activity --------- Co-authored-by: matheus.marcelino <matheus.marcelino@devcoffee.com.br>
This commit is contained in:
parent
2911b1f421
commit
43800e2540
|
@ -85,7 +85,7 @@ public class MWFActivity extends X_AD_WF_Activity implements Runnable
|
|||
/**
|
||||
*
|
||||
*/
|
||||
private static final long serialVersionUID = 8180781075902940080L;
|
||||
private static final long serialVersionUID = -9119089506977887142L;
|
||||
|
||||
private static final String CURRENT_WORKFLOW_PROCESS_INFO_ATTR = "Workflow.ProcessInfo";
|
||||
|
||||
|
@ -2171,4 +2171,12 @@ public class MWFActivity extends X_AD_WF_Activity implements Runnable
|
|||
return where;
|
||||
}
|
||||
|
||||
public String getProcessMsg() {
|
||||
|
||||
if (m_process == null)
|
||||
return null;
|
||||
|
||||
return m_process.getProcessMsg();
|
||||
}
|
||||
|
||||
} // MWFActivity
|
||||
|
|
|
@ -673,11 +673,14 @@ public class WWFActivity extends ADForm implements EventListener<Event>
|
|||
m_activity.setUserChoice(AD_User_ID, value, dt, textMsg);
|
||||
MWFProcess wfpr = new MWFProcess(m_activity.getCtx(), m_activity.getAD_WF_Process_ID(), m_activity.get_TrxName());
|
||||
wfpr.checkCloseActivities(m_activity.get_TrxName());
|
||||
|
||||
if (!Util.isEmpty(m_activity.getProcessMsg(), true))
|
||||
Dialog.error(m_WindowNo, m_activity.getProcessMsg());
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
log.log(Level.SEVERE, node.getName(), e);
|
||||
Dialog.error(m_WindowNo, "Error", e.toString());
|
||||
Dialog.error(m_WindowNo, "Error", e.getLocalizedMessage() != null ? e.getLocalizedMessage() : e.getMessage());
|
||||
trx.rollback();
|
||||
trx.close();
|
||||
return;
|
||||
|
@ -693,6 +696,9 @@ public class WWFActivity extends ADForm implements EventListener<Event>
|
|||
m_activity.setUserConfirmation(AD_User_ID, textMsg);
|
||||
MWFProcess wfpr = new MWFProcess(m_activity.getCtx(), m_activity.getAD_WF_Process_ID(), m_activity.get_TrxName());
|
||||
wfpr.checkCloseActivities(m_activity.get_TrxName());
|
||||
|
||||
if (!Util.isEmpty(m_activity.getProcessMsg(), true))
|
||||
Dialog.error(m_WindowNo, m_activity.getProcessMsg());
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue