There is no way to trigger a global rule conditionally at
For template rules, you can mimic this behavior:
<![endif]>Add a condition at the top of the template prior to generating
any output. In this condition you could for example, check the size of the $sessions
<![endif]>This would then create an empty file if the condition is not
met, so you can then clear up empty files in the rule definition using the “Suppress
Empty Files” check box.
<![endif]>NOTE : This would potentially overwrite existing files, but I don’t
think that is what you are trying to avoid here.
I don’t know of any way of getting round the copy rule
Hope this helps,
[mailto:tigerstripe-dev-bounces@xxxxxxxxxxx] On Behalf Of Zhang,
Sent: 19 January 2010 10:56
To: Tigerstripe developers list
Cc: Flauw, Marc
Subject: [tigerstripe-dev] Can I run global rules conditionally?
Would please help me in following question:
the question is: can I run global rules conditionally? I'm
working with Tigerstripe workbench 0.5.0.x
- Global Rules - File/Directory Copy Rule:
For example, , I want to generate web servcies definitions
(XSD and WSDL) from tigerstripe models. Now given a model, IF the model is
relevant with notification, THEN I will copy existing WS-notification XSD/WSDL
files to target folder; ELSE IF the model is not relevant with
notification, THEN nothing will be copied.
- Global Rules - Global Template Rule:
The case is: I have one VM template in my tigerstripe generator,
when I run the generator agaist a model, the VM should
run only IF the model meets some global condition (e.g. the
model contains at least one SessionFacade).
HP Enterprise Services