Hello Jan,
is it possible to export ReqIF/RIF format using scripting?
Kind regards,Smitta
Smitta,
automating ReqIF export is not feasible I'm afraid at the moment.
Jan
Hm, difficult but not impossible. We may expose something the typical "reqif.js" way but it would be a bit fragile and difficult to maintain.
Hi Smitta, what is the use-case behind this?
Eckhardt
Hello,
I don't know if it was my request but I request the same thing to Medini support. The use cases are the following:
-->we use classically requirements editing table to edit our requirements within MEDINI. But to be able to get the HW item related to the function for which I have allocated the requirement, I have created a simple script which display that.
(1)We want to use the requIF export feature to get these requirements (and scripting fields) and use it into another tool for system engineering.
(2)It seems that scripting field are declared but data are not exported...
It would be helpful to find a way to get this information into the ReqIF generated by MEDINI
Hi Romain,
so the request is not to *trigger* the ReqIF export in a script but to export scripted properties into ReqIF, right? I know that there is exactly the limitation, that derived properties are currently excluded by intention.
I think the argument here is that a scripted property can return arbitrary content and its not fully clear how to type the exported field. However, we have this "Type Hint" in place so we may improve here in the future to at least optionally export scripted fields.
Would that be the desired feature?
Happy Scripting
Perhaps one workaround could be to implement "mirror properties" for all derived profile properties you want to export to the requirements tool. This means string profile attributes with a similar name as the derived profile property you want to export.
Then you create a script that, when manually started, copies a snapshot of the interesting derived properties into the mirror string properties. Of course, if something is not a string by nature (e.g. a reference to another object), you will have to find an appropriate string representation for it, e.g. the ID or name of the referenced components. From there, an export to ReqIF should be possible,
Would this help?
Best regards
Bernhard
@Jan Mauersberg: yes this is the desired feature ;-)
@Bernhard Kaiser: I am a not a scripting expert in MEDINI. So I am afraid to not be able to do that by myself... If I understand well, I could create script manually started to make some copy of scripting field into not-scripting field?
@ Eckhardt: I am sorry somehow I missed it, the use case was bit different from this conversation.The customer wants to automate the export ReqIF/RIF format using script.
Romain,
yes, that was what Bernhard proposed. The scenario would be like this:
Not sure if there are different topics being mingled up at the moment: The Idea I had in mind and that Smitta quoted was not about automating the ReqIF export.
It was about a script that copies values from derived profile properties (which apparently cannot be part of a ReqIF export) into textual attributes that mirror a snapshot of their current values and can be included in the ReqIF export. The script that does this copy action would have to be started by hand, and also the ReqIF export. So there would be two manual actions to be performed in a row.
Yes, two separate use cases, anyway, no problem to handle both in this article :-)
Thanks all of you for your answers.
If i understand well, two different use cases but leading to the same need for me at the end: Get a REQIF export, where scripting fields are exported. And if i summarize, current status is:
Yes and no I would say, the two things are still separated I think.
Hope that clarifies this
Coming to the question from Romain, I'm not expert in scripts either ...
Could you please give an example about what this script would look like ? (i.e. "a script that takes A and writes the value into B")
Regards,
Thibaut
Well, I actually meant something like this:
// find all requirements and aggregate datafinder.findByType(Metamodel.safetygoals.SafetyRequirement).forEach(aggregate);function aggregate(req) { // we calculate any value based on the state of the requirement var a = req.identifier + "-" + req.kind + "-" + req.state; // <-- just an example // now we write that into a string property b which we prepared beforehand in the profile req.user_b = a; }
Aggregation of course will be prob. more complex but this should explain the approach.
The value may then for example look like:
B will be then exported in next ReqIF export.
Thanks Jan! It works perfectly
I have an extra question..
Currently Medini is configured so that "ID" is the "ReqIF.Name" exported attribute.
Is there a way to make "B" as the "ReqIF.Name" attribute, instead ?
Hello Thibaut,
as far as I know, there actually isn't, I'm sorry. The custom mapping support which medini offers for Jama/PTC/DOORS etc. is not there for ReqIF.