Skip to main content
Version: 4.51.0

Stack

The stack component allows to do depth-first traversing (longest branches before the shortest branch of a tree), but it also facilities processing data in a certain order.

Example

In this example, we would like to output to the document-store, in the order shown below. The objects have a parent-child relationship. The execution flow will look as follows:

Folder structure diagram

       A
/ \
B C
/ \
D E
  • Retrieve A from the content-store (stack: [ ])
  • Send A to document-store (stack: [ ])
  • Get children of A in reversed order and add to stack using Children input (stack: [C, B])
  • Send a message to Finished Parent input of stack, pops B (stack: [C])
  • Send B to document-store (stack: [C])
  • Get children of B in reversed order and add to stack using Children input (stack: [C, E, D])
  • Send a message to Finished Parent input of stack, pops D (stack: [C, E])
  • Send D to document-store (stack: [C, E])
  • Get children of D in reversed order and add to stack using Children input (stack: [C, E])
  • Send a message to Finished Parent input of stack, pops E (stack: [C])
  • Send E to document-store (stack: [C])
  • Get children of E in reversed order and add to stack using Children input (stack: [C])
  • Send a message to Finished Parent input of stack, pops C (stack: [ ])
  • Send C to document-store (stack: [ ])

Inputs | Outputs


Stack
Children
Finished Parent
Output
0 0 0 (ilyjsxf7)

Any value which should be pushed to the end of the stack

  • Example: A