Plugin Execution Order

We have a number of custom plugins and I wish to run one of them before another one. How do I control this and how are they ordered by default?

I can't seem to find anything in the IConfigurablePlugin interface that allows me to do this or any documentation around this.

Parents Reply
  • 1) I've moved what was in the Initialize() method of each plugin that implements the IOrchestratedPlugin interface into the new execute() method (so Initialize() is now empty. Is that right?

    Execute() should contain any logic that needs to be performed in a specific order. Note that your orchestration plugin should ensure that Execute() is only called once per initialize (as it does now) to allow child plugins to add event handlers in Execute().

    2) Is it possible to get the custom plugins to execute before the out of the box ones? If so how would this be achieved?

    No. Plugin execution order is not guaranteed and the platform does not provide a way to control it. The solution provided in this thread is for dependencies within a known set of plugins and isn't a general use/extensible solution.

    2) Could the order parameter be added out of the box to the plugin interface in a future release? I'm sure I'm not the only one who needs to do this.

    Could I get more details about the use case challenge that led you to this need? The platform has hundreds of plugins that implement both core and extension functionality and we don't have execution dependencies. A platform-defined solution would likely need to identify direct plugin dependencies instead of a concrete order number, but, again I'd appreciate more details about the need.

Children
No Data