<jbi:jbi version="1.0" ..>
   <jbi:services binding-component="true">
      <jbi:consumes interface-name="inscription-cantine:inscriptionCantine">
         <cdk:timeout>${municipalite.timeout.clt-services.qf}</cdk:timeout>
         <cdk:mep xsi:nil="true" />
         <rest:service-base-path>/api/demarches-administratives</rest:service-base-path>
         <rest:mapping>
            <rest:operation name="inscription-cantine:new">
               <!-- REST request part -->
               <rest:http-method>POST</rest:http-method>
               <rest:path-template>/demande-cantine</rest:path-template>
               <rest:http-body-from-json-virtual-root>new</rest:http-body-from-json-virtual-root>
               ...
               
               <!-- REST response part -->
               <rest:on-jbi-response>
                  <rest:on-default-out>
                     <rest:http-response http-code="201">
                        <rest:header name="Access-Control-Allow-Origin">
                           <rest:constant>*</rest:constant>
                        </rest:header>
                        <rest:header name="Access-Control-Allow-Headers">
                           <rest:constant>Origin, X-Requested-With, Content-Type, Accept</rest:constant>
                        </rest:header>
                        <rest:http-body-to-json-virtual-root>newResponse</rest:http-body-to-json-virtual-root>
                     </rest:http-response>
                  </rest:on-default-out>
                  <rest:on-default-error>
                     <rest:http-response http-code="500" />
                  </rest:on-default-error>
               </rest:on-jbi-response>
            </rest:operation>
            <rest:operation name="inscription-cantine:validate">
               <!-- REST request part -->
               <rest:http-method>PUT</rest:http-method>
               <rest:path-template>/demande-cantine/{numero-demande}</rest:path-template>
               <rest:http-body-from-json-virtual-root>validate</rest:http-body-from-json-virtual-root>
               ...
               
               <!-- REST response part -->
               <rest:on-jbi-response>
                  <rest:on-default-out>
                     <rest:http-response http-code="202">
                        <rest:http-body-to-json-virtual-root>validateResponse</rest:http-body-to-json-virtual-root>
                     </rest:http-response>
                  </rest:on-default-out>
                  <rest:on-fault order-id="0">
                     <rest:condition>
                        <rest:xpath>boolean(                     </rest:condition>
                     <rest:http-response http-code="404" />
                  </rest:on-fault>
                  <rest:on-fault order-id="1">
                     <rest:condition>
                        <rest:xpath>boolean(                     </rest:condition>
                     <rest:http-response http-code="409" />
                  </rest:on-fault>
                  <rest:on-default-error>
                     <rest:http-response http-code="500" />
                  </rest:on-default-error>
               </rest:on-jbi-response>
            </rest:operation>
         </rest:mapping>
      </jbi:consumes>
      <jbi:consumes interface-name="flowable-integration:Task">
         <cdk:timeout>${municipalite.timeout.clt-services.qf}</cdk:timeout>
         <cdk:mep xsi:nil="true" />
         <rest:service-base-path>/api/tasks</rest:service-base-path>
         <rest:mapping>
            <rest:operation name="flowable-integration:getTasks">
               <!-- REST request part -->
               <rest:http-method>GET</rest:http-method>
               <rest:path-template>/tasks</rest:path-template>
               ...
               
               <!-- REST response part -->
               <rest:on-jbi-response>
                  <rest:on-default-out>
                     <rest:transformation>
                        <rest:xsl>demandes-a-valider.xsl</rest:xsl>
                     </rest:transformation>
                     <rest:http-response http-code="200">
                        <rest:http-body-to-json-virtual-root>demandes</rest:http-body-to-json-virtual-root>
                        <rest:http-body-to-json-auto-array>true</rest:http-body-to-json-auto-array>
                     </rest:http-response>
                  </rest:on-default-out>
                  <rest:on-default-error>
                     <rest:http-response http-code="500" />
                  </rest:on-default-error>
               </rest:on-jbi-response>
            </rest:operation>
         </rest:mapping>
      </jbi:consumes>
   </jbi:services>
</jbi:jbi>
 
Now the HTTP Rest response can be customized