Commands
JSON commands can be issued to the WorkflowFM Reasoner using the following function:
1Json_composer_io.execute "JSON";;
Replace JSON
with one of the commands described below, in JSON format.
You can also execute a JSON command stored in a file as follows:
1Json_composer_io.execute_file "path/to/file.json";;
command
field of type string
which defines the type of the command.Ping
Description:
Ping/keep-alive command. Gives a Pong
response.
Structure:
command
:string
="ping"
ping
:float
= a timestamp to measure ping
Create
Description:
A command to create a new atomic process.
Structure:
command
:string
="create"
name
:string
= the name of the process to be createdinputs
:array
oflinprop
= a list of inputs. Their channels will be created by the prover.output
:linprop
= the process output. The channcel will be created by the prover.
Binary compose (compose1)
Description:
Binary composition of 2 processes with a single action.
Although a more general composition command is provided, when it comes to simple binary compositions this command executes faster.
Structure:
command
:string
="compose1"
action
:action
= the composition action to be performed. The labels of the 2 arguments must match the labels of the processes provided in the next fields.lhs
:process
= the process corresponding to the first (left) argument of the actionrhs
:process
= the process corresponding to the second (right) argument of the action
Compose
Description:
Construction of a complex composition with one or more actions. Although more general than the binary composition command compose1
, it is slower.
Structure:
command
:string
="compose"
name
:string
= the name of the final compositioncomponents
:array
ofprocess
= the list of all component processes that will be usedactions
:array
ofaction
= the ordered list of actions to be performed
Verify
Description:
A command used to reconstruct a process composition.
This is legacy command which has now devolved into the compose
command. The only difference is that verify
does not produce compose
responses for intermediate steps. It will only generate one verify
response for the final process.
Structure:
command
:string
="verify"
name
:string
= the name of the final compositioncomponents
:array
ofprocess
= the list of all component processes that will be usedactions
:array
ofaction
= the ordered list of actions to be performed
Deploy
Description:
This is a family of commands that produce executable process deployments.
There are currently 3 types of possible deployments:
PiViz
: This produces a file for the PiVizTool and/or MWB.PiLib
: This produces a deployment and code templates using the old PiLib library.PEW
: This produces a deployment and code templates with the newer PEW library.
Structure:
PiViz
command
:string
="piviz"
process
:process
= the process to be deployedcomponents
:array
ofprocess
= the list of all dependencies/components required in the composition
PiLib
command
:string
="pilib"
process
:process
= the process to be deployedcomponents
:array
ofprocess
= the list of all dependencies/components required in the compositionseparator
:string
= the client OS-specific file path separatorpath
:string
= the base path for the deploymentpkg
:string
= the desired name for the Scala package that will contain the codeproject
:string
= an identifiable name for the deployment. This will be used to identify certain types and classes.main
:bool
=true
if the generation of a template for a main class is required.java
:bool
=true
if the generation of a java runner class is required. This can help integrate the Scala deployment with Java code.
PEW
command
:string
="piviz"
process
:process
= the process to be deployedcomponents
:array
ofprocess
= the list of all dependencies/components required in the compositionseparator
:string
= the client OS-specific file path separatorpath
:string
= the base path for the deploymentpkg
:string
= the desired name for the Scala package that will contain the codeproject
:string
= an identifiable name for the deployment. This will be used to identify certain types and classes.main
:bool
=true
if the generation of a template for a main class is required.java
:bool
=true
if the generation of a java runner class is required. This can help integrate the Scala deployment with Java code.