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)
Checking to see if other jobs are using same files
B80116
Hello all,
I would like to have an external task run a script that looks at all the other workflow jobs and sets a flag if it finds that any of those jobs contain the same files which are attached to the job running the external task.
Is this possible? If so, any suggestions on how to proceed?
I'm thinking something along the lines of a Perl script that gets all the job ids, then looks at the files attribute of each job, and compares that to the files attribute of the job that is running the Perl script. If a match is found, the script sets a flag (job variable) so elsewhere in the workflow, perhaps in the next task, I can raise a warning of some kind.
Find more posts tagged with
Comments
Migrateduser
Use the CLT: iwgetfilejobs
usage: iwgetfilejobs [-h] [-v] [-s servername] path+
-h Print this message
-v Print version
-s servername Use servername as TeamSite server
path Path to look up
Dave Smith
Sr. Software Engineer
Nike, Inc.
(503) 671-4238
DavidH.Smith@nike.com
pflory
Dave,
This command is documented in this file:
ts.552.clt.unix.pdf
which is short for: TeamSite® Command-Line Tools Release 5.5.2 For UNIX®
Probably elsewhere also.
Paul Flory
Migrateduser
Yeah I was looking in the Development section's CLTs and didn't notice it listed in the Administrative section. I edited my initial post to take that comment out. Thanks for the clarification.
Dave Smith
Sr. Software Engineer
Nike, Inc.
(503) 671-4238
DavidH.Smith@nike.com
Adam Stoller
You'll want to experiement with iwgetfilejobs first - because you'll need to parse the output and ignore the current job being listed there - or else you'll *always* think the file is associated with other jobs when it isn't.
We do something like this at my customer's site where we have subroutines for verifying that the files associated with the current job are: (a) not associated with any other job; (b) not locked in another workarea; and (c) not locked by someone other than the user who owns the externaltask -- if any of these conditions fail, the workflow is transitioned to an error handler which sends email to various parties and then allows an administrator to transition the job back to the task it failed from after the problem has been corrected (or terminate the job if that's the correct resolution).
--fish
Senior Consultant, Quotient Inc.
http://www.quotient-inc.com