This content has been marked as final. Show 7 replies
Do you truly want to delete the content or just archive it out of the system? The latter would allow for recovery of documents.
You should be able to use the workflow exit event, check if the action was reject, and then run a service (using the Idoc Script executeService function) to delete or archive the document.
This list the services you have available: http://docs.oracle.com/cd/E28389_01/doc.1111/e11011/c04_core.htm
Archive does not necessarily mean expire. You could expire content, or you could export content (using Archiver) and then delete it.
I would look in Component Wizard and see if you can find a delete service that is scriptable (so it can be called from Idoc Script). If there is not one, you would need either override one (and set it to scriptable) or create a new service.
You can put the executeService wherever you know the workflow has been rejected (whether in an event or a step it should not matter).
I will update how it goes.
one more question...
consider a workflow with 3 steps and 3 approvers.
step1 - approver 1 - can create new revision - executeService script in entry step
step2 - approver 2 - review
step3 - approver 3 - review
if the document is rejected in step2 or step3 it goes to step 1, now the executeService will run under approver 1 context or the approver who rejected it?
Edited by: Bunty on Feb 6, 2013 2:25 PM
Edited by: Bunty on Feb 6, 2013 2:28 PM
Guys, sorry to interrupt, but IMHO your discussion has one flaw: neither REJECT, not wfExit(100,100) can be caught in the Exit event (of the step where they happen).
As for REJECTs (to which workflow step it returns) see UCM 10G workflow reject issue or wfAction Reject is not working
As for wfExit(100, 100) I tried to following scenario:
Step 1 (Revision/Edit Current)
<$trace("Step1 - Entry", "#log")$> <$if wfAction like "REJECT"$> <$wfExit(100,100)$> <$endif$>
Step2 (Revision only)
<$trace("Step1 - Exit", "#log")$>
<$trace("Step2 - Entry", "#log")$>
Now, if you check-in an item, approve it on step1 and reject on step2, the log will contain:
<$trace("Step2 - Exit", "#log")$>
Step1 - Entry
Step1 - Exit
Step2 - Entry
Step1 - Entry
IMHO, what you could try is to execute the delete in a filter hooked to advanceDocumentStateMarkWorkflowFinished, which is Executed just before a content item in workflow is marked as finished. You can perform additional logging, or update external resources with this filter.
John, its a permission thing. Delete access is not given to anyone ... only Author (other than admins) can delete the document.
I figured, overriding the WORKFLOW_REJECT template page will be much simpler.
change the service to DELETE_REV instead of WORKFLOW_REJECT based on some conditions.