Her er demo for variabel i melding til tidslinje.
{
"Id": "0r6WgEKJo9D2UpK",
"ClassId": "0r6WgEKJo9D2UpK",
"Author": "",
"Version": 0,
"CreatedAt": "2023-08-19T12:09:32.903244993+02:00",
"UpdatedAt": "2023-08-19T12:09:32.903244993+02:00",
"Name": "Variabel til Timeline",
"Group": "Test",
"Description": "Variabel til Timeline",
"Nodes": [
{
"Id": "1",
"Type": "trigger",
"Label": "no label",
"SuccessTransition": "2",
"TimeoutTransition": "",
"ErrorTransition": "",
"Address": "pt:j1/mt:evt/rt:dev/rn:zw/ad:1/sv:out_lvl_switch/ad:12_1",
"Service": "out_lvl_switch",
"ServiceInterface": "evt.binary.report",
"Config": {
"Timeout": 0,
"ConnectorID": "",
"ValueFilter": {
"Value": null,
"ValueType": "bool"
},
"PropFilterName": "",
"PropFilterValue": "",
"ValueJPath": "",
"ValueJPathResultType": "",
"InputVariableType": "",
"IsValueFilterEnabled": false,
"RegisterAsVirtualService": false,
"LookupServiceNameAndLocation": false,
"VirtualServiceGroup": "",
"VirtualServiceProps": null
},
"Ui": {
"x": 340,
"y": 177,
"nodeType": ""
},
"TypeAlias": "Trigger",
"LastValue": true
},
{
"Id": "2",
"Type": "set_variable",
"Label": "Variabel",
"Address": "",
"Service": "",
"ServiceInterface": "",
"SuccessTransition": "3",
"ErrorTransition": "",
"Config": {
"Name": "TimelineVariabel",
"UpdateGlobal": false,
"UpdateInputMsg": false,
"IsVariableInMemory": true,
"DefaultValue": {
"Value": 0,
"ValueType": ""
}
},
"Ui": {
"x": 392,
"y": 364,
"nodeType": ""
},
"TypeAlias": "Set variable"
},
{
"Id": "3",
"Type": "transform",
"Label": "Lag melding",
"Address": "",
"Service": "",
"ServiceInterface": "",
"SuccessTransition": "4",
"ErrorTransition": "",
"Config": {
"TargetVariableName": "TimelineMessage",
"TargetVariableType": "str_map",
"IsTargetVariableGlobal": false,
"IsTargetVariableInMemory": true,
"TransformType": "template",
"Rtype": "var",
"IsRVariableGlobal": false,
"IsLVariableGlobal": false,
"Expression": "",
"RValue": {
"ValueType": "int",
"Value": 0
},
"RVariableName": "",
"LVariableName": "TimelineVariabel",
"ValueMapping": [],
"XPathMapping": [],
"Template": "{\r\n \"message_en\": \"This is a {{.Variable}}\",\r\n \"message_no\": \"Dette er en {{.Variable}}\",\r\n \"sender\": \"Trond\"\r\n}"
},
"Ui": {
"x": 646,
"y": 141,
"nodeType": ""
},
"TypeAlias": "Transform"
},
{
"Id": "4",
"Type": "action",
"Label": "Publish timeline",
"Address": "pt:j1/mt:cmd/rt:app/rn:time_owl/ad:1",
"Service": "time_owl",
"ServiceInterface": "cmd.timeline.set",
"SuccessTransition": "",
"ErrorTransition": "",
"Config": {
"VariableName": "TimelineMessage",
"IsVariableGlobal": false,
"Props": {},
"RegisterAsVirtualService": false,
"VirtualServiceGroup": "",
"VirtualServiceProps": {},
"DefaultValue": {
"Value": {
"message_en": "",
"message_no": "",
"sender": "flow"
},
"ValueType": "str_map"
},
"VariableType": "str_map"
},
"Ui": {
"x": 983,
"y": 264,
"nodeType": "timeline_action"
},
"TypeAlias": "Timeline"
}
],
"Settings": null,
"IsDisabled": false,
"IsDefault": false,
"ParallelExecution": ""
}
Her er demo for variabel i pushmelding:
{
"Id": "orfDdHUNXhKxxUm",
"ClassId": "orfDdHUNXhKxxUm",
"Author": "",
"Version": 0,
"CreatedAt": "2023-08-19T11:44:55.648540878+02:00",
"UpdatedAt": "2023-08-19T12:08:47.460712245+02:00",
"Name": "Variabel til push",
"Group": "Test",
"Description": "Variabel til push",
"Nodes": [
{
"Id": "1",
"Type": "trigger",
"Label": "no label",
"SuccessTransition": "2",
"TimeoutTransition": "",
"ErrorTransition": "",
"Address": "pt:j1/mt:evt/rt:dev/rn:zw/ad:1/sv:out_lvl_switch/ad:12_1",
"Service": "out_lvl_switch",
"ServiceInterface": "evt.binary.report",
"Config": {
"ConnectorID": "",
"InputVariableType": "",
"IsValueFilterEnabled": false,
"LookupServiceNameAndLocation": false,
"PropFilterName": "",
"PropFilterValue": "",
"RegisterAsVirtualService": false,
"Timeout": 0,
"ValueFilter": {
"Value": null,
"ValueType": "bool"
},
"ValueJPath": "",
"ValueJPathResultType": "",
"VirtualServiceGroup": "",
"VirtualServiceProps": null
},
"Ui": {
"nodeType": "",
"x": 292,
"y": 182
},
"TypeAlias": "Trigger"
},
{
"Id": "2",
"Type": "set_variable",
"Label": "Variable",
"SuccessTransition": "5",
"TimeoutTransition": "",
"ErrorTransition": "",
"Address": "",
"Service": "",
"ServiceInterface": "",
"Config": {
"DefaultValue": {
"Value": "kekek",
"ValueType": ""
},
"IsVariableInMemory": true,
"Name": "PushVariable",
"UpdateGlobal": false,
"UpdateInputMsg": false
},
"Ui": {
"nodeType": "",
"x": 344,
"y": 372
},
"TypeAlias": "Set variable"
},
{
"Id": "5",
"Type": "transform",
"Label": "Lag meldingen",
"SuccessTransition": "6",
"TimeoutTransition": "",
"ErrorTransition": "",
"Address": "",
"Service": "",
"ServiceInterface": "",
"Config": {
"Expression": "",
"IsLVariableGlobal": false,
"IsRVariableGlobal": false,
"IsTargetVariableGlobal": false,
"IsTargetVariableInMemory": true,
"LVariableName": "PushVariable",
"RValue": {
"Value": 0,
"ValueType": "int"
},
"RVariableName": "",
"Rtype": "var",
"TargetVariableName": "PushMessage",
"TargetVariableType": "str_map",
"Template": "{\r\n \"EventName\": \"custom\",\r\n \"MessageContent\": \"Dette er en {{.Variable}}\",\r\n \"SiteId\": \"7fe610dc-3800-42e2-8853-c903f7501e15\"\r\n}\r\n",
"TransformType": "template",
"ValueMapping": [],
"XPathMapping": []
},
"Ui": {
"nodeType": "",
"x": 644,
"y": 159
},
"TypeAlias": "Transform"
},
{
"Id": "6",
"Type": "action",
"Label": "Push notification",
"SuccessTransition": "",
"TimeoutTransition": "",
"ErrorTransition": "",
"Address": "pt:j1/mt:evt/rt:app/rn:kind_owl/ad:1",
"Service": "kind-owl",
"ServiceInterface": "evt.notification.report",
"Config": {
"DefaultValue": {
"Value": {
"EventName": "custom",
"MessageContent": "",
"SiteId": "7fe610dc-3800-42e2-8853-c903f7501e15"
},
"ValueType": "object"
},
"IsVariableGlobal": false,
"Props": {},
"RegisterAsVirtualService": false,
"VariableName": "PushMessage",
"VariableType": "str_map",
"VirtualServiceGroup": "",
"VirtualServiceProps": {}
},
"Ui": {
"nodeType": "notification_action",
"x": 965,
"y": 268
},
"TypeAlias": "Notification"
}
],
"Settings": null,
"IsDisabled": true,
"IsDefault": false,
"ParallelExecution": "parallel"
}