Sumário

O exemplo simples abaixo destina-se a destacar a importação no formato do evento de sistema descrito.

Para importar os arquivos de saída tem de criar o arquivo de definição de fragmentos frag.xml e o arquivo de mapeamento map.xml:

Definições de fragmentos no arquivo frag.xml:

<?xml version="1.0" encoding="UTF-8"?>

<!DOCTYPE graphlist SYSTEM "Graph.dtd">

<graphlist>

<graph id="FRG_ORD_CREATED">

<node id="EVT_ORD_TOBECREATED" type="OT_EVT">

<attribute type="AT_OBJNAME">Customer order to be created</attribute>

<attribute type="AT_OBJNAME_INTERN">EVT_ORD_TOBECREATED</attribute>

</node>

<node id="FCT_CREATE_ORDER" type="OT_FUNC">

<attribute type="AT_OBJNAME">Create customer order</attribute>

<attribute type="AT_OBJNAME_INTERN">FCT_CREATE_ORDER</attribute>

</node>

<node id="EVT_ORD_CREATED" type="OT_EVT">

<attribute type="AT_OBJNAME">Customer order created</attribute>

<attribute type="AT_OBJNAME_INTERN">EVT_ORD_CREATED</attribute>

</node>

<edge type="CXN_FOLLOWS" source="EVT_ORD_TOBECREATED"

target="FCT_CREATE_ORDER"/>

<edge type="CXN_FOLLOWS" source="FCT_CREATE_ORDER" target="EVT_ORD_CREATED"/>

</graph>

<graph id="FRG_INVOICED">

<node id="EVT_TOBE_INVOICED" type="OT_EVT">

<attribute type="AT_OBJNAME">Invoice to be created</attribute>

<attribute type="AT_OBJNAME_INTERN">EVT_TOBE_INVOICED</attribute>

</node>

<node id="FCT_INVOICE" type="OT_FUNC">

<attribute type="AT_OBJNAME">Create invoice</attribute>

<attribute type="AT_OBJNAME_INTERN">FCT_INVOICE</attribute>

</node>

<node id="EVT_INVOICED" type="OT_EVT">

<attribute type="AT_OBJNAME">Invoice created</attribute>

<attribute type="AT_OBJNAME_INTERN">EVT_INVOICED</attribute>

</node>

<edge type="CXN_FOLLOWS" source="EVT_TOBE_INVOICED" target="FCT_INVOICE"/>

<edge type="CXN_FOLLOWS" source="FCT_INVOICE" target="EVT_INVOICED"/>

</graph>

</graphlist>

Definições de mapeamento no arquivo map.xml:

<?xml version="1.0" encoding="ISO-8859-1"?>

<!DOCTYPE eventmapping SYSTEM "eventmapping.dtd">

<eventmapping>

<processfragmentmapping>

<processfragment graphid="FRG_ORD_CREATED">

<condition eventattributetype="PPM_EVENT_NAME">

<value>FRG_ORD_CREATED</value>

</condition>

</processfragment>

<processfragment graphid="FRG_INVOICED">

<condition eventattributetype="PPM_EVENT_NAME">

<value>FRG_INVOICED</value>

</condition>

</processfragment>

</processfragmentmapping>

<attributemapping>

<objectattributes objectname="EVT_ORD_TOBECREATED" graphid="FRG_ORD_CREATED">

<attribute ppmattributetype="AT_MERGE_KEY_1">

<eventattributetype>EVT_PRED</eventattributetype>

</attribute>

</objectattributes>

<objectattributes objectname="FCT_CREATE_ORDER" graphid="FRG_ORD_CREATED">

<orgunit eventattributetype="PPM_ORG_NAME"/>

<attribute ppmattributetype="AT_MERGE_KEY_2">

<eventattributetype>START_TIME</eventattributetype>

</attribute>

<attribute ppmattributetype="AT_KI_FBZ">

<eventattributetype>PROCESSINGTIME</eventattributetype>

</attribute>

<attribute ppmattributetype="AT_SAPCLIENT">

<eventattributetype>KUNDENNR</eventattributetype>

</attribute>

<attribute ppmattributetype="AT_SAP_BSTYP">

<eventattributetype>AUFTRAGAT</eventattributetype>

</attribute>

</objectattributes>

<objectattributes objectname="EVT_ORD_CREATED" graphid="FRG_ORD_CREATED">

<attribute ppmattributetype="AT_ID">

<eventattributetype>AUFTRAGNR</eventattributetype>

</attribute>

<attribute ppmattributetype="AT_SAPCLIENT">

<eventattributetype>KUNDENNR</eventattributetype>

</attribute>

<attribute ppmattributetype="AT_MERGE_KEY_1">

<eventattributetype>EVT_NR</eventattributetype>

</attribute>

</objectattributes>

<objectattributes objectname="EVT_TOBE_INVOICED" graphid="FRG_INVOICED">

<attribute ppmattributetype="AT_MERGE_KEY_1">

<eventattributetype>EVT_PRED</eventattributetype>

</attribute>

<attribute ppmattributetype="AT_ID">

