Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Content Management (Extended ECM)
API, SDK, REST and Web Services
Archive or delete a workflow based on a field choice.
Mike_Buglioli_(mikebuglioli_-_(deleted))
Can a form-based workflow be archived or deleted based on a choice that is made on the form while to workflow is in progrss?
Find more posts tagged with
Comments
Mareka_Ducharme_(MDucharme_(Delete)_1433588)
Probably can be done writing a customized event script.
Application_Services_FUJITSU_(fuji_ware05_-_(delet
Indeed, by writing a custom event script, it can be realized.But: don't forget to make your script stop thye workflow first, otherwise it won't work as you are normally not ablme to delete or archive a workflow in actionRegardsJohan Raedemaeker mailto:jraedemaeker@switch.beAsBuilt - a swITch Business Unit
Mike_Buglioli_(mikebuglioli_-_(deleted))
Being a novice at java script would anyone have some code I can use for this project? Or know where I could get the code? Thank you
Mareka_Ducharme_(MDucharme_(Delete)_1433588)
The easiest way to do it is by adding the event script module and then write a custom event script for what you need to do. The easiest way to do this is to use oscript.
Betsy_Kowan
Hi,I am new to Oscript and would like to get some hints on how to achieve this. Could somebody please point me to some example code? The ones given in the online documentation does not give me enough information.Thanks a lot in advance.CheersPeter
Jeff Lang
Before I can answer this I need a few answers. First, is it your intention that when some attribute has a specific value set, at some point in the workflow, that the workflow end and then be deleted? If that value is not set, the workflow should not be deleted when completed?Or, do you wish like the previous posts in this thread, that the workflow either be deleted or archived when completed based upon an attribute value?
Betsy_Kowan
Jeff,Our design is that in a form step if user chooses to delete (set a form field value to be 'Delete'), then the disposition step right after that will check this value and route to a Delete target step where I am going to write the oscript. The workflow should end and be DELETED. If user chooses not to delete, the form field will be empty and the workflow will be routed to the next person (eventually to the end where workflow will be ARCHIVED). Thanks.
Nair_Krishnankutty_(nairkrishnankutty_-_(deleted))
I have posted an example module in the communities opentext which is different than this
http://communities.opentext.com/communities/llisapi.dll/wiki/162164/Developer-BuilderYou
will need a free registration to get into it.Please peruse the link called"Introduction to event scripts"The intent is to get a jump start on event scripting replete with a module and a workflow map.If you want help on accessing the form package ,there should be help or holler.One thing I want to point out is deletion of a workflow clears the workflow audit tables as well,so there is really no trace of it in the system.I had asked a suggestion that some event be recorded.In fact we wrote an event script that on delete would tell us the circumstances that led to the deletion.
Jeff Lang
here is an example event script which will cause the workflow to delete on completion.You should look at the example posted by Nair to learnn how to create event scripts.I didn't test this script, but it should work.
Betsy_Kowan
Hi Jeff,Thank you very much for your code.I put that code into one of my modules and tried to use it in a target step as well as a process step. I set it as the event script to run when the step becomes ready. But it takes no effect. The workflow is not deleted after the step completes. Any idea why?Thanks.
Jeff Lang
I added the completion options to workflow a long time ago and forgot which field stored the options.This script should work. I tested this one and it worked for me.
Betsy_Kowan
Hi Jeff,Many thanks! Indeed it works!Really appreciate your help.Have a fantastic day.Cheers,Peter