Book a Demo

Recent Posts

Pages: 1 ... 6 7 [8] 9 10
71
Hi Viking,

I am afraid I still do not quite understand the issue; however, this forum is not the appropriate place to solve individual problems related to a specific add-in. Could you please email me the details, along with an example project or the steps to reproduce the error?
72
FYI...I even commented out the change to cardinality on oSourceEnd element, and the direction still changes after running the update on the oSourceEnd connectorEnd object.
73
What am I trying to achieve:
Modelers can enter a ton of data into a spreadsheet. They can change anything their big heart desires. If they do not pass a GUID for the relationship, a new connector is created. They can change source and targets if they want.
Therefore, the code I sent was a bare minimum, in order to try to figure out what is happening on this specific issue.

I even broke it down further. Running the following changes t_connector.Direction to "Destination -> Source", even though at the start it is "Source -> Destination":

Code: [Select]
  Set oConnector = eaRepo.GetConnectorByGuid("{43839C7A-F120-43d1-8B85-328F89BA9AE6}")
  Set oSourceEnd = oConnector.ClientEnd
  Set oTargetEnd = oConnector.SupplierEnd
'  oConnector.Direction = "Source -> Destination"
  oSourceEnd.Cardinality = "0..*"
'  oTargetEnd.Cardinality = "1"
'  oSourceEnd.Navigable = "Navigable"
'  oTargetEnd.Navigable = "Unspecified"
'  oTargetEnd.Update
  oSourceEnd.Update
  oConnector.Update

I also tried to change the ordering, as per an older thread that you actually commented on, so that the update was first called on the Target(Supplier) end, and the same behavior occurs.
74
In general it is enough to set the direction. You shouldn't touch the Navigable properties.
Direction and navigability in EA depend on each other, and you get some weird results if you modify both.

Also the order in which you update stuff (or not) matters.

PS. I still have no clue what you are trying to achieve here.  Are you only trying to update the cardinality fields?

Geert
75
Understood...

I have cut down the code to the lowest common denominator.
When I set the EA objects, before the changes:
oConnector.Direction = "Source -> Destination"
oSourceEnd.Cardinality = "0..*"
oTargetEnd.Cardinality = "0..1"
oSourceEnd.Navigable = "Navigable"
oTargetEnd.Navigable = "Unspecified"

After running this (please know that the GUID I have selected is an "Aggregation"):
Code: [Select]
  Set oConnector = eaRepo.GetConnectorByGuid("{43839C7A-F120-43d1-8B85-328F89BA9AE6}")
  Set oSourceEnd = oConnector.ClientEnd
  Set oTargetEnd = oConnector.SupplierEnd
  oConnector.Direction = "Source -> Destination"
  oSourceEnd.Cardinality = "1..*"
  oTargetEnd.Cardinality = "1"
  oSourceEnd.Navigable = "Navigable"
  oTargetEnd.Navigable = "Unspecified"
  oSourceEnd.Update
  oTargetEnd.Update
  oConnector.Update

After the Updates:
oConnector.Direction = "Source -> Destination"
oSourceEnd.Cardinality = "1..*"
oTargetEnd.Cardinality = "1"
oSourceEnd.Navigable = "Navigable"
oTargetEnd.Navigable = "Unspecified"

In the DB:
Code: [Select]
select  rel.ea_guid, rel.Direction
from    t_connector rel
where   rel.ea_guid = '{43839C7A-F120-43d1-8B85-328F89BA9AE6}'

Direction = "Destination -> Source"

The flip on the t_connector table occurs after the first update statement
oSourceEnd.Update

After that runs, the magic happens ;)
76
Eric, if you give a bit more information we would probably help you.

Make sure to include

- a complete enough code sample that can be used to replicate the issue
- the "start" situation
- what you are trying to achieve
- the current end result

You are saying things "aren't working" but that is not very helpful as a description of the problem.

Geert
77
True...I should have said "Tweak the code to generate the "new" query" ;)

split it into a union, with a not exists on the second part, works like a charm. Thanks again.
Learning something new every day.

Code: [Select]
select  rel.ea_guid
from    t_diagram diag,
        t_connector rel,
        t_diagramobjects sdo,
        t_diagramobjects edo
where   diag.Diagram_ID = sdo.Diagram_ID
and     diag.Diagram_ID = edo.Diagram_ID
and     instr(diag.PDATA, 'HideRel=1') = 0
and     rel.Start_Object_ID = sdo.Object_ID
and     rel.End_Object_ID = edo.Object_ID
and     rel.Connector_Type in ('Aggregation', 'Association', 'Generalization')
and not exists
          (select  1
          from     t_diagramlinks dl
          where    dl.ConnectorID = rel.Connector_ID)
and     diag.ea_guid in ('{36E4628C-768D-4919-B4D7-21ED246020F6}','{5EE6C77A-1109-48c6-A999-BA8221668F71}')
UNION
select  rel.ea_guid
from    t_diagram diag,
        t_diagramlinks dl,
        t_connector rel,
        t_diagramobjects sdo,
        t_diagramobjects edo
where   diag.Diagram_ID = dl.DiagramID
and     diag.Diagram_ID = sdo.Diagram_ID
and     diag.Diagram_ID = edo.Diagram_ID
and     instr(diag.PDATA, 'HideRel=1') = 0
and     dl.ConnectorID = rel.Connector_ID
and     rel.Start_Object_ID = sdo.Object_ID
and     rel.End_Object_ID = edo.Object_ID
and     dl.Hidden = 0
and     rel.Connector_Type in ('Aggregation', 'Association', 'Generalization')
and     diag.ea_guid in ('{36E4628C-768D-4919-B4D7-21ED246020F6}','{5EE6C77A-1109-48c6-A999-BA8221668F71}')

78
Hi all,

Read several threads about this, yet the workarounds aren't working.

I have actually hardcoded the following to test.
oSourceEnd is connector's Client End
oTargetEnd is connector's Supplier End
oConnector is the connector itself

Code: [Select]
  oConnector.Direction = "Source -> Destination"
  oSourceEnd.Navigable = "Navigable"
  oTargetEnd.Navigable = "Unspecified"
  oConnector.Update

Looks as if the "IsNavigable" boolean no longer exists, so I can't hardcode that.

Can't get the direction to = "Source -> Destination", even though the actual object in debug says it is.

Ideas anyone? Must be doing "something" wrong? I am clueless.

Thanks...Eric

79
Hello Viking,
I cannot reproduce the issue you mentioned on the latest build. If you use the older builds, please updaate to the latest and try again. If you can still reproduce the issue with the latest build, could you send an email to me for detail with the example mode to reproduce?

No, the stereotypes ar not set for connectors. But the connectors are shown correctly as ArchiMate connectors. I said "add an "ArchiMate3::ArchiMate_Composition" connector between REST API and Microservice.

For elements the stereotypes have been set.
80
Hello Viking,

I cannot reproduce the issue you mentioned on the latest build. If you use the older builds, please updaate to the latest and try again. If you can still reproduce the issue with the latest build, could you send an email to me for detail with the example mode to reproduce?

p.s.
I will reply the private email from you soon.
Pages: 1 ... 6 7 [8] 9 10