Labs

This section has two labs you can follow to experiment some key features:

Lab 1: Creating a program using the blueprint editor and exporting as executable JAR.
Lab 2: Creating a REST API that executes a blueprint.

Lab 1: Creating programs

Let's create a classic "Hello world" program to have a look at the basic functions.
Click on in the navigation bar to access the catalog where you can manage programs and blueprints.
Click the button to create a new program. Name it "Hello" and click OK.
Click on the new item "Hello" to enter the program.
There are to predefined blueprints: "Main" and "Events".
Left click on the "Main" item to access edit the blueprint.
A blueprint has at least two nodes: an entry point (where execution starts) and a return node (where execution ends).
To add more nodes right-click on a blank point of the grid and a selector will appear.
A search field helps to find a specific node. Search "Print String" node and select it.
Now that the new node is inside the editor click on the text field and type "Hello world!" in the dialog window being opened. Then click "OK".
Blue connectors control the execution flow, while other connectors are for passing data between nodes.
To link two connectors left-click on the first and track the edge onto the second, then release.
Connect nodes as in the picture:
Compile the program by clicking the button on the toolbar.
You will see the result in the console.
Let's test the blueprint.
Click on the button of the toolbar and then on the "OK" button of the Run dialog.
You should see:
Launching program...
Connected
Getting response...
Successfully executed
Hello world!
Return to the program window and refresh.
The status of the program is now "COMPILED". Click on the "Create" to create the jar file. Wait until the popup with the spinning wheel disappears and you're gonna see a download button. Click on it and save the JAR file wherever you want.
Open a Linux terminal and move into the directory where the file has been saved.
Execute the JAR:
$ java -jar Hello.jar
Hello world!
Every exported jar has some options. Try this:
$ java -jar Hello.jar --help
This example has shown how a program can be created using the blueprint editor and exported as an executable JAR.

Lab 2: Creating a REST API

In this exercise we'are going to create an HTTP API that executes a blueprint and returns a response.
Edit the Main blueprint again, and replace the "Print String" node with the "HTTP Set Response" node:
Compile the program by clicking and close the editor tab.
Click on in the navigation bar to access the API management.
Click on button.
Here you create an API and bind it to a blueprint of a given program.
Set parameters as shown below:

MethodGET (read)
Pathlab
ProgramHello
BlueprintMain

Click "Create".
Make a GET request to https://localhost:8443/api/lab
This executes the blueprint that is linked to the API "lab", and the response will be returned to the client.