[Anthill-pro] Run NonOriginating Workflow with script

Uldis Karlovs-Karlovskis uldisk at ctco.lv
Mon Feb 4 02:52:28 CST 2008


Steve,

Are there any progress? Of course it would be nice if this will be as
feature in 3.4.9.

 

Uldis Karlovs-Karlovskis, C. T. Co

 <mailto: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: trešdiena, 2008. gada 30. janvārī 11:01
To: 'AnthillPro user and support list.'
Subject: RE: [Anthill-pro] Run NonOriginating Workflow with script

 

Steve, I still need it.

 

Uldis Karlovs-Karlovskis, C. T. Co

 <mailto:uldis.karlovs-karlovskis at ctco.lv> uldis.karlovs-karlovskis at ctco.lv

 

-----Original Message-----
From: Uldis Karlovs-Karlovskis [mailto:uldisk at ctco.lv] 
Sent: otrdiena, 2008. gada 22. janvārī 17:05
To: 'AnthillPro user and support list.'
Subject: RE: [Anthill-pro] Run NonOriginating Workflow with script

 

Yes, I`ve realized that too. Firstly I`ve tried to use something like this:

RunWorkflowStepConfig runWorkflowStepConfig = new
RunWorkflowStepConfig(workflow);

RunWorkflowStep runWorkflowStep = new
RunWorkflowStep(runWorkflowStepConfig);

But there where some problems with PrivilegedAction or something.

 

Uldis Karlovs-Karlovskis, C. T. Co

 <mailto: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: otrdiena, 2008. gada 22. janvārī 16:58
To: AnthillPro user and support list.
Subject: Re: [Anthill-pro] Run NonOriginating Workflow with script

 

Yes,

Although it may seem simple enough by design the code to actually made a
workflow "wait"  is pretty complex.  We are working on getting you a clean
solution.

Hopefully we will have something for you today. 

Thanks for your patience!

Cheers,
Steve Boone

On 1/22/08, Uldis Karlovs-Karlovskis <uldisk at ctco.lv
<mailto:uldisk at ctco.lv> > wrote:

Steve, are You working on this?

 

Uldis Karlovs-Karlovskis , C. T. Co

 <mailto: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ī 16:25
To: 'AnthillPro user and support list.'
Subject: RE: [Anthill-pro] Run NonOriginating Workflow with script

 

Yes Steve, I need to wait for workflow to finish and did not found how to do
that.

 

Sorry, did not understand Your second question.

 

Uldis Karlovs-Karlovskis, C. T. Co

 <mailto: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: pirmdiena, 2008. gada 21. janvārī 16:21
To: AnthillPro user and support list.
Subject: Re: [Anthill-pro] Run NonOriginating Workflow with script

 

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 < <mailto:uldisk at ctco.lv>
uldisk at ctco.lv> wrote:

One more problem :-( How to set "Wait on Workflow" ?

 

Uldis Karlovs-Karlovskis , C. T. Co

 <mailto: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

 <mailto: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 < <mailto:uldisk at ctco.lv>
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

 <mailto: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 < <mailto:uldisk at ctco.lv>
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

 


_______________________________________________
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/20080204/8057cc45/attachment-0001.htm


More information about the Anthill-pro mailing list