Running a service
After you have created your service, you will want to run it. Running a service means executing the Gloop steps defined in the service. It is a pretty straightforward process, just do the following:
Running a service via the Martini IDE
There are multiple ways you can run a service:
- Right click the service from the Navigator view, and then select Run from the appearing context menu.
- Open the service, and then click the run icon in the toolbar.
- Open the service, right click on the editor, and then select Run from the appearing context menu.
Use the shortcut to quickly run services
To run a service in Martini Desktop, press ; in Martini Online.
Concurrent steps are run synchronously
When running and debugging services from Martini, concurrent steps are run synchronously. To actually test concurrency, you must invoke services via HTTP.
Inputs
If your service has inputs defined, the input dialog will pop up after you have selected the run command, where you will be able to set the values of your service's inputs:
Using Martini Desktop, you can also export, import, and reset the service's inputs in the dialog.
Paste JSON or XML text, drag and drop JSON or XML files to set service input(s)
In Martini Desktop, you can specify the values of specific properties in the input dialog by dragging the JSON or XML file to the desired property. You can also select the properties, and then press if the JSON or XML text is in your clipboard. Only existing properties will be set; unknown properties from your input data will be discarded.
After running the service, the inputs are persisted and will be used again when you try to run the service. The dialog will pop us as long as the "Always ask for inputs checkbox" is ticked. You can access the persisted run configurations by clicking the run button dropdown menu in the main toolbar, and then select Run Configurations...
Outputs
Whilst the service is running, Martini will show the logs of the running service in the
Console view. Once the service has terminated,
<Service Completed>
will appear at the bottom of the view.
To show the outputs of your service in the IDE, click on the <Click here to see output>
link in the
Console view or the Show model output button in the Console view toolbar.
Running a service via the HTTP Client
To run a service:
- Drag and drop the service file to the HTTP Client.
- Depending on your service and the type of call you want to make, populate the input data required and/or set the authentication.
- Click Send.
Running a service via HTTP
Another way to run a service is to invoke it via HTTP. When executing a service via HTTP, concurrent steps are executed asynchronously.
To invoke a service via HTTP, right-click the target service in the Navigator view and then click Invoke In Browser from the appearing context menu.
Martini will then open up a new browser tab or window, and where you'll see a form for your service's inputs. Set the input arguments of your service and then click the Invoke button at the bottom of the form to finally run your service.