BPMEmail.p Blank Title 125240


(system) #1
Why are you passing the JObNum as the Mime Type to SENDEMAL after the body? try passing an empty string and see if that makes a diference or this
"type=text/html:charset=us-ascii:filetype=ascii"



Jose C Gomez
Software Engineer


T: 904.469.1524 mobile
E: jose@...
http://www.josecgomez.com

     Â


Quis custodiet ipsos custodes?


On Tue, Oct 8, 2013 at 4:34 PM, Vic Drecchio <vic.drecchio@...> wrote:

Â
<div>
  
  
  <p></p><div><p class="ygrps-yiv-1223280866MsoNormal">*<b>Vantage 8.03.409C/Progress</b>*<u></u><u></u></p><p class="ygrps-yiv-1223280866MsoNormal"><u></u> <u></u></p><p class="ygrps-yiv-1223280866MsoNormal">I’ve had quite an annoying problem that I’ve been working on for a couple weeks.  I’ve used BPMEmail.p in various BPM’s before to send automated emails.<u></u><u></u></p>

Â

This time, I’m simply trying to automate an email when a UD checkbox is checked in Job Entry. Everything fires correctly and I’ve borrowed other known-working code from my other BPMs but I can’t seem to fix this. Â

Â

After reading through this, does anyone have any ideas or perhaps what params the BPMEmail.p requires? Thanks in advance.

Â

Â

When I’m in Job Entry testing this BPM, I get this message-box that pops up:

Â

Exception caught in: Epicor.Mfg.BO.JobEntry

Â

Error Detail

============

Message: E-mail was not sent:Â (0)

Type: Error

Program: BPM/BPMEmail.p

Method: SendEmail

Table:

Row:

Field:

Â

Message:

To: alert.mtr@...

Subject: ALERT:Â TEST REPORT IS READY FOR JOB 15312

Type: Information

Program: BPM/BPMEmail.p

Method: SendEmail

Table:

Row:

Field:

Â

Â

Â

Stack Trace

===========

  at Epicor.Mfg.Proxy.JobEntryImpl.Update(JobEntryDataSet ds)

  at Epicor.Mfg.UI.Adapters.JobEntryAdapter.Update()

  at Epicor.Mfg.UI.App.JobEntry.Transaction.Update()

Â

Â

Then I check the Server Logs. I see the strangest error in it:

[13/10/08@16:14:09.553-0400] P-004320 T-005796 1 AS -- (Procedure: 'si/sim100-mail.p' Line:309) Value 3710386146 too large to fit in INTEGER datatype. (13682)

[13/10/08@16:14:09.553-0400] P-004320 T-005796 1 AS -- (Procedure: 'si/sim100-mail.p' Line:309) Unable to do run-time conversion of datatypes. (5678)

Â

Â

And that’s strange because I’m not attempting any data conversions. Here’s my 4GL code:

Â

Â

/*Â MTR ALERTÂ */

Â

FOR EACH TTJOBHEAD WHERE TTJOBHEAD.RowMod = ‘U’ AND TTJOBHEAD.CheckBox16 = TRUE,

EACH JOBHEAD WHERE JOBHEAD.JOBNUM = TTJOBHEAD.JobNum AND JOBHEAD.Company = TTJOBHEAD.Company AND TTJOBHEAD.CheckBox16 <> JOBHEAD.CheckBox16.

Â

{lib/PublishInfoMsg.i &InfoMsg = "'bpm fired!'"}.

Â

Â

DO:

Â

DEFINE VARIABLE vFrom AS CHARACTER NO-UNDO.

DEFINE VARIABLE vTo AS CHARACTER NO-UNDO.

DEFINE VARIABLE vCC AS CHARACTER NO-UNDO.

DEFINE VARIABLE vSubject AS CHARACTER NO-UNDO.

DEFINE VARIABLE vBody AS CHARACTER NO-UNDO.

DEFINE VARIABLE hMTREmail AS HANDLE NO-UNDO.

Â

Â

Â

RUN BPM/BPMEmail.p PERSISTENT SET hMTREmail.

Â

Â

Â

ASSIGN vFrom = ‘vantage@…’.

ASSIGN vTo = 'alert.mtr@...'.

ASSIGN vCC = 'it@...'.

ASSIGN vSubject = 'ALERT:Â TEST REPORT IS READY FOR JOB ' + TTJOBHEAD.JOBNUM.

ASSIGN vBody = ' <<<< THIS IS AN AUTOMATED MESSSAGE -- DO NOT REPLY >>>>' + CHR(13) + CHR(13) + CHR(13) + 'The Test Report is complete for Job ' + TTJOBHEAD.JOBNUM + '.  (By User ' + DCD-USERID + ')'.

Â

Â

