Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  • The pipeline can be created in your preferred local editor or in the Online Workbench (since version 7.0only

    Status
    colourBlue
    titleENTERPRISE
    ,
    Status
    colourPurple
    titleCORPORATE
    ).

  • To manually execute a pipeline locally you can use the CLI (we will cover these possibilities of the CLI later in this chapter):

    • pi pipeline file /path/to/your/local/pipeline.pi.yaml

    • pi pipeline remote key/of/your/pipeline/on/server

    • pi pipeline uri “inline-pipeline”

  • But the easiest way to ad-hoc execute a pipeline is by using the Online Workbench of your portal (available since version 7.0 for

    Status
    colourBlue
    titleENTERPRISE
    ,
    Status
    colourPurple
    titleCORPORATE
    licenses).

What is a Command?

The most important part of a pipeline is a command. Easily spoken, a command is a single server side task or function which can be executed from outside by its unique name. It is based on the command pattern and function as a service software architecture patterns. It supports input parameters, an input message and can optionally produce an output message:

...

There are many possibilities to execute a single command. This makes sure that for any purpose you can use the best matching approach.

Via Online Workbench

Only:

Status
colourBlue
titleENTERPRISE
,
Status
colourPurple
titleCORPORATE

Since version 7.0 of PIPEFORCE, the Online Workbench is available. This is an advanced online editor with full code completion support where you can write pipelines and commands to be executed and then run them online. This is the easiest and most preferred way to ad-hoc execute a command or commands in pipelines. Here you can see the log command as an example to be executed there:

...

Via Command Line Interface (CLI)

...

(CLI)

Another approach to execute a single command is by using the Command Line Interface (CLI) (CLI). For example there is a built-in command datetime which returns the current date time. A call of this command using the CLI would look like this:

...

Info

Note: Since different terminals handle characters like ? or | for example differently, make sure you wrap the pipeline uri inside quotation marks (" and "). Furthermore, make sure that your terminal also doesn't interpret ? and | inside the quotation marks. If so, consult the documentation of your terminal on how to escape these special characters so that they do not get interpreted by the terminal.

Via HTTP GET and POST

...

You can execute any command also as a rest-like endpoint using HTTP GET or POST calls. See this example using curl to call the datetime command:

...

Code Block
curl -H "apitoken: <YOUR_TOKEN>" \
  -X GET "https://hub-acme.pipeforce.net/api/v3/command/log?message=HELLO"

Via online documentation

Only:

Status
colourBlue
titleENTERPRISE
,
Status
colourPurple
titleCORPORATE

There is a web UI available in the portal in order to document any command enabled for your instance. Furthermore you can also execute commands for testing purposes using this web interface. By default the url to the command form looks like this:

...

Whereas <NAME> needs to be replaced by the name of the command. Here’s an example of the default command form for the datetime command:

...

Documentation via CLI

An alternative to see the documentation of all available commands is to use the CLI tool:

...

Tip

A single command can be executed by using one of these ways:

Via Online Workbench of the portal

of these ways:

  • Via Online Workbench of the portal (Only:

    Status
    colourBlue
    titleENTERPRISE
    ,
    Status
    colourPurple
    titleCORPORATE
    )

  • Via Command Line Interface (CLI)

  • Via HTTP GET / HTTP POST

  • Via online command documentation (Only:

    Status
    colourBlue
    titleENTERPRISE
    ,
    Status
    colourPurple
    titleCORPORATE
    )

What is a Pipeline?

Two or more commands can be combined to a pipeline. If such a pipeline gets executed, the commands in it will be executed by their serial ordering within the pipeline. The output message of the first command will become the input message of the next command and so on. By default, such a pipeline is written in a YAML format.

...

The PDF file my.pdf is the output from the command drive.read and will become the input for pdf.stamp. After pdf.stamp was executed and has put the stamp on the file, it will send it as output to drive.save which stores it to the data room. Instead of a PDF file, the message body can also be of any other format like JSON, string or a like.

Info

Its It's also possible to write your pipeline script in a JSON format. But we recommend using YAML since it is less “noisy”. The pipeline from above rewritten as a JSON would look like this:

...

Similar to a single command, a pipeline of commands is executed by sending it to server. Its a more advanced version of the “Function as a Service” approach since it can execute a bunch of commands in a predefined order.

Via Online Workbench

Only:

Status
colourBlue
titleENTERPRISE
,
Status
colourPurple
titleCORPORATE

Since version 7.0 of PIPEFORCE, the Online Workbench is available. This is an advanced online editor with full code completion support where you can write pipelines and commands to be executed and then run them online. This is the easiest and most preferred way to ad-hoc execute a command or pipelines. Here you can see a simple pipeline after its ad-hoc execution as an example:

...

Auto-completion support for pipeline scripts

Note: This is experimental.

In order to enable auto-completion support for pipeline configuration files in your local development editor, you need to add the pipeline schema file to your IDE.

...