incubator-hise-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From r.@apache.org
Subject svn commit: r986737 [3/5] - in /incubator/hise/trunk: hise-distro/src/distro/examples/ hise-distro/src/distro/examples/war/claimsHandling/ hise-docs/src/main/resources/ hise-examples/war/ hise-examples/war/claimsHandling/
Date Wed, 18 Aug 2010 15:23:48 GMT
Modified: incubator/hise/trunk/hise-distro/src/distro/examples/war/claimsHandling/claimsHandling.xml
URL: http://svn.apache.org/viewvc/incubator/hise/trunk/hise-distro/src/distro/examples/war/claimsHandling/claimsHandling.xml?rev=986737&r1=986736&r2=986737&view=diff
==============================================================================
--- incubator/hise/trunk/hise-distro/src/distro/examples/war/claimsHandling/claimsHandling.xml
(original)
+++ incubator/hise/trunk/hise-distro/src/distro/examples/war/claimsHandling/claimsHandling.xml
Wed Aug 18 15:23:48 2010
@@ -13,9 +13,17 @@
 
     <htd:tasks>
         <htd:task name="ClaimsHandlingTask">
-            <htd:documentation xml:lang="en-US">This task is used to handle claims
that require manual approval. </htd:documentation>
-            <htd:interface portType="tns:ClaimsHandlingPT" operation="approve" responsePortType="tns:ClaimsHandlingPT"
responseOperation="resolve"/>
-            <htd:priority> htd:getInput("ClaimApprovalRequest")/priority </htd:priority>
+
+          <htd:documentation xml:lang="en-US">This task is used to handle claims that
require manual approval. </htd:documentation>
+            <htd:interface portType="tns:ClaimsHandlingPT" operation="approve" responsePortType="tns:ClaimsResolvingPT"
responseOperation="resolve"/>
+            <htd:priority> 
+				declare namespace cla="http://www.insurance.example.com/claims";
+				declare namespace htd="http://www.example.org/WS-HT";  
+				xs:integer(htd:getInput("ClaimApprovalRequest")/cla:prio)
+            </htd:priority>
+            
+			
+          
             <htd:peopleAssignments>
             	<htd:potentialOwners>
                   <htd:from>
@@ -28,32 +36,80 @@
                     </htd:literal>
                   </htd:from>
                 </htd:potentialOwners>
+                             
+                <htd:businessAdministrators>
+                  <htd:from>
+                    <htd:literal>
+                        <htd:organizationalEntity>
+                            <htd:groups>
+                                <htd:group>group1</htd:group>
+                                <htd:group>group2</htd:group>
+                            </htd:groups>
+                            <htd:users>
+                                <htd:user>user1</htd:user>
+                                <htd:user>user2</htd:user>
+                            </htd:users>
+                        </htd:organizationalEntity>
+                    </htd:literal>
+                  </htd:from>
+                </htd:businessAdministrators>
+                
+            	<htd:taskStakeholders>
+                  <htd:from>
+                    <htd:literal>
+                        <htd:organizationalEntity>
+                            <htd:users>
+                                <htd:user>user3</htd:user>
+                            </htd:users>
+                        </htd:organizationalEntity>
+                    </htd:literal>
+                  </htd:from>
+                </htd:taskStakeholders>                
             </htd:peopleAssignments>
             
-            <htd:delegation potentialDelegatees="nobody"/>
-            
             <htd:presentationElements>
-                <htd:name xml:lang="en-US"> Approve Claim </htd:name>
+                
+            <htd:name xml:lang="en-US"> Approve Claim </htd:name>
+                
                 <htd:presentationParameters>
+                    
                     <htd:presentationParameter name="firstname" type="xsd:string">
-                        htd:getInput("ClaimApprovalRequest")/cust/firstname </htd:presentationParameter>
+declare namespace cla="http://www.insurance.example.com/claims";
+declare namespace htd="http://www.example.org/WS-HT";
+xs:string(htd:getInput("ClaimApprovalRequest")/cla:cust/cla:firstname)
+</htd:presentationParameter>
+                    
                     <htd:presentationParameter name="lastname" type="xsd:string">
