User Tools

Site Tools


custom_proc:custom_processors

Plugin Processor development

Since Version 1.0, FFAStrans supports adding processors as a plugin. This allows anybody (who is able to) to create his own processors or to download existing processors that other users created.

Plugin Deployment

Plugin processors are placed in the folder \Processors\plugin_nodes\custom_nodes. It is important that the name of the Folder matches the “name” property in the JSON definition file of a processor. So the folder \Processors\plugin_nodes\custom_nodes can only contain folders, not files. Each subfolder represents one plugin processor. For information about the contents of each plugin subfolder, keep on reading.

In this picture, we see the plugin base directory \Processors\plugin_nodes\custom_nodes. The 2 folders represent each one custom plugin.

In this picture we see the contents of an example plugin. The file style.css is not mandatory, it is just used by this processor's index.html. The folder /bin is mandatory, it must contain the script/executeable.


Plugin architecture

A plugin processor consists of 3 general parts:

  • JSON definition file (node.json in plugin root folder)
  • HTML user interface (index.html in plugin root folder)
  • Processor script/executeable (in /bin directory of a plugin, name configured in JSON definition file)

Loading / Lifetime

ffastrans.exe and processors.a3x search plugin processors node.json definition from the filesystem on program startup. This means, when a new processor is added, you need to close and restart ffastrans.exe but a running job would theoretically find new plugin processors with each and every process step.

index.html is loaded whenever you open the processor's gui in the workflow manager.

The processors script/executeable is only executed when a job actually drives the processor by spawning a corresponding processors.a3x process along with a job ticket.

JSON definition file

{
        "name":"Custom Node Example",
        "category":"Others",
        "enabled":"1",
        "priortiy":"1",
        "description":"Example node",
        "guid": "312dccee-88e1-45b1-906c-9c1234724805",
	"script_interpreter": "",
	"proc_script":"processor.exe",
	"timeout_minutes": 120,
	"gui_window_height": 400
}
  • name: display name of the processor in the workflow canvas, name must match the “base directory name” of the plugin within the plugins folder.
  • category: display category in the workflow canvas. possible values: TODO
  • enabled: when set to 0, processor is not shown in the processor menu in workflow canvas
  • description: tooltip of the processor icon in workflow canvas
  • guid: must be unique for each custom plugin, best use a guid generator. A workflow stores the plugin based on it's guid, so the guid should not ne changed after plugin installation.
  • script_interpreter: only needed if the “proc_script” is not an .exe file. script_interpreter must not be a path but can also be a full set of commands; you can write here whatever you would write on a command line that's needed to execute your script file, e.g. “c:\strawberry\perl.exe” -d
  • proc_script: filename of the .exe or script, “relative” from the /bin directory of the plugin. Just the filename goes here, not more.
  • timeout_minutes: a running processor will be killed by ffastrans when the timeout exceeded
  • gui_window_height: the processor gui height in the workflow canvas

Special output variables:

  • s_source
  • s_success
  • s_job_error_msg

                                                                                                          Back to top

custom_proc/custom_processors.txt · Last modified: 2020/01/22 22:38 by benjamin