UML 2.3 RTF Avatar
  1. OMG Issue

UML23 — what's the difference > between weight=1 and weight=*?

  • Key: UML23-58
  • Legacy Issue Number: 13898
  • Status: closed  
  • Source: NIST ( Conrad Bock)
  • Summary:

    I agree with the resolution, but I > ask myself what's the difference > between weight=1 and weight=? Edge weight controls how many offers must be accepted by the target of the edge for any tokens to traverse the edge at the same time ("the minimum number of tokens that must traverse the edge at the same time."). The default weight=1 lets just one offer be accepted for a token to traverse (all tokens might be offerred to the ObjectFlow, but it's OK if only one is accepted, it traverses). Weight=2 requires two to be accepted, or none traverse. Weight = * requires all tokens currently at the source to be accepted for any to traverse. If for some reason the target of the ObjectFlow can't accept all the tokens required by the weight (maybe the target is full), the object flow can't accept any. In the example Ed was concerned with, there's no reason for the target of an ObjectFlow to reject offers, so weight=1 causes all the tokens at the source to move at once, as if weight=. Weight=* gives a different execution of the join in Figure 12.45 than weight=1 (refered to in the Semantics of ActivityEdge). Normally the join would take one token from Bids For Proposal when the Ready to Award Bid event occurs (or at least I thought it would, the join semantics isn't clear on that I notice), but with weight=, the join must take all the tokens in Bids For Proposal. The semantics of weight= is slightly bent, because you would think it means an infinite number of tokens must traverse at the same time. It actually means whatever number of tokens are at the source must traverse at the same time (it's using "*" like a wildcard instead of infinity, not so good). The wording of the paragraph in Semantics of ActivityEdge could be improved if you'd like to file issue. In particular: - Where it says "When the minimum number of tokens are offered" it should say "accepted" instead of "offered". - The sentence starting "An unlimited weight" should continue "means that all the tokens at the source must be accepted for any of them to traverse the edge". Conrad

  • Reported: UML 2.2 — Sat, 25 Apr 2009 04:00 GMT
  • Disposition: Resolved — UML 2.3
  • Disposition Summary:

    Clarify that weight gives the minimum number of tokens that must be accepted by the target of an ActivityEdge for any tokens to traverse the edge, and that weight=UnlimitedInteger means the minimum number of tokens is the number currently at the source of the ObjectFlow.

  • Updated: Fri, 6 Mar 2015 20:58 GMT