-                        htd:getInput("ClaimApprovalRequest")/cust/lastname </htd:presentationParameter>
+declare namespace cla="http://www.insurance.example.com/claims";
+declare namespace htd="http://www.example.org/WS-HT";
+xs:string(htd:getInput("ClaimApprovalRequest")/cla:cust/cla:lastname)
+</htd:presentationParameter>
+                    
                     <htd:presentationParameter name="euroAmount" type="xsd:double">
-                        htd:getInput("ClaimApprovalRequest")/amount </htd:presentationParameter>
+declare namespace cla="http://www.insurance.example.com/claims";
+declare namespace htd="http://www.example.org/WS-HT";
+xs:double(htd:getInput("ClaimApprovalRequest")/cla:amount)
+</htd:presentationParameter>
+                        
                 </htd:presentationParameters>
-                <htd:subject xml:lang="en-US"> Approve the insurance claim for PLN
$euroAmount$ on behalf of $firstname$ $lastname$ </htd:subject>
-                <htd:description xml:lang="en-US" contentType="text/plain"> Approve
this claim following corporate guideline #4711.0815/7 ... </htd:description>
+                
+<htd:subject xml:lang="en-US"> Approve the insurance claim for PLN {$euroAmount} on
behalf of {$firstname} {$lastname} </htd:subject>
+
+                <htd:description xml:lang="en-US" contentType="text/plain"> Approve
this claim following corporate guideline #4711.0815/7 for {$firstname} {$lastname} </htd:description>
+
             </htd:presentationElements>
             
             <htd:outcome>
                 <![CDATA[
                   <cla:resolve xmlns:cla="http://www.insurance.example.com/claims" xmlns:htd="http://www.example.org/WS-HT">
-                     <claimId>{htd:getInput("request")/ClaimApprovalRequest/cla:cust/cla:id/text()}</claimId>
+                     <claimId>{htd:getInput("ClaimApprovalRequest")/cla:cust/cla:id/text()}</claimId>
                      <ok>{$outcome}</ok>
                   </cla:resolve>
                 ]]>
             </htd:outcome>
-        </htd:task>    
-    </htd:tasks>    
+         
+	<htd:autoActivate>true</htd:autoActivate>
+ </htd:task>  
+       
+</htd:tasks> 
 </htd:humanInteractions>

Modified: incubator/hise/trunk/hise-docs/src/main/resources/user-guide.xml
URL: http://svn.apache.org/viewvc/incubator/hise/trunk/hise-docs/src/main/resources/user-guide.xml?rev=986737&r1=986736&r2=986737&view=diff
==============================================================================
--- incubator/hise/trunk/hise-docs/src/main/resources/user-guide.xml (original)
+++ incubator/hise/trunk/hise-docs/src/main/resources/user-guide.xml Wed Aug 18 15:23:48 2010
@@ -49,7 +49,7 @@ xsi:schemaLocation="http://docbook.org/n
         </listitem>
         <listitem>
           <para>
