# new-instance-bean handler

<span class="notranslate">This handler allows the craetion of a new business object and assign default attribute values.</span> <span class="notranslate">The value of the bean attributes is specified using multiple instances of the bean-attribute tag</span>

<div id="bkmrk-attribute-usage-clas"><table class="confluenceTable tablesorter tablesorter-default stickyTableHeaders" role="grid"><thead class="tableFloatingHeaderOriginal"><tr class="tablesorter-headerRow" role="row"><th aria-disabled="false" aria-label="Attribute: No sort applied, activate to apply an ascending sort" aria-sort="none" class="confluenceTh tablesorter-header sortableHeader tablesorter-headerUnSorted" data-column="0" role="columnheader" scope="col" tabindex="0"><div><div>**Attribute**</div></div></th><th aria-disabled="false" aria-label="Usage: No sort applied, activate to apply an ascending sort" aria-sort="none" class="confluenceTh tablesorter-header sortableHeader tablesorter-headerUnSorted" data-column="1" role="columnheader" scope="col" tabindex="0"><div><div>**Usage**</div></div></th></tr></thead><tbody aria-live="polite" aria-relevant="all"><tr role="row"><td class="confluenceTd">className

</td><td class="confluenceTd">Name of the business object class

</td></tr><tr role="row"><td class="confluenceTd">if

</td><td class="confluenceTd">EL expression that must be evaluated to true prior to handler action

</td></tr><tr role="row"><td class="confluenceTd">unless

</td><td class="confluenceTd">EL expression that must be evaluated to false prior to handler action</td></tr><tr role="row"><td class="confluenceTd" colspan="1">bean-attribute/name</td><td class="confluenceTd" colspan="1">Name of the attribute</td></tr><tr role="row"><td class="confluenceTd" colspan="1">bean-attribute/value</td><td class="confluenceTd" colspan="1">EL expression with the value to assign</td></tr></tbody></table>

</div><span class="notranslate">With the following example would create a new city within a country:</span>

```western
<datanode name="country">
    ...
    <finder name="cities" type="city" >
        <collection-finder collection="${instance.cities}">
        <new-instance-bean  className="City">
            <bean-attribute name="countryAbbreviation" value="${instance.abbreviation}"/>
        </new-instance-bean>
    </finder>
    ...
</datanode>
```