Book a Demo

Author Topic: VBScript Check Information Items Conveyed  (Read 6812 times)

Abett

  • EA Novice
  • *
  • Posts: 5
  • Karma: +0/-0
    • View Profile
VBScript Check Information Items Conveyed
« on: August 22, 2018, 09:23:53 pm »
Hi there,
I have a model that contains elements with composite diagrams, the composite diagram has an inward and outward flow that contains multiple information items conveyed that should match the information items conveyed to and from the parent element.
My script needs to be able to read the information items transferred to and from a selected element and detect if the same items flowing into the parent element match those flowing into the composite diagram and similar for outward.
Currently I'm using the query below to find all the information items and where they are conveyed to and from but I don't know how to incorporate this into a vbscript or whether there are other more suitable methods:
 
SELECT s.object_type, s.name, d.object_type, d.name, o.object_type, o.name, c.connector_type, c.name
                  FROM t_object o,
                     t_xref x,
                     t_connector c,
                     t_object s,
                     t_object d
                        WHERE
                        
                           (o.ea_guid = left(x.description,38)
                           or o.ea_guid = mid(x.description,40,38) 
                           or o.ea_guid = mid(x.description,79,38)
                           or o.ea_guid = mid(x.description,118,38)
                           or o.ea_guid = mid(x.description,157,38) 
                           or o.ea_guid = mid(x.description,196,38)
                           )

                        and    c.ea_guid = x.client
                        and    c.start_object_id = s.object_id
                        and    c.end_object_id = d.object_id


qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: VBScript Check Information Items Conveyed
« Reply #1 on: August 23, 2018, 04:36:13 am »
No. That's the only way (still AFAIK). Needed smart thinking to get that to work (IIRC it was Helmut Ortmann who created the first published version).

q.

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13523
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: VBScript Check Information Items Conveyed
« Reply #2 on: August 27, 2018, 05:05:46 pm »
You should also be able to use a like instead of the multiple left and mid operators.

Geert

(and use proper JOIN syntax for increased clarity)