Hi,
I am developing a driver to get parameters from an API, but I’m stuck on an issue.
I need to execute a QAction right after the driver starts and display the result of that QAction. However, when I run the driver, the QAction does not execute.
Please correct me if I’m wrong, but I think the order to trigger things is:
Timer -> Action -> Group -> QAction?
Here is my code:
<QActions>
<QAction id="101" name="PingCheck" encoding="csharp" triggers="10">
</QAction>
</QActions>
<Groups>
<Group id="10">
<Name>Update Parameters basic</Name>
<Description>Updte info of Titan Live</Description>
<Type>poll</Type>
<Content>
<Param>11</Param>
<Param>12</Param>
<Param>14</Param>
<Param>15</Param>
</Content>
</Group>
<Group id="20">
<Name>Update Parameters advance</Name>
<Description>Updte info of Titan Live</Description>
<Type>poll</Type>
<Content>
<Param>1101</Param>
<Param>1102</Param>
<Param>1103</Param>
<Param>1104</Param>
<Param>13</Param>
<Param>16</Param>
</Content>
</Group>
<Group id="30">
<Name>Server Status Group</Name>
<Type>poll</Type>
<Description>Ping encoder API</Description>
<Content>
<Action>1</Action>
</Content>
</Group>
</Groups>
<Triggers>
<Trigger id="1">
<Name>health trigger</Name>
<Time>after startup</Time>
<Type>action</Type>
<Content>
<Id>1</Id>
</Content>
</Trigger>
</Triggers>
<Actions>
<Action id="1">
<Name>After Startup health </Name>
<On id="30">group</On>
<Type></Type>
</Action>
<Action id="3">
<Name>Login Button Action</Name>
<On id="300">parameter</On>
<Type>run actions</Type>
</Action>
</Actions>
<Timers>
<Timer id="1">
<Name>Polling timer (60s)</Name>
<Time initial="true">60000</Time>
<Interval>75</Interval>
<Content>
<Group>10</Group>
</Content>
</Timer>
<Timer id="2">
<Name>Polling timer (10s)</Name>
<Time initial="true">1000</Time>
<Interval>75</Interval>
<Content>
<Group>20</Group>
</Content>
</Timer>
<Timer id="3">
<Name>Polling timer QActions (30s)</Name>
<Time initial="true">30000</Time>
<Interval>75</Interval>
<Content>
<Group>30</Group>
</Content>
</Timer>
</Timers>
</Protocol>
```
Hi,
You can find in DataMiner Docs the required steps to achieve what you are looking for:
Executing a QAction after startup
Hope it helps.
Hello Jose,
In this case Group 30 will execute action 1 again, because of
<Content>
<Action>1</Action>
</Content>
You cannot trigger execution of QAction directly from a group. Example of triggering QAction after startup is this:
Trigger ->Action -> Group -> Action -> Parameter -> QAction
This workflow looks like this in code :
<Params>
<Param id="2">
<Name>AfterStartup</Name>
<Description>After Startup</Description>
<Type>dummy</Type>
</Param>
</Params>
<QActions>
<QAction id="1" name="Precompiled Code" encoding="csharp" options="precompile" />
<QAction id="2" name="After Startup" encoding="csharp" triggers="2" />
</QActions>
<Groups>
<Group id="2">
<Name>After Startup</Name>
<Description>After Startup</Description>
<Type>poll action</Type>
<Content>
<Action>2</Action>
</Content>
</Group>
</Groups>
<Triggers>
<Trigger id="1">
<Name>After Startup</Name>
<On>protocol</On>
<Time>after startup</Time>
<Type>action</Type>
<Content>
<Id>1</Id>
</Content>
</Trigger>
</Triggers>
<Actions>
<Action id="1">
<Name>After Startup Group</Name>
<On id="2">group</On>
<Type>execute next</Type>
</Action>
<Action id="2">
<Name>After Startup QAction</Name>
<On id="2">parameter</On>
<Type>run actions</Type>
</Action>
</Actions>