You are viewing a plain text version of this content. The canonical link for it is here.
Posted to hise-commits@incubator.apache.org by rr...@apache.org on 2010/07/23 11:00:20 UTC

svn commit: r967042 [1/3] - in /incubator/hise/trunk: hise-services/src/main/java/org/apache/hise/runtime/ hise-test-example-osgi/src/main/resources/ hise-test-example-osgi/src/main/resources/META-INF/spring/ itest/

Author: rr
Date: Fri Jul 23 11:00:19 2010
New Revision: 967042

URL: http://svn.apache.org/viewvc?rev=967042&view=rev
Log:
HISE-53: task history in comments (Thanks to Paweł Byszewski)

Modified:
    incubator/hise/trunk/hise-services/src/main/java/org/apache/hise/runtime/TaskHistoryListener.java
    incubator/hise/trunk/hise-test-example-osgi/src/main/resources/META-INF/spring/beans.xml
    incubator/hise/trunk/hise-test-example-osgi/src/main/resources/testHtd1.xml
    incubator/hise/trunk/itest/hise-soapui-project.xml
    incubator/hise/trunk/itest/task_history.xml

Modified: incubator/hise/trunk/hise-services/src/main/java/org/apache/hise/runtime/TaskHistoryListener.java
URL: http://svn.apache.org/viewvc/incubator/hise/trunk/hise-services/src/main/java/org/apache/hise/runtime/TaskHistoryListener.java?rev=967042&r1=967041&r2=967042&view=diff
==============================================================================
--- incubator/hise/trunk/hise-services/src/main/java/org/apache/hise/runtime/TaskHistoryListener.java (original)
+++ incubator/hise/trunk/hise-services/src/main/java/org/apache/hise/runtime/TaskHistoryListener.java Fri Jul 23 11:00:19 2010
@@ -49,24 +49,24 @@ public class TaskHistoryListener {
 	
 	 public Comment actualOwnerChanged(org.apache.hise.dao.Task taskDto, String oldActualOwner, 
 			 	String newActualOwner, String initiator ){
-		 if(initiator==null) throw new RuntimeException("Initiator name missing");
-     	if((oldActualOwner==null || oldActualOwner.isEmpty()) &&
-     			(newActualOwner==null || newActualOwner.isEmpty()))
+		if(initiator==null) throw new RuntimeException("Initiator name missing");
+     	if((oldActualOwner==null || oldActualOwner.length()==0) &&
+     			(newActualOwner==null || newActualOwner.length()==0))
      		throw new RuntimeException("Names of old and new ActualOwner missing");
      	
-			String content=null;
-	        if(oldActualOwner==null || oldActualOwner.isEmpty())
+     	String content=null;
+	    if(oldActualOwner==null || oldActualOwner.length()==0)
 	        	content=new String("Jako Actual Owner zadania został przypisany "+newActualOwner+".");
-	        else if(newActualOwner==null || newActualOwner.isEmpty()){
+	    else if(newActualOwner==null || newActualOwner.length()==0){
 	        	content=new String("Zwolniono stanowisko Actual Owner. Był tam przypisany "+oldActualOwner+".");
-	        }
-	        else{
+	    }
+	    else{
 	        
 		        	content=new String("Nastąpiła zmiana na stanowisku Actual Owner. "+oldActualOwner+
 		        			" został zastąpiony przez "+newActualOwner+".");
-	        }
-	        Comment comment= new Comment(content, taskDto, initiator);
-	        return comment;
+	    }
+	    Comment comment= new Comment(content, taskDto, initiator);
+	    return comment;
 		
 		
 	}

Modified: incubator/hise/trunk/hise-test-example-osgi/src/main/resources/META-INF/spring/beans.xml
URL: http://svn.apache.org/viewvc/incubator/hise/trunk/hise-test-example-osgi/src/main/resources/META-INF/spring/beans.xml?rev=967042&r1=967041&r2=967042&view=diff
==============================================================================
--- incubator/hise/trunk/hise-test-example-osgi/src/main/resources/META-INF/spring/beans.xml (original)
+++ incubator/hise/trunk/hise-test-example-osgi/src/main/resources/META-INF/spring/beans.xml Fri Jul 23 11:00:19 2010
@@ -89,6 +89,19 @@ xsi:schemaLocation="
              <property name="sender" ref="hiseJaxWSSender6"/>
             </bean>
             
+            
+             <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}Task10"></constructor-arg>
+                </bean>
+              </property>
+             <property name="handler" ref="hiseJaxWSService10"/>
+             <property name="sender" ref="hiseJaxWSSender10"/>
+            </bean>
+            
+            
+            
             <bean class="org.apache.hise.engine.store.TaskDD">
               <property name="taskName">
                 <bean class="javax.xml.namespace.QName" factory-method="valueOf">
