State Block

ADL treats the act of sending request and receiving confirmation messages from the exchange server as discrete events, or events which occur at a single moment in time (see: Continuous Vs. Discrete Event Messages for more information). In addition to these events, the user can define custom discrete events by double-clicking on the State Block and using the Formula Builder do define True/False statements for the Transaction Formulas field. When these True/False statements turn TRUE, ADL will consider it as an occurrence of a discrete event. By default, you can define up to two discrete events, but an option exists to allow the user to add extra slots and define more than two events using the Formula Builder.

After the statements are defined, the State Block must be triggered by a discrete event message. The block does not act upon the trigger, but merely becomes "loaded," ready to "fire" a discrete event message from one of its outputs when a user-made True/False statement turns TRUE.

When a user-made True/False statement turns TRUE, the State Block generates and outputs a discrete event message in the following manner:

  • Directs the message to the #1 output if the statement tied to it evalues to TRUE
  • Directs the message to the #2 output if the statement tied to it evalues to TRUE
  • Outputs a message from the top-most port when multiple True/False statements turn TRUE at once

After outputting a discrete event message, the State Block must be reloaded by another incoming discrete event message.

Note The State Block will not "queue" up multiple incoming discrete event messages - even if multiple message enter the State block, the block can only output a single discrete event message.

Block settings

To change default block settings, double-click the block to open the Block Editor.

Setting Description
Name Name to display beneath the block on the ADL canvas
BodyColor Background color of the block
Transaction Formulas

Equation used to calculate the value of the block

If not yet defined, the field displays a Click to edit formula link that opens the Formula Builder.

Description Optional text to explain how the block is used