Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Web CMS (TeamSite)
Task list based on workarea
goff2512
Does anyone know if there is any way to obtain a list of current open/active tasks associated with a specific workarea? As far as I can tell, it looks like we can only obtain a list of tasks associated with a file or a particular user, but not for an entire workarea. We are experimenting with iwquerytasks and iwgetwfobj, but it will require some looping through of our users in a workarea. I was wondering if there was a simpler method.
This is for TeamSite 6.1 on NT
Any suggestions would be greatly appreciated.
Thanks!
Find more posts tagged with
Comments
Migrateduser
When you say "looping through", how exactly are you approaching it currently? If you were to do an iwgetwfobj, you could slurp the output and then populate an array from there and then sort. Computationally, it's not that bad at 2*n, MAYBE 3*n complexity.
Dave
Current Environment(s):
(1) TS 6.1 SP1 on W2K3
(2) TS 6.1 SP1 on W2K
(3) TS 5.5.2 SP2 on Win2K
goff2512
Dave
Can you give us an example where iwgetwfobj will list job based on a user and/or workarea? Thanks
Migrateduser
Oh, no -- it won't. But, if you were to use the TeamSite::WFworkflow module to list all active tasks or workflows, depending on your need, it would seem to do the trick. You might need to do a lot of parsing and looping a couple of times, but the looping complexity really shouldn't be a hardship.
I've only used the WFworkflow module a few times, so you'll likely need to do a bit of reading on it if you're not already familiar.
Dave
Current Environment(s):
(1) TS 6.1 SP1 on W2K3
(2) TS 6.1 SP1 on W2K
(3) TS 5.5.2 SP2 on Win2K
Adam Stoller
Hmm - interesting question - I liked it so much I whipped this little ditty up. I'll leave it to someone else to finish the embelishments on this script (unless I find a need for it myself before someone does so):
use strict;
use TeamSite::WFsystem;
use TeamSite::WFtask;
my $system = new TeamSite::WFsystem();
my $atasks = $system->GetActiveTasks();
my %AREAS;
foreach (
@$atasks){
my $area = $_->GetArea();
$AREAS{$area}++;
}
if (keys(%AREAS)){
print "The following areas have active tasks:\n";
printf("\t[%3d] %s\n", $AREAS{$_}, $_) foreach(sort(keys(%AREAS)));
}
--fish
Senior Consultant, Quotient Inc.
http://www.quotient-inc.com
goff2512
fish,
Thanks for the reply... although it was not exactly what we were looking for, it certainly led us in the correct direction. Just so others know, the other system functions can be found in the \iw-home\iw-perl\vendor\lib\TeamSite\WFtask.pm file. A few more that we needed:
GetArea();
GetOwner();
GetWorkflowId();
GetDescription();
GetName();
GetId();
GetType()
GetState()
NeedsAttention()
GetSharedBy(\
@users
, \
@groups)
GetTimeout()
GetActivationTime()
GetUnactivationTime()
GetTransitionMade()
GetDuration($dec, $delta_format)
These are just a few...... check out the file for all of them.
Thanks!
Geoff