Hi
I have 2 issues with my http protocol
The first:
QAction no load after params change value:
<Sessionid="1"name="API Status">
<Connectionid="1"name="Check Ping">
<Requestverb="GET"url="/api/v1/system/network/ping">
</Request>
<ResponsestatusCode="2">
<Contentpid="3"></Content>
</Response>
</Connection>
</Session>
<Timerid="1">
<Name>Fast Timer (10s)</Name>
<Timeinitial="true">10000</Time>
<Interval>75</Interval>
<Content>
<Group>2</Group>
</Content>
</Timer>
<Groupid="2">
<Name>Fast Polling</Name>
<Description>Fast Polling 10s</Description>
<Type>poll</Type>
<Content>
<Session>1</Session>
</Content>
</Group>
<Paramid="2">
<Name>StatusCodePingCheck</Name>
<Description>Status Code API</Description>
<Type>dummy</Type>
</Param>
<Paramid="3">
<Name>PingCheckResponse</Name>
<Description>Ping Check Response</Description>
<Type>dummy</Type>
</Param>
LOG:
2025/06/03 23:03:31.374|SLProtocol - 1084 - Titan-Live - copy|19012|CTimer::Execute|DBG|6|1 groups to execute
2025/06/03 23:03:31.374|SLProtocol - 1084 - Titan-Live - copy|19012|CTimer::TimerThreadFunc|DBG|6|Waiting for last group to be finished.
2025/06/03 23:03:31.378|SLProtocol - 1084 - Titan-Live - copy|8832|CGroup::Execute|DBG|6|Start executing group 2 (interval = 75) (depth=1)
2025/06/03 23:03:31.379|SLProtocol - 1084 - Titan-Live - copy|8832|CProtocol::LogHttpRequest|INF|3|<- 23:03:31 - GET http://172.28.20.201:80/api/v1/system/network/ping
2025/06/03 23:03:31.391|SLProtocol - 1084 - Titan-Live - copy|8832|CProtocol::ProcessHttpResult|INF|3|HTTP/1.1 200 OK
2025/06/03 23:03:31.392|SLProtocol - 1084 - Titan-Live - copy|8832|CParameter::SetValue|DBG|2|-> StatusCodePingCheck set value to VT_BSTR : HTTP/1.1 200 OK (HTTP/1.1 200 OK)
2025/06/03 23:03:31.392|SLProtocol - 1084 - Titan-Live - copy|8832|CParameter::SetValue|DBG|2|
2025/06/03 23:03:31.393|SLProtocol - 1084 - Titan-Live - copy|8832|CParameter::SetValue|DBG|2|-> PingCheckResponse set value to VT_BSTR : {"ping": "ok"} ({"ping": "ok"})
2025/06/03 23:03:31.393|SLProtocol - 1084 - Titan-Live - copy|8832|CParameter::SetValue|DBG|2|
2025/06/03 23:03:31.469|SLProtocol - 1084 - Titan-Live - copy|8832|CGroup::Execute|DBG|6|Finished executing group 2
2025/06/03 23:03:31.470|SLProtocol - 1084 - Titan-Live - copy|19012|CTimer::TimerThreadFunc|DBG|6|Last group finished.
Session working ok and get : {
"ping": "ok"
}
But no tigger QAction when params 3 have value.
The second issue:
I run manually Qaction:
using System;
using Newtonsoft.Json.Linq;
using Skyline.DataMiner.Scripting;
public static class QAction
{
publicstaticvoid Run(SLProtocol protocol)
{
try
{
string json = protocol.GetParameter(3)?.ToString();
protocol.Log("Value jsonnnnn:" + json,LogLevel.LogEverything);
var jsonObject = JObject.Parse(json);
if (jsonObject.TryGetValue("ping", out JToken pingToken))
{
string pingValue = pingToken.ToString();
if (string.Equals(pingValue, "ok", StringComparison.OrdinalIgnoreCase))
{
protocol.SetParameter(Parameter.apihealth, 1); // OK
}
else
{
protocol.SetParameter(Parameter.apihealth, 0); // FAIL
}
}
else
{
protocol.SetParameter(Parameter.apihealth, 0);
}
}
catch (Exception ex)
{
protocol.Log($"QA{protocol.QActionID}|{protocol.GetTriggerParameter()}|Run|Exception:{Environment.NewLine}{ex}", LogType.Error, LogLevel.NoLogging);
protocol.SetParameter(Parameter.apihealth, 0); // Por seguridad: asumimos FAIL
}
}
}
For some reason params 3 is null
but in log appear :
2025/06/03 23:03:31.379|SLProtocol - 1084 - Titan-Live - copy|8832|CProtocol::LogHttpRequest|INF|3|<- 23:03:31 - GET http://172.28.20.201:80/api/v1/system/network/ping
2025/06/03 23:03:31.391|SLProtocol - 1084 - Titan-Live - copy|8832|CProtocol::ProcessHttpResult|INF|3|HTTP/1.1 200 OK
2025/06/03 23:03:31.392|SLProtocol - 1084 - Titan-Live - copy|8832|CParameter::SetValue|DBG|2|-> StatusCodePingCheck set value to VT_BSTR : HTTP/1.1 200 OK (HTTP/1.1 200 OK)
2025/06/03 23:03:31.392|SLProtocol - 1084 - Titan-Live - copy|8832|CParameter::SetValue|DBG|2|
2025/06/03 23:03:31.393|SLProtocol - 1084 - Titan-Live - copy|8832|CParameter::SetValue|DBG|2|-> PingCheckResponse set value to VT_BSTR : {"ping": "ok"} ({"ping": "ok"})
2025/06/03 23:03:31.393|SLProtocol - 1084 - Titan-Live - copy|8832|CParameter::SetValue|DBG|2|
2025/06/03 23:03:31.469|SLProtocol - 1084 - Titan-Live - copy|8832|CGroup::Execute|DBG|6|Finished executing group 2
Thanks
Hi,
I run manually QAction and work ok
2025/06/04 10:35:04.655|SLProtocol - 16756 - Titan-Live - copy|16092|CQAction::Run|INF|2|QAction [3] triggered by [pid=3/idx=-1/pk=/user=]
Input: new = {"ping": "ok"}
Input: old =
Input: extra = <NULL>
2025/06/04 10:35:04.667|SLManagedScripting.exe|ManagedInterop|CRU|5|51|Value jsonnnnn:{"ping": "ok"}
2025/06/04 10:35:04.668|SLProtocol - 16756 - Titan-Live - copy|22420|CParameter::SetValue|DBG|2|-> APIHealth set value to VT_R8 : 1.000000 (calculated = 1.000000)
2025/06/04 10:35:04.668|SLProtocol - 16756 - Titan-Live - copy|22420|CParameter::SetValue|DBG|2| 000000 31 1
2025/06/04 10:35:04.669|SLElement.exe|8024|CElement::SetParameterValueFuncAsync|DBG|5|Set for PID 100 Value = VT_R8 : 1.000000
2025/06/04 10:35:04.684|SLElement.exe|17076|CElement::SetParameterValue|DBG|1|** Parameter 100 changed to VT_R8 : 1.000000
2025/06/04 10:35:08.904|SLProtocol - 16756 - Titan-Live - copy|22272|CTimer::TimerThreadFunc|DBG|6|Resetting last group
2025/06/04 10:35:08.905|SLProtocol - 16756 - Titan-Live - copy|22272|CTimer::Execute|DBG|6|1 groups to execute
2025/06/04 10:35:08.905|SLProtocol - 16756 - Titan-Live - copy|22272|CTimer::TimerThreadFunc|DBG|6|Waiting for last group to be finished.
2025/06/04 10:35:08.918|SLProtocol - 16756 - Titan-Live - copy|13588|CGroup::Execute|DBG|6|Start executing group 2 (interval = 75) (depth=1)
2025/06/04 10:35:08.919|SLProtocol - 16756 - Titan-Live - copy|13588|CProtocol::LogHttpRequest|INF|3|<- 10:35:08 - GET http://172.28.20.201:80/api/v1/system/network/ping
2025/06/04 10:35:08.948|SLProtocol - 16756 - Titan-Live - copy|13588|CProtocol::ProcessHttpResult|INF|3|HTTP/1.1 200 OK
2025/06/04 10:35:08.948|SLProtocol - 16756 - Titan-Live - copy|13588|CParameter::SetValue|DBG|2|-> StatusCodePingCheck set value to VT_BSTR : HTTP/1.1 200 OK (HTTP/1.1 200 OK)
2025/06/04 10:35:08.952|SLProtocol - 16756 - Titan-Live - copy|13588|CParameter::SetValue|DBG|2| 000000 485454502F 312E312032 3030204F4B HTTP/1.1 200 OK
2025/06/04 10:35:08.952|SLProtocol - 16756 - Titan-Live - copy|13588|CParameter::SetValue|DBG|2|-> PingCheckResponse set value to VT_BSTR : {"ping": "ok"} ({"ping": "ok"})
2025/06/04 10:35:08.953|SLProtocol - 16756 - Titan-Live - copy|13588|CParameter::SetValue|DBG|2| 000000 7B2270696E 67223A2022 6F6B227D {"ping": "ok"}
2025/06/04 10:35:09.040|SLProtocol - 16756 - Titan-Live - copy|13588|CGroup::Execute|DBG|6|Finished executing group 2
2025/06/04 10:35:09.044|SLProtocol - 16756 - Titan-Live - copy|22272|CTimer::TimerThreadFunc|DBG|6|Last group finished.
2025/06/04 10:35:18.905|SLProtocol - 16756 - Titan-Live - copy|22272|CTimer::TimerThreadFunc|DBG|6|Resetting last group
2025/06/04 10:35:18.905|SLProtocol - 16756 - Titan-Live - copy|22272|CTimer::Execute|DBG|6|1 groups to execute
2025/06/04 10:35:18.905|SLProtocol - 16756 - Titan-Live - copy|22272|CTimer::TimerThreadFunc|DBG|6|Waiting for last group to be finished.
2025/06/04 10:35:18.912|SLProtocol - 16756 - Titan-Live - copy|13588|CGroup::Execute|DBG|6|Start executing group 2 (interval = 75) (depth=1)
2025/06/04 10:35:18.912|SLProtocol - 16756 - Titan-Live - copy|13588|CProtocol::LogHttpRequest|INF|3|<- 10:35:18 - GET http://172.28.20.201:80/api/v1/system/network/ping
2025/06/04 10:35:18.920|SLProtocol - 16756 - Titan-Live - copy|13588|CProtocol::ProcessHttpResult|INF|3|HTTP/1.1 200 OK
2025/06/04 10:35:18.920|SLProtocol - 16756 - Titan-Live - copy|13588|CParameter::SetValue|DBG|2|-> StatusCodePingCheck set value to VT_BSTR : HTTP/1.1 200 OK (HTTP/1.1 200 OK)
2025/06/04 10:35:18.921|SLProtocol - 16756 - Titan-Live - copy|13588|CParameter::SetValue|DBG|2| 000000 485454502F 312E312032 3030204F4B HTTP/1.1 200 OK
2025/06/04 10:35:18.921|SLProtocol - 16756 - Titan-Live - copy|13588|CParameter::SetValue|DBG|2|-> PingCheckResponse set value to VT_BSTR : {"ping": "ok"} ({"ping": "ok"})
2025/06/04 10:35:18.921|SLProtocol - 16756 - Titan-Live - copy|13588|CParameter::SetValue|DBG|2| 000000 7B2270696E 67223A2022 6F6B227D {"ping": "ok"}
2025/06/04 10:35:18.997|SLProtocol - 16756 - Titan-Live - copy|13588|CGroup::Execute|DBG|6|Finished executing group 2
2025/06/04 10:35:18.997|SLProtocol - 16756 - Titan-Live - copy|22272|CTimer::TimerThreadFunc|DBG|6|Last group finished.
The issue is why no run QAction for first time.

Hi Jose,
I tested your connector locally (just put another URL in the session) and everything seems to work OK on my side (the apiHealth-parameter shows "OK" a few seconds after startup of the element).
Is this indeed what you are trying to achieve, or am I misunderstanding you?
Because I cannot find any reason that the QAction does not get triggered.
Kind regards,