HiIs there a way to remove workflow jobs from workflow tab in TeamSite without having to manually remove them (menu option end job) one by one. There are few hundred jobs that I want to delete.Thanks
hi
the link is not working on this. can you please provide the correcy path?
thanks
The links were for the old (or old-old) forums - and thus, unfortunately, do not work in the new forums.
I suggest you read up about iwrmjob and iwqueryjobs - the first is the tools for removing workflows (a CLT run from the command line on the TeamSite server), the second is one way that you can retrieve the desired information (job ids) to provide to the first tool, to remove just the jobs you want to remove.
From there - it's up to you to write the code to do what you want - or hire someone who knows how to write such code to come in and do it for you.
ghoti wrote: The links were for the old (or old-old) forums - and thus, unfortunately, do not work in the new forums.I suggest you read up about iwrmjob and iwqueryjobs - the first is the tools for removing workflows (a CLT run from the command line on the TeamSite server), the second is one way that you can retrieve the desired information (job ids) to provide to the first tool, to remove just the jobs you want to remove. From there - it's up to you to write the code to do what you want - or hire someone who knows how to write such code to come in and do it for you.
Ahem...
I wrote a script running weekly from cron to find all Jobs
- > 1 week old and email user (with link to the Job/Task) to do something about them, and
- > 2 weeks old delete the Job & inform user
I've found that has worked well and keeps us to just 2-3 screens full of workflows.
The question I would ask is why are there so many outstanding workflows in the first place? Unless something goes wrong with the system (eg failed deploy) or people are not doing their tasks (that's another issue) then shouldn't Jobs either not be started in the first place or terminated gracefully? Time to do a little rewriting of the workflows, prevention better than cure and all that?
Most often, the reason so many jobs remain in the system is because the workflows (WFT and/or WFM) weren't written with proper timeout and/or error handling tasks - and jobs just get hung somewhere and forgotten until someone comes along and does something about it manually (or programmatically as you did)
HurricanesFan wrote: ghoti wrote: The links were for the old (or old-old) forums - and thus, unfortunately, do not work in the new forums.I suggest you read up about iwrmjob and iwqueryjobs - the first is the tools for removing workflows (a CLT run from the command line on the TeamSite server), the second is one way that you can retrieve the desired information (job ids) to provide to the first tool, to remove just the jobs you want to remove. From there - it's up to you to write the code to do what you want - or hire someone who knows how to write such code to come in and do it for you. Ahem... I wrote a script running weekly from cron to find all Jobs- > 1 week old and email user (with link to the Job/Task) to do something about them, and- > 2 weeks old delete the Job & inform user I've found that has worked well and keeps us to just 2-3 screens full of workflows. The question I would ask is why are there so many outstanding workflows in the first place? Unless something goes wrong with the system (eg failed deploy) or people are not doing their tasks (that's another issue) then shouldn't Jobs either not be started in the first place or terminated gracefully? Time to do a little rewriting of the workflows, prevention better than cure and all that?
We call this a giant band-aid.
Fix the problem, not the symptom.
The reason that the workflows are staying there is manu:
1. Users lack of training they stay on the Approval Step and users never get back to it
2. They fail on validates or locking and the user initiate another workflow.
Beside the script ( which I can Write it np) is there any configuration that you can set up on the workflow to End it self ( timeout) without any interaction after certain days of sitting there?
just Curious..
If review tasks are user tasks, then you can put a timeout. The timeout won't affect an unassigned group task.
I would still do something to fix the problem and not the symptom. I.e. if a task is more than a few days old, send and email and try again, or some escalation.
You could do something like, if a review task is more than 30 days old, check to see if the files are still modified, and if they are not, then end the job.
I would still put timeouts in and force people to do the right thing. Also I would probably change the WF to not allow a file to be in multiple workflow jobs at the same time. Once people cannot submit a change, issues like this get cleaned up quickly
I'm currently working on a workflow/external task that's causing me all sorts of issues. At the end of the day I may have 30+ workflows hanging around. To delete them I do the following:
1) Get a job list by owner
2) Text select/Copy all the jobs I want to delete
3) Paste into a smart text editor (textPad, NotePad++...)
4) Remove everything that doesn't look like a job number (There's a joke about an elephant, nevermind)
5) Prepend "iwrmjob " to each job number
6) Remote into the server, open a DOS window and paste.
Poof - all gone. Typically this takes about 2 minutes (or less) to do. It doesn't matter if it's 10 or 100 jobs..
However....
I too have a script that runs every week to clean up old jobs.
I use these rules:
1) more than 3 days in error state (Typically PLC's that fail) delete it
2) more than 14 days on the system, an email is sent to job owner
3) more than 28 days on the system the job is aborted
I did create a "safe list" so if someone calls and says that they need the job longer than the cutoff - It won't be removed. (Typically for large projects where content/changes are prestaged a month in advance.)