Ordering

Since we are now familiar with attachments we can talk about the order of our Deployers. What would be the natural order of our Deployers? Probably the first thing it comes to our mind is a plain number ordering. Old and proven way to do the ordering. But since we waited to introduce the attachments before we talked about ordering there must be something better. We can define the order by simply providing the information about Attachment requirements / demands (inputs) and supplies (outputs). Let's explain this in more detail on the actual example.

         public MyDeployer()
         {
         setInputs(SomeMetaData1.class, SomeMetaData2.class);
         setOutputs(MyOutput.class);
         }
      

Here we can see that our MyDeployer depends on SomeMetaData1 and SomeMetaData2 instance attachments, and provides further MyOutput instance attachment for next deployers to use. So any deployer that provides SomeMetaData1 and SomeMetaData2 instance attachments should be before our MyDeployer and any one that uses MyOutput instance attachment should be after.