Salve,
utilizzando il basic-connector-1.5.0 e la documentazione riportata, siamo riusciti ad eseguire l'importazione e l'aggiornamento dei dati da OCS di due classi: Computer e SchedaRete. La classe SchedaRete è stata mappata nel file di trasformazione xls utilizzando il dominio ComputerSchedaRete.
Questo è il problema: nonostante le classi Computer e SchedaRete vengano popolate con nuovi record, in nessun caso viene generata la relazione tra gli oggetti inseriti in CMDbuild nel dominio relativo.
Vorremmo sapere se questo è un comportamento atteso o se abbiamo omesso qualche configurazione.
Grazie.
Per completezza si riporta il file xls utilizzato:
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<xsl:output method="xml" version="1.0" encoding="UTF-8" indent="yes"/>
<xsl:template match="/">
<CMDBUILD>
<xsl:apply-templates/>
</CMDBUILD>
</xsl:template>
<xsl:template match="*">
<xsl:apply-templates/>
</xsl:template>
<xsl:template match="text()"></xsl:template>
<xsl:template match="/inventory/device">
<Computer key="Code">
<Code>
<xsl:value-of select="/inventory/device/TAG"/>
</Code>
<Description>
<xsl:value-of select="NAME"/>
</Description>
<SO>
<xsl:value-of select="/inventory/device/OSNAME"/>
</SO>
<RAM>
<xsl:value-of select="/inventory/device/MEMORY"/>
</RAM>
</Computer>
</xsl:template>
<xsl:template match="/CMDBUILD/Computer">
<Computer key="Code">
<xsl:attribute name="objid">
<xsl:value-of select="./@objid"/>
</xsl:attribute>
<Code>
<xsl:value-of select="./Code"/>
</Code>
<Description>
<xsl:value-of select="./Description"/>
</Description>
<SO>
<xsl:value-of select="./SO"/>
</SO>
<RAM>
<xsl:value-of select="./RAM"/>
</RAM>
</Computer>
</xsl:template>
<xsl:template match="/inventory/networks">
<SchedeRete domain="ComputerSchedaRete" domaindirection="inverted" identifiers="MACAddress">
<IndirizzoIP>
<xsl:value-of select="/inventory/networks/IPADDRESS"/>
</IndirizzoIP>
<MACAddress>
<xsl:value-of select="/inventory/networks/MACADDR"/>
</MACAddress>
</SchedeRete>
</xsl:template>
<xsl:template match="/CMDBUILD/SchedeRete">
<SchedeRete domain="ComputerSchedaRete" domaindirection="inverted" identifiers="MACAddress">
<xsl:attribute name="objid">
<xsl:value-of select="./@objid"/>
</xsl:attribute>
<IndirizzoIP>
<xsl:value-of select="./IndirizzoIP"/>
</IndirizzoIP>
<MACAddress>
<xsl:value-of select="./MACAddress"/>
</MACAddress>
</SchedeRete>
</xsl:template>
</xsl:stylesheet>