Assets

Assets leiten sich vom gewählten Template ab und stellen die einzelnen Stammdatenelemente dar.

Asset erstellen

per API Call

Genau wie Templates können auch Assets per API Call angelegt werden.
Siehe auch Data Management API.

<api>
    <organizationId>Virtimo</organizationId>
    <locale>de</locale>
    <requests>
        <request>
            <context>asset</context>
            <method>create</method>
            <parameters>
                <asset>
                    <version>
                        <childTemplates />
                        <customId>Benutzerdefinierte ID</customId>
                        <description></description>
                        <versionedAttributes>
                            <attribute>
                                <key>key1</key>
                                <value>val1</value>
                            </attribute>
                            <attribute>
                                <key>key2</key>
                                <value>val2</value>
                            </attribute>
                        </versionedAttributes>
                    </version>
                    <unversionedAttributes />
                </asset>
                <templateId>40</templateId>
            </parameters>
        </request>
    </requests>
</api>
xml

im BPC

Assets können in der BPC-Oberfläche erstellt werden, sofern bereits mindestens ein Template vorhanden ist.
Siehe Daten anlegen.

Asset bearbeiten

per API Call

Update über ID
<api>
    <organizationId>Virtimo</organizationId>
    <locale>de</locale>
    <requests>
        <request>
            <context>asset</context>
            <method>update</method>
            <parameters>
                <asset>
                    <version>
                        <childTemplates/>
                        <customId>NEU3</customId>
                        <description></description>
                        <versionedAttributes>
                            <attribute>
                                <key>newID</key>
                                <value></value>
                            </attribute>
                        </versionedAttributes>
                    </version>
                    <unversionedAttributes/>
                    <id>483</id>
                </asset>
            </parameters>
        </request>
    </requests>
</api>
xml
Update über CustomID
<api>
    <organizationId>Virtimo</organizationId>
    <locale>de</locale>
    <requests>
        <request>
            <context>asset</context>
            <method>update</method>

            <parameters>
                <asset>
                    <version>
                        <customId>asset_custom_id_6</customId>
                        <template>
                            <customId>template_custom_id_1</customId>
                        </template>
                        <childTemplates/>
                        <description></description>
                        <versionedAttributes>
                            <attribute>
                                <key>VirtimoID</key>
                                <value>val1</value>
                            </attribute>
                        </versionedAttributes>
                    </version>
                    <unversionedAttributes/>
                </asset>
            </parameters>
        </request>
    </requests>
</api>
xml

im BPC

In der BPC-Oberfläche werden Assets, also Stammdatenelemente, direkt über die Stammdatendetails aktualisiert.
Siehe Daten bearbeiten.

Attributeigenschaften

Property Beschreibung Beispiel

key*

Primärschlüssel, der ein Attribut identifiziert.
Falls "labels" oder "displayName" nicht angegeben sind, werden diese Werte durch "key" belegt.

<key>status</key>
xml

attributes

Ein Attribut der Klasse "complex" oder "group" kann Sub-Attribute enthalten. In einem bestimmten Asset lautet die Struktur ./attribute/attributes/* für ein Attribut des Typs "group".

value

Wert eines Attributs. Kann ein Textknoten (für ein Attribut vom Typ "basic") oder ein Elementknoten (für ein Attribut eines beliebigen Typs der Klasse "complex") sein.

Beispiele

Template und abgeleitetes Asset für Attribut "enum"
Beispiel Template - Auszug
<attribute>
    <key>state</key>
    <labels>
        <de>Zustand</de>
        <en>State</en>
    </labels>
    <type>enum</type>
    <readOnly>true</readOnly>
    <enums>
        <enum>
            <colorCode><value>00FF00</value></colorCode>
            <key>connected</key>
            <labels>
                <de>Verbunden</de>
                <en>Connected</en>
            </labels>
        </enum>
        <enum>
            <colorCode><value>FF0000</value></colorCode>
            <key>disconnected</key>
            <labels>
                <de>Getrennt</de>
                <en>Disconnected</en>
            </labels>
        </enum>
    </enums>
</attribute>
xml
Beispiel für abgeleitetes Asset - Auszug
<attribute>
    <key>state</key>
    <value>connected</value>
</attribute>
xml
Template und abgeleitetes Asset für Attribut "group"
Beispiel-Template - Auszug
<attribute>
    <key>configuration</key>
    <labels>
        <de>Konfiguration</de>
        <en>Configuration</en>
    </labels>
    <type>group</type>
    <attributes>
        <attribute>
            <key>nominalPower</key>
            <labels>
                <de>Nennleistung</de>
                <en>Nominal Power</en>
            </labels>
            <unit>kW</unit>
            <type>number</type>
        </attribute>
        <attribute>
            <key>minimumPower</key>
            <labels>
                <de>Minimalleistung</de>
                <en>Minimum Power</en>
            </labels>
            <unit>kW</unit>
            <type>number</type>
        </attribute>
    </attributes>
</attribute>
xml
Beispiel für abgeleitetes Asset - Auszug
<attribute>
    <key>configuration</key>
    <attributes>
        <attribute>
            <key>nominalPower</key>
            <value>100000</value>
        </attribute>
        <attribute>
            <key>minimumPower</key>
            <value>80000</value>
        </attribute>
    </attributes>
</attribute>
xml
Template und abgeleitetes Asset für Attribut "list"
Beispiel-Template - Auszug
<attribute>
    <key>notes</key>
    <labels>
        <de>Notizen</de>
        <en>Notes</en>
    </labels>
    <type>list</type>
    <unique>true</unique>
    <maxQuantity>10</maxQuantity>
    <attribute>
        <type>string</type>
        <maxLength>100</maxLength>
    </attribute>
</attribute>
xml
Beispiel für abgeleitetes Asset - Auszug
<attribute>
    <key>notes</key>
    <value>
        <items>
            <item>Milch</item>
            <item>Birnen</item>
            <item>Kaffee</item>
        </items>
    </value>
</attribute>
xml
Template und abgeleitetes Asset für Attribut "table"
Beispiel-Template - Auszug
<attribute>
    <key>flowers</key>
    <labels>
        <de>Blumen</de>
        <en>Flowers</en>
    </labels>
    <type>table</type>
    <maxQuantity>10</maxQuantity>
    <attributes>
        <attribute>
            <key>name</key>
            <labels>
                <de>Name</de>
                <en>Name</en>
            </labels>
            <type>string</type>
            <required>true</required>
        </attribute>
        <attribute>
            <key>color</key>
            <labels>
                <de>Farbe</de>
                <en>Color</en>
            </labels>
            <type>string</type>
        </attribute>
        <attribute>
            <key>quantity</key>
            <labels>
                <de>Anzahl</de>
                <en>Quantity</en>
            </labels>
            <type>number</type>
            <decimalPlaces>0</decimalPlaces>
        </attribute>
    </attributes>
</attribute>
xml
Beispiel für abgeleitetes Asset - Auszug
<attribute>
    <key>flowers</key>
    <value>
        <rows>
            <row>
                <name>Glockenblume</name>
                <color>Gelb</color>
                <quantity>5</quantity>
            </row>
            <row>
                <name>Tulpe</name>
                <color>Lila</color>
                <quantity>10</quantity>
            </row>
            <row>
                <name>Nelke</name>
                <color>Weiß</color>
                <quantity>5</quantity>
            </row>
        </rows>
    </value>
</attribute>
xml