Hi all,

in a project we use ant as a workflow-engine. The difference to the normal use as a buildtool is, that target (workflows) are executed as often as the user requests and the ant-application runs over long time. That makes it necessarry that ant-variables (properties) are evaluated mroe than just on time.

So each time a target is executed I call reconfigure previously for each task/runtimeconfigurable-object. The change in the attachted files delegate the reconfigure-call also to the children-xml-elements (also RuntimeConfigurable-Objects).

Now the bad news: If you have child-elements in your ant-tasks, that are no tasks (means: your task is not an task-container, but you use child-elements and implements methods like addConfiguredChild(Child c) ) . The addConfiguredChild or wathever method you implemented for your child-element is called as often as reconfigure is called on the task in a target. So you have to pay attention on clearing the list of your child-object after perform was called. For myself I implemented a method clearForReconfigure that is called for each of my tasks.

So I would like to get a feedback for this change (see attached diff) and the idea to use ant as workflowengine.

--
Thanks in advance.

Michael Augustin
344a345,350
>        throws BuildException
>     {
>        maybeConfigure(p, configureChildren, false);
>     }
>     
>     public void maybeConfigure(Project p, boolean configureChildren, boolean 
> reconfigure)
394c400,405
<                 child.maybeConfigure(p);
---
>                 // Michael Augustin, 2004-10-20
>                 // call reconfigure also for children
>                 if (reconfigure == true)
>                     child.reconfigure(p);
>                 else
>                     child.maybeConfigure(p);
427c438,441
<         maybeConfigure(p);
---
> 
>         // 2004-10-20 ,Michael Augustin
>         // call reconfigure also for children
>         maybeConfigure(p, true, true);

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to