FI Finnish
SE Swedish
FR French
PL Polish
DE German
US English (US)

Contact Us

If you still have questions or prefer to get help directly from an agent, please submit a request.
We’ll get back to you as soon as possible.

Please fill out the contact form below and we will reply as soon as possible.

Polish
FI Finnish
SE Swedish
FR French
PL Polish
DE German
US English (US)
  • Log in
  • Home
  • Platforma
  • ESM
  • Inna dokumentacja techniczna ESM
  • Słuchacze

ESM Listener — debugowanie i przykłady kodu

Contact Us

If you still have questions or prefer to get help directly from an agent, please submit a request.
We’ll get back to you as soon as possible.

Please fill out the contact form below and we will reply as soon as possible.

  • Zarządzanie usługami
    Rozwiązanie Matrix42 Professional Rozwiązanie Matrix42 Core Zarządzanie usługami przedsiębiorstwa Inteligencja Matrix42
  • Zarządzanie tożsamością i administracja ( IGA )
    Przegląd IGA Biblioteka rozwiązań IGA
  • Platforma
    ESM ESS2 ES Efecte Chat do zarządzania usługami Efektywne integracje Dodatki
  • Informacje o wydaniu dla M42 Core & Pro , IGA , Conversational AI
    2025.3 2025.2 2025.1 2024.2 2024.1 2023.4 2023.3 2023.2 2023.1 2022.4 2022.3 Informacje i zasady dotyczące wydania
  • Inny materiał
    Wytyczne uid terminów i dokumentacji Oświadczenia dotyczące dostępności
  • Usługi
+ More
    • Zarządzanie usługami

    • Zarządzanie tożsamością i administracja ( IGA )

    • Platforma

    • Informacje o wydaniu dla M42 Core & Pro , IGA , Conversational AI

    • Inny materiał

    • Usługi

ESM Listener — debugowanie i przykłady kodu

Debugowanie

Po ponownym załadowaniu ESM weryfikuje zawartość i nie można wstawić elementów niefunkcjonalnych.

  • Wyświetlany komunikat o błędzie jest często niemożliwy do zinterpretowania, np. „XML nie może być pusty”.
  • Sprawdź, czy zamknąłeś wszystkie komponenty </> i czy wszystkie kody pól są poprawne itd.
  • Przejrzyj dokumentację programu nasłuchującego, aby upewnić się, że nie próbujesz wykonywać czynności niemożliwych do wykonania, np. porównywania pól tekstowych lub pól odniesień zewnętrznych.
  • Spróbuj usunąć lub zmodyfikować podejrzane komponenty i spróbuj wykonać operację bez nich.

Możesz spróbować wyodrębnić więcej informacji, otwierając niektóre z tych klas w celu rejestrowania czasu wykonania i ustawiając poziom DEBUG podczas próby importowania pliku XML:

  • com.bitmount.equipment.importing.ValidatingEntityXMLImporter
  • com.efecte.datamodel.entity.listener.importing.XMLActionChainImporter
  • com.efecte.datamodel.entity.listener.importing.XMLDataCardListenerImporter
  • com.efecte.datamodel.entity.listener.importing.XMLSourceConditionsImporter
  • com.efecte.datamodel.entity.listener.importing.XMLTemplatesDataCardListenerImporter
  • com.bitmount.equipment.action.TemplateListenerImport

Jeśli masz ogólnie akceptowalnego słuchacza, który nie pracuje w ten sposób, chciałbyś:

Możesz spróbować uzyskać więcej informacji, otwierając klasy odpowiadające Twoim warunkom rejestrowania czasu wykonania i ustawiając poziom DEBUG. Powinieneś zobaczyć, co jest wyzwalane, a co nie:

  • com.efecte.datamodel.entity.listener.condition.(?????)
  • com.efecte.datamodel.entity.action.chain.condition.(?????)
  • com.efecte.datamodel.entity.action.implementations.(?????)
  • (?????) = każdy składnik XML

Pamiętaj, aby po naprawieniu programów nasłuchujących ustawić rejestrowanie z powrotem na poziom INFO, w przeciwnym razie wygenerujesz ogromną ilość plików dziennika!!

Przykłady kodu

Specjalizacje strukturalne

<?xml version="1.0" encoding="iso-8859-1"?>
<template code=”template code where listener is run">
    <listener>
        <name>Name of the listener</name>
        <trigger>post save</trigger>
        <source_conditions boolean="AND">
            <source_condition>
                ...
            </source_condition>
            <combined_source_condition boolean=”OR”>
                <source_condition>
                    ...
                </source_condition>
            </combined_source_condition>
        </source_conditions>
        <action_chain>
            <name>Set something</name>
            <root_target_condition>
                <template_condition>
                    <code>template code of target if used</code>
                </template_condition>
                <combined_target_condition boolean="AND">
                    <target_condition>
                        ...
                    </target_condition>
                </combined_target_condition>
            </root_target_condition>
            <action>
                ...
            </action>
            <action>
                ...
            </action>
        </action_chain>
    </listener>
</template>

Łączenie urządzeń z modelami urządzeń

 <template code="computer_model">
	<listener>
        <name>postsave.1.Link workstation to computer model if system type matches and no link exists</name>
        <trigger>post save</trigger>
        <source_conditions boolean="AND">
			<source_condition>
				<always_true/>
			</source_condition>
        </source_conditions>
