Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Web CMS (TeamSite)
triggers - distinguish create from copy ?
nipper
Tough one here.
I have a trigger that I wanted to catch any copy commands or Save As (templates). I had to use iwatcreate
which catches Copy, Save As, and New DCRs.
Any idea how I can identify the New DCRs ? Can't look at history (cause there is none)
I am trying to understand the iwatcreate perl, to see if I can find anything useful
Tips/Pointers/RTFMs appreciated
Andy
Find more posts tagged with
Comments
Adam Stoller
First - you might be better off using 'iwat' and specifying the events you want it triggered off of rather than 'iwatcreate' - especially if you're dealing with Windows.
Second - you can identify a 'new' DCR by (a) its path, and (b) the fact that no corresponding file exists in the staging area for that branch.
Note - if you switch from iwatcreate to iwat - the information is passed in via command line arguments rather than as environment variables.
--fish
Senior Consultant, Quotient Inc.
http://www.quotient-inc.com
nipper
>First - you might be better off using 'iwat' and specifying the events you want it triggered off of rather than 'iwatcreate' - especially if you're dealing with >Windows.
I'm on Unix, but I will try anything if it will help.
>Second - you can identify a 'new' DCR by (a) its path, and (b) the fact that no corresponding file exists in the staging area for that branch.
No. If I copy DCRA to DCRB there is no history for DCRB. Whether it is a copy, save as, or new DCR.
Behind the scenes we have a DB ID in the DCR. So when a DCR is copied or Save As, we need to zero that field
and get a new one.
>Note - if you switch from iwatcreate to iwat - the information is passed in via command line arguments rather than as environment variables.
Will check that out.
Andy