We are trying to setup custom application type for Backoffice on latest Intershop 7.9, but when we try to run DBInit we get following error:
[xx.xxx.webshop.dbinit.data.organization.Channel,xx.xxx.webshop.dbinit.data.organization.ChannelLocalization,ProcessChannel-DBInit] Version:null] com.intershop.beehive.core.pipelet.pipeline.ExecutePipeline [] [Unknown] [scHAqDIFBIAAAAFjuxgo2CwQ] [RbPAqDIFZAUAAAFjuxgo2CwQ] "main" ISH-CORE-2490: Synchronous called pipeline 'CreateSalesChannel-CreateChannelObjects' of application 'CustomShop@Custom-Site (app=xx.CustomBackoffice)' has finished with exception: com.intershop.beehive.core.internal.pipeline.PipelineCallStackException: com.intershop.beehive.core.capi.pipeline.PipelineExecutionException: Required input parameter 'AppID' missing of pipeline 'ProcessApplication defined in cartridge sld_ch_base' and start node 'Create'!
Error appears when calling preparer for channels. This is relevant code from apps.component file used to create backoffice application type:
<instance name="xx.CustomBackoffice.ApplicationTypes" with="AppRegistry"/>
<!-- register the custom B2CBackoffice to the Enterprise Backoffice of your choose -->
<fulfill of="intershop.EnterpriseBackoffice" requirement="namedObject">
<instance with="NamedObject">
<fulfill value="ChannelBackofficeApplicationType_52" requirement="name"/>
<fulfill with="xx.CustomBackoffice" requirement="object"/>
</instance>
</fulfill>
<!-- declaration of the cartridge list -->
<instance with="CartridgeListProvider" name="xx.CustomBackoffice.Cartridges">
<!-- Derive from standard webshop if you want to use the same cartridges like standard webshop -->
<fulfill requirement="parent" with="intershop.B2CBackoffice.Cartridges" />
</instance>
<!-- definition of the application type -->
<instance with="ApplicationType" name="xx.CustomBackoffice">
<fulfill requirement="id" value="xx.CustomBackoffice" />
<fulfill requirement="urlIdentifier" value="a1-shop-bo" />
<fulfill requirement="cartridgeListProvider" with="xx.CustomBackoffice.Cartridges" />
<fulfill requirement="namedObject">
<instance with="NamedObject">
<fulfill requirement="name" value="ChannelApps_52" />
<!-- register the AppRegistry containing all storefront applications of this channel -->
<fulfill requirement="object" with="xx.CustomBackoffice.ApplicationTypes" />
</instance>
</fulfill>
<!-- put additional NamedObjects, that are required by the particular business features -->
<!-- ... -->
</instance>
<!-- registration of the application type to the AppEngine -->
<fulfill of="AppEngine" with="xx.CustomBackoffice" requirement="app"/>
<fulfill requirement="namedObject" of="xx.CustomBackoffice" with="intershop.EnterpriseBackoffice.RESTAPI"/>
As soon as I remove definition for custom backoffice application type, dbinit runs successfully and frontoffice application types are created without error.
Can anybody see where is error or what is correct way to define custom application type for backoffice?
I tracked down this problem to define 2 custom application types in apps.component, especially this part:
<!-- register the custom B2CBackoffice to the Enterprise Backoffice of your choose -->
<fulfill of="intershop.EnterpriseBackoffice" requirement="namedObject">
<instance with="NamedObject">
<fulfill value="ChannelBackofficeApplicationType_52" requirement="name"/>
<fulfill with="xx.CustomBackoffice" requirement="object"/>
</instance>
</fulfill>
If I add second BO application type and try to register it with intershop.EnterpriseBackoffice with same code as above (just change xx.CustomBackoffice to xx2.CustomBackoffice):
<!-- register the custom B2CBackoffice to the Enterprise Backoffice of your choose -->
<fulfill of="intershop.EnterpriseBackoffice" requirement="namedObject">
<instance with="NamedObject">
<fulfill value="ChannelBackofficeApplicationType_52" requirement="name"/>
<fulfill with="xx2.CustomBackoffice" requirement="object"/>
</instance>
</fulfill>
Error shown above is given running DBinit. So if anyone knows hot to define and register 2 custom application types for backoffice (xx.CustomBackoffice and xx2.CustomBackoffice)?
Apparently there is a way to define two application types for BO and assign them to different channels. It's a kind of workaround but it works...
You have to define two BO application types in apps.component, and assign them to both channels, for example:
<fulfill requirement="app" with="channel1.Web" of="channel1.Backoffice.ApplicationTypes"/>
<fulfill requirement="app" with="channel1.Web" of="channel2.Backoffice.ApplicationTypes"/>
<fulfill requirement="app" with="channel2.Web" of="channel1.Backoffice.ApplicationTypes"/>
<fulfill requirement="app" with="channel2.Web" of="channel2.Backoffice.ApplicationTypes"/>
And add post DBinit preparer which executes SQL to update channel1 BO application to channel1.Backoffice (because with DBInit channel1 will be assigned to channel2.Backoffice):
UPDATE application SET appid = 'channel1.Backoffice' WHERE urlidentifier IN ('channel1', 'channel1-organization-channel1');