Adding a Trigger for a Trigger Event

You can configure a trigger program run when a particular event occurs. The instructions assume the trigger program has already been installed (or created if you have a custom program).

Make sure you follow the instructions carefully to avoid making these common mistakes:


  • Creating the eService Trigger Program Parameters object in a vault other than eService Administration.
  • Failing to promote the eService Trigger Program Parameters object to Active after creating it.
  • Not matching the name of the eService Trigger Program Parameters object to the name entered in the Input box for the trigger in Business Modeler.

These procedures describe how to add triggers using ENOVIA Matrix Navigator and Business Modeler, but you can use MQL instead.

  1. In ENOVIA Matrix Navigator, create an eService Trigger Program Parameters object that represents the trigger program.

    1. Select Object>New>Original.
    2. Complete the Original dialog box.



      Type--eService Trigger Program Parameters.

      Name--The name should indicate the trigger the object is associated with by including the administrative type (policy, type, attribute), the administrative object name (Part, Originator, etc.), the trigger event (Create, Promote, etc.), and the kind of trigger program (Check, Override, Action). For policies, include the state name also. For more information, see How Rules are Automated.

      Revision--Any string, such as 1 or A or a. You may want to include a description of the trigger program associated with the object.

      Vault--The vault must be eService Administration.

      Policy--eService Trigger Program Policy.

    3. Click Create.

  2. Enter attributes for the new object.



    eService Program Name--Enter the name of the program object that should be executed when the trigger event occurs.

    eService Sequence Number--Enter a number that represents the order in which the program should run. For example, if three check programs execute when the trigger event occurs and this program should run last, enter 3. If it does not matter which order the programs run in, you must still enter a numeric value other than 0. For more information, see How Rules are Automated.

    eService Program Argument n--Enter a value for each argument the object should pass to the trigger program, making sure the argument inputs are in the correct order. Also make sure you use the symbolic name for any administrative objects that you specify as an input. For example, if you need to specify a relationship for an argument input, use the symbolic name for the relationship and not the standard name (relationship_GBOM instead of GBOM). For a list of accepted argument inputs for a trigger program and the correct order for the arguments, refer to Utility Trigger Programs and to the guide that accompanies your ENOVIA product.

    Remember to register the symbolic name for any custom administrative objects (objects that are not supplied with the framework). If you use an unregistered symbolic name as an input for a program, the program will not work. See Registering Your Own Administrative Objects.

    eService Program Argument n Description--Enter a description for what each argument does. This description can also include other details, such as the default value for the argument.

    eService Method Name--The name of the method to invoke in the JPO. Specifying a method is important if you need to use the same JPO with multiple methods in many different triggers. If no value is entered, the Trigger Manager uses the main (mxMain) method of the JPO.

    eService Target States--Only used for promote and demote triggers. Stores a comma separated list of the symbolic names of states. The Trigger Manager fires the trigger program only when promoting or demoting to one of the listed states. If the target state is not in the list, the trigger does not fire. If the attribute is not populated, the Trigger Manager fires the program regardless of the target state.

    This attribute is useful for policies that allow branching to multiple states but the trigger program should not run for all states. For example, suppose a policy allows an object to be promoted from State1 to State2A or State2B but the trigger should only run when the object is promoted to State2A. This attribute should contain state_State2A.

  3. If this is the first trigger program of this kind for the event (the Trigger Manager program and input has not been specified for this kind of trigger for this event), proceed to step 4.

    Or:

    If there is already a trigger program of this kind for the event:


    • Make sure the sequence numbers for the existing trigger programs are correct. If the program you added should run before the existing programs, the sequences for the existing programs will probably have to change. For instructions on changing the sequence number for a trigger program, see Modifying Inputs Trigger Programs.
    • The name of the Trigger Program Parameter should already have been specified as the input for the Trigger Manager. Therefore, the procedure is complete and you can skip the remaining steps.

  4. Promote the object to the Active state.

  5. In Business Modeler, find the administrative object for which you want to add the trigger.

    For example, to have a program run when a part is promoted to the Release state, find the policy that governs the part. To have a program run when a file is checked into an object, find that object type.

  6. Double-click the administrative object to edit it.

  7. Select the Trigger tab. (For policies, double-click the appropriate state and then select the Trigger tab.)

  8. In the box for the type of trigger program that you want to add (Check, Override, Action), enter emxTriggerManager.

  9. In the Input box to the right of the program name, enter the name of the eService Trigger Program Parameters object that represents the trigger program you want to run. Make sure the name is exactly the same as the Trigger Program Parameters object.

    If there are eService Trigger Program Parameters objects with different names that need to be called--for example, TypeAllCreateAction and TypePartCreateAction--you can enter both names separated by a space.