Descriptor

A flow component descriptor contains a description and the meta data of a flow component. It is stored in a file descriptor.json at the top level of the flow component's directory:

The descriptor has the following sections, defined as top-level JSON fields in the file:

  • description
  • labelproperty
  • links
  • refs
  • properties

description

A text field that contains a short description of the flow component. This will be displayed in a tool tip in flow editor when hovering over it.

Example:

"description": "Input on a queue with optional selector, regular or wiretap consumer.",

labelproperty

Per default, the label of a flow component is the name when it is placed into a flow. If the component should display a value of a property, the labelproperty field can be specified and must point to the name of a property in this descriptor:

Example:

"labelproperty": "queuename",

The links field is a JSON structure that describes the input and output connectors of the flow component.

input

The input field is a JSON array with link definitions:

Example:

"input": [
{
"name": "In",
"type": "message",
"mandatory": true
}
],

name is the unique name of the connector. type is the connector type. It can be any string. mandatory states whether this connector must be connected (default is false). 

output

The output field is a JSON array with link definitions:

Example:

"output": [
{
"name": "Out",
"type": "message"
}
]

name is the unique name of the connector. type is the connector type. It can be any string. mandatory states whether this connector must be connected (default is false). 

outputdepend

The outputdepend field is a JSON structure that points to a property of type array. Output connectors are built dynamically from the content of the array:

Example:

"outputdepend": {
"name": "values",
"type": "message"
}

name is the name of the property of type array. type is the connector type. It can be any string. mandatory states whether this connector must be connected (default is false). 

refs

The refs field is a JSON structure that describes the input and output references of the flow component.

input

The input field is a JSON array with reference definitions:

Example:

"input": [
{
"name": "Memory",
"type": "memory",
"mandatory": true
}
]

name is the unique name of the reference. type is the reference type. It can be any string. mandatory states whether this reference must be connected (default is false). 

output

The output field is a JSON array with reference definitions:

Example:

"output": [
{
"name": "Property",
"type": "property",
"mandatory": false
}
]

name is the unique name of the reference. type is the reference type. It can be any string. mandatory states whether this connector must be connected (default is false). 

properties

This section is a JSON array with property meta data declarations. Property meta data describe a property and is used in the flow editor's property pane to construct the input entries.

Each entry in the array is a JSON structure with the following fields:

  • name: Unique name of the property.
  • label: Label of the property.
  • description: A short text to describe the property.
  • type: The type of the property. These types are predefined: string, integer, boolean, identifier,destination, choice, array.
  • min: A minimum value for integer types.
  • max: A maximum value for integer types.
  • default: A default value that is used if the property is not mandatory and no value is entered by the user.

type: string

The user can enter any character.

type: integer

The user can enter an integer value only. 

type: boolean

The user can enter true or false.

type: identifier

This is a string, limited by a regular expression. It ensures that the user can only enter characters that are valid for SwiftMQ identifiers.

type: destination

This is a string, limited by a regular expression. It ensures that the user can only enter characters that are valid for SwiftMQ destination names (queues/topics).

type: choice

This is a string, limited by a JSON array that contains the choice values. Example:

{
"name": "timeunitchangeunit",
"label": "Unit",
"type": "choice",
"choice": [
"Second",
"Minute",
"Hour",
"Day",
"Week",
"Month",
"Year"
]
}

type: array

This is an array where the user can add elements. The array can optionally have an associated fieldtypes JSON array that contains possible field types that can be entered into the array. Example:

{
"name": "indexes",
"label": "Create Indexes for properties",
"type": "array",
"description": "Creates an index for faster lookup for this property names.",
"fieldtypes": [
"identifier"
],
"mandatory": false
},