<eventattributetype>AUFTRAGNR</eventattributetype>

</attribute>

</objectattributes>

<objectattributes objectname="FCT_INVOICE" graphid="FRG_INVOICED">

<orgunit eventattributetype="PPM_ORG_NAME"/>

<attribute ppmattributetype="AT_MERGE_KEY_2">

<eventattributetype>START_TIME</eventattributetype>

</attribute>

<attribute ppmattributetype="AT_KI_FBZ">

<eventattributetype>PROCESSINGTIME</eventattributetype>

</attribute>

</objectattributes>

<objectattributes objectname="EVT_INVOICED" graphid="FRG_INVOICED">

<attribute ppmattributetype="AT_ID">

<eventattributetype>AUFTRAGNR</eventattributetype>

</attribute>

<attribute ppmattributetype="AT_SAPCLIENT">

<eventattributetype>KUNDENNR</eventattributetype>

</attribute>

<attribute ppmattributetype="AT_MERGE_KEY_1">

<eventattributetype>EVT_NR</eventattributetype>

</attribute>

</objectattributes>

</attributemapping>

</eventmapping>

A extração de dados do sistema de aplicativos criou o arquivo de saída XML events.xml:

<?xml version="1.0" encoding="ISO-8859-1"?>

<!DOCTYPE eventlist SYSTEM "event.dtd">

<eventlist>

<event>

<attribute type="EVT_PRED">0</attribute>

<attribute type="PPM_EVENT_ID">4711</attribute>

<attribute type="PPM_EVENT_NAME">FRG_ORD_CREATED</attribute>

<attribute type="PPM_ORG_NAME">Mr Miller</attribute>

<attribute type="AUFTRAGNR">4711</attribute>

<attribute type="AUFTRAGART">Rush order</attribute>

<attribute type="START_TIME">11.11.2002 11:11:11</attribute>

<attribute type="KUNDENNR">5711</attribute>

<attribute type="PROCESSINGTIME">7 MINUTE</attribute>

<attribute type="EVT_NR">1</attribute>

</event>

<event>

<attribute type="EVT_PRED">1</attribute>

<attribute type="PPM_EVENT_ID">4711</attribute>

<attribute type="PPM_EVENT_NAME">FRG_INVOICED</attribute>

<attribute type="PPM_ORG_NAME">Ms. Smith</attribute>

<attribute type="AUFTRAGNR">4711</attribute>

<attribute type="KUNDENNR">5711</attribute>

<attribute type="START_TIME">12.11.2002 14:21:15</attribute>

<attribute type="PROCESSINGTIME">14 MINUTE</attribute>

<attribute type="EVT_NR">2</attribute>

</event>

</eventlist>

Executar a linha de comando

runxmlimport -user system -password manager -f frag.xml -m map.xml -i event.xml

gera fragmentos de instância de processo no banco de dados do PPM. A lista abaixo no formato de gráfico do PPM ilustra os fragmentos de instância de processo gerados no banco de dados do PPM. Na lista, as informações do fragmento da instância de processo, que foram adicionadas à definição do fragmento, são gravadas em negrito:

<?xml version='1.0' encoding='ISO-8859-1'?>

<!DOCTYPE graphlist SYSTEM "graph.dtd">

<graphlist>

<graph id="FRG_ORD_CREATED" xml:lang="en">

<node id="FRG_ORD_CREATED-EVT_ORD_TOBECREATED-1-8835472025300230616"

type="OT_EVT">

<attribute type="AT_OBJNAME">Customer order to be created</attribute>

<attribute type="AT_OBJNAME_INTERN">EVT_ORD_TOBECREATED</attribute>

<attribute type="AT_EPK_FRAGMENT_ID">FRG_ORD_CREATED</attribute>

<attribute type="AT_INTERNAL_OBJECT_KEY">EVT_ORD_TOBECREATED0</attribute>

<attribute type="AT_MERGE_KEY_1">0</attribute>

<attribute type="AT_ORIG_EPK_ID">1</attribute>

</node>

<node id="FRG_ORD_CREATED-FCT_CREATE_ORDER-2-8344758599463564840"

type="OT_FUNC">

<attribute type="AT_OBJNAME">Create customer order</attribute>

<attribute type="AT_OBJNAME_INTERN">FCT_CREATE_ORDER</attribute>

<attribute type="AT_EPK_FRAGMENT_ID">FRG_ORD_CREATED</attribute>

<attribute type="AT_INTERNAL_OBJECT_KEY">

FCT_CREATE_ORDER11.11.2002 11:11:11</attribute>

<attribute type="AT_KI_FBZ">7 MINUTE</attribute>

<attribute type="AT_MERGE_KEY_2">11.11.2002 11:11:11</attribute>

<attribute type="AT_ORIG_EPK_ID">1</attribute>

<attribute type="AT_SAPCLIENT">5711</attribute>

</node>

<node id="FRG_ORD_CREATED-EVT_ORD_CREATED-3-7299716715746582786"

type="OT_EVT">

<attribute type="AT_OBJNAME">Customer order created</attribute>

