View Source

*_3.1) MySQL database_*
If you don't have one yet, download and install MySQL server.
Create a database for Petals View:
example: petalview
Create a user with all rights granted to this database
example: user: view
pwd: view
*_3.2) petals-view.properties file_*
Open this file (located in PetalsView-docs directory) and adapt informations to fit your database configuration (database name, users id and password, MySQL server address). Save the file.
\\
!worddavdbea6075feb593a9969903514ef7c93a.png|height=343,width=486!
\\
\\
\\
\\
\\
\\
\\
\\
\\
\\
\\
\\
\\
\\
\\
\\
\\
\\
*_3.3) SE-KPI Component configuration_*
Browse directories to petals-se-kpi.zip/META_INF
Open jbi.xml file.
On this line – <petals-se-kpi:hibernateURL>: fill in the "petals-view.properties" file location
example : file:///home/user/Desktop/petals-view.properties
Save the file.
\\
!worddav2af8efbdd49932e3239f2304671319d7.png|height=296,width=575!
*_3.4) Petals View configuration_*
Go toPetalsView-webapp/ PetalsView.war/WEB-INF/spring
Open petals-view-annotation.xml
On the line <property >, in value quotation marks, fill in "petals-view.properties" file location.
Example : [{color:#000080}{+}file:///home/user/Bureau/ petals-view.properties+{color}|\\\\samba\\pv00.vg00.Societe\\user\\Bureau\\PetalsView-Tutorial\\docs\\hibernate.cfg.xml]
\\
!worddav6dffe405132465bdeb425c3911a1f314.png|height=241,width=588!
*Creation of related SA-KPI: sa-KPI-tutorial.zip*
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.
*_4.1) Import sa from PetalsView-SA directory in Petals Studio_*
Launch Petals Studio and choose your workspace.
In upper-left window, right-click on ''Service Assembly Projects''
Then click on import/Service Assembly
Browse directories to find the PetalsView-SA one and choose sa-EIP-FootballPoolWebService-provide.zip then click on "Validate".
Repeat the procedure for each service assembly provided in PetalsView-SA directory.
!worddavb599e4811f4693a9790e9f2cb2aba31a.png|height=309,width=540!
\\
\\
\\
\\
\\
\\
\\
\\
*_4.2) Create your su-kpi_*
In this step, we'll define all services units (SU) necessary for our scenario.
Right-click on ''Service Assembly Projects''
Then click on New/KPI Configuration
!worddav22a3c5c6521ddf4fdd81238c2ab90c49.png|height=268,width=538!
\\
\\
\\
\\
\\
\\
\\
\\
\\
\\
\\
\\
\\
\\
\\
\\
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.
!worddav4977d6bf76be1e018c87b162a55f8629.png|height=298,width=588!
\\
\\
\\
\\
\\
\\
\\
\\
\\
\\
\\
\\
\\
\\
\\
\\
\\
\\
Watcher Configuratio : herein we'll fill in the states of our SU: In, Out, Status or Fault.
The FileTransfert one is InOnly so we'll tick Status/In/Fault.
The EIP one is InOnly so we'll tick Status/In/Fault.
The BC-SOAP one is InOut so we'll tick In/Out/Fault.
Click on Next
!worddav70b1cd1332eb8fe9d01b2fc8a5dd6ee9.png|height=255,width=590!
\\
\\
\\
\\
\\
\\
\\
\\
\\
\\
\\
\\
\\
\\
\\
Deployment Configuration: herein we'll give a human-readable name for our sa-kpi: e.g. Sa-KPI-tutorial.
Click on F !worddav3ccee3a0a60b60435a54c70f3d889c67.png|height=279,width=558! inish.
\\
\\
\\
\\
\\
\\
\\
\\
\\
\\
\\
\\
\\
\\
\\
\\
\\
\\
*_4.3) jbi.xml_*
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.
!worddav068f4ef7d5bb4fc68bf15a60afdd7683.png|height=283,width=592!
\\
\\
\\
\\
\\
\\
\\
\\
\\
\\
\\
\\
\\
\\
\\
\\
\\
Here, important informations are enclosed in mark-up tags: {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}
The value in red defines the SU Type, here it's In. In this tags, that's the only variable information.
{color:#008080}<{color}{color:#3f7f7f}kpi:MessageContentSOAInterfaceNamespace{color}{color:#008080}>{color}{color:#1a1a1a}http://euro2008.dataaccess.eu{color}{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}{color:#1a1a1a}http://euro2008.dataaccess.eu{color}{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}
Here, values in various tags define services informations, on which we want to run notifications and filters.
{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}
The value of this tag is the name of related stylesheet.
*_4.4) Stylesheet (.xsl) configuration_*
For the time being, data collect can only be performed on "In" "type Service Units.
In our example, we'll want informations from both su-KPI-FootballPoolEIPService-consume-In and su-KPI-copyResponse-consume-In.
*Stylesheet: su-KPI-FootballPoolEIPService-consume-In.xsl*
\\
!worddav4a0d66d45141ad623250a6eec211e89a.png|height=285,width=586!
# 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.

Between {color:#008080}<{color}{color:#3f7f7f}wsnebm:params{color}{color:#008080}>{color} {color:#008080}</{color}{color:#3f7f7f}wsnebm:params{color}{color:#008080}>{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:#008080}<{color}{color:#3f7f7f}wsnebm:param{color}{color:#008080}>{color} {color:#008080}</{color}{color:#3f7f7f}wsnebm:paras{color}{color:#008080}>{color}
The value to fill in is: {color:#008080}<{color}{color:#3f7f7f}xsl:value-of{color} {color:#7f007f}select{color}{color:#008080}={color}{color:#2a00ff}"//*\[local-name()='sCountryName'\]/text()"{color}{color:#008080}/>{color}
\\
!worddava20740eaebff5f1581d1b18ea9fafaae.png|height=306,width=673!
*Stylesheet su-KPI-copyResponse-consume-In.xsl:*
We' ll follow the same process to add the parameter:
In first tag ''m'', add: {color:#7f007f}*xmlns:m{*}{color}={color:#2a00ff}{_}'http://euro2008.dataaccess.eu'_{color}
Uncomment {color:#008080}<{color}{color:#3f7f7f}wsnebm:param{color}{color:#008080}>{color} {color:#008080}</{color}{color:#3f7f7f}wsnebm:paras{color}{color:#008080}>{color} tag
Fill in with the value: {color:#008080}*<{*}{color}{color:#3f7f7f}{*}xsl:value-of*{color} {color:#7f007f}*select{*}{color}={color:#2a00ff}{_}"//*/m:AllDefendersResult/*/text()"{_}{color}{color:#008080}{*}/>*{color}
!worddav2ab6586de401cd5d5d10c924fd450613.png|height=281,width=516!
\\
\\
\\
\\
\\
\\
\\
\\
\\
\\
\\
\\
\\
\\
\\
\\
\\
\\
Your su-kpi are ready. All that's left to do is export them so we can deploy them in Petals ESB.
Right-click on each su-kpi, then select Petals/Fast Export for Petals submenu.
!worddave5aaca775559456a47372ea9080f625a.png|height=339,width=589!
\\
\\
\\
\\
\\
\\
\\
\\
\\
\\
\\
\\
\\
\\
\\
\\
\\
\\
\\
\\
\\
Repeat for each su-kpi.
Once finished, you should have nine archives ready to be installed in Petals ESB.