Skip to content

Commit

Permalink
docs: Runtime Defined Entity Behaviors Part 1
Browse files Browse the repository at this point in the history
This commit contains Behaviors general concepts, invocation.

Signed-off-by: kirilkadoncheva <kiki.doncheva393@gmail.com>
  • Loading branch information
Kirilka Doncheva authored and kirilkadoncheva committed Jun 11, 2024
1 parent a2bce39 commit d3fb062
Show file tree
Hide file tree
Showing 13 changed files with 481 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# AWS Lambda Behaviors

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# MQTT Behaviors

Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
# No-op Behaviors

No-op behaviors, as the name suggests, are behaviors which do not perform any operation as part of their execution. They always succeed or always fail (depending on how they are configured). This type of behaviors can be used for testing purposes.

## Behavior Definition
The no-op behavior execution type is `noop`. By default no-op behavior execution always succeeds and returns a `null` result. However, a no-op behavior can be configured to return a custom result. Also no-op behaviors can be configured to always fail with custom error.

#### Special execution properties
There are some special properties which can be set in the behavior definition `execution_properties` section.
- `returnValue` - any - this property is used to set a custom result value for the behavior.
- `returnError` - Object - this property is used to set a custom error for the behavior:
```json
"returnError": {
"majorErrorCode": 501,
"minorErrorCode": "NOT_IMPLEMENTED",
"message": "Not Implemented"
}
```

Default no-op behavior definition:
```json
{
"name": "testNoOp",
"execution": {
"type": "noop"
}
}
```

No-op behavior definition returning custom result:

```json
{
"name": "testNoOpWithReturnArgument",
"execution": {
"type": "noop",
"execution_properties": {
"returnValue": "Successful Behavior Execution"
}
}
}
```

No-op behavior definition for behavior failing with custom error:
```json
{

"name": "testNoOpError",
"execution": {
"type": "noop",
"execution_properties": {
"returnError": {
"majorErrorCode": 501,
"minorErrorCode": "NOT_IMPLEMENTED",
"message": "Not Implemented"
}
}
}
}
```
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# VRO Behaviors
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# WebHook Behaviors
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit d3fb062

Please sign in to comment.