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)
Can you modify a running job?
Bowker
I would like to have a workflow's approval process go to different groups based upon what files are attached to the job.
For example:
if a file with the path of /personal/... is attached to the workflow, someone from the Personal Services department must be looped in.
if a file with the path of /corporate/... is attached to the workflow, someone from the Corporate Services department must be looped in.
(there could be dozens of this type of decisions to be made along the approval process)
Here's the problem, the files are attached after the workflow has started.
What I would like is an external task to modify a grouptask's sharedby condition right before starting the group task.
Any one have a suggestion.
(I would prefer not hardcoding in each possible path and launching an external task to perform different successors since that would require dozens of successors & tasks and a maintenance nightmare.)
Find more posts tagged with
Comments
Migrateduser
Your approach seems reasonable: Place an externaltask before the grouptask and have it modify the sharedby. You should be able to use the AddGroup, RemoveGroup, AddUser and RemoveUser methods on TeamSite::WFtask.
Your script could read a separate mapping file with your path (or pattern) to group mappings. That way you can modify your mappings without touching the code (once you get it working.) Be sure to include a default (or exception) in case none of the paths apply.
Brinko Kobrin
Interwoven Staff Engineer
james1
If you wanted to, you could use a nested workflow job. Once the files are attached to the job, and you have determined what kind of approval process you want, you can invoke a new WFT. I think (?) that you can pass files from the parent job to the nested job, so the nested job WFT should be able to see attached files and perform the correct kind of approval...?
-- James
Adam Stoller
There are ways of referring to the parent job from the nested job that allow you to pass information about file lists, variables, and so on back and forth. But frankly, I think Brinko's suggestion is simpler - and if it solves the problem ...
--fish
(Interwoven, Curriculum Development)
Migrateduser
I don't know if anyone will care, but it wasn't my idea. This is the approach that Dan Bowker suggested in his original posting. However, I do love simple solutions.
Give credit where credit is due... and the blame will surely follow!
Brinko Kobrin
Interwoven Staff Engineer