Delete and Unpublish
Hello,
In Cascade's cms, there is an option to unpublish and delete. Looking through the web services options (http://cms-origin.bethel.edu/ws/services/AssetOperationService?wsdl) I am unable to find a usable function to unpublish and delete an asset. While searching, I see a "delete_unpublish" option, which looks promising. Again, I haven't had success in using it.
I would prefer not to unpublish and then delete, since the asset being unpublished might be in the queue for some time.
Any suggestions?
Thanks!
Discussions are closed to public comments.
If you need help with Cascade CMS please
start a new discussion.
Keyboard shortcuts
Generic
? | Show this help |
---|---|
ESC | Blurs the current field |
Comment Form
r | Focus the comment reply box |
---|---|
^ + ↩ | Submit the comment |
You can use Command ⌘
instead of Control ^
on Mac
1 Posted by Wing Ming Chan on 04 Jun, 2015 07:06 PM
Hi,
I would say that the best option is to use triggers. But if you have to use web services, then this is my suggestion:
1. Assuming that you have a way to identify the assets you want to delete, store the Id's in an array
2. Schedule a cron job to unpublished the assets, using a web service script
3, Schedule another cron job, maybe an hour later, to delete the assets, using another script
These two scripts can be scheduled to run, for example, every day.
Wing
2 Posted by Ryan Griffith on 05 Jun, 2015 08:04 PM
Hi,
I will need to verify this, but you might be able to call the
delete
operation and pass in a workflow configuration that points to an automated workflow which calls thedeleteAndUnpublish
trigger.I will follow up once I gather some additional information.
Thanks!
3 Posted by Wing Ming Chan on 22 Jun, 2015 06:26 PM
Hi,
This is what I did to unpublish and delete a page at the same time, using my library. First, I need to create a workflow definition using the
UnpublishAndDelete
trigger:Secondly, with the workflow definition in place, I just need to edit the page in the following way:
Theedit
method is called here to associate a page with a workflow. This code works because theedit
method defined ina\Page
takes care of the workflow configuration when$wd
is passed in. Workflow step configurations are bypassed though. The last argument,false
, is passed in to skip processing of the structured data of the page, because right after theedit
method is called, the page will be deleted, and there is no structured data to process. Without thefalse
value, warnings will be issued.Wing
4 Posted by ces55739 on 22 Jun, 2015 09:41 PM
Thank you Wing! Using the workflow you provided above worked for me.
ces55739 closed this discussion on 22 Jun, 2015 09:41 PM.