JSON Output
Description
JSON Output is a step in the Output Plugin for Process Studio Workflows. JSON Output step generates json blocks based on input step values and outputs it in a field or file. Output json is available as java script array or java script object depending on step settings.
Configurations
No. | Field Name | Description |
---|---|---|
1 | Operation | Specify type of step operation, output json structure, step output file. This file will be used to dump all generated json. |
Settings: | ||
1 | Step name | Step name should be unique in context of workflow. |
2 | Operation | Specify step operation type. Currently available 3 types of operation: Output value - only pass output json as a step output field, do not dump to output file. Write to file - only write to fie, do not pass to output field Output value and write to file - dump to file and pass generated json as a step output file. |
3 | Json block name | This value will be used as a name for json block. Can be empty string that will affect output json structure, see detailed description below. |
4 | Nr. rows in a block | Specify the number of rows in a block. In others words it is the number key - value pairs in a json block. 0 means all the rows in the same unique block. NOTE, 1 is a special value, in case of 1 every output will be generated as one object. See description below. |
5 | Output value | This value will be used as a step output field. Will contain generated json output block depending on step settings. |
6 | Compatibility mode | This check box handles compatibility configuration with previous Process Studio versions. |
Output File: | ||
1 | Filename | Full path to output file. |
2 | Append | If not checked new file will be created every time step is running. If file with specified name already existed - it will be replaced by a new one. If checked - new json output will be appended at the end of existing file. Or if existing file is not exists - it will be created as in previous case. |
3 | Create Parent folder | Usually, file name contains some path folder as a parent folder. If parent folder does not exist and this option is checked - parent folder will be created as a new folder. Otherwise - file not be found and step will fail. |
4 | Do not open create at start | If not checked - file (and in some cases parent folder) will be created/opened to write during workflow initialization. If checked - file and parent folder will be created only after step will get any first input data. |
5 | Extension | Output files extension. Default value is 'js'. |
6 | Encoding | Output file encoding. |
7 | Pass output to servlet | Enable this option to return the data via a web service instead writing into a file. |
8 | Include date in filename? | If checked - output file name will contain File name value + current date. This may help to generate unique output files. |
9 | Include time in filename | If checked - output file name will contain file creation time. Same as for 'Include date in filename' option. |
10 | Show filename(s) button | Can be useful to test full output file path. |
11 | Add file to result filenames? | If checked - created output file path will be accessible form step result. |
Files Tab: | ||
1 | Fieldname | Input step field name. Use 'Get Fields' button to discover available input fields |
2 | Element name | Json element name as a key. For example "A":"B" - A is an element name, B is actual input value mapped for this Element name. |