Question

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?

Was it helpful?

Solution

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

OTHER TIPS

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.

Licensed under: CC-BY-SA with attribution
scroll top