<action_chain>
            <name>Link to computer model</name>
            <root_target_condition>
			 	<template_condition>
					<code>workstation</code>
				</template_condition>
				<combined_target_condition boolean="AND">
					<target_condition>
						<value>
							<attribute>
								<code>computer_model</code>
							</attribute>
							<operator>IS NULL</operator>
							<compared_value></compared_value>
						</value>
					</target_condition>
					<target_condition>
						<source_property>
							<attribute>
								<code>system_type</code>
							</attribute>
							<operator>=</operator>
							<compared_attribute>
								<code>sccm_model</code>
								<current_value>true</current_value>
							</compared_attribute>
						</source_property>
					</target_condition>
					<target_condition>
						<entity>
							<state>entityIsHidden</state>
							<value>false</value>
						</entity>
					</target_condition>							
				</combined_target_condition>
			</root_target_condition>
			<action>
<name>Link to computer model</name>
<class>com.efecte.datamodel.entity.action.implementations.CopySourceReferenceAction</class>
				<configuration_item>
					<name>Code</name>
					<value>computer_model</value>
				</configuration_item>
            </action>
        </action_chain>
    </listener>
</template>


Wstawianie nazw modeli urządzeń podczas importowania Utworzono puste nowe

<template code="workstation">
	<listener>
        <name>postsave.2.Insert model name from linked datacard if empty</name>
        <trigger>post save</trigger>
        <source_conditions boolean="AND">
            <source_condition>
                <value>
                    <attribute>
                        <code>workstation_model</code>
                        <current_value>true</current_value>
                    </attribute>
                    <operator>IS NOT NULL</operator>
                    <compared_value/>
                </value>
            </source_condition>
            <source_condition>
                <value>
                    <attribute>
                        <code>workstation_model_text</code>
                        <current_value>true</current_value>
                    </attribute>
                    <operator>IS NOT NULL</operator>
                    <compared_value/>
                </value>
            </source_condition>
			<source_condition>
				<reference_path_value>
					<reference>
						<path>$workstation_model:workstation_model$</path>
						<current_value>true</current_value>
					</reference>
					<operator>IS NULL</operator>
					<compared_value/>
				</reference_path_value>
			</source_condition>
        </source_conditions>
<action_chain>
            <name>Copy model name</name>
			<root_target_condition>
			 	<template_condition>
					<code>workstation_model</code>
				</template_condition>
				<combined_target_condition boolean="AND">
					<target_condition>
						<reference_from_source>
							<source_attribute>
								<code>workstation_model</code>
							</source_attribute>
						</reference_from_source>
					</target_condition>
					<target_condition>
						<entity>
							<state>entityIsHidden</state>
							<value>false</value>
						</entity>
					</target_condition>					
				</combined_target_condition>
			</root_target_condition>
<action>
<name>Copy model name</name>
              <class>com.efecte.datamodel.entity.action.implementations.CopyDataCardValuesAction</class>
                <configuration_item>
                    <name>Value</name>
                    <value>workstation_model_text</value>
                </configuration_item>
                <configuration_item>
                    <name>Code</name>
                    <value>workstation_model</value>
                </configuration_item>
            </action>
        </action_chain>
    </listener>
</template>

Wysyłanie e-maili

<template code="standard_change">
    <listener>
        <name>postsave.5. Notify development team on incoming email changing timestamps-04.05.2017</name>
        <trigger>post save</trigger>
        <source_conditions boolean="AND">
			<combined_source_condition boolean="OR">
				<source_condition>
					<property>
						<attribute>
							<code>implementation_start</code>
							<current_value>false</current_value>
						</attribute>
						<operator>!=</operator>
						<compared_attribute>
							<code>implementation_start</code>
							<current_value>true</current_value>
						</compared_attribute>
					</property>
				</source_condition>
				<source_condition>
					<property>
						<attribute>
							<code>implementation_end</code>
							<current_value>false</current_value>
						</attribute>
						<operator>!=</operator>
						<compared_attribute>
							<code>implementation_end</code>
							<current_value>true</current_value>
						</compared_attribute>
					</property>
				</source_condition>
				</combined_source_condition>
            <source_condition>
                <value>
                    <attribute>
                        <code>incoming_emails</code>
                        <current_value>true</current_value>
                    </attribute>
                    <operator>IS NOT NULL</operator>
                    <compared_value/>
                </value>
            </source_condition>
            <source_condition>
                <value>
                    <attribute>
                        <code>development_team</code>
                        <current_value>true</current_value>
                    </attribute>
                    <operator>IS NOT NULL</operator>
                    <compared_value/>
                </value>
            </source_condition>
        </source_conditions>
         <action_chain>
            <name>Notify</name>
			<action>
               <name>Send mail</name>
               <class>com.efecte.datamodel.entity.action.implementations.SendMailAction</class>
               <configuration_item>
                   <name>Message</name>
                   <value>Your requested Standard change $efecte_id$ has a changed scheduled datetime

Subject: $subject$
Description: $description$

Latest worklog comment:
$worklog$

This is an automatic mail from https://efecteitsm.dna.fi</value>
               </configuration_item>
               <configuration_item>
                   <name>To</name>
                   <value>$development_team:members_emails$</value>
               </configuration_item>
               <configuration_item>
                   <name>From</name>
                   <value>efecte-no-reply@dna.fi</value>
               </configuration_item>
               <configuration_item>
                   <name>Subject</name>
                   <value>Your requested Standard change $efecte_id$ has a changed scheduled datetime</value>
               </configuration_item>
           </action>
        </action_chain>
    </listener>
</template>

Was this article helpful?

Yes
No
Give feedback about this article

Related Articles

  • Cykl życia nasłuchiwacza ESM
  • Struktura XML odbiornika ESM
  • Operatorzy nasłuchujący ESM i warunki

Copyright 2026 – Matrix42 Professional.

Matrix42 homepage


Knowledge Base Software powered by Helpjuice

0
0
Expand