flowground for Business Customers
Util
Connector for

Util

Additional utility functions for flowground Branching using ghost messages This connector allows flow designers to make a sequence of steps optional. The execution of the flow will be resumed at the end of this optional sequence, even if the optional sequence has been executed 0 times. The most common use cases for this feature are the general programming IF instruction and FOR instruction. Both can have their inner block executed zero times, but normally we want to resume execution after these blocks, no matter how many times they have been executed. Currently, the elastic.io platform does not execute any subsequent steps if the current step does not emit any message, so there is no default way to "jump over" a block of steps. The workaround this connector implements is injecting a ghost message in the flow, a message that is forwarded as-is by normal steps, and recognized and processed by the control steps this connector implements (branchBegin and branchEnd). The ghost message is created by the branchBegin action, and is emitted at the end of the normal messages this step receives. The next steps can process the normal messages, can emit other messages etc., but must necessarily forward the ghost message as-is to the next step. This assures there is at least one execution that reaches the branchEnd step, situated at the end of the optional sequence. When the ghost message reaches the corresponding branchEnd step, it is not forwarded anymore, but instead, a single normal message (equal to the input of the corresponding branchBegin step) is emitted. Another thing that the branchEnd step does is "collapse" the multiple executions inside the block. It only emits a message when it receives a ghost message. Normal messages are ignored. The branchBegin/branchEnd pairs can be nested (think of an IF inside another IF). In conclusion, you can take a sequence of steps that executes 0, 1 or more times and enclose it in a "branch" (defined by a starting beginBranch step and a corresponding branchEnd step). The step after branchEnd will be executed the same number of times as the branchBegin step. Limitation: all the connectors between branchBegin and branchEnd must identify and forward unchanged the ghost messages. Technical note: the ghost messages are identified by a $SKIP message property with a nonzero number value, representing the depth of the current optional block (starting at 1). A value of zero is assigned to the normal message emitted after branchEnd.
Specifications
  • Category: Utility
  • Provider: Deutsche Telekom AG
  • Used API: n/a
  • Managed: -
  • License: -
  • Programmed with: javascript
Prices

For productive use you need a project room, which is subject to a fee.

Prices and Editions
Changelog

Revision: Version number: 1

Last change 02/20/2019

Technical Specifications

emitStaticData

Emits a single object or an array of objects specified in config. Used for testing flows with dummy data.

OnInit
-
OnStartup
-
OnClose
-

Attributes

-

branchBegin

Makes a part of a flow optional by: - forwarding the input message as-is - sending an additional ghost message Subsequent flow steps are expected to forward this ghost message without processing it. When the ghost message reaches the corresponding branchEnd, it is consumed, and a message with the same body as the input of the branchBegin step is emitted instead.

OnInit
-
OnStartup
-
OnClose
-

Attributes

-

branchEnd

The corresponding pair of branchBegin. Emits a single message with the same body as the message received by branchBegin.

OnInit
-
OnStartup
-
OnClose
-

Attributes

-

forEach

Emits a message for each element in the input array.

OnInit
-
OnStartup
-
OnClose
-

Attributes

-

if

Evaluates a JSONata condition against the input message and only emits a copy of the input message if the condition evaluates to true (truthy).

OnInit
-
OnStartup
-
OnClose
-

Attributes

-

end

This action ends a For Each sequence, guaranteeing a single thread of execution onwards, irrespective of how many messages were processed in the ForEach sequence above it.

OnInit
-
OnStartup
-
OnClose
-

Attributes

-

log

A very simple action that only logs the input message it receives. It also emits this message, so that it can be inserted in the middle of a flow without affecting it.

OnInit
-
OnStartup
-
OnClose
-

Attributes

-

No data available for terms

No data available for environment