RUN SENDEMAIL IN hMTREmail (

               FALSE,

               CUR-COMP,

               vFrom,

               vTo,

               vCC,

               vSubject,

               vBody,

               TTJOBHEAD.JOBNUM

               ).

Â

Â

END.

Â

END.

Â

Â

Â

Vic Drecchio

Â

Director of Information Technology

Swepco Tube, LLC

Â

Mobile:Â 704.530.3092

Office:Â x1379

Â

</div>
 


<div style="color:#fff;min-height:0;"></div>


(system) #2

*Vantage 8.03.409C/Progress*

 

I’ve had quite an annoying problem that I’ve been working on for a couple weeks.  I’ve used BPMEmail.p in various BPM’s before to send automated emails.

 

This time, I’m simply trying to automate an email when a UD checkbox is checked in Job Entry.  Everything fires correctly and I’ve borrowed other known-working code from my other BPMs but I can’t seem to fix this.  

 

After reading through this, does anyone have any ideas or perhaps what params the BPMEmail.p requires?  Thanks in advance.

 

 

When I’m in Job Entry testing this BPM, I get this message-box that pops up:

 

Exception caught in: Epicor.Mfg.BO.JobEntry

 

Error Detail

============

Message: E-mail was not sent:  (0)

Type: Error

Program: BPM/BPMEmail.p

Method: SendEmail

Table:

Row:

Field:

 

Message:

To: alert.mtr@...

Subject: ALERT:  TEST REPORT IS READY FOR JOB 15312

Type: Information

Program: BPM/BPMEmail.p

Method: SendEmail

Table:

Row:

Field:

 

 

 

Stack Trace

===========

   at Epicor.Mfg.Proxy.JobEntryImpl.Update(JobEntryDataSet ds)

   at Epicor.Mfg.UI.Adapters.JobEntryAdapter.Update()

   at Epicor.Mfg.UI.App.JobEntry.Transaction.Update()

 

 

Then I check the Server Logs.  I see the strangest error in it:

[13/10/08@16:14:09.553-0400] P-004320 T-005796 1 AS -- (Procedure: 'si/sim100-mail.p' Line:309) Value 3710386146 too large to fit in INTEGER datatype. (13682)

[13/10/08@16:14:09.553-0400] P-004320 T-005796 1 AS -- (Procedure: 'si/sim100-mail.p' Line:309) Unable to do run-time conversion of datatypes. (5678)

 

 

And that’s strange because I’m not attempting any data conversions.  Here’s my 4GL code:

 

 

/*  MTR ALERT  */

 

FOR EACH TTJOBHEAD WHERE TTJOBHEAD.RowMod = 'U' AND TTJOBHEAD.CheckBox16 = TRUE,

EACH JOBHEAD WHERE JOBHEAD.JOBNUM = TTJOBHEAD.JobNum AND JOBHEAD.Company = TTJOBHEAD.Company AND TTJOBHEAD.CheckBox16 <> JOBHEAD.CheckBox16.

 

{lib/PublishInfoMsg.i &InfoMsg = "'bpm fired!'"}.

 

 

DO:

 

DEFINE VARIABLE vFrom AS CHARACTER NO-UNDO.

DEFINE VARIABLE vTo AS CHARACTER NO-UNDO.

DEFINE VARIABLE vCC AS CHARACTER NO-UNDO.

DEFINE VARIABLE vSubject AS CHARACTER NO-UNDO.

DEFINE VARIABLE vBody AS CHARACTER NO-UNDO.

DEFINE VARIABLE hMTREmail AS HANDLE NO-UNDO.

 

 

 

RUN BPM/BPMEmail.p PERSISTENT SET hMTREmail.

 

 

 

ASSIGN vFrom = 'vantage@...'.

ASSIGN vTo = 'alert.mtr@...'.

ASSIGN vCC = 'it@...'.

ASSIGN vSubject = 'ALERT:  TEST REPORT IS READY FOR JOB ' + TTJOBHEAD.JOBNUM.

ASSIGN vBody = '  <<<< THIS IS AN AUTOMATED MESSSAGE -- DO NOT REPLY >>>>' + CHR(13) + CHR(13) + CHR(13) + 'The Test Report is complete for Job ' + TTJOBHEAD.JOBNUM + '.   (By User ' + DCD-USERID + ')'.

 

 

RUN SENDEMAIL IN hMTREmail (

                FALSE,

                CUR-COMP,

                vFrom,

                vTo,

                vCC,

                vSubject,

                vBody,

                TTJOBHEAD.JOBNUM

                ).

 

 

END.

 

END.

 

 

 

Vic Drecchio

 

Director of Information Technology

Swepco Tube, LLC

 

Mobile:  704.530.3092

Office:  x1379