Process workflow for SCemail

email notification

You all know that when you want to send or receive the notification from / to SM, we have to integrate with email application. One of them is SCEmail which is built-in mail of SM (Java Mail). So in this post, we will talk about the working flow of SCEmail to send the emails from SM. Here it is:

When scemail starts, it reads the value in the scemail.chk file and does a query for all email eventout records with an evsysseq (checkpoint) greater than the value in the scemail.chk file.

The query issued by scemail to the eventout file is roughly as follows:

SELECT … from eventoutm1 WHERE evtype=”email” and evsysseq>(the checkpoint number)

It sends all the emails that were selected (updating the scemail.chk file after each email) and then sleeps for 10 seconds (or whatever sleep value you have setup).

When scemail wakes up it does the same thing, except it uses the checkpoint value in memory rather than reading the scemail.chk file again.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s