[Anthill-pro] Run NonOriginating Workflow with script
Steve Boone
sbb at urbancode.com
Mon Jan 21 08:21:12 CST 2008
Uldis,
Did you want to wait on a workflow to finish before running your scripted
workflow?
Do you want this part of the script to be its own step?
Regards,
Steve
On 1/21/08, Uldis Karlovs-Karlovskis <uldisk at ctco.lv> wrote:
>
> One more problem L How to set "Wait on Workflow" ?
>
>
>
> Uldis Karlovs-Karlovskis, C. T. Co
>
> *uldis.karlovs-karlovskis at ctco.lv* <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 *Uldis
> Karlovs-Karlovskis
> *Sent:* pirmdiena, 2008. gada 21. janvārī 12:30
> *To:* 'AnthillPro user and support list.'
> *Subject:* RE: [Anthill-pro] Run NonOriginating Workflow with script
>
>
>
> Thank You, Steve! This is what I need. I hope that I can assign values to
> workflow with br.setProperty("propName", "value");
>
>
>
> Uldis Karlovs-Karlovskis, C. T. Co
>
> *uldis.karlovs-karlovskis at ctco.lv* <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 *Steve Boone
> *Sent:* piektdiena, 2008. gada 18. janvārī 19:41
> *To:* AnthillPro user and support list.
> *Subject:* Re: [Anthill-pro] Run NonOriginating Workflow with script
>
>
>
> Uldis,
>
> This script below uses a workflow property called "workflow_prop"
>
> This property should be the name of the secondary (non-originating)
> workflow that you would like to run.
>
> ---------------
>
> import com.urbancode.anthill3.runtime.scripting.helpers.*;
> import com.urbancode.anthill3.services.build.*;
> import com.urbancode.anthill3.AnthillRuntimeException.*;
> import com.urbancode.anthill3.domain.buildrequest.* ;
> import com.urbancode.anthill3.domain.buildlife.*;
> import com.urbancode.anthill3.domain.workflow.*;
> import com.urbancode.anthill3.domain.servergroup.*;
> import com.urbancode.anthill3.domain.security.*;
> import com.urbancode.anthill3.domain.persistent.*;
> import com.urbancode.anthill3.domain.project.*;
>
>
> String wf = PropertyLookup.getValue("workflow_prop");
> Project prj = ProjectLookup.getCurrent();
> BuildLife bl = BuildLifeLookup.getCurrent();
> Workflow wflow = WorkflowLookup.getForProjectAndName(prj, wf);
> ServerGroup sg = ServerGroupLookup.getCurrent();
> User usr = BuildRequestLookup.getCurrent().getUser();
> RequestSourceEnum rse = BuildRequestLookup.getCurrent
> ().getRequestSource();
> Persistent req = BuildRequestLookup.getCurrent().getRequester();
>
>
> BuildRequest br = new BuildRequest(bl, wflow, sg, usr, rse, req);
> BuildService.getInstance ().runWorkflow(br);
>
>
>
> On 1/18/08, *Uldis Karlovs-Karlovskis* <uldisk at ctco.lv> wrote:
>
> No, this doesn't help me. I know how to get my buildlife and project
> workflow objects. I need script which can execute Secondary Workflow like "Run
> Another Workflow" step does.
>
>
>
> Uldis Karlovs-Karlovskis , C. T. Co
>
> *uldis.karlovs-karlovskis at ctco.lv* <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 *Steve Boone
> *Sent:* ceturtdiena, 2008. gada 17. janvārī 18:42
> *To:* AnthillPro user and support list.
> *Subject:* Re: [Anthill-pro] Run NonOriginating Workflow with script
>
>
>
> Uldis,
>
> Would this work for you?
>
> BuildLifeLookup.mostRecentSuccessForProjectAndWorkflowName(project,
> "Name_of_your_workflow")
>
> On 1/17/08, *Uldis Karlovs-Karlovskis* < uldisk at ctco.lv> wrote:
>
> Hello!
>
>
>
> Does anybody can help me to call Secondary workflow with script? I want to
> do this from Evaluation script. I`ve tried to create a "Run Workflow Step"
> with script and execute and run it directly but everything fails :(
>
> I need this to get ability run secondary workflows from Library Job
> because now I have identical 7 jobs per every project and every of them
> consist only from step "Run Workflow Step".
>
>
>
> With that script I can find Project Workflows on runtime just by Workflow
> name.
>
>
>
> *Uldis Karlovs - Karlovskis*
>
> *Build System and Deployment Administrator*
>
> *System Configuration Management*
>
> *C.T.Co *
>
> *Mobile: +371 29 345 210*
>
>
>
>
> _______________________________________________
> 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
>
>
>
> _______________________________________________
> Anthill-pro mailing list
> Anthill-pro at lists.urbancode.com
> http://lists.urbancode.com/mailman/listinfo/anthill-pro
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.urbancode.com/pipermail/anthill-pro/attachments/20080121/2f3c205c/attachment-0001.htm
More information about the Anthill-pro
mailing list