Demo Discussion
Forum Config Examples Contributions Vulnerabilities
  Discussion forum about ELOG  Not logged in ELOG logo
icon5.gif   Mass postings, posted by mike cianci on Sat May 3 14:59:14 2008 
    icon2.gif   Re: Mass postings, posted by Stefan Ritt on Mon May 5 08:44:03 2008 
       icon2.gif   Re: Mass postings, posted by Erik Iverson on Mon Jun 9 15:57:15 2008 
Message ID: 65909     Entry time: Mon Jun 9 15:57:15 2008     In reply to: 65866
Icon: Reply  Author: Erik Iverson  Author Email: eiverson@ornl.gov 
Category: Question  OS: Windows  ELOG Version:  
Subject: Re: Mass postings 

Stefan Ritt wrote:

mike cianci wrote:

I am setting this up as instrument log in a multi-hospital system, where there will be multiple instruments, in multiple departments, at multiple facilities.

I am using the "Top Group" function to keep the books separate so operators from one instrument/department/facility don't contaminate another instrument/department/facility's logbook.

What I am wondering is there someway to set it up so that a system wide manager could post a message to 5 individual logbooks for 5 identical instruments at 5 different locations all at once (one ELOG server)?

I hope this made sense.  Thank you for your help.

Unfortunately this is not possible at the moment. You would have to use the menu command "copy to" and enable it for the admin user. Then you create your entry, and click on "copy to" once for each location you want to copy this entry.

 

I found a way to get this to work.  Define a "Messages" logbook for the messages to be broadcast.  None of the user installations need access to it. Use "Execute new = " to execute a script calling the elog command line client passing the message on to each target logbook.  Example:

--- elogd.cfg snippet begin ---

[Messages]

...

Execute new = mass_post.sh $text &

--- elogd.cfg snippet end ---

--- mass_post.sh begin ---

#!/bin/sh

elog -a Sender="System Administrator" -l "Logbook 1" $@

elog -a Sender="System Administrator" -l "Logbook 2" $@

elog -a Sender="System Administrator" -l "Logbook 3" $@

--- mass_post.sh end ---

The $@ expands to all the command line arguments, so the $text field, with all its spaces, gets passed correctly.  Sorry I showed you the example in bash/linux rather than in Windows, but I don't know Windows real well - you're better off translating into it yourself than my untested attempts.  The one thing I can tell you is that the "Execute new" command must include the "background fork".  In Linux this is provided by the & at the end of the line. In windows you'll need to use

Execute new = start "dummy" /min mass_post.bat

to background the process.  This is ESSENTIAL.  Without backgrounding the batch file, the elogd server will go into an infinite loop.  The parent process will wait for the child process to exit before continuing.  elogd is single-threaded, so the child process cannot start until the parent process has completed its current task (which is waiting for the child process to exit). 

You may need to tweak the above a little if you want to pass variable attributes to the script instead of defining them all in the script itself.

 

ELOG V3.1.5-fe60aaf