2

I want to have a control flow decide whether an object can pass through a point in a flow or not. From my understanding of control and object flows, this would not work in the way I have done it, since an object and control flow are being joined together into something undefined. What would the correct way to do this look like?

enter image description here

EDIT:

I've done some research and stumbled over this in the UML specification:

enter image description here

Figure 15.59 is an example of using a DataStoreNode. Records for hired employees are persisted in the Personnel Database. If an employee has no assignment, then one is made using Assign Employee. Once a year, all employees have their performance reviewed. The JoinNode blocks the flow of tokens to Review Employee except when the AcceptEventAction (see sub clause 16.10) is triggered “Once a year”. When the AcceptEventAction generates its yearly control token, this satisfies the join condition on the JoinNode and, as the outgoing edge from the Personnel Database has “{weight=*}”, object tokens for all the persisted employee records can then flow to Review Employee.

Would this not be the exact same case of an undefined join as well?

1
  • 1
    Sharing your research helps everyone. Tell us what you've tried and why it didn't meet your needs. This demonstrates that you've taken the time to try to help yourself, it saves us from reiterating obvious answers, and most of all it helps you get a more specific and relevant answer. Also see How to Ask
    – gnat
    May 28, 2020 at 18:57

2 Answers 2

1

In both cases, the outgoing edge of a JoinNode is an ObjectFlow, not "something undefined".

According to UML specifications clause 15.3.3.4 Join Nodes:

If any of the incoming edges of a JoinNode are ObjectFlows, the outgoing edge shall be an ObjectFlow. Otherwise the outgoing edge shall be a ControlFlow.

Note that:

Join nodes may have a joinSpec , which ... determines the condition under which the join will emit a token.

By default, JoinNode behaves as follows:

If some of the tokens offered on the incoming edges are control tokens and others are object tokens, then only the object tokens are offered on the outgoing edge. Tokens are offered on the outgoing edge in the same order they were offered to the join

5

The simplest way is this:

enter image description here

get data will internally select what is appropriate (main or fallback) and send it to process data.


The above makes use of pins (p. 513 od UML 2.5):

16.14.33 Pin [Abstract Class]

16.14.33.1 Description

A Pin is an ObjectNode and MultiplicityElement that provides input values to an Action or accepts output values from an Action.

5
  • This definitely works, can you take a look at my edit though? I'm not so sure my approach does not work any more.
    – lokus
    May 28, 2020 at 19:40
  • Those little warts are new to me. Do they have a proper name? Can you point me to a definition? May 28, 2020 at 19:42
  • Those are input/output pins, they are a different way to signify an object flow. Figure 15.9 in the UML specification explains them.
    – lokus
    May 28, 2020 at 19:46
  • 1
    @lokus I'd need to look into that added question. Please don't ask multiple questions in one. Make it a new question. It's probably worth it (I'm a bit tired since it's late here).
    – user188153
    May 28, 2020 at 20:14
  • 1
    See p. 374 of 2.5 for an explanation of the weight.
    – user188153
    May 28, 2020 at 20:22

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.