Tutorial 5: Create a Pipeline
Estimated time: 20 min.
- PIPEFORCE Enterprise 7.0 or higher
- You have a valid PIPEFORCE Developer account
- You have executed tutorial Tutorial: Create a new app
Pipeline - Intro
A pipeline in PIPEFORCE is an easy to learn low code script which can do many different things for you:
- Data conversion, validation and mapping
- Connecting with external services
- Business logic
- Send and receive messages
- Robotic Process Automation (RPA)
- Regularly execute jobs
- Trigger workflows
- And many more…
It’s named “low code script”, because you are not required to do real coding inside such a pipeline script. You will mainly configure commands with parameters and combine them in a list. All commands in the list will then be executed one after the other.
Because of its simplicity and power at the same time, the pipeline is one of the most important part in PIPEFORCE. In this tutorial, you will learn how to create and execute such a pipeline script. To learn more about pipelines in detail, see this section of the documentation: Pipelines
1 - Execute an ad-hoc pipeline
You can have two main types of pipelines:
- Ad-hoc pipeline: Doesn't need to be stored. The script is sent to the server, executed and then “forgotten”. Ad-hoc pipelines are good, for example, to execute an ad-hoc query, send ad-hoc messages, or to be called by client implementations.
- Persisted pipeline: A pipeline script which is stored at server side in the property store under a unique key. The pipeline can be executed later by calling its unique key. This kind of pipeline is good to persist your execution logic, to create automation apps and to organize them into multiple pipelines.
In this first part of the tutorial we gonna execute an ad-hoc pipeline. To do so, follow these steps:
Login to the portal https://NAMESPACE.pipeforce.net
Navigate to LOW CODE → Workbench
Now you should see the ad-hoc pipeline editor automatically opened for you. It looks similar to this:
Here you can scribble any ad-hoc pipeline and execute it by pushing the RUN button.
There is already a hello world demo pipeline prepared for you here.
Do not change this pipeline and execute it by pushing the RUN button. After this, you should see an output like this at the bottom:
Congrats, you have executed your first pipeline!
Next, let's create a more sophisticated pipeline by sending a simple email. To do so, start typing inside the editor after the dash
-and you should see command suggestions like this:
Lets select the command
mail.sendfrom the list. Finish the line with a colon
:, and then go to the next line and indent with two tabs
[->|]. To see the list of available parameters for the command, press
[CTRL] + [SPACE], and you should again see the auto-completion list like this:
Lets select the parameter
tofrom the list, and set your email address and a
subjecthere as shown below:
In your pipeline, you have now two commands: The first one simply logs a message, while the second one sends an email. Note that each command
is listed below
is indented with one tab,
starts with a dash
-followed by the command name.
is finished with a colon
can have optional parameters. In this case, you can specify them below the command after an additional indent using a tab.
can exchange data with other commands. If you want to learn more about this, have a look here: Pipeline.
Now, let's execute this pipeline by pressing the RUN button.
After a while, you should receive the email in your inbox.
Since this is an ad-hoc pipeline, when you leave this view, your pipeline is gone. Therefore, you should persist (store) it if you later need it. At first, copy this pipeline into your clipboard, then go on to the next part in this tutorial to learn how to persist it.
2 - Persist a pipeline
Persisting a pipeline means “storing” a pipeline script at server side in the property store (Property Store ) under a unique key. From there you can then load and execute it later by this unique key. Follow these steps to create such a persisted pipeline:
Select LOW CODE → Workbench.
In the property tree select the node of the app you’ve created in the last tutorial.
Click the plus icon at the top of the tree.
The new property view opens:
- As a property key, use the value
MY_APPwith the name of the app you created before, for example
myapp24. Do use only lower case letters and don’t use special characters or spaces!
- As mime type select
application/yaml; type=pipeline. Do not select
- As a property key, use the value
You should now see again the hello world pipeline in the editor.
Replace the content of this editor by pasting your clipboard content here (Ctrl + V).
Click again SAVE.
Congrats: Now, you have your first persisted pipeline. This pipeline has the unique key
3 - Execute a persisted pipeline
After you have persisted a pipeline, you can execute it by calling it using its unique property key. There are many different possibilities in PIPEFORCE to do so. In this step, you will learn how to do it using the command
Select LOW CODE → Commands.
Search for the command
pipeline.runand click it.
In the parameter field
key, copy the key of the pipeline you have created before, for example like this:
Execute the command by clicking SUBMIT.
As a result, you should see the “Hello World” output and after a while you should have received the email in your inbox.
Congrats, you have executed a persisted pipeline by its property key!
The online documentation of all available commands for your pipelines can be found at https://NAMESPACE.pipeforce.org/#/commands (replace NAMESPACE by your real namespace name) or you use the CLI:
pi help command
Report an Issue
In case you're missing something on this page, you found an error or you have an idea for improvement, please click here to create a new issue. Another way to contribute is, to click Edit this page below and directly add your changes in GitHub. Many thanks for your contribution in order to improve PIPEFORCE!