:Notice: Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at. http://www.apache.org/licenses/LICENSE-2.0 . Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR  CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
:page-partial:


=== Execution Publishing

The xref:refguide:applib:index/annotation/Property.adoc#executionPublishing[executionPublishing()] element determines whether and how a property edit is published via the registered implementation of xref:refguide:applib:index/services/publishing/spi/ExecutionSubscriber.adoc[ExecutionSubscriber].

A common use case is to notify external "downstream" systems of changes in the state of the Apache Causeway application.

The xref:refguide:config:sections/causeway.applib.adoc#causeway.applib.annotation.property.execution-publishing[causeway.applib.annotation.property.execution-publishing] configuration property is used to determine the whether the property edits are published:

* `all`
+
all property edits are published

* `none`
+
no property edits are published

If there is no configuration property in `application.properties` then publishing is automatically enabled.

This default can be overridden on an property-by-property basis; if `executionPublishing()` is set to `ENABLED` then the property edit is published irrespective of the configured value; if set to `DISABLED` then the property edit is _not_ published, again irrespective of the configured value.

For example:

[source,java]
----
import lombok.Getter;
import lombok.Setter;

public class Order {

    @Property(executionPublishing=Publishing.ENABLED)    // <.>
    @Getter @Setter
    private int quantity;

    // ...
}
----

<.> because set to enabled, will be published irrespective of the configured value.


