How to deploy a trigger on GUI and/or Server event on DOORS NG ?
Hi,
My first concern now is to be able to run automatically a javascript when a user open a DNG document.
A "trigger" that execute a widget could be the right way to do that, but I found no trace of that in https://jazz.net/wiki/bin/view/Main/RMExtensions602
May be it is something that is more "buried" in JAZZ (something like a trigger on Work Items events). I'm not a JAZZ expert, and I have not found any documentation related to that.
I'm quite sure that I heard a IBM application Engineer has said that is is at least possible to deploy a trigger in DNG based on a user(GUI) event.
Actually, the "Trigger" is a great weapon to enforce a workbench, I would be surprized that Jazz platform does not provide an equivalent mechanism.
I use :
Does someone can help me ?
Thanks in advance.
|
Accepted answer
If I understand your question right, you want to run a javascript as soon as an artifact with format module is opened.
Assuming you have access to the javascript RM Object (e.g. in a widget), you could try the following:
Of course you could or should use anonymous functions instead of yourFunction() or yourSecondFunction().
You also should check whether the getAttribute operation finished successfully before you access the result (result.code == RM.OperationResult.OPERATION_OK).
Putting it all together, this should work:
The following events are currently available:RM.Event.subscribe(RM.Event.ARTIFACT_OPENED, function(openedArtifact){
Please also refer to Client Extension API for the Requirements Management (RM) Application.
Joseph Aracic selected this answer as the correct answer
|
Your answer
Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.