@@ -212,6 +225,23 @@ xsi:schemaLocation="
       </bean>
     </property>
   </bean>
+  
+    <bean id="hiseJaxWSService10" class="org.apache.hise.engine.jaxws.HISEJaxWSService" init-method="init">
+     <!--property name="id" value="hiseJaxWSService10"/-->
+    <property name="hiseEngine" ref="hiseEngine"/>
+    <property name="transactionManager" ref="transactionManager"></property>
+  </bean>
+ 
+  <jaxws:endpoint id="testHtd10" address="/ClaimsHandlingService10/" implementor="#hiseJaxWSService10" serviceName="ins:ClaimsHandlingService" endpointName="ins:ClaimsHandlingPort" publish="true" wsdlLocation="classpath:ExampleTasks.wsdl"/>
+
+  <bean id="hiseJaxWSSender10" 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}ClaimsResolvingService"></constructor-arg>
+      </bean>
+    </property>
+  </bean>
 
 </beans>    
 

Modified: incubator/hise/trunk/hise-test-example-osgi/src/main/resources/testHtd1.xml
URL: http://svn.apache.org/viewvc/incubator/hise/trunk/hise-test-example-osgi/src/main/resources/testHtd1.xml?rev=967042&r1=967041&r2=967042&view=diff
==============================================================================
--- incubator/hise/trunk/hise-test-example-osgi/src/main/resources/testHtd1.xml (original)
+++ incubator/hise/trunk/hise-test-example-osgi/src/main/resources/testHtd1.xml Fri Jul 23 11:00:19 2010
@@ -856,65 +856,7 @@ xs:double(htd:getInput("ClaimApprovalReq
 			-
    </htd:renderings>      
             
-  <htd:deadlines>
-    <htd:startDeadline>
-      <htd:for>'PT5S'</htd:for>
-      <htd:escalation name="reassignTask3">
-        <htd:reassignment>
-          <htd:potentialOwners>
-            <htd:from>
-              <htd:literal>
-                <htd:organizationalEntity>
-                  <htd:users>
-                    <htd:user>user3</htd:user>
-                  </htd:users>
-                </htd:organizationalEntity>
 
-              </htd:literal>
-            </htd:from>
-          </htd:potentialOwners>
-        </htd:reassignment>
-      </htd:escalation>
-      
-    </htd:startDeadline>
-
-  <htd:startDeadline>
-    <htd:for>'PT5S'</htd:for>
-    <htd:escalation name="startDeadline2">
-      <htd:toParts>
-        <htd:toPart name="request">
-        <![CDATA[
-          <cla:notify xmlns:cla="http://www.insurance.example.com/claims" xmlns:htd="http://www.example.org/WS-HT">
-            <firstname>{htd:getInput("ClaimApprovalRequest")/cla:cust/cla:firstname/text()}</firstname>
-            <lastname>{htd:getInput("ClaimApprovalRequest")/cla:cust/cla:lastname/text()}</lastname>
-            <taskId>{$taskId}</taskId>
-          </cla:notify>
-        ]]>
-        </htd:toPart>
-      </htd:toParts>
-      <htd:localNotification reference="tns:Notify2"/>
-    </htd:escalation>
-  </htd:startDeadline>
-    
-    <htd:completionDeadline>
-      <htd:for>'PT10S'</htd:for>
-      <htd:escalation name="reassignTask3Completion">
-        <htd:reassignment>
-          <htd:potentialOwners>
-            <htd:from>
-              <htd:literal>
-                <htd:organizationalEntity>
-                  <htd:users>
-                    <htd:user>user4</htd:user>
-                  </htd:users>
-                </htd:organizationalEntity>
-              </htd:literal>
-            </htd:from>
-          </htd:potentialOwners>
-        </htd:reassignment>
-      </htd:escalation>
-    </htd:completionDeadline>
-  </htd:deadlines>
   
       
         </htd:task>   
@@ -1143,6 +1085,207 @@ xs:double(htd:getInput("ClaimApprovalReq
                 ]]>
             </htd:outcome>
         </htd:task>   
+        
+        <htd:task name="Task10">
+
+          <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";            
+                htd:getInput("ClaimApprovalRequest")/cla:priority
+            </htd:priority>
+            
+           <htd:savingTaskHistory>
+          		true
+          </htd:savingTaskHistory>    
+            
+            <htd:peopleAssignments>
+            	<htd:potentialOwners>
+                  <htd:from>
+                    <htd:literal>
+                        <htd:organizationalEntity>
+                            <htd:users>
+                                <htd:user>user1</htd:user>
+                            </htd:users>
+                            
+                        </htd:organizationalEntity>
+                    </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:organizationalEntity>
+                    </htd:literal>
+                  </htd:from>
+                </htd:businessAdministrators>
+
+                <htd:businessAdministrators>
+                  <htd:from>
+                    <htd:literal>
+                        <htd:organizationalEntity>
+                            <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:presentationParameters>
+                    
+                    <htd:presentationParameter name="firstname" type="xsd:string">
+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">
+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">
+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 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("ClaimApprovalRequest")/cla:cust/cla:id/text()}</claimId>
+                     <ok>{$outcome}</ok>
+                  </cla:resolve>
+                ]]>
+            </htd:outcome>
+            
+            
+            
+               <htd:renderings>
+                <htd:rendering type="NSW/GWT">
+                <expression>
+                    <![CDATA[
+                   
+                        declare namespace htd="http://www.example.org/WS-HT"; 
+                                      
+                        <example name="anyname" xmlns:cla="http://www.insurance.example.com/claims">
+                            <param name="type" value="{htd:getInput("ClaimApprovalRequest")/cla:cust/cla:firstname/text()}"/>
+                        </example>
+            
+                    ]]>
+                    </expression>
+                </htd:rendering>
+              <htd:rendering type="simpleText">
+                <expression>
+                    <![CDATA[
+                      "test_expression"
+                    ]]>
+                    </expression>
+                </htd:rendering>
+			-
+   </htd:renderings>      
+            
+  <htd:deadlines>
+    <htd:startDeadline>
+      <htd:for>'PT5S'</htd:for>
+      <htd:escalation name="reassignTask3">
+        <htd:reassignment>
+          <htd:potentialOwners>
+            <htd:from>
+              <htd:literal>
+                <htd:organizationalEntity>
+                  <htd:users>
+                    <htd:user>user3</htd:user>
+                  </htd:users>
+                </htd:organizationalEntity>
+
+              </htd:literal>
+            </htd:from>
+          </htd:potentialOwners>
+        </htd:reassignment>
+      </htd:escalation>
+      
+    </htd:startDeadline>
+
+  <htd:startDeadline>
+    <htd:for>'PT5S'</htd:for>
+    <htd:escalation name="startDeadline2">
+      <htd:toParts>
+        <htd:toPart name="request">
+        <![CDATA[
+          <cla:notify xmlns:cla="http://www.insurance.example.com/claims" xmlns:htd="http://www.example.org/WS-HT">
+            <firstname>{htd:getInput("ClaimApprovalRequest")/cla:cust/cla:firstname/text()}</firstname>
+            <lastname>{htd:getInput("ClaimApprovalRequest")/cla:cust/cla:lastname/text()}</lastname>
+            <taskId>{$taskId}</taskId>
+          </cla:notify>
+        ]]>
+        </htd:toPart>
+      </htd:toParts>
+      <htd:localNotification reference="tns:Notify2"/>
+    </htd:escalation>
+  </htd:startDeadline>
+    
+    <htd:completionDeadline>
+      <htd:for>'PT10S'</htd:for>
+      <htd:escalation name="reassignTask3Completion">
+        <htd:reassignment>
+          <htd:potentialOwners>
+            <htd:from>
+              <htd:literal>
+                <htd:organizationalEntity>
+                  <htd:users>
+                    <htd:user>user4</htd:user>
+                  </htd:users>
+                </htd:organizationalEntity>
+              </htd:literal>
+            </htd:from>
+          </htd:potentialOwners>
+        </htd:reassignment>
+      </htd:escalation>
+    </htd:completionDeadline>
+  </htd:deadlines>
+  
+      
+        </htd:task>   
+        
+        
 </htd:tasks> 
     
     <htd:notifications>