From agila-dev-return-44-apmail-incubator-agila-dev-archive=www.apache.org@incubator.apache.org Mon Feb 14 14:14:26 2005 Return-Path: Delivered-To: apmail-incubator-agila-dev-archive@www.apache.org Received: (qmail 81834 invoked from network); 14 Feb 2005 14:14:25 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur-2.apache.org with SMTP; 14 Feb 2005 14:14:25 -0000 Received: (qmail 41187 invoked by uid 500); 14 Feb 2005 14:14:25 -0000 Mailing-List: contact agila-dev-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: agila-dev@incubator.apache.org Delivered-To: mailing list agila-dev@incubator.apache.org Delivered-To: moderator for agila-dev@incubator.apache.org Received: (qmail 20632 invoked by uid 99); 14 Feb 2005 14:02:10 -0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: pass (hermes.apache.org: local policy) Mime-Version: 1.0 (Apple Message framework v619) In-Reply-To: References: Content-Type: text/plain; charset=US-ASCII; format=flowed Message-Id: <05B6A096-7E91-11D9-96B0-000A95D41A40@4quarters.com> Content-Transfer-Encoding: 7bit From: Geir Magnusson Jr Subject: Re: [PATCH] adding getTasksForInstance() and setTaskStatusForInstance() to TaskService Date: Mon, 14 Feb 2005 09:02:11 -0500 To: agila-dev@incubator.apache.org X-Mailer: Apple Mail (2.619) X-Virus-Checked: Checked X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N 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. > > > > James > ------- > http://radio.weblogs.com/0112098/ -- Geir Magnusson Jr +1-203-665-6437 geir@gluecode.com