<attribute type="AT_OBJNAME_INTERN">EVT_ORD_CREATED</attribute>

<attribute type="AT_EPK_FRAGMENT_ID">FRG_ORD_CREATED</attribute>

<attribute type="AT_ID">4711</attribute>

<attribute type="AT_INTERNAL_OBJECT_KEY">EVT_ORD_CREATED1</attribute>

<attribute type="AT_MERGE_KEY_1">1</attribute>

<attribute type="AT_ORIG_EPK_ID">1</attribute>

<attribute type="AT_SAPCLIENT">5711</attribute>

</node>

<node id="FRG_ORD_CREATED-1--2--7661491465378853387" type="OT_ORG">

<attribute type="AT_INTERNAL_OBJECT_KEY">

FRG_ORD_CREATED-1--2-7661491465378853387</attribute>

<attribute type="AT_OBJNAME">Mr Miller</attribute>

</node>

<edge type="CXN_FOLLOWS"

source="FRG_ORD_CREATED-EVT_ORD_TOBECREATED-1-8835472025300230616"

target="FRG_ORD_CREATED-FCT_CREATE_ORDER-2-8344758599463564840" />

<edge type="CXN_FOLLOWS"

source="FRG_ORD_CREATED-FCT_CREATE_ORDER-2-8344758599463564840"

target="FRG_ORD_CREATED-EVT_ORD_CREATED-3-7299716715746582786" />

<edge type="CXN_UNDIRECTED"

source="FRG_ORD_CREATED-1--2-7661491465378853387"

target="FRG_ORD_CREATED-FCT_CREATE_ORDER-2-8344758599463564840">

<attribute type="AT_COUNT_PROCESSINGS">1</attribute>

</edge>

</graph>

<graph id="FRG_INVOICED" xml:lang="en">

<node id="FRG_INVOICED-EVT_TOBE_INVOICED-1-246376083169224336" type="OT_EVT">

<attribute type="AT_OBJNAME">Invoice to be created</attribute>

<attribute type="AT_OBJNAME_INTERN">EVT_TOBE_INVOICED</attribute>

<attribute type="AT_EPK_FRAGMENT_ID">FRG_INVOICED</attribute>

<attribute type="AT_ID">4711</attribute>

<attribute type="AT_INTERNAL_OBJECT_KEY">EVT_TOBE_INVOICED1</attribute>

<attribute type="AT_MERGE_KEY_1">1</attribute>

<attribute type="AT_ORIG_EPK_ID">2</attribute>

</node>

<node id="FRG_INVOICED-FCT_INVOICE-2--1285282699037363371" type="OT_FUNC">

<attribute type="AT_OBJNAME">Create invoice</attribute>

<attribute type="AT_OBJNAME_INTERN">FCT_INVOICE</attribute>

<attribute type="AT_EPK_FRAGMENT_ID">FRG_INVOICED</attribute>

<attribute type="AT_INTERNAL_OBJECT_KEY">FCT_INVOICE12.11.2002

14:21:15</attribute>

<attribute type="AT_KI_FBZ">14 MINUTE</attribute>

<attribute type="AT_MERGE_KEY_2">12.11.2002 14:21:15</attribute>

<attribute type="AT_ORIG_EPK_ID">2</attribute>

</node>

<node id="FRG_INVOICED-EVT_INVOICED-3-1541227247726154405" type="OT_EVT">

<attribute type="AT_OBJNAME">Invoice created</attribute>

<attribute type="AT_OBJNAME_INTERN">EVT_INVOICED</attribute>

<attribute type="AT_EPK_FRAGMENT_ID">FRG_INVOICED</attribute>

<attribute type="AT_ID">4711</attribute>

<attribute type="AT_INTERNAL_OBJECT_KEY">EVT_INVOICED2</attribute>

<attribute type="AT_MERGE_KEY_1">2</attribute>

<attribute type="AT_ORIG_EPK_ID">2</attribute>

<attribute type="AT_SAPCLIENT">5711</attribute>

</node>

<node id="FRG_INVOICED-1--2--8231301810541650135" type="OT_ORG">

<attribute type="AT_INTERNAL_OBJECT_KEY">FRG_INVOICED-1--2-

8231301810541650135</attribute>

<attribute type="AT_OBJNAME">Ms. Smith</attribute>

</node>

<edge type="CXN_FOLLOWS"

source="FRG_INVOICED-EVT_TOBE_INVOICED-1-246376083169224336"

target="FRG_INVOICED-FCT_INVOICE-2--1285282699037363371" />

<edge type="CXN_FOLLOWS"

source="FRG_INVOICED-FCT_INVOICE-2-1285282699037363371"

target="FRG_INVOICED-EVT_INVOICED-3-1541227247726154405" />

<edge type="CXN_UNDIRECTED"

source="FRG_INVOICED-1--2--8231301810541650135"

target="FRG_INVOICED-FCT_INVOICE-2--1285282699037363371">

<attribute type="AT_COUNT_PROCESSINGS">1</attribute>

</edge>

</graph>

</graphlist>