[Anthill-pro] Using properties as a condition to bypass a step
emerson cargnin
echofloripa.yell at gmail.com
Sun Apr 13 13:49:06 CDT 2008
BTW, I'm trying to stop a job to run if a property in the project
called "hasNoResources" is defined as true. If it's not defined or
defined as false the job should be allowed to run.
I know I can get the property with the following :
PropertyLookup.getValue("hasNoResources")
But I have no clue how to, based on this value, to allow or not. Also
the "Job Pre-Condition Scripts" don't have much documentation. It
seems, for what i saw (the example below) that they return
"JobStatusEnum.SUCCESS" to allow the job to continue. But not really
sure how to put this into a beanshell script.
return JobStatus.parentsAre(JobStatusEnum.SUCCESS)
Could anyone give me an exaple or a hand on this?
thanks
emerson
On 13/04/2008, emerson cargnin <echofloripa.yell at gmail.com> wrote:
> It would be good if the preconditions could be included at the step level, at the "Continuation Condition:", this could also include a scripted option.
> PS: by the way, the name "continuation condition" is a bit confusing, as that is actually a pre-condition, and "PreCondition:" is the name used at the steps list level (when pressing at '+').
>
> regards
> Emerson
>
>
>
>
> On 10/04/2008, Uldis Karlovs-Karlovskis <uldisk at ctco.lv> wrote:
> >
> >
> >
> >
> >
> > I`ve found an only way to accomplish this by splitting those steps into Jobs, so after then You can use Job Precondition scripts.
> >
> >
> >
> >
> > Regards,
> >
> > Uldis, C. T. Co
> >
> > uldis.karlovs-karlovskis at ctco.lv
> >
> >
> >
> >
> > -----Original Message-----
> > From: anthill-pro-bounces at lists.urbancode.com [mailto:anthill-pro-bounces at lists.urbancode.com] On Behalf Of Tyler Andreasen
> > Sent: ceturtdiena, 2008. gada 10. aprīlī 0:43
> > To: anthill-pro at lists.urbancode.com
> > Subject: [Anthill-pro] Using properties as a condition to bypass a step
> >
> >
> >
> > I have a job with several tasks. I want to have a Boolean property (0 or 1) such that if set to 0, certain steps in a job will NOT run. Is there any practical way to do this using properties? Or is there another way.
> >
> >
> >
> > Thanks,
> >
> > T. Andreasen
> > _______________________________________________
> > Anthill-pro mailing list
> > Anthill-pro at lists.urbancode.com
> > http://lists.urbancode.com/mailman/listinfo/anthill-pro
> >
> >
>
>
More information about the Anthill-pro
mailing list