To define a new activity using Alf, first the Activity needs to be created in the model, and then Alf code needs to be written for it and compiled.


To create the Hello World Activity


  1. Right click on the root Model and select Create Element > Activity.
  2. Enter the name Hello World.


To create an Alf body for Hello World


  1. Select the new Activity in the Model Browser and open the Alf editor window (select Windows > Alf), if it isn't already open.

  2. In the Alf editor window, type WriteLine("Hello World!");

  3. If there are any errors in your code, fix them.
  4. When the code is entered correctly, click the Save button. The Alf code will be compiled into Activity Nodes and Edges within the selected Activity.


Next: Running the Hello World activity