Hi,
I'm after suggestions as to how I can create something that would allow me to export an XML file to a folder whenever a physical item is approved or changed. I can create a stored procedure that can generate the XML for me but I don't know how to automate this whenever a physical item is approved.
I suspect it's something to do with database events / engines however I have no experience of this. Any advice appreciated.
Cheers,
Andy.
Hi Andy,
In eBSMC, navigate down the community to "Events". On the right pane, you will see a list of different eB events, one of them being "onapprovalstatuschanged", and a list of stored procedures that take place when this event occurs. You can create your own stored procedure in the database that does what you need to create the file and copy it, and add it to the list of events by right clicking on the "Event Handlers" pane, and select "add event handler".
As always, any change as described above should be first tested in a non production environment to confirm it does not affect the standard approval process.
hope this helps.
Address: Bentley | 10052 Mesa Ridge Court Suite100 | San Diego | CA | 92121 | USA
thanks Roberto, is there any documents that describes this functionality in more detail, for example, how can you use an event to trigger some custom code?
Andy,
Pages 41-43 in "4 System Management Console Manual.pdf" found under Documentation\Installguides of distributed software has some additional information.
Hi Andrew,I have an example for you for Event Handler and Automation. Please check the below link for the same:http://communities.bentley.com/products/assetwise/assetwise_platform/w/wiki/event-handler-and-automation.aspxI hope this will help you to customize your own Automation :-)
Thanks Manav, there is some useful information in that. The logic that I need to do is quite complex, more so than is achievable in a SP. What I need is to be able to call a DLL from the database events. Ever come across anybody doing this?
Andrew, I never worked on DLL for events. Though I will try to search some information for you on the same.
Hi Andrew, I discussed this with Experts to call DLL from automation or from Event Handler. I am afraid, but that is not possible for DLL. But I have another option for you to process it.
You can create a job to the Work Queue in Database Event Handler and define you Custome Engine to process it (Depending on your Business Logic).
Like if you want to do some actions when a document gets approved, so onApprovalStatusChanged event, you have to add Event Handler to add queue job, by calling ebp_ad_queue_job etc.So the job will endup in the work queue, then you need an engine to process it.Do let me know if it helps you with the Automation :-)
Answer Verified By: Carma De Villiers