Triggers in MQL for ENOVIA V6 and 3DXP

Appropriate timing given we just had the ENOVIA Community Conference last week in Waltham (blog post coming soon!)

Triggers in MQL for ENOVIA V6 and 3DXP

The underpinnings of ENOVIA V6 and the 3DEXPERIENCE Platform (3DXP) can be quite complex at first glance, but once you have the lay of the land, it is evident that MQL is a foundational component worth understanding. There are many important things to know about MQL (Matrix Query Language), but one not-so-obvious element is the inclusion or exclusion of triggers. If you’re relatively new to ENOVIA V6, the 3DEXPERIENCE Platform, or MQL, read on to understand the relevance of triggers to MQL and automation in 3DXP and ENOVIA V6.

Triggers are another word for events in ENOVIA V6, the 3DEXPERIENCE Platform, and MatrixOne (please excuse the use of all of these terms – MQL applies to all of these). During almost any operation in the system, multiple triggers fire, allowing the system to execute custom code before, after, or instead of the planned operation. Out-of-the-box ENOVIA V6, 3DXP, and MatrixOne make heavy use of triggers. Everything from creating users to adding items has some type of program attached to its triggers.The relevance of triggers for MQL is simple: each MQL session can be configured to ignore triggers (and thus not run the programs associated with those triggers) or to allow triggers to behave as they normally would in the user interface. What’s surprising to many first-time administrators of the 3DEXPERIENCE Platform or ENOVIA V6 is the wide-ranging impact that this setting can have. For instance, creating a new user in the system runs multiple pieces of trigger-based code to accomplish the task. So if you try to automate the process of creating a new user via MQL, and your MQL session is ignoring triggers, you’ll quickly discover that your new ENOVIA/3DXP user accounts don’t behave properly.

Luckily, controlling triggers in an MQL session is straightforward. To explicitly include the operation of triggers in an MQL session, include the “trigger on;” syntax, and to exclude the operation of triggers in an MQL session, include the “trigger off;” syntax. Hopefully, this eliminates some of the mystery around what’s happening in MQL when you try to automate user interface operations, and gives you the information you need to program in MQL with confidence.

This article is transposed from this original posting HERE (from Razorleaf)