DNG 6.0.5 Extensions/ java script hooks ?
![]() Hello,
I would like to sync another system after an user updates the requirement artifact, is there any way similar like in ccm, where you can hook java scripts calculated once the artifact is updated? or it should be through an extension developed, could you help me with an example.
|
Accepted answer
![]()
Ralph Schoon (63.3k●3●36●46)
| answered Jul 01 '19, 10:33 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER edited Jul 01 '19, 10:35 a.m. These are the available APIS for DNG:
This is client API - see the version you need.
DNG and RQM do not provide an SDK and you can not create custom operation behavior (as far as I know).
Rafael Rodriguez Montes selected this answer as the correct answer
Comments so before getting into the APIs for DNG, there is no way to create or hook something base on the action save or modify on the DNG artifacts? like developing an extension in DNG where we can hook an script with x action when the user saves the artifact? ![]() FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
That is correct as far as I am aware. Thank you Ralph!
in terms of developing an extension, may exist a possibility on triggering actions base on the actions save? or either way there no way?
Thank you.
![]() FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
No.
As far as I know the only ones that can write something that is acting similar to a save participant/follow up action or a precondition is the DOORS Next Generation development team with access to the full product source.
I can not really tell how far you can go using the JavaScript Client API but as far as I am concerned I don't see how you could use that to drive integrations or preconditions/follow up actions.
This is the last repetition of my opinion in this thread.
|
One other answer
![]()
The DOORS Next Gen RM Extension API provides a few things that you could use, however these are limited to the Client side so I'm not sure they are what you want.
The API has a set of events, including the RM.Event.ARTIFACT_SAVED event, which will be triggered after an artefact is saved. The subscribe function lets you register a callback that is triggered on the registered event, and is supplied a list of affected artefacts, as below:
function onSelection(artifactArray) {
<do something with the list of artefacts and your external system>
}
RM.Event.subscribe(RM.Event.ARTIFACT_SAVED, onSelection);
You would need to create some JavaScript that sets this up, and get it to load when the user is working. Most commonly this is done via a widget on the user's side dashboard - I can't think of any other way to automatically load this in the background (the user would have to explicitly set this up) Comments Davyd is a guru in JavaScript compared to my 'skills' which are pretty lackluster.
The client integration he mentions is the best can do as far as discussions went, that I attended. There are exampes in the client API. All use the dashboard mini.
Requsts that go deeper are apparently not possible today.
1
LOL thanks @Ralph - don't know about guru though. It's more by necessity than by choice!
I think this is something the IBM devs need to look at a lot more as the SaaS offerings are really becoming popular. Apparently our local IoT Exchange conference has only one registration that is using CLM on prem - everybody else is using the SaaS 'on Cloud' offerings and loving them.
As a business partner with clients all across Australia and New Zealand it has also meant I can work with my clients without getting on a plane every time, and I can focus on the engineering problems with them instead of the software admin and maintenance.
On the down side, it does mean I have had to dig a lot deeper into the JavaScript client API (or undocumented API) than I care to, and I have also had to do some really gross kludges to get the result I need. I'd love to sit down with some of the devs and workshop the client API for the whole toolset - a few small enhancements would make a huge difference
Yes you can - it's pretty much exactly the same way for customised attributes as for built in ones (just use getAttribute('My Custom Attribute') ), and yes the widget is the default approach that the API was built for.
|
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.