Consider a UML Action contained in a UML Activity defining the behavior of a classifier. Such Action has three input pins connected to other output pins of different action by means of object flow edges. It also has an incoming control flow.

My question is: does the action start when all the tokens _ those coming from all the input pins and that coming from the control flow _ are available? What if I have more than one control flows?

  • 2
    Could you please post an image showing what you mean?
    – NoChance
    Jul 29, 2012 at 16:35

1 Answer 1


As far as I remember, this was modeled after the Petri nets.

I remember that this part of the specification has changed between my PDF version of the specification (20003 january 6), and by the time the UML 2.0 was finalized in Rational Rose files (which I can't and won't handle)

Anyway, to summarize the specification, whilst there can be multiple actions that are able to fire at any single moment in time, UML does not deal with their concurrency. Quoting the spec:

However, the fact that the UML allows for concurrently executing objects does not necessarily imply a distributed software structure. Some implementations may group together objects into a single task and execute sequentially—so long as the behav- ior of the implementation conforms to the sequencing constraints of the specification.

Also, UML doesn't deal with passing of time, it only deals with requirements about sequence. Again, quote:

The UML does not provide for the specification of a time metric, but only describes sequences of executions.

That said, in a Petri network, when there are one or more executable actions, at least one will have to execute in the next step. The order of execution between these, just as in real life, is undeterminable. It can also be, that given two executable actions, firing one of them will make the other one impossible to fire.

Therefore, in case your action is the only action in the system which is executable (either because others don't have their sufficient input or because you only have a single control flow), it will be executed in the next step. When does that next step occur, nobody can, and nobody is willing to tell you.

In case you want to get guarantees, consider LTL modeling your UML actions. UML is formal in order to be modelable with LTL.

  • Thanks for your kind answer. However it is still actually not clear to me whether an action with multiple input pins and control flows should have tokens on at least one control and all the object flows in order to be executed or not. The latest UML Superstructure specification is omg.org/spec/UML Jul 30, 2012 at 5:13
  • As per definition, an action can only be executed, if ALL of its input has tokens, but it is not guaranteed that it'll execute. On the other side, a single action shouldn't have multiple control flows coming into it, especially not with the same input - that would mean, that two CPUs are executing the same command with same inputs simultaneously, and put its putput to the same place... I guess that'd be a Huge mess.
    – Aadaam
    Jul 30, 2012 at 13:30

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.