Ian, Perhaps I can clarify/expand on what Adam suggested:
1) You do not stop the data entering the database when a story is submitted. Instead, it is inserted as normal but you also set another column probably in the same table, perhaps named "status" with a value of "P" for pending when you perform the insert e.g. insert into stories (story_id, foo, bar, status) values (666,'Foo','Bar','P') 2) Only display "stories" on the website if the "status" column is not "P", perhaps only if the status column is "A" for approved e.g. select foo, bar from stories where status = 'A' 3) When the approver approves a story to be published, the appropriate row in the database gets "updated" and the status column is changed appropriately. e.g. update stories set status = 'A' where story_id = 666 You could extend this model quite simply to allow for multi-level approvals and multiple types of status. It's important to note that this is not a ColdFusion specific problem. It is merely a programming issue and there is more than one way to skin a cat. Thanks, André -----Original Message----- From: Ian Vaughan [mailto:[EMAIL PROTECTED] Sent: 03 March 2003 11:02 To: CF-Talk Subject: Re: Is it possible to achieve workflow in Coldfusion ??? Adam There is only one administrator or approver. How would you achieve this, do you have example code so I can see how it may function, how do you stop the data entering the database ?? "As part of the submit page, have it save the document away with a flag 'pending'." ----- Original Message ----- From: "Adam Reynolds" <[EMAIL PROTECTED]> To: "CF-Talk" <[EMAIL PROTECTED]> Sent: Monday, March 03, 2003 9:46 AM Subject: RE: Is it possible to achieve workflow in Coldfusion ??? > Ian, > This is relatively simple. As part of the submit page, have it save the > document away with a flag 'pending'. > > Is there just one administrator? Do you want different admin for different > areas of the site? That is the real pain. > > You could have a pending approval page that admin can go to to see any > pending pages. They could then view (AND edit) those pages before accepting > the content or rejecting the comment. > > Adam > > > -----Original Message----- > > From: Ian Vaughan [mailto:[EMAIL PROTECTED] > > Sent: 03 March 2003 09:38 > > To: CF-Talk > > Subject: Is it possible to achieve workflow in Coldfusion ??? > > > > > > Hi > > > > I am trying to add a workflow element into a news application, and would > > just like to hear if anybody else on the list have been able to achieve > > this? or best practices on how to achieve this? > > > > I have an admin form that allows users to add news stories. At > > present when > > the form is submitted the data is entered into the database table. > > > > What I would like to achieve is when the user submits the form an > > e-mail is > > sent to the relevant approver. They view their e-mail and click > > on the link > > which opens up their admin screen. > > > > >From here they can see they have content to approve. The approver reads > > through the story and if they are happy they approve the data and it is > > entered into the database and goes live on the site. > > > > If the approver declines the story it sends the user who created > > the content > > an e-mail with why the data was not approved and the changes needed to be > > made, and the story does not go live on the site. > > > > > > > > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4 FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Your ad could be here. Monies from ads go to support these lists and provide more resources for the community. http://www.fusionauthority.com/ads.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4