AutoCAD Map 3D Developer
Welcome to Autodesk’s AutoCAD Map 3D Developer Forums. Share your knowledge, ask questions, and explore popular AutoCAD Map 3D Developer topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

After "Commit" Trigger in Map Industry models.

4 REPLIES 4
SOLVED
Reply
Message 1 of 5
maherich
781 Views, 4 Replies

After "Commit" Trigger in Map Industry models.

We are creating a complex labels in electrical industry model that load data from various related tables. Using the rules for Labeldefinition we start the Label also when any changes applie to the related tables. The label definition we created use a specialised Oracle function which create the text. However when we make some changes in the related table and the label udpate starts, the changes have not been commited in the database and function returns old data.

My question is, does any one of you know about client side rule in Map that is started after the data has been written and commited in the database? I believe there has to be something like this.

4 REPLIES 4
Message 2 of 5
drewbb
in reply to: maherich

Certainly you can set up client side feature rules that are enforced after insert and/or update.  When you define a feature rule, one of the arguments is the RuleTriggerEvent.  This enum can have a value of AfterInsert, AfterUpdate, AfterInsertUpdate, etc.

 

Related, in the label properties, there is a Regeneration Definition.  You can use this tool to update the label based on edits of related feature classes.

 

 

 

Sincerely,
Drew Burgasser, P.E.
CAD Masters, Inc.
www.cadmasters.com
Message 3 of 5
maherich
in reply to: maherich

yes, that is exactly what we tried, as it seems obvious that it should work in that way. Unfortunately if you use rules afterinsert or after update the date are not yet written into the database! That means if I start an select statement on database table it returns the old data and not the update ones.

The same way works also Label regeneration definition. It fires the label regeneration on update of related table. But if the label use any Oracle function to get the data from database, we always recieve the old data not the updated ones.

Therefor we are looking for any way how to start the label regeneration after the data has been written to database = commited.

 

Message 4 of 5
drewbb
in reply to: maherich

Are you doing the updates to the related tables within the same Oracle session/transaction?  If so, you should see the updates with any select statements even before a commit.

Sincerely,
Drew Burgasser, P.E.
CAD Masters, Inc.
www.cadmasters.com
Message 5 of 5
maherich
in reply to: maherich

We did found that the problems was in the oracle function we used. There was used pragma AUTONOMOUS_TRANSACTION which actualy opened new transaction that did not see the updated data. After we removed this out of the function everything works like a charm. Thanks for hint.

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report

”Boost