BPM DD on DMRHead to send email

I have a BPM that works sometimes.

I created a DD on DMRHead In Transistion

Condition: ttDMRHead.DMRNum field has changed from any to any
ALso used At least one ADDED row to ttDMRHead
Actions:

> {lib/PublishInfoMsg.i   &InfoMsg = '"Some Test"'}.

>    DEF VAR ipc-subject    AS CHAR NO-UNDO.
>    DEF VAR ipc-emailtext  AS CHAR NO-UNDO.
>    
>    DEF VAR vh-bpmmail       AS HANDLE NO-UNDO.
>    DEF VAR pl-async         AS LOG  NO-UNDO.
>    DEF VAR pc-comp      AS CHAR NO-UNDO.
>    DEF VAR pc-from          AS CHAR NO-UNDO.
>    DEF VAR pc-to            AS CHAR NO-UNDO.
>    DEF VAR pc-cc            AS CHAR NO-UNDO.

>         run Bpm/BpmEmail.p persistent set vh-bpmmail.

>         pl-async = FALSE.
>         pc-from = 'XXXX@CCICMS.COM'.
>      	 pc-to = 'XXXXXX@ccicms.com'. 
>         pc-comp = cur-comp.

> 				ipc-subject = "DMR " + string(ttDMRHead.DMRNum) + " has been processed for PartNum: " +  ttDMRHead.PartNum + ".".
> 				/*ipc-subject = "DMR".*/
> 				ipc-emailtext = "BPM: DD DMRHead InTran - MAS".
> {lib/PublishInfoMsg.i   &InfoMsg = '"Some Test2"'}.	

>         RUN SendEmail in vh-bpmmail(pl-async,
>                                    pc-comp,
>                                    pc-from,
>                                    pc-to,
>                                    pc-cc,
>                                    ipc-subject,
>                                    ipc-emailtext,
>                                    "").
>    
>        DELETE OBJECT vh-bpmmail NO-ERROR.

When I go to Inspection Processing and FAIL the material, RMA, Inventory, I see the Popup message, but the email does not send most of the time.

My BPM Action Process is running every minute…
> 04/18/17 09:54:37 BPM Action Process - -------------------- Starting --------------------
> 04/18/17 09:54:37 BPM Action Process - PID: 9992; Session: 10.0.93.14::EpicorTest905::9421::a779c9e00e9a281d:-5d11a166:15b777adf9c:-330f
> 04/18/17 09:54:37 BPM Action Process - Started
> 04/18/17 09:54:37 BPM Action Process - Stopped
> 04/18/17 09:54:39 BPM Action Process - -------------------- Starting --------------------
> 04/18/17 09:54:39 BPM Action Process - PID: 11660; Session: 10.0.93.14::Epicor905Print::9405::a779c9e00e9a281d:467099e1:15b7778b4c1:-20ba
> 04/18/17 09:54:39 BPM Action Process - Started
> 04/18/17 09:54:39 BPM Action Process - Processing
> 04/18/17 09:54:39 BPM Action Process - Completed
> 04/18/17 09:54:39 BPM Action Process - Stopped
> 04/18/17 09:55:40 BPM Action Process - -------------------- Starting --------------------
> 04/18/17 09:55:40 BPM Action Process - PID: 13764; Session: 10.0.93.14::Epicor905Print::9405::a779c9e00e9a281d:467099e1:15b7778b4c1:-20af
> 04/18/17 09:55:40 BPM Action Process - Started
> 04/18/17 09:55:40 BPM Action Process - Processing
> 04/18/17 09:55:40 BPM Action Process - AblActionType #61145 - Starting action
> 04/18/17 09:55:41 BPM Action Process - AblActionType #61145 - Action completed
> 04/18/17 09:55:41 BPM Action Process - AblActionType #61146 - Starting action
> 04/18/17 09:55:42 BPM Action Process - AblActionType #61146 - Action completed
> 04/18/17 09:56:28 BPM Action Process - -------------------- Starting --------------------
> 04/18/17 09:56:28 BPM Action Process - PID: 9992; Session: 10.0.93.14::EpicorTest905::9421::a779c9e00e9a281d:-5d11a166:15b777adf9c:-3302
> 04/18/17 09:56:28 BPM Action Process - Started
> 04/18/17 09:56:28 BPM Action Process - Stopped

Here are the emails I rec’d. Once I got the first email, I tried to clean up the code, basically comment in/out stuff, then i was not able to get this going for an hour…then no more emails again.

Any thoughts?

You might find that the PID is stuck. Look in Task manager (if you are running windows) and you’ll see that PID 13764 is running and probably using up CPU. Notice how you never see a stopped line. Restarting the App servers fix it, but can be a pain if it is in the middle of the day. If you are using BPM action process on a schedule then it may be possible to cancel the running process, I only tried that once and the thing just sits in system manager saying cancelling. That being said another BPM Action task starts.

Sorry if the information is not much more help.