Engineering Requirements Management

Engineering Requirements Management

Come for answers, stay for best practices. All we're missing is you.

 View Only
  • 1.  Trigger unexpected behavior

    Posted 08/10/20 04:50 AM

    Hello,

    I'm facing a weird behavior of the trigger, would be appreciated if anyone could help. Please find below some info:

    Trigger code:

    void run(Trigger t) {

    print "You have edited an attribute"

    }

    Trigger t = trigger(project->all->module->all->formal->attribute->all, save, 0, run)

    if(!null t) print "Trigger registered"

    Expected behavior

    The above trigger should be called only on edit/save of an attribute

    Actual behavior

    In some modules (potentially copied module), the trigger is called immediately when the module is opened or even when switching module from Read to Edit mode, and it is called multiple times (the number of times matches the number of objects in the module)





    #SupportMigration
    #DOORS
    #Sustainability
    #EngineeringRequirementsManagement
    #Support


  • 2.  RE: Trigger unexpected behavior
    Best Answer

    Posted 08/10/20 10:08 PM

    Is it possible there is a DXL attribute in the default view? This would calculate when the module is opened / if you switch the edit mode from read to edit and therefore fires the trigger.





    #SupportMigration
    #Sustainability
    #DOORS
    #EngineeringRequirementsManagement
    #Support


  • 3.  RE: Trigger unexpected behavior
    Best Answer

    Posted 08/11/20 03:12 AM

    Hello kourosh,

    Thank you for your answer, it is correct that the trigger is fired when there is a DXL attribute presents on the view.





    #DOORS
    #Support
    #Sustainability
    #EngineeringRequirementsManagement
    #SupportMigration