patch [ 1666044 ] Workflow - Send Approval Notification As Notice Or Email
https://sourceforge.net/tracker/index.php?func=detail&aid=1666044&group_id=176962&atid=879334
This commit is contained in:
parent
0ab963ffed
commit
01693677f9
|
@ -1134,18 +1134,30 @@ public class MWFActivity extends X_AD_WF_Activity implements Runnable
|
||||||
setTextMsg ("User Choice: " + e.toString());
|
setTextMsg ("User Choice: " + e.toString());
|
||||||
log.log(Level.WARNING, "", e);
|
log.log(Level.WARNING, "", e);
|
||||||
}
|
}
|
||||||
// Send Approval Notification
|
// Send Approval Notification
|
||||||
if (newState.equals(StateEngine.STATE_Aborted))
|
if (newState.equals(StateEngine.STATE_Aborted)) {
|
||||||
{
|
MUser to = new MUser(getCtx(), doc.getDoc_User_ID(), null);
|
||||||
MClient client = MClient.get(getCtx(), doc.getAD_Client_ID());
|
String NotificationType = to.getNotificationType();
|
||||||
client.sendEMail(doc.getDoc_User_ID(),
|
|
||||||
doc.getDocumentInfo() + ": " + Msg.getMsg(getCtx(), "NotApproved"),
|
// send email
|
||||||
doc.getSummary()
|
if (MUser.NOTIFICATIONTYPE_EMail.equals(NotificationType)
|
||||||
+ "\n" + doc.getProcessMsg()
|
|| MUser.NOTIFICATIONTYPE_EMailPlusNotice.equals(NotificationType)) {
|
||||||
+ "\n" + getTextMsg(),
|
MClient client = MClient.get(getCtx(), doc.getAD_Client_ID());
|
||||||
doc.createPDF());
|
client.sendEMail(doc.getDoc_User_ID(), Msg.getMsg(getCtx(), "NotApproved")
|
||||||
|
+ ": " + doc.getDocumentNo(), doc.getSummary() + "\n"
|
||||||
|
+ doc.getProcessMsg() + "\n" + getTextMsg(), null);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Send Note
|
||||||
|
if (MUser.NOTIFICATIONTYPE_Notice.equals(NotificationType)
|
||||||
|
|| MUser.NOTIFICATIONTYPE_EMailPlusNotice.equals(NotificationType)) {
|
||||||
|
MNote note = new MNote(getCtx(), "NotApproved", doc.getDoc_User_ID(), null);
|
||||||
|
note.setTextMsg(doc.getSummary() + "\n" + doc.getProcessMsg() + "\n"
|
||||||
|
+ getTextMsg());
|
||||||
|
note.save();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
setWFState (newState);
|
setWFState (newState);
|
||||||
return ok;
|
return ok;
|
||||||
} // setUserChoice
|
} // setUserChoice
|
||||||
|
|
Loading…
Reference in New Issue