Optionally suppress messages and responses in a procedure

If you have questions or if you want to share your opinion about Aware IM post your message on this forum
Post Reply
kklosson
Posts: 1628
Joined: Sun Nov 23, 2008 3:19 pm
Location: Virginia

Optionally suppress messages and responses in a procedure

Post by kklosson »

I'm just looking to see if anyone has a better approach to this...

I have a few procedures which when run by themselves, deserve a Display Question message to ensure the user wants to do this thing. I also want a grand process that triggers about five of these type of processes but we don't want the question/response for each process when run in this batch mode. One question and one message at the end is just fine. So I am considering setting an attribute on the loggedin user caled 'SilentMode'. On the grand procedure, I would first set SilentMode to 'Yes', then Present the Question and confirm, then start the procedures.

So LoggedInUser.SilentMode='Yes'...
Within each procedure being called, I would have the following:

IF SilentMode<>'Yes' THEN
DisplayQuestion 'Do you want to do this thing?'

** Next Rule **

IF SilentMode<>'Yes' AND Question.Reply='Yes'
[Do the things...]
Display Message 'The Thing is done.'

** Next Rule **

IF SilentMode='Yes' THEN
[Do the things...]
V8.8
MySQL, AWS EC2, S3
PDFtk Toolkit
tford
Posts: 4238
Joined: Sat Mar 10, 2007 6:44 pm

Re: Optionally suppress messages and responses in a procedur

Post by tford »

Sounds perfect.
Tom - V8.8 build 3137 - MySql / PostGres
kklosson
Posts: 1628
Joined: Sun Nov 23, 2008 3:19 pm
Location: Virginia

Re: Optionally suppress messages and responses in a procedur

Post by kklosson »

Thanks. You saying so ensures no one else will chip in. But I think you're right. I need to code it and see.
V8.8
MySQL, AWS EC2, S3
PDFtk Toolkit
tford
Posts: 4238
Joined: Sat Mar 10, 2007 6:44 pm

Re: Optionally suppress messages and responses in a procedur

Post by tford »

As you know, in AwareIM there are usually many ways to get to the finish line.

Hopefully others will chip in their thoughts as well.
Tom - V8.8 build 3137 - MySql / PostGres
BenHayat
Posts: 2749
Joined: Thu Dec 23, 2010 5:48 am
Location: Fla, USA
Contact:

Re: Optionally suppress messages and responses in a procedur

Post by BenHayat »

Kingsley;
I have a similar situation that I have several child processes that are used/shared by different parent processes. Some of those parent processes require different types of "Display Question" message. So in my LoggedInSystemUser, I set "Message Type" value and in each child process, depending on this value, different "Display question" shows to user and works great. In one case, it's just like your case, no question asked.
Post Reply