Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
THRUST SERVICES & TOOLS
CLOUD EDITIONS
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Web CMS (TeamSite)
Content deletion workflow
tsrookie
Gidday all,
I have to write a content deletion workflow, any ideas?
I imagine the first step will be to see what assets (images/pdfs) the page/pages to be deleted are also used.
What pages link to the page/pages to be deleted.
then check to see which of those assets are used by other pages and remove them from the list of things to be deleted.
Update the links in the effected pages
Then delete.
Has anyone done this sort of thing and can point me in the right direction.
Thanking you in anticipation
Regards
Colin
Find more posts tagged with
Comments
Dwayne
TeamSite doesn't provide any sort of "Where Used" functionality. You'll need to maintain that information yourself, probably in some form of database. DAS could help with that if all of your pages are generated via templating, AND you don't use any Visual Formatter fields. For non-template generated pages, and for visual formatter fields, you're going to have to parse the HTML looking for <A>, <IMG>, <FRAME>, etc tags, to find the referenced file.
Once you've got the "Where Used" database, you need to decide what to DO with it. You could automatically delete the referencing page, but that's VERY dangerous. Because you'd then need to recursively delete all pages that reference the newly deleted page. Delete one image that's commonly used, like a spacer image, and you could quickly wipe out your entire web site. Probably better is to build a list of the referencing files, and then send an email/task to the site owner, so that they can manually resolve the reference.
--
Current project: TS 5.5.2/6.1 W2K
tsrookie
Ok no more procratinating its time to write this workflow.
Thanks for your suggestions Dwayne.
First thing is an external task to parse the generated HTML (using HMTL::Tree) for any imgs used or anchor tags on the page.
What I'd like to do is with this information is create the body of an email to be sent via the next task to our operations team notifying them that a user has requested to delete a page and it contains the following images and links that may or may not need to be added to the task.
Can I save the email body as a variable and then access it by the next task, I believe this is possible from my reading but not sure exacltly how to do it.
Any help appreciated,
Regards
Colin
gzevin
you can add a vriable thru the workflow's perl API. However, if the message is too large, I'd create a unique temp file (composed say, from job id and a timestamp), pass the file name in a variable, and read the necessary text from this file.
if you are unable to find the API stuff, I'll pass it on tomorrow, when I am with my laptop..
Greg Zevin, Ph.D. Comp. Sc.
Independent Interwoven Consultant/Architect
Sydney, AU
stefanmaier
Hi,
we also have an deletion workflow, but not voluminous as you want it...
Our authors can delete one page with its associated pages (we generate a print version additionally to our HTML pages) and its DCR.
The WF deletes all the files in the workarea, submits and deploys the deleting information.
Additionally we have an implemented an "Where used" function based on an verity search engine (no, we are not on TS65, we are using TS552SP5).
Authors can see, what HTML pages point to an object (GIF, PDF, HTML, ...) and easy they can send a message to the linking page's author.
The website link information (who links on who) is updated every 30 minutes (customors says, that enough), the information gathering process runs approx. 10-20 seconds (we use an incremental algorithm).
Total website size is round about 11.000 pages.
Bye
Stefan
tsrookie
Hi Greg,
Thanks for your suggestions I will use pid and timestamp as the temporary filename.
Colin
tsrookie
Stefan,
Thanks also for your input the where used functionality is a great idea, I might use it in a future release.
Regards
Colin