Book a Demo

Author Topic: Add support DiagramID/DiagramGUID field substitution macro in charts custom sql  (Read 7607 times)

onlyonce

  • EA Novice
  • *
  • Posts: 4
  • Karma: +1/-0
    • View Profile
I usually create StandardCharts in diagrams to show completness of elements in diagrams.
Currently I need manually modify my SQL template in every diagram to replace diagram guid, to get their context.

select /*2016.09.07:11.08*/ decode(op.status,
                       'Complete',
                       'Complete',
                       'Verified',
                       decode(op.priority,
                              'High',
                              'Critical',
                              'Medium',
                              'Decided',
                              null),
                       null) "Series",
       nvl(op.problem, 'NotSet') "GroupName",
       o.name,
       o.stereotype,
       o.object_type
  from ea.t_diagram d, ea.t_object o, ea.t_diagramobjects do
  left outer join ea.t_objectproblems op
    on do.object_id = op.object_id
 where d.ea_guid = '#DiagramGUID#'
   and do.diagram_id = d.diagram_id
   and (op.problem in ('CustomProblem') or op.object_id is null)
   and o.object_id = do.object_id
   and (o.object_type not in ('Note', 'Boundary', 'Text') and
       not (o.object_type = 'Class' and o.stereotype = 'Chart'))

andersd7

  • EA User
  • **
  • Posts: 26
  • Karma: +1/-0
    • View Profile
I have a similar requirement where I want to show vaues for all diagramobjects/diagramlinks for a given diagram within a modelview Dashboard object as per the following Custom SQL.

Code: [Select]
select conn.ea_guid AS CLASSGUID, conn.Connector_Type AS CLASSTYPE, dl.ConnectorID as [ID], conn.Name as [Name], src.Name as [Source], trg.Name as [Target], conn.PtStartX, conn.PtEndX, conn.PtStartY, conn.PtEndY, dl.Geometry
from t_diagramlinks dl, t_diagram d, t_connector conn, t_object src, t_object trg
where d.Diagram_ID = dl.DiagramID
and conn.Connector_ID = dl.ConnectorID
and src.Object_ID = conn.Start_Object_ID
and trg.Object_ID = conn.End_Object_ID
and d.Diagram_ID = #CurrentDiagramID#


has there been any further consideration to this request?

« Last Edit: March 06, 2019, 01:54:57 pm by andersd7 »

Guillaume

  • EA Practitioner
  • ***
  • Posts: 1405
  • Karma: +42/-2
    • View Profile
    • www.umlchannel.com
I have the same need for a #Diagram# macro.

A workaround involves using #Package# on the diagram Package ID, but it only works if there's only that diagram in the package.
Guillaume

Blog: www.umlchannel.com | Free utilities addin: www.eautils.com


Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 8626
  • Karma: +259/-129
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
I have the same need for a #Diagram# macro.

A workaround involves using #Package# on the diagram Package ID, but it only works if there's only that diagram in the package.
Yes Please!
We separate our diagrams from our items and so there are often very many diagrams in a package.

Paolo
Inconsistently correct systems DON'T EXIST!
... Therefore, aim for consistency; in the expectation of achieving correctness....
-Semantica-
Helsinki Principle Rules!