An accept action usage is declared as an action usage whose behavior is to accept the transfer of a payload received by the given receiver, and then output that payload. It has two parameters:

  1. A parameter for a set of payload values, identified by the accept keyword. 
    1. The payload parameter declaration for an accept action usage identifies the type of values accepted by the accept action.
    2. A payload parameter declaration can include a feature value (change trigger, absolute time trigger, relative time trigger). In this case, the accept action usage will only accept exactly the value that is the result of the feature value expression. 
  2. An input parameter giving a receiver occurrence, identified by the via keyword. 

Accepting context

  • If an accept action usage is a composite feature of a part definition or usage, then the default for the receiver (via) of the accept action usage is the containing part, not the accept action itself. 
  • If an accept action usage is not a composite feature of a part definition or usage, then the default for the receiver (via) of the accept action usage is the highest-level containing action usage. 
  • If an accept action usage is contained by a perform action, then the default for the receiver (via) of the accept action usage is the perform action, not the part or the higher-level action.
  • When accepting through a port, the port usage is the receiver (via).

Specifying accept actions for actions

Specifying accept actions for actions via the Textual Editor

To specify accept actions for actions via the Textual Editor


  1. In the Textual Editor, place the cursor where you want to create the send action and do one of the following:

    1. For a named accept action usage, declare the keyword action, specify the element name, and then the keyword accept.
    2. For an unnamed accept action usage, declare the keyword accept.
  2. Follow with the expression for the payload.
  3. (Optional) Specify a feature value of a payload parameter:
    1. A change trigger with the keyword when followed by an expression whose result must be a Boolean value.
    2. An absolute time trigger with the keyword at followed by an expression whose result must be a TimeInstantValue.
    3. A relative time trigger with the keyword after followed by an expression whose result must be a DurationValue.
  4. (Optional) Follow with the keyword via and the expression for the receiver.
  5. Click the Synchronize button.

// ------------ accepting without ports; the receiver is the part 'camera'

part camera : Camera {
    action takePicture : TakePicture {

        // named accept action 'trigger' accepting the transfer of the payload 'scene' by the receiver 'camera':
        action trigger accept scene : Scene;
        // unnamed accept action usage:
        accept scene : Scene;
        // accept action usage with a payload parameter's change trigger feature value:
        action trigger accept scene : Scene when normalTemp < maxTemp; 
        // accept action usage  with a payload parameter's absolute time trigger feature value:

        action trigger accept scene : Scene at currentTime 
        // accept action usage  with a payload parameter's relative time trigger feature value:

        action trigger accept scene : Scene after 5 [s] 

        then action focus : Focus {
            in scene = trigger.scene;
            out image;
        }
        flow focus.image to shoot.image;
        then action shoot : Shoot {
            in image;
            out picture;
        }
        then action displayPicture send shoot.picture to screen;  
    }
}

// ------------ accepting through ports; the receiver is the port 'viewPort'

part camera : Camera {
    port viewPort;
    port displayPort;

   
action takePicture : TakePicture {

        // named accept action 'trigger' accepting the transfer of the payload 'scene' by the port 'viewPort':
        action trigger accept scene : Scene via viewPort;  
        // unnamed accept action usage:
        accept scene : Scene via viewPort;  
        // accept action usage with a payload parameter's change trigger feature value:
        action trigger accept scene : Scene when normalTemp < maxTemp via viewPort; 
        // accept action usage  with a payload parameter's absolute time trigger feature value:

        action trigger accept scene : Scene at currentTime via viewPort 
        // accept action usage  with a payload parameter's relative time trigger feature value:

        action trigger accept scene : Scene after 5 [s] via viewPort 

        then action focus : Focus {
            in scene = trigger.scene;
            out image;
        }
        flow focus.image to shoot.image;
        then action shoot : Shoot {
            in image;
            out picture;
        }
        then action displayPicture send shoot.picture via displayPort
    }
}

Specifying accept actions for actions via the view palette

To specify accept actions for actions via the view palette


  1. In the view palette, under the Other Actions group, click the accept button to create an accept action usage element.
  2. Click on an action symbol in the view pane where you want to create the accept symbol.
  3. (Optional) Specify the element's parameters via the Textual Editor.

Specifying the payload for accept actions via the Drag and Drop handler in a view

To specify the payload for accept actions via the Drag and Drop handler in a view


Specifying the payload for accept actions via the Specification panel

To specify the payload for accept actions via the Specification panel


  • Drag and drop an element from the Containment tree or use its symbol's (2026x Refresh1) Drag and Drop handler and drop it on the Payload field in the Properties section of the Specification panel for the accept action element.