locked
How to prevent subsequent Plug-Ins from Firing? RRS feed

  • Question

  • I have an interesting dilemma.

    An entity has a couple of Plug-Ins associated to it. The first ensure that all business logic is fully applied and the second is an auto-number generator that gives the entity a unique reference before it is saved to the platform.

    If its not possible to fix business logic errors and I need to raise an exception to prevent the save going ahead, would this prevent the second plug-in from firing. And if not how does one go about preventing an entity save operation and any plug-ins associated to it.

    One idea I've had was that each entity has a single Plug-in, and its this plug-in that decides which operations it needs to carry out.

    Does anybody have any thoughts or comments?

    Many thanks

    Steve

    Friday, August 7, 2009 10:51 AM

Answers

  • Hi, Steve.

    Yes. If in fitst plugin exception will be raised - second step will not be executed. Check this url .
    Truth is opened the prepared mind My blog - http://a33ik.blogspot.com
    • Marked as answer by lemonje Friday, August 7, 2009 11:17 AM
    Friday, August 7, 2009 10:58 AM
    Moderator

All replies

  • Hi, Steve.

    Yes. If in fitst plugin exception will be raised - second step will not be executed. Check this url .
    Truth is opened the prepared mind My blog - http://a33ik.blogspot.com
    • Marked as answer by lemonje Friday, August 7, 2009 11:17 AM
    Friday, August 7, 2009 10:58 AM
    Moderator
  • Thanks Andriy for the prompt confirmation... saved me lots of R&D on the subject.

    Cheers

    Friday, August 7, 2009 11:17 AM