AppData
This activity allows you to set and get global App attributes.
Installation
AIflow CLI
AIflow install github.com/r2d2-ai/aiflow/common/activity/appdata
Configuration
Settings:
| Name |
Type |
Description |
| name |
string |
The name of the shared attribute - REQUIRED |
| op |
string |
The operation (get or set), 'get' is the default |
| type |
string |
The data type of the shared value, default is 'any' |
| Name |
Type |
Description |
| value |
object |
The value of the shared attribute |
Output:
| Name |
Type |
Description |
| value |
object |
The value of the shared attribute |
Examples
Get
Get the value of the 'myAttr' attribute:
{
"id": "get_app_attr",
"name": "Get App Attr",
"activity": {
"ref": "github.com/r2d2-ai/aiflow/common/activity/appdata",
"settings": {
"attribute": "myAttr",
"operation": "get"
}
}
}
Set
Update the value of the 'myAttr' attribute to bar:
{
"id": "set_app_attr",
"name": "Set App Attr",
"activity": {
"ref": "github.com/r2d2-ai/aiflow/common/activity/appdata",
"settings": {
"attribute": "myAttr",
"operation": "set"
},
"input": {
"value": "bar"
}
}
}