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)
Workflow/Jobs
agiaccone
Ok, a runaway loop in the SDK has left me with 13,888 jobs in the Queue. I'd really like to delete them all, but I've got no idea how to do it. Can anyone point me at a simple way (ie not through the webclient) to delete 13 thousand plus workflows?
Tony Giaccone
Find more posts tagged with
Comments
nipper
What OS ?
I have done this on Solaris.
not pretty, but better than doing 13K remove jobs from the gui
Migrateduser
any chance that these 13888 workflows are the _only_ workflows currently active?
if that's the case, you could just nuke that portion of the backing store and make them alllllllll go away pretty quick :-) resets your workflow counter, too, not sure if that matters to you?
I haven't done it intentionally, but I believe the one time that I witnessed ALL of the workflows getting accidentally "lost", the contents of the iw-store/workflow directory were lost...obviously I would recommend making a full backup of your full backing store _before_ you delete the iw-store/workflow contents, but that might be a quicker option for you :-)
and if you do care about some of the workflows currently active, then nevermind :-)
cheers,
-Rori
pranav
Hi,
I have done ti many times , So few points regarding the deletion of workflows::
1>> Stop teamsite service and then delete the
worflow
floder inside
iw-store
folder.
2>>When you will again restart the server a new workflow folder will get created .
3>>This procedure should be used only when you want all the workflows to be deleted.
4>>You can't revert back to the earlier stage , So carefully check all your workflows before deleting the
workflow
folder
-Pranav
Migrateduser
Pranav,
deleting the workflow folder not comes into interwoven best practices. This is not the right approach to delete the tasks / jobs.
Best way is delete the jobs and sort by user or all.
~RG
Migrateduser
there's a "best practice" way to do things, and then the "this needs to get done NOW" way :-)
btw RG, did you see the original post that there are 13888 workflows to remove?? I'm not saying that the best practice way of doing things isn't the best or shouldn't be the first choice, just saying that all situations have their own considerations...
cheers,
-Rori
pranav
I agree with Rori .Sometimes one needs to do few things in uncoventional way(Depends on the constraints of the situation).
right ??
-Pranav
agiaccone
So here's the rest of the story. Fort those folks who wanted to know the OS, ti's Windows Server 2003.
There are 13888, workflows. I can't see any reasonable way to delete the from the web client. I can delete them one by one there. or even maybe 5 at a time, but what does that leave me, 2200 delete repetitions at @ 4 seconds a repetition, that's only 3 hours with out a break of workflow deletion.. Tedious at best ;-)
I don't have a iw-store file on the C drive where team site is installed, but I do have one on the G drive, which is the larger of the two and what I think has been configured to hold the data files that teamsite manages.
In the it-store folder is a workflow folder, which contains two folders. d0 and FORMAT. In d0 there are 9 folders d0 through D8. Each of those folders has many sub-folders often times 256, and the folders have 2 or 3 digit names which always start with d, (d1a, df7, df).
I'd prefer to find a way to delete these workflows with out blowing away this directory, but.. if that's the only reasonable way to do it, I'm up for it.
Tony
nipper
On Solaris I did this:
did a iwgetjobs which dumped an XML file of all jobs.
I stripped out the XML (with a VI command) and then inserted iwrmjob
in from of each line. Started it with a #!/bin/sh and it was ready to roll.
You can do that in a Perl script easily. Do you need to filter out or delete all
13K ?
Migrateduser
is iwgetjobs a new CLT? don't see it on my windows TS 6.1 ...
but this would work on windows, along the lines of what nipper did:
get output from "iwgetwfobj" called with NO parameters...spits out an XML format of the entire workflow registry, with an "activeworkflows" node containing an entry for each active workflow in the form of:
<activeworkflows>
<id v="434030" />
<id v="480712" />
....
</activeworkflows>
use your favorite XML parser and loop through all child nodes of the <activeworkflows> node....call the CLT "iwrmjob" with each "v" attrib value...
if you need to filter your workflows, you could do an "iwgetwfobj" on each workflow and extract whatever identifier you'd need, then decide if it goes to iwrmjob or not...
good luck!
-Rori
nipper
Yea I meant iwgetwfobj,
that was what I used.
Easy to write a Perl script to do it, can also put a filter in then if you need
pranav
Hi All,
I do agree with the solution , But i have some doubts abou tthe implementation using iwgetwfobj.
>> Do u want to keep few workflows and rest to delete out of 13888 ? If this is the case then deleting
workflow
folder will not work as it will delete all the workflows including the valid ones.
>>Lets assume if you write a perl script which will use iwgetwfobj iwrmjob to delete the jobs.Ar you trying to save some jobs using this ?
If yes then howcome you will get to know the jobids of those valid workflows .
>>Tony !!! you were describing the workflow folder structure and the details about d0 and etc........
My point is !!! this will be difficult to identify the workflows this way.
-Pranav
Edited by pranav on 08/25/05 01:34 AM (server time).
nipper
Don't know why you have questions about it, I have done it before easily.
BTW, if you do use iwgetwfobj, it returns a lot more than just jobs (like active tasks) etc,
so you need to do some filtering.
nipper
Here is a perlscript, just change the path and actually run iwrmjob:
#!/usr/iw-home/iw-perl/bin/iwperl
$wf =`/usr/iw-home/bin/iwgetwfobj`;
$wf =~ m|<activeworkflows>(.*)</activeworkflows>|sg;
my $jobsonly = $1;
$_=$jobsonly;
@jobs
= m|<id v=\"(.*)\"/>.*|g;
foreach (
@jobs)
{print "/usr/iw-home/bin/iwrmjob $_ \n";
}
Awaiting the usualy Ghoti critique of my code.