Summary
This recipe shows how to convert a flow (expressed in RDF) into an equivalent ZigZag script automatically.
A simple flow example
To introduce some of the ZigZag concepts we will use the following flow
![]() |
| Example flow that concatenate strings and converts the result into upper case |
|---|
This flow is available on any Meandre engine as part of the /public/services/demo_repository.rdf. If we run the flow from the Meandre Workbench with no modifications, we obtain the following output
![]() |
| Flow output produced by the example flow |
|---|
This flow contains six instances of five different components
| Instance name | Component name | Language | Description |
|---|---|---|---|
| Push String 0 | Push String | Java | Push hello world |
| Push String 1 | Push String | Java | Push hello world |
| Concatenate String 0 | Concatenate String | Java | Concatenates two strings |
| To Uppercase 0 | To Uppercase | Python | Converts and string to upper case |
| Pass Through 0 | Pass Through | List | Just passes the input to the output |
| Print Object 0 | Print Object | Java | Prints an object to the console |
This flow is expressed by the following RDF descriptor
RDF, despite all its benefits, it is not human friendly. Writing an RDF descriptor would be tedious and error prone. Thus, Meandre provides the ability to express flows in a human-friendly readable using the ZigZag scripting language. This scripting language is intended to manipulate flows without using the Workbench and to create self contained flows that can be run on standalone mode outside the Meandre server.
Converting a flow in to a ZigZag script
Meandre provides a simple tool to generate ZigZag scripts out of RDF descriptors. We can get the ZigZag script describing the flow by using the rdf2zz facility. For instance, we can generate the ZigZag script running the following command
where http://demo.seasr.org:1714/public/services/demo_repository.ttl
is the location containing the flow RDF description, and meandre://test.org/flow/test-hello-world-with-python-and-lisp/ the flow URI we want to convert to a ZigZag script. The script contained on upper.zz is listed below.

