# Workflow Entry Conditions Object

# operation_type

NOTE

Relevant only for output operations.


  • Type: string
  • Default: continue_session
  • Can be one of:
    continue_session - Continue the session.
    drop_session - Dropping the session.

    Defines whether the session should be dropped after the operation, or continue.
    You would like to use drop_session for the last operation in the workflow, or for an operation that handles errors

# redis_functions


  • Type: Array.<object>
  • Default: []

The purpose of redis_functions is to change data on redis before or after the operation is execute.
For example, suppose we want to delete values ​​under a certain key in redis before or after the operation, or we want to place a value on a certain value in redis before or after the operation.
Each object within the redis fucntions defines several fields within it:
operation - what action we want to perform.
path - path for the values on redis.
Currently, we support three types of redis_functions: delete_keys set_field

  • delete_keys - delete values from redis.
  • set_field - set value to redis.

# For example:

Assume for some example operation, you set the output object as follows:

output:
    redis_functions:
        - operation: delete_key
          path: users-names*

The result will be that at the end of the operation run, all the keys in redis under the key users-names will be deleted.

# format_function


  • Type: Array.<object>
  • Default: []

The purpose of format_function is to modify data before or after sending a request.
Each object within the format fucntion defines several fields within it:
operation - what action we want to perform.
output - under which key in redis we want to save the result.
value - where the value on which we will execute the format is located.

Currently, we support four types of format_function: decrement increment encode_base64 get_length

  • decrement - decrease value.
  • increment - increase value.
  • encode_base64 - encode to base64.
  • get_length - returns the length of the value. For an array, it will return the length of the array, for string it will return the number of characters, and for an object it will return the number of keys in the object.

# For example:

Assume for some example operation, you set the input object as follows:

input:
    format_function:
        - operation: increment
          output: increment_result
          args:
            amount: 1
          value:
            data: some:redis:path
            type: redis
            rkey_type: hash_map

And this redis configuration:

redis:
  type: hash_map
  field: hello_world_response

This means that the value found in redis under the key some:redis:path will be retrieved, an increment operation in 1 will be performed on the retrieved value - and the result will be saved under:

hello_world_response:increment_result