How to enable or disable an event (event or handler or subscriber) through code in Agile PLM

I have a client who is facing max event issue in one of the utilities he is running on his side. The utility is running as a scheduled event in the night. He assumes it is happening because two other utilities are running at the same time when this utility is running. So he wants to customize through code to disable those two utilities running for a while till this gets completed and then start again. Please help in finding solution for this issue.

Agile User Asked on May 17, 2021 in Product Collaboration.
Add Comment
2 Answer(s)

Hello

There are no SDK that lets you do this programatically

One possible option – I assume the primary utility is running as a system account. If so, have the 2 other utilities ignore processing based on that userid

– Raj

Agile Angel Answered on May 17, 2021.
Add Comment

Hi Akanksha,

 

As mentioned by Raj,¬† there is no way to disable an event with SDK API. However, I am a bit curious regarding the RCA of the issue. If two events are getting triggered simultaneously, it shouldn’t ideally throw Max Event Level Reached error as per my knowledge, what is can show is Someone is working on this object, please try again later, or There is a newer version of this object, please refresh and try again, like these.

If you really think that multiple scheduled events are causing these, there is one probable solution. In the Task Configuration  settings, go to ScheduledEventTask and change Task MaxEventNumber to 1 and see if this resolves the issue.

The most likely cause of Events getting triggered nestedly is poor handling of dirty cells, please have a look there also.

Hope these help.

Cheers,

Swagoto

Agile Professional Answered on June 1, 2021.
Add Comment

Your Answer

By posting your answer, you agree to the privacy policy and terms of service.