Scheduler Not Working
-
@rodrigo @STAFF
I think there's a bug with the permissions. Even though the User has the needed permissions.
The event states "Scheduler failed to initialize because user does not hold the required role/s"Could someone check this? Below the code for the Data source, handler and scheduler, I have just created a user, give to it the permissions and the scheduler throws the above error.
Data Source
"dataSources":[ { "xid":"DS01_VDS01", "name":"01 - VDS 01", "enabled":true, "type":"VIRTUAL", "alarmLevels":{ "POLL_ABORTED":"INFORMATION" }, "purgeType":"YEARS", "updatePeriods":5, "updatePeriodType":"SECONDS", "polling":true, "quantize":true, "useCron":false, "data":null, "editPermission":[ ], "purgeOverride":false, "purgePeriod":1, "readPermission":[ [ "user" ] ] } ], "dataPoints":[ { "xid":"DP01_Virtual01", "name":"01 - ON \/ OFF", "enabled":true, "loggingType":"ON_CHANGE", "intervalLoggingPeriodType":"MINUTES", "intervalLoggingType":"INSTANT", "purgeType":"YEARS", "pointLocator":{ "dataType":"BINARY", "changeType":{ "type":"NO_CHANGE", "startValue":"true" }, "settable":true }, "eventDetectors":[ ], "plotType":"STEP", "rollup":"NONE", "unit":"", "simplifyType":"NONE", "chartColour":"", "data":null, "dataSourceXid":"DS01_VDS01", "defaultCacheSize":1, "deviceName":"Virtual Device 01", "discardExtremeValues":false, "discardHighLimit":1.7976931348623157E308, "discardLowLimit":-1.7976931348623157E308, "editPermission":[ ], "intervalLoggingPeriod":15, "intervalLoggingSampleWindowSize":0, "overrideIntervalLoggingSamples":false, "preventSetExtremeValues":false, "purgeOverride":false, "purgePeriod":1, "readPermission":[ [ "user" ] ], "setExtremeHighLimit":1.7976931348623157E308, "setExtremeLowLimit":-1.7976931348623157E308, "setPermission":[ [ "user" ] ], "tags":{ }, "textRenderer":{ "type":"BINARY", "oneColour":"rgb(255, 51, 51)", "oneLabel":"OFF", "zeroColour":"rgb(0, 214, 0)", "zeroLabel":"ON" }, "tolerance":0.0 }, { "xid":"DP02_Virtual02", "name":"01 - ON \/ OFF", "enabled":true, "loggingType":"ON_CHANGE", "intervalLoggingPeriodType":"MINUTES", "intervalLoggingType":"INSTANT", "purgeType":"YEARS", "pointLocator":{ "dataType":"BINARY", "changeType":{ "type":"NO_CHANGE", "startValue":"true" }, "settable":true }, "eventDetectors":[ ], "plotType":"STEP", "rollup":"NONE", "unit":"", "simplifyType":"NONE", "chartColour":"", "data":null, "dataSourceXid":"DS01_VDS01", "defaultCacheSize":1, "deviceName":"Virtual Device 02", "discardExtremeValues":false, "discardHighLimit":1.7976931348623157E308, "discardLowLimit":-1.7976931348623157E308, "editPermission":[ ], "intervalLoggingPeriod":15, "intervalLoggingSampleWindowSize":0, "overrideIntervalLoggingSamples":false, "preventSetExtremeValues":false, "purgeOverride":false, "purgePeriod":1, "readPermission":[ [ "user" ] ], "setExtremeHighLimit":1.7976931348623157E308, "setExtremeLowLimit":-1.7976931348623157E308, "setPermission":[ [ "user" ] ], "tags":{ }, "textRenderer":{ "type":"BINARY", "oneColour":"rgb(255, 51, 51)", "oneLabel":"OFF", "zeroColour":"rgb(0, 214, 0)", "zeroLabel":"ON" }, "tolerance":0.0 }, { "xid":"DP03_Virtual03", "name":"01 - ON \/ OFF", "enabled":true, "loggingType":"ON_CHANGE", "intervalLoggingPeriodType":"MINUTES", "intervalLoggingType":"INSTANT", "purgeType":"YEARS", "pointLocator":{ "dataType":"BINARY", "changeType":{ "type":"NO_CHANGE", "startValue":"true" }, "settable":true }, "eventDetectors":[ ], "plotType":"STEP", "rollup":"NONE", "unit":"", "simplifyType":"NONE", "chartColour":"", "data":null, "dataSourceXid":"DS01_VDS01", "defaultCacheSize":1, "deviceName":"Virtual Device 03", "discardExtremeValues":false, "discardHighLimit":1.7976931348623157E308, "discardLowLimit":-1.7976931348623157E308, "editPermission":[ ], "intervalLoggingPeriod":15, "intervalLoggingSampleWindowSize":0, "overrideIntervalLoggingSamples":false, "preventSetExtremeValues":false, "purgeOverride":false, "purgePeriod":1, "readPermission":[ [ "user" ] ], "setExtremeHighLimit":1.7976931348623157E308, "setExtremeLowLimit":-1.7976931348623157E308, "setPermission":[ [ "user" ] ], "tags":{ }, "textRenderer":{ "type":"BINARY", "oneColour":"rgb(255, 51, 51)", "oneLabel":"OFF", "zeroColour":"rgb(0, 214, 0)", "zeroLabel":"ON" }, "tolerance":0.0 } ] }
Event Handler
{ "eventHandlers": [ { "handlerType": "SET_POINT", "targetPointId": "DP01_Virtual01", "scriptRoles": [], "inactiveValueToSet": "true", "activeValueToSet": "false", "eventTypes": [ { "XID": null, "sourceType": "ADVANCED_SCHEDULE", "scheduleEventType": "SCHEDULE_ACTIVE" } ], "xid": "EH_test01", "activeAction": "STATIC_VALUE", "inactiveAction": "STATIC_VALUE", "readPermission": [ [ "user" ] ], "name": "Handler 01", "disabled": false, "additionalContext": [], "editPermission": [ [ "user" ] ] } ] }
Scheduler
{ "advancedSchedules": [ { "xid": "advSch_test01", "defaultSchedule": { "dailySchedules": [ { "changes": [] }, { "changes": [ "18:30", "19:55" ] }, { "changes": [ "18:30", "19:55" ] }, { "changes": [ "18:30", "19:55" ] }, { "changes": [ "18:30", "19:55" ] }, { "changes": [ "18:30", "19:55" ] }, { "changes": [] } ], "offsetCount": 10 }, "readPermission": [ [ "user" ] ], "name": "Scheduler test 01", "alarmLevel": "INFORMATION", "errorAlarmLevel": "INFORMATION", "editPermission": [ [ "user" ] ], "enabled": true, "exceptions": [] } ] }
Thanks!
-
-
@rodrigo I imported your example as superadmin and everything works as expected. When I try to create a schedule as non-superadmin I can't even save it, but I don't think this is the problem you are describing.
From the description I see that you are having problems with a non superadmin user. We will need more information to help you out.
Can you elaborate on what "not working" means? Please provide a detailed step by step procedure that describes what the problem is and how to reproduce it.
Can you provide the full log output or screenshot of the event in the UI you are seeing, I'm unsure of what this means and where you see it: "The event states "Scheduler failed to initialize because user does not hold the required role/s"
-
@terrypacker
Hi Terry, thank you for answering, there are two problems actually;-
the one you mention, a non-superadmin user can't create or modify/save created schedules, even though it has all the permissions. I'm trying this again now, and supposedly the user is able to edit and save the schedule.
-
A schedule created by a superadmin user works as expected, in the example it starts/stops the virtual device 01
Test 01: Logged as superadmin I'm able to modify and save the schedule, when the schedule time arrives, the Virtual Device 01 is turned on and off. It works.
Test 02: With the same Data source, points, schedule, modify the schedule as superadmin save it and logout. Log in as user and the same schedule does not trigger the Virtual Device and the following event appears.
As per the "full log output" file you're asking, can you please tell me where to find it?
Thanks again,
Rodrigo -
-
@rodrigo We were able to reproduce the problem and it will require additional investigation from our side.
-
@benjamin-perez Thanks Benjamin, looking forward to know if it's my mistake somewhere or a bug.
I've also asked @MattFox to take a look at this. His thoughts, bug.Regards,
Rodrigo -
@Rodrigo
Hello Everyone, have you been able to check this issue?Regards,
Rodrigo -
@Rodrigo This issue has been identified and we are working on the solution. The fix for problem will be delivered in a new version.
-
@benjamin-perez Thank you Benjamin.
Regards,
Rodrigo -
@Rodrigo This issue has been resolved in Mango v4.4.0 with advancedScheduler-4.4.1.