Activity Editor is used to create activity definitions, which specify the business logic for each action node in the collaboration template. Each action node has one activity definition associated with it.
An activity definition is based on function blocks. A function block represents a discrete part of an activity definition, such as a constant, a variable, or a particular piece of functionality (like a programming method). Many of the function blocks in Activity Editor correspond to individual methods in the Collaboration API.
Function blocks are placed on the editing canvas by dragging and dropping them from either the Library or Content window. Once a function block is dropped on the editing canvas, you can move it around as needed. Just click the function block icon on the canvas to select it and drag it to the desired location.
Function blocks can have inputs, outputs, or both. The inputs and outputs for each function block are predefined, and accept only the specified value type. When the function block is dropped on the editing canvas, its input and output ports are represented by arrows, as shown in Figure 43.
Figure 43. A function block with input and output ports
These ports serve as connecting points for linking between the function block and other components. By default, the name of each input and output is displayed next to its connection port (you can use the View --> Preferences option to hide the names).
Function blocks are connected by connection links. Connection links define the flow of activity between the various components in the activity definition. They connect the output port of one function block to the input port of another function block.
Perform the following steps to add a connection link between two function blocks:
If an input port already has an existing connection link the newer connection link replaces it.
Activity Editor has a New Constant function that you can drag and drop onto the editing canvas to define a constant value that you set and use as input to other function blocks.
The New Constant function block is located in the System folder in the Library and Content windows. Figure 44 illustrates what the New Constant function block looks like when it is dropped onto the editing canvas.
Figure 44. New Constant function block
The text edit box is displayed on top of the function block so you can enter the constant's value. (If you need to edit the value, click inside the constant function block and enter the new value.) Note that the constant contains a single output port.
The System folder (located in the Library and Content windows) contains function blocks for adding comment, description, label, and to-do tags to the activity definition. These tags help identify each activity or subactivity, or serve as a reminder of something that must be done. You drag and drop these function blocks onto the editing canvas as you would any other function block. However, there are no input and output ports.
To edit a new tag, single-click in the center of the tag. The cursor changes to an I-beam, and you can enter your text. The tags automatically wrap lines of text that are too long. You can also press Enter to type text on a new line.
If you want to resize a tag, left-click the lower right-hand corner of the tag, and then hold down the mouse while dragging the tag to the desired size. Note that the tags do have a minimum size requirement, and cannot be resized smaller than that minimum size.
A set of function blocks on the editing canvas can be grouped together and saved for later reuse in another activity definition. In effect, this saved component group acts as a function block.
After you have created the desired activity flow on the editing canvas, perform the following steps to save all or part of the flow as a reusable component group:
The new component group icon is added to the My Collection folder in the Library and Content windows. You can drag and drop the icon onto the editing canvas for any activity definition within your collaboration scenario.