Ews value modification from EBO not seen by the processor
SmartConnector Forum
Schneider Electric support forum about SmartConnector applications for integration of other building management systems (BMS) into EcoStruxure Building Operation.
Send a co-worker an invite to the portal.Just enter their email address and we'll connect them to register. After joining, they will belong to the same company.
You have entered an invalid email address. Please re-enter the email address.
This co-worker has already been invited to the Exchange portal. Please invite another co-worker.
Please enter email address
Send InviteCancel
Invitation Sent
Your invitation was sent.Thanks for sharing Exchange with your co-worker.
Link copied. Please paste this link to share this article on your social media post.
2021-10-1308:18 AM
Ews value modification from EBO not seen by the processor
In the smartConnector i'm currently developing i've noticed something, I have defined some EWS values as "writeable", i can modify them from an EBO client an the values change correctly, but, my updateProcessor (that implements ILongRunningProcess) can't see the changes. I have to stop and start again the processor in order to watch the changes from it.
i'm using the method "GetValue()" to retrieve the data.
Example:
var pathValue = DataAdapter.ValueItems.FirstOrDefault(x => x.AlternateId == "CameraPathJpeg_" + index.ToString());
Link copied. Please paste this link to share this article on your social media post.
2021-10-1308:34 AM
Hi Jorge,
It's probably because you're keeping the DataAdapter alive in your ILongRunningProcess processor, and with time the data in the datacontext is no longer fresh.
The idea is to use it in a normal processor run and let it "die", and reconnect when the processor runs again. However, in a long running processor this is not the case, so we have to take care of that ourselves. Calling CreateDatabaseContext() on the DataAdapter should do the trick.
From the IDE docs:
"This adapter is tightly coupled to a MongooseDbContext's interfaces via dependency injection. As such, it should be a "short lived" instance however you can call CreateDatabaseContext to refresh your connection. To consume, you can optionally ConnectExisting to authenticate yourself against an existing EwsServer or ConnectNew to create a brand new EwsServer instance. In the latter case you are immediately authenticated."