|
Key
This line was removed.
This word was removed. This word was added.
This line was added.
|
Changes (88)
View Page Historypetals-view.properties
This file will hold the following informations - see the screen hereunder (informations in blue are values you have to change to conform with your database's name and user).
This file will hold the following informations - see the screen hereunder (informations in blue are values you have to change to conform with your database's name and user).
\_All database tables will be automatically created at Petals View's first launch._
{code}
###########
###########
fill in the path of the file petals-view.properties (that you created in Stage 1).
example:
example:
\\
<petals-se-kpi:hibernateURL xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:jbi="http://java.sun.com/xml/ns/jbi" xmlns:petals-se-kpi="http://petals.ow2.org/components/petals-se-kpi/version-1.0-SNAPSHOT" xmlns:kpi-config="http://petals.ow2.org/components/petals-se-kpi/specific" xmlns:petalsCDK="[http://petals.ow2.org/components/extensions/version-x|http://petals.ow2.org/components/extensions/version-x]">{color:#ff0000}*[file:///home/user/Bureau/petals-view.properties]*{color}</ petals-se-kpi:hibernateURL>
\\ {code}
<petals-se-kpi:hibernateURL xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:jbi="http://java.sun.com/xml/ns/jbi" xmlns:petals-se-kpi="http://petals.ow2.org/components
/petals-se-kpi/version-1.0-SNAPSHOT" xmlns:kpi-config="http://petals.ow2.org/components/petals-
se-kpi/specific" xmlns:petalsCDK="http://petals.ow2.org/components/extensions/version-x">file:///home/user/Bureau/petals-view.properties
</petals-se-kpi:hibernateURL>
{code}
If you use MySQL or Oracle database, You need to copy mysql-connector-java-5.1.x.jar or oracle-jdbc-10g.jar in your petals-se-kpi component with the others dependencies.
xmlns:jbi="http://java.sun.com/xml/ns/jbi" xmlns:petals-se-kpi="http://petals.ow2.org/components
/petals-se-kpi/version-1.0-SNAPSHOT" xmlns:kpi-config="http://petals.ow2.org/components/petals-
se-kpi/specific" xmlns:petalsCDK="http://petals.ow2.org/components/extensions/version-x">file:///home/user/Bureau/petals-view.properties
</petals-se-kpi:hibernateURL>
{code}
If you use MySQL or Oracle database, You need to copy mysql-connector-java-5.1.x.jar or oracle-jdbc-10g.jar in your petals-se-kpi component with the others dependencies.
Save the changes.
Download Petals View (petalsview.war)
Browse to petalsview.war/WEB-INF/spring
Open the file petals-view-annotation.xml
Fill in the path to petals-view.properties file:
Browse to petalsview.war/WEB-INF/spring
Open the file petals-view-annotation.xml
Fill in the path to petals-view.properties file:
{code}
<bean
class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
<property name="location" value="{color:#ff0000}*[file:////home/strino/Bureau/petals-view.properties]*{color}" />
<property name="location" value="file:////home/strino/Bureau/petals-view.properties"/>
</bean>
{code}
Save the changes.
If you use MySQL database or Oracle database, You need to copy mysql-connector-java-5.1.x.jar or oracle-jdbc-10g.jar in PetalsView/ WEB-INF/lib.
h2. Stage 3: Configuring and setting up notification environment
Setting up Petals ESB and its components:
Download and install Petals ESB
Setting up Petals ESB and its components:
Download and install Petals ESB
Install the SE-Notification component
Install the SE-Notification component {color:#ff0000}(WARNING\!\! You {warning}{color:#ff0000}You HAVE to install this component BEFORE ANY OTHER, otherwise there could be configuration conflict preventing notifications to work.){color} work.{color}{warning}
Install all components that you don't need to emit notifications
Install the SE-KPI component (petals-se-kpi.zip) using the configuration created at Stage 2
Install the SE-KPI component (petals-se-kpi.zip) using the configuration created at Stage 2
Open the jbi.xml file
Find the following line and set up its value to "true":
Find the following line and set up its value to "true":
{code}
<petalsCDK:notifications xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:jbi="http://java.sun.com/xml/ns/jbi" xmlns:soap="http://petals.ow2.org/components/soap/version-x" xmlns:petalsCDK="[http://petals.ow2.org/components/extensions/version\- x|http://petals.ow2.org/components/extensions/version-]">{color:#0084d1}true{color}</petalsCDK:notifications> xmlns:petalsCDK="http://petals.ow2.org/components/extensions/version-x">true</petalsCDK:notifications>
{code}
Save
Install the component in Petals ESB
Install the component in Petals ESB
A SA-KPI is composed of: a META-INF folder which will contain jbi.xml file and the su-kpi.zip.
example of a jbi.xml file from a sa-kpi.zip :
example of a jbi.xml file from a sa-kpi.zip :
{code:lang=xml}
<jbi version="1.0" xmlns="http://java.sun.com/xml/ns/jbi">
<service-assembly>
<service-assembly>
<identification>
<name>sa-in</name>
<description>SA in.</description>
</identification>
<service-unit>
<identification>
<name>sa-in</name>
<description>SA in.</description>
</identification>
<service-unit>
<identification>
<name>sa-in</name>
<description>SA in.</description>
<description>SA in.</description>
<name>su-notif-in</name>
<description>su in description.</description>
<description>su in description.</description>
</identification>
<service-unit>
<identification>
<name>su-notif-in</name>
<description>su in description.</description>
</identification>
<identification>
<name>su-notif-in</name>
<description>su in description.</description>
</identification>
<target>
<artifacts-zip>su-notif-in.zip</artifacts-zip>
<component-name>petals-se-kpi</component-name>
</target>
</service-unit>
</service-assembly>
</service-assembly>
</service-unit>
</service-assembly>
</service-assembly>
</jbi>
{code}
A SU-KPI is composed of: a META-INF folder containing SU's jbi.xml file and a special file, modelNotification.xls
example of jbi.xml file of a SU:
example of jbi.xml file of a SU:
{code:lang=xml}
<?xml version="1.0" encoding="UTF-8"?>
<!--JBI descriptor for the PEtALS' "petals-se-kpi" component (WS-Notification).
Originally created for the version 1.0-SNAPSHOT of the component. -->
Originally created for the version 1.0-SNAPSHOT of the component. -->
<\!-\-
JBI descriptor for the PEtALS' "petals-se-kpi" component (WS-Notification).
Originally created for the version 1.0-SNAPSHOT of the component. \-->
Originally created for the version 1.0-SNAPSHOT of the component. \-->
<jbi:jbi version="1.0" xmlns:notification="http://petals.ow2.org/petals-se-notification"
\\ xmlns:wsn-br="http://docs.oasis-open.org/wsn/br-2"
<jbi:jbi version="1.0" xmlns:notification="[http://petals.ow2.org/petals-se-notification|http://petals.ow2.org/petals-se-notification]" xmlns:wsn-br="http://docs.oasis-open.org/wsn/br-2" xmlns:kpi="[http://petals.ow2.org/petals-se-kpi|http://petals.ow2.org/petals-se-kpi]" xmlns:jbi="[http://java.sun.com/xml/ns/jbi|http://java.sun.com/xml/ns/jbi]" xmlns:petalsCDK="[http://petals.ow2.org/components/extensions/version-5|http://petals.ow2.org/components/extensions/version-5]" xmlns:xsi="[http://www.w3.org/2001/XMLSchema-instance|http://www.w3.org/2001/XMLSchema-instance]" xmlns:st="http://www.ebmwebsourcing.com/wsnotification/specificTypes">
\\ xmlns:kpi="http://petals.ow2.org/petals-se-kpi"
xmlns:jbi="http://java.sun.com/xml/ns/jbi"
xmlns:petalsCDK="http://petals.ow2.org/components/extensions/version-5"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:st="http://www.ebmwebsourcing.com/wsnotification/specificTypes">
xmlns:petalsCDK="http://petals.ow2.org/components/extensions/version-5"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:st="http://www.ebmwebsourcing.com/wsnotification/specificTypes">
<\!-\- <!-- Import a Service into PEtALS or Expose a PEtALS Service => use a BC. -->
<jbi:services binding-component="false">
\\
<\!-\- <!-- Expose a PEtALS Service => consumes a Service. -->
<jbi:consumes
interface-name="wsn-br:NotificationBroker"
interface-name="wsn-br:NotificationBroker"
service-name="notification:NotificationBrokerService">
endpoint-name="NotificationBrokerServiceEndpoint">
\\
<\!-\- <!-- CDK specific fields -->
<petalsCDK:operation>Subscribe</petalsCDK:operation>
<petalsCDK:mep>InOut</petalsCDK:mep>
<petalsCDK:mep>InOut</petalsCDK:mep>
<\!-\- <!-- Component specific elements -->
<\!-\- <!-- Subscription to process on init : -->
<kpi:TopicExpressionDialect>[http://docs.oasis-open.org/wsn/t|http://docs.oasis-open.org/wsn/t]1/TopicExpression/Full</kpi:TopicExpressionDialect>
<kpi:TopicExpressionDialect>http://docs.oasis-open.org/wsn/t1/TopicExpression/Full</kpi:TopicExpressionDialect>
<kpi:TopicExpressionNamespace>[http://petals.ow2.org/topic]</kpi:TopicExpressionNamespace> <kpi:TopicExpressionNamespace>http://petals.ow2.org/topic</kpi:TopicExpressionNamespace>
<kpi:TopicExpressionPrefix>petals</kpi:TopicExpressionPrefix>
<kpi:TopicExpressionContent>petals:component/cdk/producer/{color:#ff0000}in{color}\[@wstop:topic='true'\]</kpi:TopicExpressionContent>
<kpi:TopicExpressionContent>petals:component/cdk/producer/in[@wstop:topic='true']</kpi:TopicExpressionContent>
\\
<kpi:MessageContentXpath>boolean(/*\[local-name()={color:#23b8dc}'{color}{color:#0084d1}publishBusinessEntity'{color}\])</kpi:MessageContentXpath>
<kpi:MessageContentXpathDialect>[http://www.w3.org/TR/1999/REC-xpath-19991116|http://www.w3.org/TR/1999/REC-xpath-19991116]</kpi:MessageContentXpathDialect>
<kpi:MessageContentXpathDialect>[http://www.w3.org/TR/1999/REC-xpath-19991116|http://www.w3.org/TR/1999/REC-xpath-19991116]</kpi:MessageContentXpathDialect>
<kpi:MessageContentXpath>boolean(/*[local-name()='publishBusinessEntity'])</kpi:MessageContentXpath>
<kpi:MessageContentXpathDialect>http://www.w3.org/TR/1999/REC-xpath-19991116</kpi:MessageContentXpathDialect>
<kpi:MessageContentXpathDialect>http://www.w3.org/TR/1999/REC-xpath-19991116</kpi:MessageContentXpathDialect>
<kpi:MessageContentSOADialect>[http://www.ebmwebsourcing.com/wsnotification/soaparameter]</kpi:MessageContentSOADialect> <kpi:MessageContentSOADialect>http://www.ebmwebsourcing.com/wsnotification/soaparameter</kpi:MessageContentSOADialect>
\\
<kpi:MessageContentSOAInterfaceNamespace>{color:#0084d1}[http://org.ow2.petals/demo/travelagency/agency/]{color}</kpi:MessageContentSOAInterfaceNamespace>
<kpi:MessageContentSOAInterfaceName>{color:#0084d1}travelAgency{color}</kpi:MessageContentSOAInterfaceName> <kpi:MessageContentSOAServiceNamespace>{color:#0084d1}[http://org.ow2.petals/demo/travelagency/agency/]{color}</kpi:MessageContentSOAServiceNamespace>
<kpi:MessageContentSOAInterfaceName>{color:#0084d1}travelAgency{color}</kpi:MessageContentSOAInterfaceName> <kpi:MessageContentSOAServiceNamespace>{color:#0084d1}[http://org.ow2.petals/demo/travelagency/agency/]{color}</kpi:MessageContentSOAServiceNamespace>
<kpi:MessageContentSOAServiceName>{color:#0084d1}travelAgencyService{color}</kpi:MessageContentSOAServiceName> <kpi:MessageContentSOAInterfaceNamespace>http://org.ow2.petals/demo/travelagency/agency/</kpi:MessageContentSOAInterfaceNamespace>
\\ <kpi:MessageContentSOAInterfaceName>travelAgency</kpi:MessageContentSOAInterfaceName>
<kpi:TransformPolicy>{color:#ff950e}/modelNotification.xsl{color}</kpi:TransformPolicy> <kpi:MessageContentSOAServiceNamespace>http://org.ow2.petals/demo/travelagency/agency/</kpi:MessageContentSOAServiceNamespace>
\\ <kpi:MessageContentSOAServiceName>travelAgencyService</kpi:MessageContentSOAServiceName>
<kpi:TransformPolicy>/modelNotification.xsl</kpi:TransformPolicy>
<kpi:ContextPolicyCorrelationId>true</kpi:ContextPolicyCorrelationId>
<kpi:ContextPolicyInterface>true</kpi:ContextPolicyInterface>
<kpi:ContextPolicyInterface>true</kpi:ContextPolicyInterface>
<kpi:ContextPolicyService>true</kpi:ContextPolicyService>
<kpi:ContextPolicyStatus>true</kpi:ContextPolicyStatus>
<kpi:ContextPolicyStatus>true</kpi:ContextPolicyStatus>
\\
<kpi:ProcessPolicyAction>create</kpi:ProcessPolicyAction>
</jbi:consumes>
</jbi:services>
</jbi:consumes>
</jbi:services>
</jbi:jbi>{code}
The text in red defines for which state you configure the present SU: in -- out -- status \-fault. --fault.
Texts in blue define the filtering you want to apply to notifications:
<kpi:MessageContentXpath>boolean(/*\[local-name()={color:#23b8dc}'{color}{color:#0084d1}publishBusinessEntity'{color}\])</kpi:MessageContentXpath> :
<kpi:MessageContentXpath>boolean(/*\[local-name()={color:#23b8dc}'{color}{color:#0084d1}publishBusinessEntity'{color}\])</kpi:MessageContentXpath> : here you can apply filtering criteria on content fields, as long as they are present in the messages. If you don't want any content filtering, set the value to "true".
Example : <kpi:MessageContentXpath>boolean({color:#0084d1}true(){color})</kpi:MessageContentXpath>
\\
You can filter directly on service's endpoint or interface (these fields are not mandatory). You can also filter on endpoint:
<kpi:MessageContentSOAInterfaceNamespace>{color:#0084d1}[http://org.ow2.petals/demo/travelagency/agency/]{color}</kpi:MessageContentSOAInterfaceNamespace>
<kpi:MessageContentSOAInterfaceNamespace>{color:#0084d1}[http://org.ow2.petals/demo/travelagency/agency/]{color}</kpi:MessageContentSOAInterfaceNamespace>
<kpi:MessageContentSOAInterfaceName>{color:#0084d1}travelAgency{color}</kpi:MessageContentSOAInterfaceName> <kpi:MessageContentSOAServiceNamespace>{color:#0084d1}[http://org.ow2.petals/demo/travelagency/agency/]{color}</kpi:MessageContentSOAServiceNamespace>
<kpi:MessageContentSOAInterfaceName>{color:#0084d1}travelAgency{color}</kpi:MessageContentSOAInterfaceName>
<kpi:MessageContentSOAServiceNamespace>{color:#0084d1}[http://org.ow2.petals/demo/travelagency/agency/]{color}</kpi:MessageContentSOAServiceNamespace>
<kpi:MessageContentSOAServiceNamespace>{color:#0084d1}[http://org.ow2.petals/demo/travelagency/agency/]{color}</kpi:MessageContentSOAServiceNamespace>
<kpi:MessageContentSOAServiceName>{color:#0084d1}travelAgencyService{color}</kpi:MessageContentSOAServiceName>
<kpi:MessageContentSOAEndpoint>{color:#0084d1}travelAgencyEndpoint{color}</kpi:MessageContentSOAEndpoint>
<kpi:MessageContentSOAEndpoint>{color:#0084d1}travelAgencyEndpoint{color}</kpi:MessageContentSOAEndpoint>
Text in orange defines the name of the file which will be used as a model for the notifications.
example of the modelNotification.xls file:
{code}
<xsl:stylesheet version='1.0' xmlns:xsl='http://www.w3.org/1999/XSL/Transform' >
<xsl:output method="xml" indent="yes"/>
<xsl:template match="/">
<wsnebm:NotifyContent xmlns:wsnebm="http://www.ebmwebsourcing.com/WS-BaseNotification/NotifyContent" processType="{color:#23b8dc}1{color}" xmlns:age="[http://org.ow2.petals/demo/travelagency/agency/|http://org.ow2.petals/demo/travelagency/agency/]">
<wsnebm:NotifyContent xmlns:wsnebm="http://www.ebmwebsourcing.com/WS-BaseNotification/NotifyContent" processType="{color:#23b8dc}1{color}" xmlns:age="[http://org.ow2.petals/demo/travelagency/agency/">
<wsnebm:params>
<wsnebm:param><xsl:value-of select="//age:lastname/text()"/></wsnebm:param>
<wsnebm:param><xsl:value-of select="//email/text()"/></wsnebm:param>
</wsnebm:params>
</wsnebm:NotifyContent>
</xsl:template>
</xsl:template>
</wsnebm:NotifyContent>
</xsl:template>
</xsl:template>
</xsl:stylesheet>
{code}
processType: here you have to type the same integer value as in Petals View's referential for this type of flows.
xmlns:age="[http://org.ow2.petals/demo/travelagency/agency/|http://org.ow2.petals/demo/travelagency/agency/]": here, you define a parameter
xmlns:age="[http://org.ow2.petals/demo/travelagency/agency/|http://org.ow2.petals/demo/travelagency/agency/]": here, you define a parameter