Workflow op elements — part 1
Generated from brezel/api@ddd04f543e0fecc433a351dcaab24d39087b24be — do not edit by hand.
op/addItem
Section titled “op/addItem”Effectively a dynamic op/push on an entity field. Give it an entity and a field identifier along with a value to add into that field. If the field is a multiselect, it will add that value to it. You can even define the field identifier based on a variable so that you can change which multiselect a value is added to dynamically. For any other field type, only the chosen one knows what will happen. Use at your own risk for anything other than a multiselect.
Input ports: default (any; Input).
Output ports: default (any; Output; recipe type {"kind":"input","port":"default"}).
| Option | Type | Default | Required | Description |
|---|---|---|---|---|
field | recipes | null | not declared | Field Identifier |
value | recipes | null | not declared | Value |
op/addListItem
Section titled “op/addListItem”Adds a new empty item to a list field of the Entity in the input.
Input ports: default (any; Input).
Output ports: default (any; Output; recipe type {"kind":"input","port":"default"}).
| Option | Type | Default | Required | Description |
|---|---|---|---|---|
list | field | null | not declared | The list field to add a new item to. |
op/addListItems
Section titled “op/addListItems”Adds a number of empty items to a list field of an Entity.
Input ports: default (any; Input).
Output ports: default (any; Output; recipe type {"kind":"input","port":"default"}).
| Option | Type | Default | Required | Description |
|---|---|---|---|---|
list | text | null | not declared | Identifier of the list field to add empty items to. |
number | number | 1 | not declared | Number of empty items to create. |
op/base64
Section titled “op/base64”This Element generates the Base64 content for a file object.
Input ports: default (any; Input), file (any; File).
Output ports: default (any; Output; recipe type {"kind":"input","port":"default"}).
Options: none.
op/count
Section titled “op/count”Counts the elements in the input.
Input ports: default (any; Input).
Output ports: default (any; Output; recipe type {"kind":"scalar","name":"int"}).
Options: none.
op/diff
Section titled “op/diff”Calculate the difference between two arrays, collections or Entities. CAREFUL: This behaves differently when using Entities compared to arrays or collections. Only when comparing Arrays/Collections will the special out ports be used.
Input ports: default (any; Input), dataForDiff (any; dataForDiff), old (any; old), new (any; new).
Output ports: default (any; Output; recipe type {"kind":"input","port":"default"}), new (any; new), removed (any; removed), changedNew (any; changedNew), changedOld (any; changedOld).
Options: none.
op/except
Section titled “op/except”Returns a collection without the entities provided in exceptEntities.
Input ports: default (any; Input), exceptEntities (any; Except entities).
Output ports: default (any; Output; recipe type {"kind":"input","port":"default"}).
Options: none.
op/exists
Section titled “op/exists”Checks if a given value exists in a array. The attribute option can be used to set the key if the array is filled with objects.
Input ports: default (any; Input), array (any; Array), value (any; Value), attribute (any; Attribute).
Output ports: default (any; Output; recipe type {"kind":"input","port":"default"}), else (any; Else).
Options: none.
op/filter
Section titled “op/filter”Filter a given collection or Array by a recipe function.
Input ports: default (any; Input).
Output ports: default (any; Output; recipe type {"kind":"input","port":"default"}).
| Option | Type | Default | Required | Description |
|---|---|---|---|---|
filter | recipes | null | not declared | Filter |
op/first
Section titled “op/first”Get the first element of a collection or Array.
Input ports: default (any; Input).
Output ports: default (any; Output; recipe type {"kind":"item","of":{"kind":"input","port":"default"}}).
Options: none.
op/flatten
Section titled “op/flatten”Flatten the input collection or array. Returns a one-dimensional array.
Input ports: default (any; Input).
Output ports: default (any; Output; recipe type {"kind":"flatten","of":{"kind":"input","port":"default"}}).
Options: none.
op/get
Section titled “op/get”Get element from list/array/collection by key. Performs a data_get operation on the input according to the key.
Input ports: default (any; Input), key (string; Key).
Output ports: default (any; Output; recipe type {"kind":"input","port":"default"}).
Options: none.
op/getOCR
Section titled “op/getOCR”Retrieves OCR Data for a file. Might be empty if the asynchronous OCR process has not been finished yet.
Input ports: default (any; Input).
Output ports: default (any; Output; recipe type {"kind":"input","port":"default"}).
Options: none.
op/groupBy
Section titled “op/groupBy”Group a collection or Array by a key.
Input ports: default (any; Input).
Output ports: default (any; Output; recipe type {"kind":"input","port":"default"}).
| Option | Type | Default | Required | Description |
|---|---|---|---|---|
by | text | null | yes (requireOption) | The key to group by. |
op/hide
Section titled “op/hide”Hide attributes of an Entity instance.
Input ports: default (any; Input).
Output ports: default (any; Output; recipe type {"kind":"input","port":"default"}).
Options: none.
op/join
Section titled “op/join”Performs a join operation on two collections or Arrays.
Input ports: first (any; First), second (any; Second).
Output ports: default (any; Output).
| Option | Type | Default | Required | Description |
|---|---|---|---|---|
type | select | inner | not declared | Type Values: inner, left, right, full. |
conditions | filters | [] | not declared | Conditions |
op/jsonResource
Section titled “op/jsonResource”Turns a single or multiple entities into a JSON resource and can respect the permissions of a (different) user.
Input ports: default (any; Input).
Output ports: default (any; Output; recipe type {"kind":"input","port":"default"}).
| Option | Type | Default | Required | Description |
|---|---|---|---|---|
user | entity | null | not declared | User |
withModule | bool | true | not declared | With module |
op/last
Section titled “op/last”Get the last element of a collection or Array.
Input ports: default (any; Input).
Output ports: default (any; Output; recipe type {"kind":"item","of":{"kind":"input","port":"default"}}).
Options: none.
op/load
Section titled “op/load”Load relations and lists for entities.
Input ports: default (resource; Entity(s)).
Output ports: default (resource; Entity(s)).
| Option | Type | Default | Required | Description |
|---|---|---|---|---|
fields | field | [] | yes (requireOption) | Fields to load (comma-separated). |
all | bool | null | not declared | Load all fields (relations and lists). |
op/merge
Section titled “op/merge”Merge two arrays.
Input ports: default (any; Input), array1 (unspecified; Array 1), array2 (unspecified; Array 2).
Output ports: default (any; Output; recipe type {"kind":"input","port":"default"}).
Options: none.