-            Copy example files from examples/claims-approval/* into WEB-INF/classes directory.
+            Copy example files from examples/war/claimsHandling/* into WEB-INF/classes directory.
             HISE looks up *-hise-dd.xml files for Human Tasks definitions.  
           </para>
         </listitem>
@@ -77,9 +77,11 @@ xsi:schemaLocation="http://docbook.org/n
             </programlisting>
             addUsers.sql looks like this:
             <programlisting>
-                insert into HISE_ENTITY (name, type, userpassword) values ('user1', 'USER',
'pass1');
-                insert into HISE_ENTITY (name, type, userpassword) values ('group1', 'GROUP',
null);
-                insert into HISE_USER_GROUPS (USERGROUPS_NAME, ORGENTITY_NAME) values ('user1',
'group1');
+                insert into HISE_ENTITY (name, type, userpassword) values ('user1', 'USER',
'user1pass');
+		insert into HISE_ENTITY (name, type, userpassword) values ('user2', 'USER', 'user2pass');
+		insert into HISE_ENTITY (name, type, userpassword) values ('user3', 'USER', 'user3pass');
+		insert into HISE_ENTITY (name, type, userpassword) values ('group1', 'GROUP', null);
+		insert into HISE_USER_GROUPS (USERGROUPS_NAME, ORGENTITY_NAME) values ('user1', 'group1');
             </programlisting>
             This defines Organizational Entities and specifies associations between users
and groups.
           </para>

Added: incubator/hise/trunk/hise-examples/war/README.txt
URL: http://svn.apache.org/viewvc/incubator/hise/trunk/hise-examples/war/README.txt?rev=986737&view=auto
==============================================================================
--- incubator/hise/trunk/hise-examples/war/README.txt (added)
+++ incubator/hise/trunk/hise-examples/war/README.txt Wed Aug 18 15:23:48 2010
@@ -0,0 +1 @@
+Check out Apache HISE User Guide on how to run examples.

Added: incubator/hise/trunk/hise-examples/war/addUsers.sql
URL: http://svn.apache.org/viewvc/incubator/hise/trunk/hise-examples/war/addUsers.sql?rev=986737&view=auto
==============================================================================
--- incubator/hise/trunk/hise-examples/war/addUsers.sql (added)
+++ incubator/hise/trunk/hise-examples/war/addUsers.sql Wed Aug 18 15:23:48 2010
@@ -0,0 +1,5 @@
+insert into HISE_ENTITY (name, type, userpassword) values ('user1', 'USER', 'user1pass');
+insert into HISE_ENTITY (name, type, userpassword) values ('user2', 'USER', 'user2pass');
+insert into HISE_ENTITY (name, type, userpassword) values ('user3', 'USER', 'user3pass');
+insert into HISE_ENTITY (name, type, userpassword) values ('group1', 'GROUP', null);
+insert into HISE_USER_GROUPS (USERGROUPS_NAME, ORGENTITY_NAME) values ('user1', 'group1');

Added: incubator/hise/trunk/hise-examples/war/claimsHandling/ExampleTasks.wsdl
URL: http://svn.apache.org/viewvc/incubator/hise/trunk/hise-examples/war/claimsHandling/ExampleTasks.wsdl?rev=986737&view=auto
==============================================================================
--- incubator/hise/trunk/hise-examples/war/claimsHandling/ExampleTasks.wsdl (added)
+++ incubator/hise/trunk/hise-examples/war/claimsHandling/ExampleTasks.wsdl Wed Aug 18 15:23:48
2010
@@ -0,0 +1,144 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- 
+https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/a0c9ce4c-ee02-2a10-4b96-cb205464aa02
+
+© 2007 Active Endpoints Inc., Adobe Systems Inc., BEA Systems Inc., International
+Business Machines Corporation, Oracle Inc., and SAP AG. All rights reserved.
+ -->
+<wsdl:definitions name="ClaimApproval"
+  targetNamespace="http://www.insurance.example.com/claims"
+  xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
+  xmlns:tns="http://www.insurance.example.com/claims"
+  xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
+  xmlns:xsd="http://www.w3.org/2001/XMLSchema">
+  <wsdl:types>
+    <xsd:schema elementFormDefault="qualified"
+      targetNamespace="http://www.insurance.example.com/claims"
+      xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+      xmlns:tns="http://www.insurance.example.com/claims">
+        <xsd:complexType name="ClaimApprovalData">
+          <xsd:sequence>
+            <xsd:element name="cust">
+              <xsd:complexType>
+                <xsd:sequence>
+                  <xsd:element name="id" type="xsd:string">
+                  </xsd:element>
+                  <xsd:element name="firstname" type="xsd:string">
+                  </xsd:element>
+                  <xsd:element name="lastname" type="xsd:string">
+                  </xsd:element>
+                </xsd:sequence>
+              </xsd:complexType>
+            </xsd:element>
+            <xsd:element name="amount" type="xsd:double" />
+            <xsd:element name="region" type="xsd:string" />
+            <xsd:element name="prio" type="xsd:int" />
+            <xsd:element name="activateAt" type="xsd:dateTime" />
+          </xsd:sequence>
+        </xsd:complexType>
+    </xsd:schema>
+  </wsdl:types>
+  <wsdl:message name="ClaimApprovalRequest">
+    <wsdl:part name="ClaimApprovalRequest"
+      type="tns:ClaimApprovalData" />
+  </wsdl:message>
+  <wsdl:message name="ClaimApprovalResponse">
+  </wsdl:message>
+  <wsdl:message name="ClaimResolveRequest">
+    <wsdl:part name="claimId" type="xsd:int" />
+    <wsdl:part name="ok" type="xsd:boolean" />
+  </wsdl:message>
+  <wsdl:message name="ClaimResolveResponse">
+  </wsdl:message>
+  <wsdl:message name="notifyRequest">
+    <wsdl:part name="firstname" type="xsd:string" />
+    <wsdl:part name="lastname" type="xsd:string" />
+    <wsdl:part name="taskId" type="xsd:string" />
+  </wsdl:message>
+  <wsdl:message name="notifyResponse"></wsdl:message>
+  <wsdl:portType name="ClaimsHandlingPT">
+    <wsdl:operation name="approve">
+      <wsdl:input message="tns:ClaimApprovalRequest" />
+      <wsdl:output message="tns:ClaimApprovalResponse" />
+    </wsdl:operation>
+    <wsdl:operation name="escalate">
+      <wsdl:input message="tns:ClaimApprovalRequest" />
+      <wsdl:output message="tns:ClaimApprovalResponse"></wsdl:output>
+    </wsdl:operation>
+  </wsdl:portType>
+  <wsdl:portType name="ClaimsHandlingPT">
+    <wsdl:operation name="resolve">
+      <wsdl:input message="tns:ClaimResolveRequest" />
+      <wsdl:output message="tns:ClaimResolveResponse" />
+    </wsdl:operation>
+  </wsdl:portType>
+  <wsdl:portType name="ClaimApprovalReminderPT">
+    <wsdl:operation name="notify">
+      <wsdl:input message="tns:notifyRequest" />
+      <wsdl:output message="tns:notifyResponse" />
+    </wsdl:operation>
+  </wsdl:portType>
+
+  <wsdl:binding name="ClaimsHandlingBinding" type="tns:ClaimsHandlingPT">
+    <soap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http" />
+    <wsdl:operation name="approve">
+      <soap:operation />
+      <wsdl:input>
+        <soap:body use="literal" namespace="http://www.insurance.example.com/claims" />
+      </wsdl:input>
+      <wsdl:output>
+        <soap:body use="literal" namespace="http://www.insurance.example.com/claims" />
+      </wsdl:output>
+    </wsdl:operation>
+    <wsdl:operation name="escalate">
+      <soap:operation />
+      <wsdl:input>
+        <soap:body use="literal" namespace="http://www.insurance.example.com/claims" />
+      </wsdl:input>
+      <wsdl:output>
+        <soap:body use="literal" namespace="http://www.insurance.example.com/claims" />
+      </wsdl:output>
+    </wsdl:operation>
+  </wsdl:binding>
+  <wsdl:service name="ClaimsHandlingService">
+    <wsdl:port name="ClaimsHandlingPort" binding="tns:ClaimsHandlingBinding">
+      <soap:address location="http://localhost:8090"/>
+    </wsdl:port>
+  </wsdl:service>
+
+  <wsdl:binding name="ClaimsHandlingBinding" type="tns:ClaimsHandlingPT">
+    <soap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http" />
+    <wsdl:operation name="resolve">
+      <soap:operation/>
+      <wsdl:input>
+        <soap:body use="literal" namespace="http://www.insurance.example.com/claims" />
+      </wsdl:input>
+      <wsdl:output>
+        <soap:body use="literal" namespace="http://www.insurance.example.com/claims" />
+      </wsdl:output>
+    </wsdl:operation>
+  </wsdl:binding>
+  <wsdl:service name="ClaimsHandlingService">
+    <wsdl:port name="ClaimsHandlingPort" binding="tns:ClaimsHandlingBinding">
+      <soap:address location="http://localhost:9999"/> <!--some non existing destination,
since it has to be initialized from callback EPR -->
+    </wsdl:port>
+  </wsdl:service>
+
+  <wsdl:binding name="ClaimApprovalReminderBinding" type="tns:ClaimApprovalReminderPT">
+    <soap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http" />
+    <wsdl:operation name="notify">
+      <soap:operation/>
+      <wsdl:input>
+        <soap:body use="literal" namespace="http://www.insurance.example.com/claims" />
+      </wsdl:input>
+      <wsdl:output>
+        <soap:body use="literal" namespace="http://www.insurance.example.com/claims" />
+      </wsdl:output>
+    </wsdl:operation>
+  </wsdl:binding>
+  <wsdl:service name="ClaimApprovalReminderService">
+    <wsdl:port name="ClaimApprovalReminderPort" binding="tns:ClaimApprovalReminderBinding">
+      <soap:address location="http://localhost:8090"/> <!--some non existing destination,
since it has to be initialized from callback EPR -->
+    </wsdl:port>
+  </wsdl:service>
+</wsdl:definitions>

Added: incubator/hise/trunk/hise-examples/war/claimsHandling/claimsHandling-hise-dd.xml
URL: http://svn.apache.org/viewvc/incubator/hise/trunk/hise-examples/war/claimsHandling/claimsHandling-hise-dd.xml?rev=986737&view=auto
==============================================================================
--- incubator/hise/trunk/hise-examples/war/claimsHandling/claimsHandling-hise-dd.xml (added)
+++ incubator/hise/trunk/hise-examples/war/claimsHandling/claimsHandling-hise-dd.xml Wed Aug
18 15:23:48 2010
@@ -0,0 +1,49 @@
+<?xml version="1.0" encoding="UTF-8"?>
+  <!--
+    ~ Licensed to the Apache Software Foundation (ASF) under one ~ or more contributor license
agreements. See the NOTICE file ~ distributed with this work for additional information ~
regarding copyright ownership. The ASF licenses this file ~ to you under the Apache License,
Version 2.0 (the ~ "License"); you may not use this file except in compliance ~ with the License.
You may obtain a copy of the License at ~ ~ http://www.apache.org/licenses/LICENSE-2.0 ~ ~
Unless required by applicable law or agreed to in writing, ~ software distributed under the
License is distributed on an ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY ~ KIND,
either express or implied. See the License for the ~ specific
+    language governing permissions and limitations ~ under the License.
+  -->
+<beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:jaxws="http://cxf.apache.org/jaxws" xmlns:ins="http://www.insurance.example.com/claims"
xsi:schemaLocation="
+       http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
+       http://cxf.apache.org/jaxws http://cxf.apache.org/schemas/jaxws.xsd
+       ">
+  <bean class="org.apache.hise.engine.store.HISEDeployer" init-method="init">
+    <property name="hiseEngine" ref="hiseEngine"/>
+    <property name="deploymentInfo">
+      <bean class="org.apache.hise.engine.store.HISEDD">
+        <property name="humanInteractionsResource" value="classpath:claimsHandling.xml"></property>
+        <property name="tasksDI">
+          <list>
+            <bean class="org.apache.hise.engine.store.TaskDD">
+              <property name="taskName">
+                <bean class="javax.xml.namespace.QName" factory-method="valueOf">
+                  <constructor-arg type="java.lang.String" value="{http://www.insurance.example.com/claims}ClaimsHandlingTask"></constructor-arg>
+                </bean>
+              </property>
+              <property name="handler" ref="hiseJaxWSService1"/>
+              <property name="sender" ref="hiseJaxWSSender1"/>
+            </bean>
+          </list>
+        </property>
+      </bean>
+    </property>
+  </bean>
+
+  <bean id="hiseJaxWSService1" class="org.apache.hise.engine.jaxws.HISEJaxWSService" init-method="init">
+    <property name="hiseEngine" ref="hiseEngine"/>
+    <property name="transactionManager" ref="transactionManager"></property>
+  </bean>
+
+  <jaxws:endpoint id="claimsHandling" address="/ClaimsHandlingService/" implementor="#hiseJaxWSService1"
serviceName="ins:ClaimsHandlingService" endpointName="ins:ClaimsHandlingPort" publish="true"
wsdlLocation="classpath:ExampleTasks.wsdl">
+  </jaxws:endpoint>
+
+  <bean id="hiseJaxWSSender1" class="org.apache.hise.engine.jaxws.HISEJaxWSClient" init-method="init">
+    <property name="wsdlDocumentLocation" value="classpath:ExampleTasks.wsdl"></property>
+    <property name="serviceName">
+      <bean class="javax.xml.namespace.QName" factory-method="valueOf">
+        <constructor-arg type="java.lang.String" value="{http://www.insurance.example.com/claims}ClaimsHandlingService"></constructor-arg>
+      </bean>
+    </property>
+  </bean>
+</beans>    
+



Mime
View raw message