Author Topic: How to access collaborations (discussions) from VBScript  (Read 4064 times)

michielper

  • EA User
  • **
  • Posts: 176
  • Karma: +2/-1
    • View Profile
How to access collaborations (discussions) from VBScript
« on: December 16, 2020, 10:04:47 pm »
Some of my elements are linked to a discussion (visible in the Collaboration tab).
How do I access this content from a (reporting-) script?

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13404
  • Karma: +567/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: How to access collaborations (discussions) from VBScript
« Reply #1 on: December 16, 2020, 10:55:55 pm »
IIRC those are stored in t_document

I'm not sure if you can access them via the API

Geert

michielper

  • EA User
  • **
  • Posts: 176
  • Karma: +2/-1
    • View Profile
Re: How to access collaborations (discussions) from VBScript
« Reply #2 on: December 17, 2020, 03:42:14 am »
This is for a script that generates a report.

Might it be that I can use a fragment to show the discussion? This probably works in standard report generation but does it also work with script? My first attempt failed but I was wondering if fragments with SQL code are correctly called from DocumentGenerator.DocumentElement....

Michiel

Uffe

  • EA Practitioner
  • ***
  • Posts: 1859
  • Karma: +133/-14
  • Flutes: 1; Clarinets: 1; Saxes: 5 and counting
    • View Profile
Re: How to access collaborations (discussions) from VBScript
« Reply #3 on: December 17, 2020, 06:14:08 am »
Hi Michiel,

My first attempt failed but I was wondering if fragments with SQL code are correctly called from DocumentGenerator.DocumentElement....

Fragments work the same when called from scripts as when part of regular (F8) document generation. Which is to say, you cannot pass a fragment to DocumentElement() directly, but if you pass a regular template and that template includes a fragment, the fragment is applied correctly.

NB: This applies to SQL fragments, but script fragments won't work when referenced from a generation script because EA's script management is broken and can only deal with one script at a time.


/Uffe
My theories are always correct, just apply them to the right reality.