I’m about to start writing some CFC code to send a HTTP Request to notify when an image has been deleted in Razuna. I have checked out the documentation and I know that I need to add my component using the add_action method where the appropriate hook is on_file_remove.
I would like to know how to get the assetId and the some customField data I need for my notification. What are the options?
Here is my metadata:
Self-hosted
Razuna 1.6.2
Chrome Version 32.0.1700.77
MySQL 5.5.29
SUSE Linux
When Razuna calls a hook, in this case the “on_file_remove” hook, it will pass all parameters in a struct.
You can parse this structure by accessing the struct in your plugin. When you look at the example you see that there is always a argument for each function, i.e:
<cfargument name="args" required="true">
Then within your code you can simply access the struct with:
#arguments.args#
Within it you will see many arguments and the asset it. With this you can further query the database with the available plugin api functions which are listed at http://wiki.razuna.com/display/ecp/Plugin+API
Hope this helps.
PS: We also have a workflow plugin which does this and much more. It comes with a support contract and might be something you want to look into?