![]() |
Telelogic DOORS (steve huntington) | ![]() |
new topic :
profile :
search :
help :
dashboard :
calendar :
home
|
||
Latest News:
|
|
Topic Title: Return Type for Persistent Triggers Topic Summary: Created On: 18-Aug-2004 17:17 Status: Post and Reply |
Linear : Threading : Single : Branch |
![]() |
![]()
|
![]() Answer: Dynamic triggers call a FUNCTION to do the work. Such functions can return a value. Persistent triggers call a DXL PROGRAM to do the work. Programs cannot return a value. You have no place to "go" from such a program. However, "pre" event persistent triggers let you decide from inside the trigger whether or not the triggering event actually happens. If you have a pre-module-open trigger, the trigger CAN disallow the module-open (such as after checking the user's RMCDA rights). Look for "trigPreConPass" in the DXL manual. - Louie | |
![]() |
|
So I've been working a variety of persistent triggers, and for reasons of flow, I'd like to return from inside my persistent trigger.
I've tried a variety of return types: -none -true -false -0 -1 -"" but I always get a error of "incorrect return type" for the trigger. Does anyone know what the correct return type is? -Andrew |
|
![]() |
|
![]() |
|
Dynamic triggers call a FUNCTION to do the work. Such functions can return a value.
Persistent triggers call a DXL PROGRAM to do the work. Programs cannot return a value. You have no place to "go" from such a program. However, "pre" event persistent triggers let you decide from inside the trigger whether or not the triggering event actually happens. If you have a pre-module-open trigger, the trigger CAN disallow the module-open (such as after checking the user's RMCDA rights). Look for "trigPreConPass" in the DXL manual. - Louie |
|
![]() |
|
![]() |
|
Louie,
Thanks for the response. I've been using the set routine to set the return state and that works well. What I am trying to do is to leave my trigger from the middle of its execution. (e.g. return or exit.) I can't find a way to exit from within my trigger. For example: if (o."State" == "Draft") { blah blah return } other code... Whenever I have that return in there, I get the error of incorrect return type. -Andrew |
|
![]() |
|
![]() |
|
You "return" from a function to go back to the caller. You "halt" to quit execution.
"Halt" should be fairly routine in your DXL programs. All my Module DXL code has the following at the top: Module g_mCurr = current if (null g_mCurr){ack("Run from open module"); halt} Most of the non-module code checks for a current project. Another reasonable possibiltiy, for code that modifies the module, is: if (!isEdit(g_mCurr)){ack("Open module for Edit"); halt} - Louie |
|
![]() |
Telelogic DOORS
» DXL Exchange
»
Return Type for Persistent Triggers
|
![]() |
FuseTalk Standard Edition v3.2 - © 1999-2009 FuseTalk Inc. All rights reserved.