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.
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?
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?