View Source

{color:#333333}We'll first import in Petals Studio, the preconfigured services assemblies provided in PetalsView-SA directory. Thanks to this, we will easily retrieve informations we need to build our su-kpi.{color}

h1. *Import sa from PetalsView-SA directory in Petals Studio*

{color:#333333}Launch Petals Studio and choose your workspace.{color}

{color:#333333}In upper-left window, right-click on ''Service Assembly Projects''{color}

{color:#333333}Then click on import/Service Assembly{color}

{color:#333333}Browse directories to find the PetalsView-SA one and choose sa-EIP-FootballPoolWebService-provide.zip then click on "Validate".{color}

{color:#333333}Repeat the procedure for each service assembly provided in PetalsView-SA directory.{color}


!ViewSu-KPI.png|thumbnail,border=1,align=center!









h1. *Create your su-kpi*

{color:#333333}In this step, we'll define all services units (SU) necessary for our scenario.{color}

{color:#333333}Right-click on ''Service Assembly Projects''{color}

{color:#333333}Then click on New/KPI Configuration{color}


!Studio-KPI.png|thumbnail,border=1,align=center!

















{color:#333333}Watched Service(s): herein, we'll choose the endpoints that will be watched through notifications emissions. In our example, select the three available endpoints then click on Next.{color}


!SelectEndpoint.png|thumbnail,border=1,align=center!



















{color:#333333}Watcher Configuratio : herein we'll fill in the states of our SU: In, Out, Status or Fault.{color}

{color:#333333}The FileTransfert one is InOnly so we'll tick Status/In/Fault.{color}

{color:#333333}The EIP one is InOnly so we'll tick Status/In/Fault.{color}

{color:#333333}The BC-SOAP one is InOut so we'll tick In/Out/Fault.{color}

{color:#333333}Click on Next{color}


!TypeSuKPI.png|thumbnail,border=1,align=center!
















{color:#333333}Deployment Configuration: herein we'll give a human-readable name for our sa-kpi: e.g. Sa-KPI-tutorial.{color}

{color:#333333}Click on F{color}{color:#333333}inish.{color}


!ChooseSA-KPIName.png|thumbnail,border=1,align=center!


















h1. *jbi.xml*

{color:#333333}Each SU has its own jbi.xml file. Let's examine what's needed to make this file KPI-specific. We'll take jbi.xml from su-KPI-FootballEIPService-consume-In as an example.{color}


!su-EIP-In-jbi-xml.png|thumbnail,border=1,align=center!


















{color:#333333}Here, important informations are enclosed in mark-up tags:{color}{color:#008080}<{color}{color:#3f7f7f}kpi:TopicExpressionContent{color}{color:#008080}>{color}{color:#1a1a1a}petals:component/cdk/producer/{color}{color:#800000}in{color}{color:#1a1a1a}\[@wstop:topic='true'\]{color}{color:#008080}</{color}{color:#3f7f7f}kpi:TopicExpressionContent{color}{color:#008080}>{color}

{color:#333333}The value in red defines the SU Type, here it's In. In this tags, that's the only variable information.{color}

{color:#008080}<{color}{color:#3f7f7f}kpi:MessageContentSOAInterfaceNamespace{color}{color:#008080}>{color}[http://euro2008.dataaccess.eu|http://euro2008.dataaccess.eu/]{color:#008080}</{color}{color:#3f7f7f}kpi:MessageContentSOAInterfaceNamespace{color}{color:#008080}>{color}
{color:#008080}<{color}{color:#3f7f7f}kpi:MessageContentSOAInterfaceName{color}{color:#008080}>{color}{color:#1a1a1a}FootballPoolEIP{color}{color:#008080}</{color}{color:#3f7f7f}kpi:MessageContentSOAInterfaceName{color}{color:#008080}>{color}
{color:#008080}<{color}{color:#3f7f7f}kpi:MessageContentSOAServiceNamespace{color}{color:#008080}>{color}[http://euro2008.dataaccess.eu|http://euro2008.dataaccess.eu/]{color:#008080}</{color}{color:#3f7f7f}kpi:MessageContentSOAServiceNamespace{color}{color:#008080}>{color}
{color:#008080}<{color}{color:#3f7f7f}kpi:MessageContentSOAServiceName{color}{color:#008080}>{color}{color:#1a1a1a}FootballPoolEIPService{color}{color:#008080}</{color}{color:#3f7f7f}kpi:MessageContentSOAServiceName{color}{color:#008080}>{color}
{color:#008080}<{color}{color:#3f7f7f}kpi:MessageContentSOAEndpoint{color}{color:#008080}>{color}{color:#1a1a1a}FootballPoolWebServiceEIP{color}{color:#008080}</{color}{color:#3f7f7f}kpi:MessageContentSOAEndpoint{color}{color:#008080}>{color}

{color:#333333}Here, values in various tags define services informations, on which we want to run notifications and filters.{color}

{color:#008080}<{color}{color:#3f7f7f}kpi:TransformPolicy{color}{color:#008080}>{color}{color:#1a1a1a}su-KPI-FootballPoolEIPService-consume-In.xsl{color}{color:#008080}</{color}{color:#3f7f7f}kpi:TransformPolicy{color}{color:#008080}>{color}

{color:#333333}The value of this tag is the name of related stylesheet.{color}

h1. *Stylesheet (.xsl) configuration*

{color:#333333}For the time being, data collect can only be performed on "In" "type Service Units.{color}

{color:#333333}In our example, we'll want informations from both su-KPI-FootballPoolEIPService-consume-In and su-KPI-copyResponse-consume-In.{color}

{color:#333333}{*}Stylesheet su-KPI-FootballPoolEIPService-consume-In.xsl{*}{color}{color:#333333}&nbsp;{color} !su-KPI-FileTransfert-In-Style.png|thumbnail,border=1,align=center!
One essential information to retrieve herein is processType. Its value must be the same for all stylesheets attached to a same process. This value allows linking between flows saved in database and related Petals View's referential. This value has to be unique for each process.

{color:#333333}Between&nbsp;{color}{color:#008080}<{color}{color:#3f7f7f}wsnebm:params{color}{color:#008080}>{color}{color:#333333}&nbsp;{color}{color:#008080}</{color}{color:#3f7f7f}wsnebm:params{color}{color:#008080}>{color}{color:#333333}&nbsp;{color}{color:#1a1a1a}tag we'll fill in the parameter we want to retrieve to display it in Petals View.{color}

{color:#1a1a1a}Uncomment{color}{color:#333333}&nbsp;{color}{color:#008080}<{color}{color:#3f7f7f}wsnebm:params{color}{color:#008080}>{color}{color:#333333}&nbsp;{color}{color:#008080}</{color}{color:#3f7f7f}wsnebm:params{color}{color:#008080}>{color}

{color:#333333}The value to fill in is:&nbsp;{color}{color:#008080}<{color}{color:#3f7f7f}xsl:value-of{color}{color:#333333}&nbsp;{color}{color:#7f007f}select{color}{color:#008080}={color}{color:#2a00ff}"//*\[local-name()='sCountryName'\]/text()"{color}{color:#008080}/>{color}{color:#333333}&nbsp;{color}


!su-KPI-EIP-In-Style-Full.png|thumbnail,border=1,align=center!


{color:#333333}{*}Stylesheet su-KPI-copyResponse-consume-In.xsl{*}{color}

{color:#333333}We' ll follow the same process to add the parameter:{color}

{color:#333333}In first tag ''m'', add:&nbsp;{color}{color:#7f007f}{*}xmlns:m{*}{color}{color:#333333}={color}{color:#2a00ff}_'http://euro2008.dataaccess.eu'_{color}

{color:#333333}Uncomment&nbsp;{color}{color:#008080}<{color}{color:#3f7f7f}wsnebm:param{color}{color:#008080}>{color}{color:#333333}&nbsp;{color}{color:#008080}</{color}{color:#3f7f7f}wsnebm:paras{color}{color:#008080}>{color}{color:#333333}&nbsp;tag{color}

{color:#333333}Fill in with the value:&nbsp;{color}{color:#008080}*<*{color}{color:#3f7f7f}{*}xsl:value-of{*}{color}{color:#7f007f}{*}select{*}{color}{color:#333333}={color}{color:#2a00ff}_"//_{color}{color:#2a00ff}{*}_/m:AllDefendersResult/_{*}{color}{color:#2a00ff}_/text()"_{color}{color:#008080}*/>*{color}


!su-KPI-FileTransfert-In-Style-Full.png|thumbnail,border=1,align=center!



















{color:#333333}Your su-kpi are ready. All that's left to do is export them so we can deploy them in Petals ESB.{color}

{color:#333333}Right-click on each su-kpi, then select Petals/Fast Export for Petals submenu.{color}


!export-su-kpi.png|thumbnail,border=1,align=center!






















{color:#333333}Repeat for each su-kpi.{color}

{color:#333333}Once finished, you should have nine archives ready to be installed in Petals ESB.{color}