Pliant has the capability to run programs using the built-in Function-as-a-Service (FaaS) action blocks. They are available under the FaaS folder in the Workflow Editor.
You can use the Python FaaS block to run and manage Python code. Python is one of the most popular programming languages used across different industries and use cases. You can easily place Python scripts and programs and pass parameters to them using the Workflow Editor.
Drag and drop the Python action block from the Faas Folder available from the Workflow Editor onto any desired location.
You can enter Python code in the code section available in the Object Editor. Like the other action blocks, you can access the fullscreen editor by clicking on the button in the value field when you hover over it. The editor supports language-standard syntax highlighting.
You can seamlessly pass data from the workflow to the Python script by entering the values in the parameters field. All the properties added to the parameters object will automatically become variables within the Python code. Notice in our example that msg is being used as a property in the parameters object.
Passing data out of the Python block happens through the print command in the Python code (or any other command that outputs to stdout). Anything printed out will appear in the result property of the Python block.
The fullBuild option is a boolean field allowing you to decide if you want to run a cached version of the designated Python block. If set to true, this will run a cached version which will result in a faster runtime. It should be set to true before publishing to production, but set to false during debugging or when frequent changes to the code are being made.