Q:

inbound property mule create

Why does this code allow someone to create an inbound message property in a Message Processor (like a Java component)
message.setProperty("myProperty", PropertyScope.INBOUND" );

but this does not
<set-property value="100" propertyName="myProperty" />

Per documentation, only message source should be able to create inbound property, then why is a Java component able to set inbound message property?

A:

You are right - that does violate the documented behavior of inbound properties.  As further, proof if you try to set an inbound property using the expression component:
<expression-component>
  message.inboundProperties['foo'] = 'bar'
</exporession-component>

At runtime will throw the following error:
Exception stack is:
1. The inbound message property "foo" cannot be added, updated or removed 
   because inbound message properties are immutable (java.lang.UnsupportedOperationException)
  org.mule.el.context.MessagePropertyMapContext:47 (null)

However Javadoc for setProperty says:

Set a property on the message. End-users should prefer more
  scope-specific methods for readability. This one is more intended for
  programmatic scope manipulation and Mule internal use.

So the takeaway is that setProperty is for internal Mule use, you should use setInvocationProperty, setOutboundProperty or setSessionProperty.  That is interesting to know because I'm sure I have used setProperty before.

