After two hours reading/searching in about examples and usages of selection behavior of object flows, I guess that selects all tokens which satisfy a criteria (like a query) and this can change order of tokens as specification in Object Flows says:

If a selection Behavior is specified, then it is used to offer a token from a source ObjectNode to the ObjectFlow, rather than using the ObjectNode’s ordering.

But also above section says:

Whenever a new token is offered to the ObjectFlow, or an offer is withdrawn, the selection Behavior is invoked with the values from all the object tokens currently being offered to the ObjectFlow passed to the Behavior input Parameter. The selection Behavior should then select one of the input values and produce it as output

What I understand from second quote is:

  • it only be invoked when a new token is offered or an offer is withdrawn (so not be invoked when a previously stored token is accepted)
  • if multiple tokens are stored, it only selects one token (instead of all tokens which satisfy criteria) even if there are more tokens that satisfy condition. For example in this situation only one candidate will be accepted:

enter image description here

Are above bullets true?(I think those are incorrect; but those are my understand of second quote) Also what is the meaning of offer is withdrawn in second quote?

1 Answer 1


The «selection» introduces a semantic that allows to restricts the tokens of the ObjectFlow or change their order. So the specification shall be read, having both cases in mind.

The standard shows in figure 15.16 an example in which «selection» is used to specify that Orders offered should be shipped by order of priority.

Your first bullet is correct. Nothing is said about the stored token. And we do not need to care. Let's take the shipping order example. Suppose I have a set of Order tokens waiting that match the selection criteria. When the shipping consumes a new Order, the selection must ensure that the token provided has the highest priority. We don't know if the Orders that are already accepted are kept in a sorted fashion (could be done at the offering) or if they are ordered at consumption.

Your second bullet is incorrect. The selection behavior selects only one token for its output. This means that it provides them one by one. It doesn't say that the others are discarded. So in your example, if several candidates would match the criteria, all of them would be interviewed. If the interpretation of the standard would be as restrictive as you imagined, the order shipping example would not work because the modelled system would not ship by order of priority but only the highest priority of each bunch of orders.

  • Thank you for your reply. I got your point; but what about withdrawn offer? Commented Sep 18, 2018 at 8:14
  • @hasanghaforian Very good question. I also don't see ways how to "withdraw" a token, except the object has flows to different actions and another one takes a token. In any case the wording in the specs is improvable. You could send a bug report.
    – user188153
    Commented Sep 18, 2018 at 8:43
  • @christophe: "It doesn't they that the others are discarded." does not seem to be a sentence. Did you mean "say" ISO "they"?
    – user188153
    Commented Sep 18, 2018 at 8:44
  • @ThomasKilian thanks for pointing out ! "Say" of course !
    – Christophe
    Commented Sep 18, 2018 at 9:33
  • 1
    Withdrawal seems to be a bad word. "Consumed elsewhere" would probably a bit clearer. Sending a bug report to OMG could be considered. OTOH I sent a bug report a few years ago and it's still in the queue. Thank God we have SO ;-)
    – user188153
    Commented Sep 18, 2018 at 10:39

Your Answer

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

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