[Anthill-pro] Secondary WF's
Eric Minick
etm at urbancode.com
Tue Nov 27 10:52:44 CST 2007
Curtis,
We need to combine our Javadocs, but if you go to the tools link in the
upper right, there's a link to the remoting javadocs, which has the
AnthillPro domain model. That's the approach I took.
I'll admit to cheating and looking at source to make sure isSuccess()
did what I thought it should since we have been pretty bad at commenting
our Javadocs, but otherwise I used the tools at your disposal.
So the (less than ideal) path to take would have been:
1) Look at the scripting helpers to get the build life lookup.
2) Go back into the remoting docs to find the build life class.
3) Find the getOriginating()
4) Find the getStatus() returns a WorkflowStatusEnum
5) See the isSuccess(), and pre-defined status values in that.
-- Eric
Yanko, Curtis wrote:
> How in the heck was I supposed to find that? I can't find
> getOriginatingWorkflow()??? ...anywhere in the Scripting JavaDocs?
>
> Besides, while I am sure this would work in my particular case what I
> really want is the more abstract solution. If I am to use build lives as
> ways to have 'gates' on the progress and promotion of my build I really
> just want the current status of the build life and not the status of the
> originating WF. I thought statuses were connected to Build Lives and
> just set by WF's.
>
> I saw Ryans script too but I got to tell you, even as someone who has
> been programming since the late 70's I don't quite get it. What is
> 'public boolean matches (Object obj)' anyway? Then the actual work is
> all in a 'throw'?!
>
> The actual status lookup seems reasonable enough though.
>
> The real solution is to have Secondary WF's filter not only on security
> but on Status as well. It should be impossible to run a Deploy WF
> against a build life that 'failed' to build. The statuses should be
> listed as Checkboxes that I can select and then the Secondary WF should
> only show if one of those statuses is the current one.
>
>
> ===
> -Curt
> W: 860.702.9059
> M: 860.881.2050
>
> -----Original Message-----
> From: anthill-pro-bounces at lists.urbancode.com
> [mailto:anthill-pro-bounces at lists.urbancode.com] On Behalf Of Eric
> Minick
> Sent: Tuesday, November 27, 2007 11:13 AM
> To: AnthillPro user and support list.
> Subject: Re: [Anthill-pro] Secondary WF's
>
> Curtis,
>
> Right. I think the way to choose based on originating workflow status
> is:
>
> status =
> BuildLifeLookup.getCurrent().getOriginatingWorkflow().getStatus();
>
> if (status.isSuccess()) {
>
> }
> else {
>
> }
>
>
>
>
> Yanko, Curtis wrote:
>
>> Ok, I'm looking at scripting and as always I get confused as nothing
>> seems clear to me.
>>
>> I would assume I need a WF lookup helper and Status lookup helper if I
>>
>
>
>> am to make a Job Pre-Condition Script I can use.
>>
>> So, BuildLifeLookup.getCurrent(() seems handy
>>
>> ..but then I don't where I could use that to determine the current
>> status of this current build life???
>>
>> ===
>> -Curt
>> W: 860.702.9059
>> M: 860.881.2050
>>
>>
>> ----------------------------------------------------------------------
>> --
>> *From:* anthill-pro-bounces at lists.urbancode.com
>> [mailto:anthill-pro-bounces at lists.urbancode.com] *On Behalf Of *Yanko,
>>
>
>
>> Curtis
>> *Sent:* Tuesday, November 27, 2007 10:01 AM
>> *To:* AnthillPro user and support list.
>> *Subject:* [Anthill-pro] Secondary WF's
>>
>> How can I prohibit Secondary WF's from being run (or even available)
>> on for failed builds? I don't see an easy way to limit by status and I
>>
>
>
>> don't want people deploying failed builds or Archiving Dev builds.
>>
>> I'm guessing I could evaluate a script but then the WF would still
>> show up to be run and I would rather not present it at all.
>>
>> ===
>> -Curt
>> W: 860.702.9059
>> M: 860.881.2050
>>
>>
>>
>>
>> This e-mail, including attachments, may include confidential and/or
>> proprietary information, and may be used only by the person or entity
>> to which it is addressed. If the reader of this e-mail is not the
>> intended recipient or his or her authorized agent, the reader is
>> hereby notified that any dissemination, distribution or copying of
>> this e-mail is prohibited. If you have received this e-mail in error,
>> please notify the sender by replying to this message and delete this
>>
> e-mail immediately.
>
>> This e-mail, including attachments, may include confidential and/or
>> proprietary information, and may be used only by the person or entity
>> to which it is addressed. If the reader of this e-mail is not the
>> intended recipient or his or her authorized agent, the reader is
>> hereby notified that any dissemination, distribution or copying of
>> this e-mail is prohibited. If you have received this e-mail in error,
>> please notify the sender by replying to this message and delete this
>>
> e-mail immediately.
>
>> ----------------------------------------------------------------------
>> --
>>
>> _______________________________________________
>> Anthill-pro mailing list
>> Anthill-pro at lists.urbancode.com
>> http://lists.urbancode.com/mailman/listinfo/anthill-pro
>>
>>
> _______________________________________________
> Anthill-pro mailing list
> Anthill-pro at lists.urbancode.com
> http://lists.urbancode.com/mailman/listinfo/anthill-pro
>
>
> This e-mail, including attachments, may include confidential and/or
> proprietary information, and may be used only by the person or entity to
> which it is addressed. If the reader of this e-mail is not the intended
> recipient or his or her authorized agent, the reader is hereby notified
> that any dissemination, distribution or copying of this e-mail is
> prohibited. If you have received this e-mail in error, please notify the
> sender by replying to this message and delete this e-mail immediately.
>
> _______________________________________________
> 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