Skip to Content.
Sympa Menu

en - Re: [sympa-users] custom scenario tasks

Subject: The mailing list for listmasters using Sympa

List archive

Chronological Thread  
  • From: Thomas Berry <address@concealed>
  • To: Philip Crandall <address@concealed>
  • Cc: "'address@concealed'" <address@concealed>
  • Subject: Re: [sympa-users] custom scenario tasks
  • Date: Thu, 22 Oct 2009 12:13:28 -0700

Philip,

Thanks for the quick response.

I had thought about what you suggestion, but I needed the scenario to perform more than one CustomCondition before the authentication took place. I was trying to figure out how to add these CustomCondition(s) as include scenarios, and add them as needed to newly defined send scenarios.

Maybe the following will work?


[include.urlcheck]
title.gettext Moderated with URL Review

CustomCondition::urlreview([listname],[sender],[msg_body]) smtp,smime,md5 -> reject(tt2='url_rejected')

----
[include.smstexting]
title.gettext Send SMS text message to list owners

CustomCondition::smstexting([listname],[sender]) smtp,smime,md5 -> editorkey


----
[send.jplcomm]
title.us Moderated with SMS texting and URL validation

include urlcheck
include smstexting
true() smtp,smime,md5 -> editorkey


----

smstexting.pm always returns FALSE

urlreview.pm returns FALSE if successful, else TRUE



Thomas


Philip Crandall wrote:
If you have the custom condition return false every time, the action won't
take place. So, yes, you could execute the code of a CustomCondition every
time a scenario runs and not do anything in the context of the scenario.
Just make sure to put it at the top of the scenario so that you make sure it
is executed.

Alternatively, if you are using the custom condition to send a SMS message to
the list owners when there is a message to moderate, you could replace the
true() part of the scenario with the custom condition and always return true
from your CustomCondition package. Along the lines of:
CustomCondition::yes() smtp,md5,smime -> editorkey

Philip Crandall
University of Chicago

-----Original Message-----
From: address@concealed [mailto:address@concealed] On
Behalf Of Thomas Berry
Sent: Thursday, October 22, 2009 1:23 PM
To: address@concealed
Subject: [sympa-users] custom scenario tasks


I want to write a scenario CustomCondition that performs a task, but
the
results of that task should be ignored in the context of the scenario
(the purpose of the CustomCondition is to send an SMS text message to
the owners of a list). Can I use a custom scenario and ignore its
results regardless whether it results in true or fales?



Archive powered by MHonArc 2.6.19+.

Top of Page