Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 8 of 8 total
Thread Trigger an action from the Server that notifies the User??
Thu, Jul 29 2021 12:21 AMPermanent Link

Ian Branch

Avatar

Hi Team,
From within the EDBServer, is there a way to..
1.  Periodically, say hourly, filter a table by the contents of Field A and compare Field B's contents (DateTime) with the current datetime.
2.  If the current datetime is > Field B's datetime then initiate some action to flag to the User.

1. above is not a problem.  I just can't see how I can flag something to the User.
Perhaps run an App that would send an email, or something?

Welcome any thoughts/suggestions.

Regards & TIA,
Ian
Thu, Jul 29 2021 7:55 AMPermanent Link

Roy Lambert

NLH Associates

Team Elevate Team Elevate

Ian


Have the server job write to a table and have a background task that checks that table periodically. If an entry is found signal the main thread of the application to display a notification and once acknowledged remove the entry from the table.

Is that enough to get you on the way?

Roy Lambert
Thu, Jul 29 2021 4:37 PMPermanent Link

Ian Branch

Avatar

Hi Roy,
That's pretty much what I figured.  I was just hoping there was a simpler way than having a task running all the time.

Regards,
Ian
Thu, Jul 29 2021 6:29 PMPermanent Link

Raul

Team Elevate Team Elevate

On 7/29/2021 4:37 PM, Ian Branch wrote:
> That's pretty much what I figured.  I was just hoping there was a simpler way than having a task running all the time.

Nothing automatic nor built-in . However depends on what you want action
to be. You mentioned email so for that one can definitely do more of a
push model for server to trigger action into custom app or internet
service to send notification.

Raul

Fri, Jul 30 2021 2:10 AMPermanent Link

Roy Lambert

NLH Associates

Team Elevate Team Elevate

Raul


How would you communicate with the custom app or internet?

If email is built in (as I've done on a few applications) you might have access to its tables and could write directly to its inbox.

Roy Lambert
Fri, Jul 30 2021 9:15 AMPermanent Link

Raul

Team Elevate Team Elevate

On 7/30/2021 2:10 AM, Roy Lambert wrote:
>
> How would you communicate with the custom app or internet?
>
> If email is built in (as I've done on a few applications) you might have access to its tables and could write directly to its inbox.
>

I would write a custom external module and then call the procedure from
the server job.

Module would have to do the heavy lifting of course but sending email or
doing http post or such (if using external service) is pretty
straightforward.

One could also just create a generic module to simply execute external
app given path and params.

Raul
Sat, Jul 31 2021 4:45 PMPermanent Link

Ian Branch

Avatar

Hi Team,
I ended up writing a small console app that checks the database and emails the relevant info.
The app is called by the windows task scheduler at the appointed times.
All good
Thank you for your input.

Regards,
Ian
Wed, Aug 4 2021 7:30 AMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Raul,

<< I would write a custom external module and then call the procedure from the server job. >>

*This* is the best answer, in my opinion.  You only need to slap the emailing code into the EDB external module, and then any server job can easily call it like a procedure/function every N minutes, hours, etc.  Furthermore, the EDB external module can still access and update the same databases that the EDB Server does.  You would just need to use the TEDBExternalModule properties like ConfigPath, TempTablesPath, etc. to set up equivalent database access.  All database access would act just as if you were accessing a local database on your local machine directly using TEDB* components.

Tim Young
Elevate Software
www.elevatesoft.com
Image