Skip to main content

Together - Document Generation use of getDGRwiElement

  • November 7, 2011
  • 1 reply
  • 0 views

[Migrated content. Thread originally posted on 01 November 2011]

I'm trying to create a report where I list the "operations" in a model.
For example:
Operation Signature Visibility getTerminationPoint(Framework.DataObjectClasses.NamingAttributeType tpRef, NetworkResourceFulfillment.DataObjectClasses.TerminationPointDataType tp) public

I can use the getDWRwiElement to create a link for the "types" being used for the input/ouput parameters (i.e. Framework.DataObjectClasses.NamingAttributeType), but what I would like to be able to do is actually list the actual class structures immediately after the "operation" in the report.

How can I do this? Rather urgent please, as my boss is waiting on this report :-)

1 reply

  • Author
  • Rocketeer
  • 19312 replies
  • November 7, 2011

[Migrated content. Thread originally posted on 01 November 2011]

I'm trying to create a report where I list the "operations" in a model.
For example:
Operation Signature Visibility getTerminationPoint(Framework.DataObjectClasses.NamingAttributeType tpRef, NetworkResourceFulfillment.DataObjectClasses.TerminationPointDataType tp) public

I can use the getDWRwiElement to create a link for the "types" being used for the input/ouput parameters (i.e. Framework.DataObjectClasses.NamingAttributeType), but what I would like to be able to do is actually list the actual class structures immediately after the "operation" in the report.

How can I do this? Rather urgent please, as my boss is waiting on this report :-)
Hi,
with regards to your question.


If you wish to list all classes used as parameters types right after the operation documentation I would suggest using an element iterator with a 'programmed' scope for this. You can get all types used as a current operation parameters using, e.g., the following expression:

self.formalParameters->collect(p|p.type)->union(self.returnResult.type->asSet())

This OCL expression has to be specified as programmed iterator scope. I have attached a sample template (you need to remove the doc extension).