Stream functions and data instead of script composition
Story
- Script composition is currently a complex process and is difficult to troubleshoot
- Create a way of using stdin/stdout to stream data and script to nuix
- Less code to maintain, simpler solution, more control over nuix steps and sequences, no need to duplicate code between c# and ruby
Implementation Details
See here for more details:
- https://gitlab.com/reductech/to-do/-/issues/370
- https://gitlab.com/reductech/sandbox/nuix-stdin-test
The c# connector should:
- start nuix_console with base script
- keep track of which functions already sent
- send functions
The nuix connector data contract:
{
"cmd": "searchandtag",
"def": "",
"args": {
"term": "green",
"tag": "color"
},
"isstream": false
}
- only cmd is required
To finish processing and close case
{"cmd":"done"}
For streaming entities / data
- Send
"isstream": true
- Send a guid as the first line of the data stream
- Send the same guid to let the application know you're done
{
"cmd": "searchandtag",
"isstream": true
}
The cmd must support streaming - when it's created so will have
to reference the global variable $data_stream
.
Sending function definitions
Include a def
key in the json with the function:
{
"cmd": "thisisafunc",
"def": "def thisIsAFunc\n puts 'Hiya!'\nend"
}