Hello,
We use preventive maintenance plan with job templates, where the plan can be set to create a new job after 1000 hours, or every 2 months.
For some reason, (I do not know yet why…maybe due to parts not received…) a current maintenance plan can still be active while the new one is due to be created.
We want to avoid having two preventive maintenance plans being active on same machine at same time.
So I was asked the following: Is there a way to prevent the creation of a maintenance plan job, if there is alreay a maintenance job running for the resource already?
I am sure I can detect in the job creation update method, if it is a maintenance, and if the resource already have one active,
but not sure it is the way…
my first thought was that I cannot use the exception widget as this sets a message box to a user… But for the automation process that creates them, what I should use? Is there a way to stop creation other than Raise Exception widget? Or there is no problemds using it even if the job is automatically created?
I saw there was a method called GetNextMntJobNum… (did not test) but I think the machine is not yet know at that point? It is just to get a new number… But again how to prevent creation without using the exception widget?
Any ideas how to proceed ?
Thanks