Book a Demo

Author Topic: Are object flows to decision node and object flows from merges legal?  (Read 9708 times)

mse

  • EA User
  • **
  • Posts: 308
  • Karma: +1/-0
    • View Profile
Is the following activity diagram "legal" with respect to connectivity i.e. control and object flow?

  • ReadStructuralValue action with result pin connected via OBJECT FLOW to decision node.
  • One edge has guard (x != TIMEOUT) and leads to an atomic action with Effect (y = x)
  • Another edge has guard (else) and leads to an atomic action with Effect (y = 0)
  • Both actions merge into a merge node via CONTROL FLOW
  • From merge node, there is an outgoing OBJECT FLOW to value pin of a AddStructuralFeature action

Are these object flows from pins to decision and merge nodes okay?

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: Are object flows to decision node and object flows from merges legal?
« Reply #1 on: September 12, 2019, 02:01:48 am »
Gives me headaches. How about a picture? You could ask that on StackOverflow....

q.

Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 8110
  • Karma: +119/-20
    • View Profile
Re: Are object flows to decision node and object flows from merges legal?
« Reply #2 on: September 12, 2019, 09:38:40 am »
Quote
5.3.3.6 Decision Nodes
...
If the primary incoming edge of a DecisionNode is a ControlFlow, then all outgoing edges shall be ControlFlows and, if the primary incoming edge is an ObjectFlow, then all outgoing edges shall be ObjectFlows.

In short, yes. Object flows are valid to and from Decision Nodes. My personal explanation is that an Object Flow is a1 Control Flow with an additional piece of data.

1 Technically it is an ActivityEdge that "may hold values". But as a ControlFlow doesn't add semantics of its own I believe describing one in terms of the other makes for an easier explanation and an easier decision while modeling.

Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 8626
  • Karma: +259/-129
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
Re: Are object flows to decision node and object flows from merges legal?
« Reply #3 on: September 12, 2019, 09:47:23 am »
Quote
5.3.3.6 Decision Nodes
...
If the primary incoming edge of a DecisionNode is a ControlFlow, then all outgoing edges shall be ControlFlows and, if the primary incoming edge is an ObjectFlow, then all outgoing edges shall be ObjectFlows.

In short, yes. Object flows are valid to and from Decision Nodes. My personal explanation is that an Object Flow is a1 Control Flow with an additional piece of data.

1 Technically it is an ActivityEdge that "may hold values". But as a ControlFlow doesn't add semantics of its own I believe describing one in terms of the other makes for an easier explanation and an easier decision while modelling.
Yes, I agree.  I've always thought of the Object flow as a Control Flow with data.  This reinforces the Decision Note wording; as the data has to "go" somewhere.

Paolo
« Last Edit: September 12, 2019, 12:07:02 pm by Paolo F Cantoni »
Inconsistently correct systems DON'T EXIST!
... Therefore, aim for consistency; in the expectation of achieving correctness....
-Semantica-
Helsinki Principle Rules!

KP

  • EA Administrator
  • EA Expert
  • *****
  • Posts: 2919
  • Karma: +55/-3
    • View Profile
Re: Are object flows to decision node and object flows from merges legal?
« Reply #4 on: September 12, 2019, 10:07:42 am »
Yes, but...

  • Both actions merge into a merge node via CONTROL FLOW
  • From merge node, there is an outgoing OBJECT FLOW to value pin of a AddStructuralFeature action

I don't think you can have an object flow out of a merge node unless there's an object flow in. Where does the object come from?
The Sparx Team
[email protected]