Configure Variable Bar
Properties can be added to the Variable Bar by clicking the +
icon, existing Properties can be edited or removed by clicking on the Name of an existing Property.
Property Name
You can provide any name you'd like for the Property or you can choose a special Property by clicking the v
icon next to the Property Name.
See Special Properties
below for more information about special properties.
Property Flow Direction
Flow Direction is specified by checking or unchecking the checkboxes to the left and right of the Property Name. From the perspective of a Workflow, an Input to the Workflow is a Node Output Property while an Output from a Workflow is a Node Input Property.
Property Type
The Property type determines the UI control that is displayed to edit the Property value.
When Property Type is set to File
, an additional UI is displayed to allow a file extension to be specified. This is the file extension that will be used when the Property is served as a download.
Logging
By default, Property values will be marked as Logged
. If you wish to exclude a Property from logging, choose Redacted
. See Property Redaction for more information.
Property Type
Specifies the behavior of a Property.
Default Property
indicates that the Property should present in the Run Now Pane and be addressable for invoke via APIConfiguration Property
indicates that the value of the Property should be managed within the Site rather than in the Workflow. When selected, an additional UI will display allowing a name for the Configuration Property). Any Workflow in the Site using this name will receive the same value for the Property. When a Workflow contains a Configuration Property, an additionalConfigure
option will be shown on the Workflow Landing Pane screen allowing persistent values for these Properties to be managed per EnvironmentHidden Property
indicates that the Property should not present in the Run Now Pane.
Special Properties
The following special Properties are available from the Variable Bar.
Special Input Variables
FgSiteId
provides the identity of the Site in which the Workflow resides. This is the same identity shown in the Site Details pane.FgSiteName
provides the name of the Site in which the Workflow resides.FgWorkflowId
provides the identity of the executing workflow. This is the same identity shown in the Workflow Design Pane.FgWorkflowName
provides the name of the currently executing top-level Workflow.FgWorkflowInstanceId
is a unique identifier that represents the current task instance.FgUsername
contains the username of the user who executed the Workflow. When a Workflow is executed from the Console, this is the identity of the user who is logged in. When executed via API call, this is the identity of the API Key.FgEnvironment
is the name of the Environment under which the current Workflow instance is executing. For exampleProduction
orTest
.FgAction
contains a static list of actions that are available in the Run Now screen. When present, the current action will be shown on the Run button itself and users will be able to select other actions
REST API Input Variables
FgRequestBody
contains the raw HTTP POST payload when the Workflow is invoked via API. Where the requestContent-Type
header is set toapplication/json
,application/x-www-form-urlencoded
or starts withtext/
,FgRequestBody
will be a UTF8 encoded string representation of the request. For all other Content Types, FgRequestBody will be a byte array.
It's easiest to work with data in JSON or XML form in Flowgear. Use the sample workflow Sample Workflow to see how to convert form data to a JSON document.FgRequestHeaders
contains a list of all HTTP Request Headers that were sent when the Workflow was invoked via API.FgRequestContentType
contains the HTTP Content-Type Header when the Workflow is invoked via API. This Property does not need to be used ifFgRequestHeaders
is used.
REST API Output Variables
FgResponseCode
enables a Workflow to assign an HTTP response code. If not used,200
will be set unless an unhandled error occurs in which case500
will be set. To override, add a custom error handler - see Error Handling.
-FgResponseBody
provides a mechanism for the Workflow to emit a Raw HTTP Response payload. This will typically be a JSON or XML document but may be any type of data. Be sure to set the appropriate Content-Type
header via FgResponseHeaders
FgResponseHeaders
provides a mechanism for emitting custom HTTP Response Headers. Headers should be supplied exactly as they should appear in the HTTP Response. Namely,header: value
pairs, one per line.FgResponseContentType
specifies the HTTP ResponseContent-Type
Header.Content-Type
can also be set viaFgResponseHeaders
.FgResponseContentDisposition
eEnables the Workflow to override theContent-Disposition
HTTP Response Header. If omitted, aContent-Disposition
Header of the formattachment;filename=Result.{file-extension}
will be generated by Flowgear when the Variable Bar fieldFgResponseBody
has a Type ofFile
specified.Content-Disposition
can also be set viaFgResponseHeaders
.
http://flowgear.me/s/VkcFwMf provides an example of how to use FgResponseBody and FgResponseContentType.