incubator-agila-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Geir Magnusson Jr <g...@4quarters.com>
Subject Re: [PATCH] adding getTasksForInstance() and setTaskStatusForInstance() to TaskService
Date Mon, 14 Feb 2005 14:02:11 GMT
applied

On Jan 18, 2005, at 2:27 PM, jastrachan@mac.com wrote:

> Attached is a patch (which also includes my previous patch from Nov 
> 30th for adding property setting of Nodes in the workflow XML) which 
> adds 2 new methods to TaskService...
>
>
>     /**
>      * Returns a list of tasks for the given workflow instance
>      * which are at the specified status
>      */
>     List getTasksForInstance(InstanceID instanceID, int status);
>
>     /**
>      * Updates the status of all tasks of the oldStatus on the given 
> workflow instance
>      * to the newStatus. This method can be used to cancel/complete 
> all open tasks, or
>      * re-open all complete tasks etc.
>      *
>      * @param instanceID
>      * @param oldStatus  the current status of the tasks
>      * @param newStatus  the new status of the tasks
>      * @return the number of rows updated
>      */
>     int setTaskStatusForInstance(InstanceID instanceID, int oldStatus, 
> int newStatus);
>
>
>
> This allows you to look up all of the tasks (or open/closed/cancelled 
> tasks) for a given workflow instance. (I've added a new TASK_CANCELLED 
> status too). It also lets you update the status of the tasks for an 
> instance - for example, to complete all outstanding tasks on a 
> workflow instance - or cancel them all - or re-open all the complete 
> tasks or whatever.
>
> This allows you to, say, close an existing workflow instance and 
> reopen another one with ease, without leaving around lots of old, dead 
> tasks.
>
> This patch also includes some minor fixes, to use the name 'status' 
> for parameters consistently, rather than 'type' and to ensure that if 
> the status Task.TASK_ALL is used on some of the methods (like 
> getTasksForUser(), getTasksForGroup() and so forth) that the 
> status-filter is not applied.
>
> <patch.txt>
>
> James
> -------
> http://radio.weblogs.com/0112098/
-- 
Geir Magnusson Jr                                  +1-203-665-6437
geir@gluecode.com


Mime
View raw message