Jump to content


How to set trigger on stream deletion?


  • Please log in to reply
5 replies to this topic

#1 xargs

xargs

    Newbie

  • Members
  • Pip
  • 4 posts

Posted 15 February 2017 - 05:58 AM

Hi,

I'm able to get a trigger on a stream creation with the following trigger and then parsing the argsQuoted:

sandbox change-commit //streamsDepot/... "mycmd %quote%%argsQuoted%%quote%"

However, I don't see to see a way to get a trigger on a stream delete.

The use case here is on stream create a sandbox dev env is created, and then on a delete it would trigger the deletion of the dev env.

Thx!

#2 Sambwise

Sambwise

    Advanced Member

  • Members
  • PipPipPip
  • 254 posts

Posted 15 February 2017 - 05:23 PM

You want a form-delete trigger that fires on forms of type stream.

Your current trigger is not firing on stream creation, it's firing on every change committed to that stream (which happens to include the initial change that populates it).  A form-commit trigger will fire when a stream form is created or updated.

#3 xargs

xargs

    Newbie

  • Members
  • Pip
  • 4 posts

Posted 15 February 2017 - 08:06 PM

Thanks will try that.

#4 xargs

xargs

    Newbie

  • Members
  • Pip
  • 4 posts

Posted 15 February 2017 - 10:39 PM

Oh is there a way to use a different trigger per path? e.g. //streamDepot1/... gets trigger A, and //streamDepot2/.. gets trigger B?

Thank you!

#5 Sambwise

Sambwise

    Advanced Member

  • Members
  • PipPipPip
  • 254 posts

Posted 15 February 2017 - 10:53 PM

Not for a form trigger, since the "path" is just the form type (stream in this case).  However, your trigger will have access to the stream name and can change its behavior accordingly (there's no reason your trigger can't execute another script/tool).

#6 xargs

xargs

    Newbie

  • Members
  • Pip
  • 4 posts

Posted 16 February 2017 - 12:41 AM

Got it, thank you!




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users