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: Philip Crandall <address@concealed>
  • To: Thomas Berry <address@concealed>
  • Cc: "'address@concealed'" <address@concealed>
  • Subject: RE: [sympa-users] custom scenario tasks
  • Date: Fri, 30 Oct 2009 09:17:43 -0500

Thomas,
I don't see why that wouldn't work. The last rule "true()" may or may not
ever be executed depending on how you do the smstexting CustomCondition (i.e.
it doesn't necessarily have to return true, especially if you ever wanted to
add additional conditions below it). I haven't ever tried includes in a
scenario tt2, but I don't see any reason it shouldn't work. The work you're
doing looks interesting. Good Luck!

Philip

> -----Original Message-----
> From: address@concealed [mailto:address@concealed] On
> Behalf Of Thomas Berry
> Sent: Thursday, October 22, 2009 2:13 PM
> To: Philip Crandall
> Cc: 'address@concealed'
> Subject: Re: [sympa-users] custom scenario tasks
>
> 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