incubator-hise-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From wi...@apache.org
Subject svn commit: r1151066 [1/2] - in /incubator/hise/trunk: ./ hise-bundle/ hise-bundle/soapui-tests/ hise-distro/src/distro/examples/claimsHandling/ hise-examples/osgi/ hise-examples/osgi/claims-handling-bundle/src/main/resources/ hise-examples/osgi/claims...
Date Tue, 26 Jul 2011 12:01:27 GMT
Author: witek
Date: Tue Jul 26 12:01:15 2011
New Revision: 1151066

URL: http://svn.apache.org/viewvc?rev=1151066&view=rev
Log:
Touk changes (wip) merge.

Added:
    incubator/hise/trunk/hise-test-example-osgi/src/main/java/org/apache/hise/test/Test.java
Removed:
    incubator/hise/trunk/hise-bundle/soapui-tests/
    incubator/hise/trunk/hise-distro/src/distro/examples/claimsHandling/
    incubator/hise/trunk/hise-services/src/main/java/org/apache/hise/lang/faults/
    incubator/hise/trunk/hise-services/src/main/resources/hise/
    incubator/hise/trunk/hise-services/src/test/java/org/apache/hise/engine/
    incubator/hise/trunk/hise-services/src/test/java/org/apache/hise/lang/
    incubator/hise/trunk/hise-services/src/test/java/org/apache/hise/utils/
    incubator/hise/trunk/hise-web/soapui-tests/
Modified:
    incubator/hise/trunk/hise-bundle/pom.xml
    incubator/hise/trunk/hise-examples/osgi/claims-handling-bundle/src/main/resources/Htd1.xml
    incubator/hise/trunk/hise-examples/osgi/claims-handling-bundle/src/main/resources/META-INF/spring/beans.xml
    incubator/hise/trunk/hise-examples/osgi/claims-handling-karaf/pom.xml
    incubator/hise/trunk/hise-examples/osgi/pom.xml
    incubator/hise/trunk/hise-fe/pom.xml
    incubator/hise/trunk/hise-fe/src/main/java/org/apache/hise/fe/gwt/client/ui/widgets/FilterPanel.java
    incubator/hise/trunk/hise-fe/src/main/java/org/apache/hise/fe/gwt/client/ui/widgets/PagingPanel.java
    incubator/hise/trunk/hise-fe/src/main/java/org/apache/hise/fe/gwt/client/ui/widgets/TaskInfoPanel.java
    incubator/hise/trunk/hise-fe/src/main/java/org/apache/hise/fe/gwt/client/ui/widgets/TaskListPanel.java
    incubator/hise/trunk/hise-fe/src/main/java/org/apache/hise/fe/server/facades/impl/TaskFacade.java
    incubator/hise/trunk/hise-karaf/pom.xml
    incubator/hise/trunk/hise-services/src/main/java/org/apache/hise/api/Management.java
    incubator/hise/trunk/hise-services/src/main/java/org/apache/hise/dao/Comment.java
    incubator/hise/trunk/hise-services/src/main/java/org/apache/hise/dao/HISEDao.java
    incubator/hise/trunk/hise-services/src/main/java/org/apache/hise/dao/Message.java
    incubator/hise/trunk/hise-services/src/main/java/org/apache/hise/dao/Task.java
    incubator/hise/trunk/hise-services/src/main/java/org/apache/hise/dao/TaskQuery.java
    incubator/hise/trunk/hise-services/src/main/java/org/apache/hise/engine/ManagementImpl.java
    incubator/hise/trunk/hise-services/src/main/java/org/apache/hise/engine/jaxws/TaskOperationsAdministrative.java
    incubator/hise/trunk/hise-services/src/main/java/org/apache/hise/engine/jaxws/TaskOperationsAdministrativeImpl.java
    incubator/hise/trunk/hise-services/src/main/java/org/apache/hise/engine/jaxws/TaskOperationsBaseImpl.java
    incubator/hise/trunk/hise-services/src/main/java/org/apache/hise/engine/store/HISERouteBuilder.java
    incubator/hise/trunk/hise-services/src/main/java/org/apache/hise/runtime/Task.java
    incubator/hise/trunk/hise-services/src/main/java/org/apache/hise/runtime/TaskEvaluator.java
    incubator/hise/trunk/hise-services/src/main/java/org/apache/hise/runtime/TaskHistoryListener.java
    incubator/hise/trunk/hise-services/src/main/java/org/apache/hise/utils/StringToConverterFabric.java
    incubator/hise/trunk/hise-services/src/test/java/org/apache/hise/DaoTest.java
    incubator/hise/trunk/hise-services/src/test/java/org/apache/hise/TaskCreationHelper.java
    incubator/hise/trunk/hise-test-example-osgi/pom.xml
    incubator/hise/trunk/hise-test-example-osgi/src/main/java/org/apache/hise/test/TestImpl.java
    incubator/hise/trunk/hise-test-example-osgi/src/main/java/org/apache/hise/test/TestingManagment.java
    incubator/hise/trunk/hise-test-example-osgi/src/main/resources/META-INF/spring/hise-itest.xml
    incubator/hise/trunk/hise-web/pom.xml
    incubator/hise/trunk/hise-web/src/test/java/org/apache/hise/Client2Test.java
    incubator/hise/trunk/hise-ws-client/src/main/java/org/apache/hise/wsclient/facade/FilterCriteria.java
    incubator/hise/trunk/hise-ws-client/src/main/java/org/apache/hise/wsclient/facade/HiseApiFacade.java
    incubator/hise/trunk/hise-ws-client/src/main/java/org/apache/hise/wsclient/facade/HiseApiFacadeImpl.java
    incubator/hise/trunk/hise-ws-client/src/main/java/org/apache/hise/wsclient/infrastructure/Tasks.java
    incubator/hise/trunk/hise-ws-client/src/main/resources/wsdls/ws-humantask-api-wsdl.xsd
    incubator/hise/trunk/hise-ws-client/src/test/java/org/apache/hise/api/client/facade/HiseApiFacadeUnitTest.java
    incubator/hise/trunk/hise-wsdl/src/main/resources/ws-humantask-api-wsdl.xsd
    incubator/hise/trunk/itest/task_history.xml
    incubator/hise/trunk/pom.xml
    incubator/hise/trunk/rtests/src/test/java/org/apache/hise/evalpeople/EvalPeopleTest.java
    incubator/hise/trunk/rtests/src/test/java/org/apache/hise/managementApi/PagingTest.java

Modified: incubator/hise/trunk/hise-bundle/pom.xml
URL: http://svn.apache.org/viewvc/incubator/hise/trunk/hise-bundle/pom.xml?rev=1151066&r1=1151065&r2=1151066&view=diff
==============================================================================
--- incubator/hise/trunk/hise-bundle/pom.xml (original)
+++ incubator/hise/trunk/hise-bundle/pom.xml Tue Jul 26 12:01:15 2011
@@ -38,7 +38,7 @@
             <plugin>
                 <groupId>org.apache.felix</groupId>
                 <artifactId>maven-bundle-plugin</artifactId>
-				<version>1.4.3</version>
+				<version>2.3.4</version>
 				<extensions>true</extensions>
                 <configuration>
                     <instructions>

Modified: incubator/hise/trunk/hise-examples/osgi/claims-handling-bundle/src/main/resources/Htd1.xml
URL: http://svn.apache.org/viewvc/incubator/hise/trunk/hise-examples/osgi/claims-handling-bundle/src/main/resources/Htd1.xml?rev=1151066&r1=1151065&r2=1151066&view=diff
==============================================================================
--- incubator/hise/trunk/hise-examples/osgi/claims-handling-bundle/src/main/resources/Htd1.xml (original)
+++ incubator/hise/trunk/hise-examples/osgi/claims-handling-bundle/src/main/resources/Htd1.xml Tue Jul 26 12:01:15 2011
@@ -18,11 +18,11 @@
 
             <htd:documentation xml:lang="en-US">This task is used to handle claims that require manual approval. </htd:documentation>
 
-            <htd:interface portType="ClaimsHandling" operation="default" 
-                           responsePortType="ClaimsResolving" responseOperation="default"/>
+            <htd:interface portType="tns:ClaimsHandlingPT" operation="approve" 
+                           responsePortType="tns:ClaimsResolvingPT" responseOperation="resolve"/>
 
             <htd:priority>  
-                xs:integer(htd:getInput("message")/cla:prio)
+                xs:integer(htd:getInput("ClaimApprovalRequest")/cla:prio)
             </htd:priority>
 
             <htd:peopleAssignments>
@@ -86,15 +86,15 @@
                 <htd:presentationParameters>
                     
                     <htd:presentationParameter name="firstname" type="xsd:string">
-                        xs:string(htd:getInput("message")/cla:cust/cla:firstname)
+                        xs:string(htd:getInput("ClaimApprovalRequest")/cla:cust/cla:firstname)
                     </htd:presentationParameter>
                     
                     <htd:presentationParameter name="lastname" type="xsd:string">
-                        xs:string(htd:getInput("message")/cla:cust/cla:lastname)
+                        xs:string(htd:getInput("ClaimApprovalRequest")/cla:cust/cla:lastname)
                     </htd:presentationParameter>
                     
                     <htd:presentationParameter name="euroAmount" type="xsd:double">
-                        xs:double(htd:getInput("message")/cla:amount)
+                        xs:double(htd:getInput("ClaimApprovalRequest")/cla:amount)
                     </htd:presentationParameter>
                         
                 </htd:presentationParameters>
@@ -112,7 +112,7 @@
             <htd:outcome>
                 <![CDATA[
                   <cla:resolve xmlns:cla="http://www.insurance.example.com/claims" xmlns:htd="http://www.example.org/WS-HT">
-                     <claimId>{htd:getInput("message")/cla:cust/cla:id/text()}</claimId>
+                     <claimId>{htd:getInput("ClaimApprovalRequest")/cla:cust/cla:id/text()}</claimId>
                      <ok>{$outcome}</ok>
                   </cla:resolve>
                 ]]>

Modified: incubator/hise/trunk/hise-examples/osgi/claims-handling-bundle/src/main/resources/META-INF/spring/beans.xml
URL: http://svn.apache.org/viewvc/incubator/hise/trunk/hise-examples/osgi/claims-handling-bundle/src/main/resources/META-INF/spring/beans.xml?rev=1151066&r1=1151065&r2=1151066&view=diff
==============================================================================
--- incubator/hise/trunk/hise-examples/osgi/claims-handling-bundle/src/main/resources/META-INF/spring/beans.xml (original)
+++ incubator/hise/trunk/hise-examples/osgi/claims-handling-bundle/src/main/resources/META-INF/spring/beans.xml Tue Jul 26 12:01:15 2011
@@ -26,23 +26,64 @@ xmlns:xsi="http://www.w3.org/2001/XMLSch
   
   <osgi:reference id="hiseEngine" interface="org.apache.hise.api.HISEEngine" bean-name="hiseEngine"/>
   <osgi:reference id="transactionManager" interface="org.springframework.transaction.PlatformTransactionManager" bean-name="transactionManager"/>
-
-  <bean id="hiseRouteBuilder" class="org.apache.hise.engine.store.HISERouteBuilder">
-    <property name="humanInteractionsResource" value="classpath:Htd1.xml"/>
+  <bean class="org.apache.hise.engine.store.HISEDeployer" init-method="init" destroy-method="destroy">
+    <property name="hiseEngine" ref="hiseEngine"/>
+    <property name="deploymentInfo">
+      <bean class="org.apache.hise.engine.store.HISEDD">
+        <property name="humanInteractionsResource" value="classpath:Htd1.xml"/>
+        <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}Task1"/>
+                </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"/>
   </bean>
+  <jaxws:endpoint id="Htd1" implementor="#hiseJaxWSService1" serviceName="ins:ClaimsHandlingService" endpointName="ins:ClaimsHandlingPort" publish="true" wsdlLocation="classpath:ExampleTasks.wsdl"/>
+  <bean id="hiseJaxWSSender1" class="org.apache.hise.engine.jaxws.HISEJaxWSClient" init-method="init">
+    <property name="wsdlDocumentLocation" value="classpath:ExampleTasks.wsdl"/>
+    <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"/>
+      </bean>
+    </property>
+  </bean>
+  <jaxws:endpoint id="Htd2" address="/ClaimsReminderService" implementor="#hiseJaxWSService1" serviceName="ins:ClaimApprovalReminderService" endpointName="ins:ClaimApprovalReminderPort" publish="true" wsdlLocation="classpath:ExampleTasks.wsdl"/>
 
-  <camel-osgi:camelContext id="camelContext" xmlns="http://camel.apache.org/schema/spring">
-    <routeBuilder ref="hiseRouteBuilder"/>
+    <camel-osgi:camelContext xmlns="http://camel.apache.org/schema/spring">
         <route>
             <from uri="file:input?delete=true" />
-            <to uri="direct:ClaimsHandling"/>
+            <convertBodyTo type="javax.xml.transform.stream.StreamSource"/>
+            <enrich uri="nmr:{http://www.insurance.example.com/claims}ClaimsHandlingPort"/>
+            <to uri="file:input-processed"/>
         </route>
         <route>
-            <from uri="direct:ClaimsResolving"/>
+            <from uri="jetty:http://localhost:8280/ClaimsResolvingService"/>
             <to uri="file:output"/>
+            <setBody>
+                <constant>
+<![CDATA[
+<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
+  <SOAP-ENV:Header/>
+  <SOAP-ENV:Body>
+  </SOAP-ENV:Body>
+</SOAP-ENV:Envelope>
+]]>
+                </constant>
+            </setBody>
+            <convertBodyTo type="javax.xml.transform.stream.StreamSource"/>
         </route>
-  </camel-osgi:camelContext>
-
+    </camel-osgi:camelContext>
 </beans>

Modified: incubator/hise/trunk/hise-examples/osgi/claims-handling-karaf/pom.xml
URL: http://svn.apache.org/viewvc/incubator/hise/trunk/hise-examples/osgi/claims-handling-karaf/pom.xml?rev=1151066&r1=1151065&r2=1151066&view=diff
==============================================================================
--- incubator/hise/trunk/hise-examples/osgi/claims-handling-karaf/pom.xml (original)
+++ incubator/hise/trunk/hise-examples/osgi/claims-handling-karaf/pom.xml Tue Jul 26 12:01:15 2011
@@ -42,7 +42,6 @@
       <plugin>
         <groupId>org.apache.maven.plugins</groupId>
         <artifactId>maven-resources-plugin</artifactId>
-        <version>1.5</version>
         <executions>
            <execution>
               <id>filter</id>

Modified: incubator/hise/trunk/hise-examples/osgi/pom.xml
URL: http://svn.apache.org/viewvc/incubator/hise/trunk/hise-examples/osgi/pom.xml?rev=1151066&r1=1151065&r2=1151066&view=diff
==============================================================================
--- incubator/hise/trunk/hise-examples/osgi/pom.xml (original)
+++ incubator/hise/trunk/hise-examples/osgi/pom.xml Tue Jul 26 12:01:15 2011
@@ -35,7 +35,7 @@
 	<cxf.version>2.2.6</cxf.version>
 	<spring.version>2.5.6.SEC01</spring.version>
 	<saxon.version>9.1.0.8</saxon.version>
-        <log4j.version>1.2.13</log4j.version>
+    <log4j.version>1.2.13</log4j.version>
 	<hise.version>1.0.0-SNAPSHOT</hise.version>
   </properties>
 

Modified: incubator/hise/trunk/hise-fe/pom.xml
URL: http://svn.apache.org/viewvc/incubator/hise/trunk/hise-fe/pom.xml?rev=1151066&r1=1151065&r2=1151066&view=diff
==============================================================================
--- incubator/hise/trunk/hise-fe/pom.xml (original)
+++ incubator/hise/trunk/hise-fe/pom.xml Tue Jul 26 12:01:15 2011
@@ -29,7 +29,7 @@
     <groupId>org.apache.hise</groupId>
     <artifactId>hise-fe</artifactId>
 	<packaging>war</packaging>
-	<version>1.0.0-SNAPSHOT</version>
+    <version>1.0.0-SNAPSHOT</version>
     <name>Frontend for HISE web services (web application)</name>
 
 	<properties>
@@ -239,7 +239,7 @@
 								TODO for production <style>OBF</style>
 							-->
 							<source>5</source>
-							<jvmOptions>-Xss1024k -Xmx1200m -Xms256m -Djava.awt.headless=true</jvmOptions>
+							<jvmOptions>-Xss1024k -Xmx1024m -Xms256m -Djava.awt.headless=true</jvmOptions>
 							<fork>true</fork>
 						</configuration>
 						<executions>

Modified: incubator/hise/trunk/hise-fe/src/main/java/org/apache/hise/fe/gwt/client/ui/widgets/FilterPanel.java
URL: http://svn.apache.org/viewvc/incubator/hise/trunk/hise-fe/src/main/java/org/apache/hise/fe/gwt/client/ui/widgets/FilterPanel.java?rev=1151066&r1=1151065&r2=1151066&view=diff
==============================================================================
--- incubator/hise/trunk/hise-fe/src/main/java/org/apache/hise/fe/gwt/client/ui/widgets/FilterPanel.java (original)
+++ incubator/hise/trunk/hise-fe/src/main/java/org/apache/hise/fe/gwt/client/ui/widgets/FilterPanel.java Tue Jul 26 12:01:15 2011
@@ -85,6 +85,7 @@ public class FilterPanel extends Composi
 		Label hideButton = new Label("[-]");
 		hideButton.setStyleName("filterHide");
 		hideButton.addClickHandler(new ClickHandler() {
+			@Override
 			public void onClick(ClickEvent arg0) {
 				setFiltersVisible(!filters.isVisible());
 			}
@@ -114,6 +115,7 @@ public class FilterPanel extends Composi
 		} 
 		
 		listBox.addChangeHandler(new ChangeHandler() {
+			@Override
 			public void onChange(ChangeEvent arg0) {
 				filterIfCriteriaChanged();
 			}

Modified: incubator/hise/trunk/hise-fe/src/main/java/org/apache/hise/fe/gwt/client/ui/widgets/PagingPanel.java
URL: http://svn.apache.org/viewvc/incubator/hise/trunk/hise-fe/src/main/java/org/apache/hise/fe/gwt/client/ui/widgets/PagingPanel.java?rev=1151066&r1=1151065&r2=1151066&view=diff
==============================================================================
--- incubator/hise/trunk/hise-fe/src/main/java/org/apache/hise/fe/gwt/client/ui/widgets/PagingPanel.java (original)
+++ incubator/hise/trunk/hise-fe/src/main/java/org/apache/hise/fe/gwt/client/ui/widgets/PagingPanel.java Tue Jul 26 12:01:15 2011
@@ -106,6 +106,8 @@ public class PagingPanel extends Composi
 	
 	private ClickHandler getDisplayTasksPageClickHandler(final int page) {
 		return new ClickHandler() {
+			
+			@Override
 			public void onClick(ClickEvent event) {
 				GWT.log("[PAGE CLICKED] page=" + page);
 				TaskListPanel.getInstance().displayTasksPage(page);
@@ -115,6 +117,8 @@ public class PagingPanel extends Composi
 
 	private ClickHandler getRefreshClickHandler() {
 		return new ClickHandler() {
+			
+			@Override
 			public void onClick(ClickEvent event) {
 				GWT.log("[REFRESH]");
 				TaskListPanel.getInstance().reloadTasks();

Modified: incubator/hise/trunk/hise-fe/src/main/java/org/apache/hise/fe/gwt/client/ui/widgets/TaskInfoPanel.java
URL: http://svn.apache.org/viewvc/incubator/hise/trunk/hise-fe/src/main/java/org/apache/hise/fe/gwt/client/ui/widgets/TaskInfoPanel.java?rev=1151066&r1=1151065&r2=1151066&view=diff
==============================================================================
--- incubator/hise/trunk/hise-fe/src/main/java/org/apache/hise/fe/gwt/client/ui/widgets/TaskInfoPanel.java (original)
+++ incubator/hise/trunk/hise-fe/src/main/java/org/apache/hise/fe/gwt/client/ui/widgets/TaskInfoPanel.java Tue Jul 26 12:01:15 2011
@@ -102,6 +102,7 @@ public class TaskInfoPanel extends Compo
 	private ClickHandler getHandlerForButtonClick(final Action action) {
 		return new ClickHandler() {
 			
+			@Override
 			public void onClick(ClickEvent event) {
 				final String displayedTask = TaskInfoPanel.this.displayedTask;
 				GWT.log("Task no " + displayedTask + " " + action.name() + " TO BE DONE.");

Modified: incubator/hise/trunk/hise-fe/src/main/java/org/apache/hise/fe/gwt/client/ui/widgets/TaskListPanel.java
URL: http://svn.apache.org/viewvc/incubator/hise/trunk/hise-fe/src/main/java/org/apache/hise/fe/gwt/client/ui/widgets/TaskListPanel.java?rev=1151066&r1=1151065&r2=1151066&view=diff
==============================================================================
--- incubator/hise/trunk/hise-fe/src/main/java/org/apache/hise/fe/gwt/client/ui/widgets/TaskListPanel.java (original)
+++ incubator/hise/trunk/hise-fe/src/main/java/org/apache/hise/fe/gwt/client/ui/widgets/TaskListPanel.java Tue Jul 26 12:01:15 2011
@@ -177,6 +177,7 @@ public class TaskListPanel extends Compo
 	private void addChooseTaskHandler() {
 		taskTable.addClickHandler(new ClickHandler() {
 			
+			@Override
 			public void onClick(ClickEvent event) {
 				Cell clickedCell = taskTable.getCellForEvent(event);
 				int clickedRow = clickedCell.getRowIndex();
@@ -268,6 +269,7 @@ public class TaskListPanel extends Compo
 		final TaskDataDisplayer criteria = columnConfig.getColumn(columnIndex);
 		if (criteria != null) {
 			Collections.sort(tasks, new Comparator<TaskDto>() {
+				@Override
 				public int compare(TaskDto task1, TaskDto task2) {
 					String data1 = criteria.getDataForColumn(task1);
 					String data2 = criteria.getDataForColumn(task2);

Modified: incubator/hise/trunk/hise-fe/src/main/java/org/apache/hise/fe/server/facades/impl/TaskFacade.java
URL: http://svn.apache.org/viewvc/incubator/hise/trunk/hise-fe/src/main/java/org/apache/hise/fe/server/facades/impl/TaskFacade.java?rev=1151066&r1=1151065&r2=1151066&view=diff
==============================================================================
--- incubator/hise/trunk/hise-fe/src/main/java/org/apache/hise/fe/server/facades/impl/TaskFacade.java (original)
+++ incubator/hise/trunk/hise-fe/src/main/java/org/apache/hise/fe/server/facades/impl/TaskFacade.java Tue Jul 26 12:01:15 2011
@@ -20,6 +20,7 @@ public class TaskFacade implements org.a
 	private HiseApiFacade hiseFacade;
 	private DozerBeanMapper dozer;
 	
+	@Override
 	public List<TaskDto> getMyTasks(FilterCriteriaDto filterCriteria) {
 		try {
 			List<Task> tasks = hiseFacade.getMyTasks(securityUtil.getUsername(), securityUtil.getPassword(), dozer.map(filterCriteria, FilterCriteria.class));
@@ -34,6 +35,7 @@ public class TaskFacade implements org.a
 		}
 	}
 	
+	@Override
     public void claim(String taskId) {
 		try {
 			hiseFacade.claim(securityUtil.getUsername(), securityUtil.getPassword(), taskId);
@@ -42,6 +44,7 @@ public class TaskFacade implements org.a
 		}
     }
 
+    @Override
     public void fail(String taskId) {
     	try {
     		hiseFacade.fail(securityUtil.getUsername(), securityUtil.getPassword(), taskId);
@@ -50,6 +53,7 @@ public class TaskFacade implements org.a
 		}
     }
 
+    @Override
     public void complete(String taskId) {
 	    try {
 	    	hiseFacade.complete(securityUtil.getUsername(), securityUtil.getPassword(), taskId, null);
@@ -58,6 +62,7 @@ public class TaskFacade implements org.a
 		}
     }
 
+    @Override
     public void start(String taskId) {
 	    try {
 	    	hiseFacade.start(securityUtil.getUsername(), securityUtil.getPassword(), taskId);

Modified: incubator/hise/trunk/hise-karaf/pom.xml
URL: http://svn.apache.org/viewvc/incubator/hise/trunk/hise-karaf/pom.xml?rev=1151066&r1=1151065&r2=1151066&view=diff
==============================================================================
--- incubator/hise/trunk/hise-karaf/pom.xml (original)
+++ incubator/hise/trunk/hise-karaf/pom.xml Tue Jul 26 12:01:15 2011
@@ -52,7 +52,6 @@
       <plugin>
           <groupId>org.codehaus.mojo</groupId>
           <artifactId>build-helper-maven-plugin</artifactId>
-          <version>1.5</version>
           <executions>
             <execution>
               <id>attach-artifacts</id>

Modified: incubator/hise/trunk/hise-services/src/main/java/org/apache/hise/api/Management.java
URL: http://svn.apache.org/viewvc/incubator/hise/trunk/hise-services/src/main/java/org/apache/hise/api/Management.java?rev=1151066&r1=1151065&r2=1151066&view=diff
==============================================================================
--- incubator/hise/trunk/hise-services/src/main/java/org/apache/hise/api/Management.java (original)
+++ incubator/hise/trunk/hise-services/src/main/java/org/apache/hise/api/Management.java Tue Jul 26 12:01:15 2011
@@ -112,6 +112,11 @@ public interface Management {
 	 public NominateResponseDocument nominate(NominateDocument nominate, String name) throws IllegalArgumentFault, IllegalStateFault, IllegalAccessFault;
 	
 	 public SetPriorityResponseDocument setPriority(Long id, java.math.BigInteger priority, String name) throws IllegalArgumentFault, IllegalStateFault, IllegalAccessFault;
-	 
+
+     public void setSkipable(Long id);
+
+     void recalculateValues(String taskDefinitionKey);
+
+
 	}
 

Modified: incubator/hise/trunk/hise-services/src/main/java/org/apache/hise/dao/Comment.java
URL: http://svn.apache.org/viewvc/incubator/hise/trunk/hise-services/src/main/java/org/apache/hise/dao/Comment.java?rev=1151066&r1=1151065&r2=1151066&view=diff
==============================================================================
--- incubator/hise/trunk/hise-services/src/main/java/org/apache/hise/dao/Comment.java (original)
+++ incubator/hise/trunk/hise-services/src/main/java/org/apache/hise/dao/Comment.java Tue Jul 26 12:01:15 2011
@@ -22,6 +22,16 @@ package org.apache.hise.dao;
 import javax.persistence.*;
 import java.util.Date;
 
+import javax.persistence.Column;
+import javax.persistence.Entity;
+import javax.persistence.GeneratedValue;
+import javax.persistence.Id;
+import javax.persistence.JoinColumn;
+import javax.persistence.ManyToOne;
+import javax.persistence.Table;
+import javax.persistence.Temporal;
+import javax.persistence.TemporalType;
+
 /**
  * Task content.
  *
@@ -50,9 +60,7 @@ public class Comment extends JpaBase {
     @JoinColumn(name = "TASK_ID")
     private Task task;
     
-    public Comment() {
-
-    }
+    public Comment() {}
 
     public Comment(final String content, final Task taskDto, final String userName) {
         this.content = content;

Modified: incubator/hise/trunk/hise-services/src/main/java/org/apache/hise/dao/HISEDao.java
URL: http://svn.apache.org/viewvc/incubator/hise/trunk/hise-services/src/main/java/org/apache/hise/dao/HISEDao.java?rev=1151066&r1=1151065&r2=1151066&view=diff
==============================================================================
--- incubator/hise/trunk/hise-services/src/main/java/org/apache/hise/dao/HISEDao.java (original)
+++ incubator/hise/trunk/hise-services/src/main/java/org/apache/hise/dao/HISEDao.java Tue Jul 26 12:01:15 2011
@@ -55,7 +55,7 @@ public class HISEDao extends JpaDaoSuppo
             }
         });
     }
-    
+
     public OrgEntity getOrgEntity(final String name) {
         return (OrgEntity) getJpaTemplate().execute(new JpaCallback() {
             public Object doInJpa(EntityManager em) throws PersistenceException {
@@ -87,6 +87,14 @@ public class HISEDao extends JpaDaoSuppo
 					query.setMaxResults(taskQuery.getMaxTasks());
 				}
 
+                if(taskQuery.getFromTaskNumber() != null) {
+                    query.setFirstResult(taskQuery.getFromTaskNumber());
+                    //H2 work-around, H2 requires limit to be present for using offset.
+                    if(taskQuery.getMaxTasks() == null) {
+                        query.setMaxResults(Integer.MAX_VALUE - 1);
+                    }
+                }
+
 				List<Task> tasks = query.getResultList();
 
 				if (taskQuery.getWorkQueue() != null && !taskQuery.getWorkQueue().equals("")) {
@@ -100,8 +108,17 @@ public class HISEDao extends JpaDaoSuppo
 
 	}
 
+    public Long countUserTasks(final TaskQuery taskQuery) {
+        return (Long) getJpaTemplate().execute(new JpaCallback() {
+
+            public Object doInJpa(EntityManager em) throws PersistenceException {
+                return (Long) buildSQLQueryForTaskQueryCount(taskQuery, em).getSingleResult();
+            }
+        });
+    }
+
 	public static  Query buildSQLQueryForTaskQuery(TaskQuery query, EntityManager em) {
-		Vector<Object> q = new Vector<Object>();
+		List<Object> q = new ArrayList<Object>();
 		q.add("select distinct t from Task t, TaskOrgEntity e where ");
 		
 		if(addStatuses(q, query)) 
@@ -116,15 +133,42 @@ public class HISEDao extends JpaDaoSuppo
 		if(addCreatedOnClause(q, query))
 			q.add(" and ");
 		
-		if(!addWhereClause(q, query))
-			if(q.size()>1) q.setSize(q.size()-1);
+		if(!addWhereClause(q, query)) {
+			if(q.size()>1) {
+                            q.remove(q.size() - 1);
+                        }
+                }
 
-		q.add(" order by t." + (query.getOrderByClause() == null ? "id" : query.getOrderByClause()));
-		
+		q.add(" order by t." + (query.getOrderByClause() == null ? "id" : query.getOrderByClause()));		
 		return new JpaQueryBuilder().buildQuery(em, q.toArray());	
 	}
+
+	public static  Query buildSQLQueryForTaskQueryCount(TaskQuery query, EntityManager em) {
+		List<Object> q = new ArrayList<Object>();
+		q.add("select count(distinct t) from Task t, TaskOrgEntity e where ");
+
+		if(addStatuses(q, query))
+			q.add(" and ");
+
+		if(addOrgEntity(q, query))
+			q.add(" and ");
+
+		if(addGenericHumanRole(q, query))
+			q.add(" and ");
+
+		if(addCreatedOnClause(q, query))
+			q.add(" and ");
+
+		if(!addWhereClause(q, query)) {
+			if(q.size()>1) {
+                            q.remove(q.size() - 1);
+                        }
+                }
+
+		return new JpaQueryBuilder().buildQuery(em, q.toArray());
+	}
     
-	private static boolean addOrgEntity(Vector<Object> q, TaskQuery query){
+	private static boolean addOrgEntity(List<Object> q, TaskQuery query){
 		if(query.getGenericHumanRole() != null && query.getGenericHumanRole().equals(GenericHumanRole.ACTUALOWNER)){
 			return false;
 		}
@@ -134,9 +178,9 @@ public class HISEDao extends JpaDaoSuppo
 			q.add(" e.task = t and (e.name = :user and e.type = :constUser");
 			q.add(new JQBParam("user", query.getUser()));
 			q.add(new JQBParam("constUser", TaskOrgEntity.OrgEntityType.USER));
-			q.add( new JQBParam("groups", query.getUserGroups(), 
+			q.add( new JQBParam("groups", query.getUserGroups(),
 				new Object[] {
-                	" or e.name in (:groups) and e.type = :constGroup", 
+                	" or e.name in (:groups) and e.type = :constGroup",
                 	new JQBParam("constGroup", TaskOrgEntity.OrgEntityType.GROUP)
             	}));
 		}else{
@@ -150,13 +194,13 @@ public class HISEDao extends JpaDaoSuppo
 		
 	}
 	
-	private static boolean addWhereClause(Vector<Object> q, TaskQuery query) {
+	private static boolean addWhereClause(List<Object> q, TaskQuery query) {
 		String clause=query.getWhereClause();
     	if(clause==null) return false;
     	return (createWhereClause(q, clause, "addition"));
 	}
 
-	private static boolean addGenericHumanRole(Vector<Object> q, TaskQuery query){
+	private static boolean addGenericHumanRole(List<Object> q, TaskQuery query){
         if(query.getGenericHumanRole()==null) return false;
         switch (query.getGenericHumanRole()) {
         case ACTUALOWNER:
@@ -181,19 +225,23 @@ public class HISEDao extends JpaDaoSuppo
         }
 	}
 	
-	private static boolean createWhereClause(Vector<Object> q, String clause, String name){
+	private static boolean createWhereClauseOneInstance(List<Object> q, String clause, String name){
     	StringTokenizer st = new StringTokenizer(clause, "<>=", true);
-    	Vector<String> tokens=new Vector<String>();
-    	String operands=new String("");
-    	String value=new String("");
+    	String operands = "";
+    	String value = "";
     	if(st.countTokens()<3) return false;
-    	String entity=st.nextToken();
+    	String entity=st.nextToken().trim();
     	while(st.hasMoreTokens()){
     			String token=st.nextToken();
-    			if(st.hasMoreTokens()) operands+=token;
-    			else value=token;
+    			if(st.hasMoreTokens()) operands+=token.trim();
+    			else value=token.trim();
     	}
-    	
+
+        if (value.contains("*")) {
+            value = value.replaceAll("\\*", "%");
+            operands = "LIKE";
+        }
+
     	StringToConverter conv=StringToConverterFabric.createConverter(value);
 		Object temp=conv.convert(value);
 		
@@ -205,17 +253,35 @@ public class HISEDao extends JpaDaoSuppo
 		return true;
 		
 	}
+
 	
-    private static boolean addCreatedOnClause(Vector<Object> q, TaskQuery query) {
+    private static boolean addCreatedOnClause(List<Object> q, TaskQuery query) {
     	if(query.getCreatedOnClause()==null)
     		return false;
-    	String clause = new String("createdOn"+query.getCreatedOnClause());
+    	String clause = "createdOn" + query.getCreatedOnClause();
     	return createWhereClause(q, clause, "createdOn");
     	
 	}
-	
-	
-    private static boolean addStatuses(Vector<Object> q, TaskQuery query) {
+
+    private static boolean createWhereClause(List<Object> q, String clause, String name) {
+        String[] clauses = clause.split("AND");
+        boolean out = false;
+        for (int i=0;i<clauses.length;i++) {
+            boolean current = createWhereClauseOneInstance(q, clauses[i], name+i);
+            if (current) {
+               q.add(" and ");
+            }
+            out = out || current;
+        }
+        if (out) {
+            q.remove(q.size()-1);
+        }
+
+        return out;
+    }
+
+
+    private static boolean addStatuses(List<Object> q, TaskQuery query) {
     	if(!query.getStatuses().isEmpty()){
     		q.add(" ( ");
     		for(int i=0; i<query.getStatuses().size(); ++i){
@@ -245,10 +311,20 @@ public class HISEDao extends JpaDaoSuppo
         });
     }
 
+    public List<Task> listTasks(final String taskDefinitionKey) {
+        return (List<Task>) getJpaTemplate().executeFind(new JpaCallback() {
+            public Object doInJpa(EntityManager em) throws PersistenceException {
+                return em.createQuery("select j from Task j where j.taskDefinitionKey = :key")
+                .setParameter("key", taskDefinitionKey)
+                .getResultList();
+            }
+        });
+    }
+
     public <T> T find(Class<T> what, Object id) {
         return getJpaTemplate().find(what, id);
     }
-    
+
     public void remove(Object o) {
         getJpaTemplate().remove(o);
         getJpaTemplate().flush();
@@ -258,7 +334,7 @@ public class HISEDao extends JpaDaoSuppo
         getJpaTemplate().persist(o);
         getJpaTemplate().flush();
     }
-    
+
     public <T> void clearAllRecords(Class<T> clazz) {
         log.debug("select t from " + clazz.getName());
         for (Object o : getJpaTemplate().find("select t from " + clazz.getName() + " t")) {
@@ -278,9 +354,8 @@ public class HISEDao extends JpaDaoSuppo
 						//temp1=parameters.get(i);
 						q.setParameter(i+1, parameters.get(i));
 					}
-
-					List res = q.getResultList();					
-					return res;					
+					
+					return q.getResultList();
 				}
 			});
 		
@@ -288,18 +363,21 @@ public class HISEDao extends JpaDaoSuppo
 	
 	}
 	
-	private List<Task> taskFilterByQuery(List<Task> tasks, TaskQuery query){
-    	query.setWorkQueue(null);
-    	query.setGenericHumanRole(null);
-    	List<org.apache.hise.dao.Task> taskWithPossibleAccess = getUserTasks(query);
-    	List<org.apache.hise.dao.Task> filteredTasks = new ArrayList<org.apache.hise.dao.Task>();
-    	
-    	for(org.apache.hise.dao.Task i : tasks){
-    		if(taskWithPossibleAccess.contains(i)){
-    			filteredTasks.add(i);
-    		}
-    	}
-    	return filteredTasks;
+    private List<Task> taskFilterByQuery(List<Task> tasks, TaskQuery query){
+        query.setWorkQueue(null);
+        query.setGenericHumanRole(null);
+        query.setMaxTasks(null);
+        query.setFromTaskNumber(null);
+        List<org.apache.hise.dao.Task> taskWithPossibleAccess = getUserTasks(query);
+        List<org.apache.hise.dao.Task> filteredTasks = new ArrayList<org.apache.hise.dao.Task>();
+     
+        for(org.apache.hise.dao.Task i : tasks){
+            if(taskWithPossibleAccess.contains(i)){
+                filteredTasks.add(i);
+            }
+        }
+   
+        return filteredTasks;
     }
 
 }

Modified: incubator/hise/trunk/hise-services/src/main/java/org/apache/hise/dao/Message.java
URL: http://svn.apache.org/viewvc/incubator/hise/trunk/hise-services/src/main/java/org/apache/hise/dao/Message.java?rev=1151066&r1=1151065&r2=1151066&view=diff
==============================================================================
--- incubator/hise/trunk/hise-services/src/main/java/org/apache/hise/dao/Message.java (original)
+++ incubator/hise/trunk/hise-services/src/main/java/org/apache/hise/dao/Message.java Tue Jul 26 12:01:15 2011
@@ -40,7 +40,7 @@ import org.apache.commons.logging.LogFac
 @Entity
 @Table(name = "HISE_MESSAGE")
 public class Message extends JpaBase {
-
+    
     @Id
     @GeneratedValue
     private Long id;

Modified: incubator/hise/trunk/hise-services/src/main/java/org/apache/hise/dao/Task.java
URL: http://svn.apache.org/viewvc/incubator/hise/trunk/hise-services/src/main/java/org/apache/hise/dao/Task.java?rev=1151066&r1=1151065&r2=1151066&view=diff
==============================================================================
--- incubator/hise/trunk/hise-services/src/main/java/org/apache/hise/dao/Task.java (original)
+++ incubator/hise/trunk/hise-services/src/main/java/org/apache/hise/dao/Task.java Tue Jul 26 12:01:15 2011
@@ -209,6 +209,37 @@ public class Task extends JpaBase {
     
     private boolean savingStateHistory;
 
+    @Temporal(javax.persistence.TemporalType.TIMESTAMP)
+    private Date completeBy;
+
+    private String presentationSubject;
+
+    private String presentationDescription;
+
+    public Date getCompleteBy() {
+        return completeBy;
+    }
+
+    public void setCompleteBy(Date completeBy) {
+        this.completeBy = completeBy;
+    }
+
+    public String getPresentationSubject() {
+        return presentationSubject;
+    }
+
+    public void setPresentationSubject(String presentationSubject) {
+        this.presentationSubject = presentationSubject;
+    }
+
+    public String getPresentationDescription() {
+        return presentationDescription;
+    }
+
+    public void setPresentationDescription(String presentationDescription) {
+        this.presentationDescription = presentationDescription;
+    }
+
     public boolean isSavingTaskHistory() {
 		return savingStateHistory;
 	}
@@ -482,4 +513,6 @@ public class Task extends JpaBase {
         }
         return result;
     }
+
+
 }

Modified: incubator/hise/trunk/hise-services/src/main/java/org/apache/hise/dao/TaskQuery.java
URL: http://svn.apache.org/viewvc/incubator/hise/trunk/hise-services/src/main/java/org/apache/hise/dao/TaskQuery.java?rev=1151066&r1=1151065&r2=1151066&view=diff
==============================================================================
--- incubator/hise/trunk/hise-services/src/main/java/org/apache/hise/dao/TaskQuery.java (original)
+++ incubator/hise/trunk/hise-services/src/main/java/org/apache/hise/dao/TaskQuery.java Tue Jul 26 12:01:15 2011
@@ -45,6 +45,7 @@ public class TaskQuery {
     
     //no limit on number of returned tasks 
     private Integer maxTasks = null;
+    private Integer fromTaskNumber = null;
 
     public String getUser() {
         return user;
@@ -125,4 +126,13 @@ public class TaskQuery {
 	public String getOrderByClause() {
 	    return orderByClause;
     }
+
+    public Integer getFromTaskNumber() {
+        return fromTaskNumber;
+    }
+
+    public void setFromTaskNumber(Integer fromTaskNumber) {
+        this.fromTaskNumber = fromTaskNumber;
+    }
+        
 }

Modified: incubator/hise/trunk/hise-services/src/main/java/org/apache/hise/engine/ManagementImpl.java
URL: http://svn.apache.org/viewvc/incubator/hise/trunk/hise-services/src/main/java/org/apache/hise/engine/ManagementImpl.java?rev=1151066&r1=1151065&r2=1151066&view=diff
==============================================================================
--- incubator/hise/trunk/hise-services/src/main/java/org/apache/hise/engine/ManagementImpl.java (original)
+++ incubator/hise/trunk/hise-services/src/main/java/org/apache/hise/engine/ManagementImpl.java Tue Jul 26 12:01:15 2011
@@ -21,6 +21,7 @@ package org.apache.hise.engine;
 
 import java.math.BigInteger;
 import java.util.ArrayList;
+import java.util.Collections;
 import java.util.List;
 
 import org.apache.hise.api.HISEEngine;
@@ -81,253 +82,269 @@ import org.apache.hise.lang.xsd.htdt.TTi
 import org.apache.hise.lang.xsd.htdt.impl.StartDocumentImpl;
 
 public class ManagementImpl implements Management {
-	
-	private HISEEngine hiseEngine;
 
-	private TaskOperationsAdministrativeImpl taskOperations;
-	
-	private TaskOperations to;
-	
-	private TaskOperationsAdministrative adminOperations;
-	
-	public String getText(){
-		return new String("test");
-	}
-
-	public HISEEngine getHiseEngine() {
-		return hiseEngine;
-	}
-
-	public void setHiseEngine(HISEEngine hiseEngine) {
-		this.hiseEngine = hiseEngine;
-	}
-	
-
-	public GetMyTasksResponseDocument getMyTasks(String userName, String taskType,
-		String genericHumanRole, String workQueue, List<Enum> status,
-		String whereClause, String orderByClause, String createdOnClause, Integer maxTasks,
-		Integer fromTaskNumber) throws IllegalArgumentFault, IllegalStateFault {
+    private HISEEngine hiseEngine;
 
-			adminOperations.setUserName(userName);
-			return adminOperations.getMyTasks( taskType, genericHumanRole, workQueue, status, whereClause, orderByClause, createdOnClause, maxTasks, fromTaskNumber);
+    private TaskOperationsAdministrativeImpl taskOperations;
+
+    private TaskOperations to;
+
+    private TaskOperationsAdministrative adminOperations;
+
+    public String getText() {
+        return new String("test");
+    }
+
+    public HISEEngine getHiseEngine() {
+        return hiseEngine;
+    }
+
+    public void setHiseEngine(HISEEngine hiseEngine) {
+        this.hiseEngine = hiseEngine;
+    }
+
+
+    public GetMyTasksResponseDocument getMyTasks(String userName, String taskType,
+                                                 String genericHumanRole, String workQueue, List<Enum> status,
+                                                 String whereClause, String orderByClause, String createdOnClause, Integer maxTasks,
+                                                 Integer fromTaskNumber) throws IllegalArgumentFault, IllegalStateFault {
+
+        adminOperations.setUserName(userName);
+        return adminOperations.getMyTasks(taskType, genericHumanRole, workQueue, status, whereClause, orderByClause, createdOnClause, maxTasks, fromTaskNumber);
 
     }
-	
+
     public GetMyTaskAbstractsResponseDocument getMyTaskAbstracts(String userName, String taskType, String genericHumanRole, String workQueue, List<TStatus.Enum> status, String whereClause,
-            String createdOnClause, Integer maxTasks, Integer fromTaskNumber) throws IllegalArgumentFault, IllegalStateFault {
-    	
-    		adminOperations.setUserName(userName);
-    		return adminOperations.getMyTaskAbstracts(taskType, genericHumanRole, workQueue, status, whereClause, createdOnClause, maxTasks, fromTaskNumber);
+                                                                 String createdOnClause, Integer maxTasks, Integer fromTaskNumber) throws IllegalArgumentFault, IllegalStateFault {
+
+        adminOperations.setUserName(userName);
+        return adminOperations.getMyTaskAbstracts(taskType, genericHumanRole, workQueue, status, whereClause, createdOnClause, maxTasks, fromTaskNumber);
     }
-    
-    public HISEDao getHiseDao(){
-    	return hiseEngine.getHiseDao();
-    	
+
+    public HISEDao getHiseDao() {
+        return hiseEngine.getHiseDao();
+
     }
 
 
-	public void delegate(String identifier,
-			TOrganizationalEntity organizationalEntity, String name) throws RecipientNotAllowed, IllegalStateFault {
-        Task task = Task.load((HISEEngineImpl) hiseEngine, new Long(identifier));  
+    public void delegate(String identifier,
+                         TOrganizationalEntity organizationalEntity, String name) throws RecipientNotAllowed, IllegalStateFault {
+        Task task = Task.load((HISEEngineImpl) hiseEngine, new Long(identifier));
         String userID = task.checkCanDelegate(organizationalEntity);
         adminOperations.setUserName(name);
-        
+
         try {
-        	 task.setCurrentUser(adminOperations.getUserName());
-			task.setActualOwner(userID);
-			task.addGenericHumanRole(userID, GenericHumanRole.POTENTIALOWNERS);
-		} catch (HiseIllegalStateException e) {
-			throw new IllegalStateFault();
-		}
-		
-	}
-	public void delegate(String identifier, List<String> usersList, List<String> groupsList,  String userName) throws RecipientNotAllowed, IllegalStateFault{
-		TOrganizationalEntity tOrganizational = TOrganizationalEntity.Factory.newInstance();
-        
-		TUserlist users=TUserlist.Factory.newInstance();
-        for(String name : usersList)
-        		users.getUserList().add(name);
-        
-        TGrouplist groups=TGrouplist.Factory.newInstance();
-        for(String name: groupsList)
-        		groups.getGroupList().add(name);
-        
+            task.setCurrentUser(name);
+            task.setActualOwner(userID);
+            task.addGenericHumanRole(userID, GenericHumanRole.POTENTIALOWNERS);
+        } catch (HiseIllegalStateException e) {
+            throw new IllegalStateFault();
+        }
+
+    }
+
+    public void delegate(String identifier, List<String> usersList, List<String> groupsList, String userName) throws RecipientNotAllowed, IllegalStateFault {
+        TOrganizationalEntity tOrganizational = TOrganizationalEntity.Factory.newInstance();
+
+        TUserlist users = TUserlist.Factory.newInstance();
+        for (String name : usersList)
+            users.getUserList().add(name);
+
+        TGrouplist groups = TGrouplist.Factory.newInstance();
+        for (String name : groupsList)
+            groups.getGroupList().add(name);
+
         tOrganizational.setGroups(groups);
         tOrganizational.setUsers(users);
-        
+
         delegate(identifier, tOrganizational, userName);
-	}
-	
-	public StartResponseDocument start(StartDocument start, String name)
-	throws IllegalArgumentFault, IllegalStateFault, IllegalAccessFault {
-		
-		adminOperations.setUserName(name);
-			return adminOperations.start(start);
-	}
-	public StartResponseDocument start(String taskIdentifier, String name)throws IllegalArgumentFault, IllegalStateFault, IllegalAccessFault {
-		
-		StartDocument startDoc = StartDocument.Factory.newInstance();
-		Start start=Start.Factory.newInstance();
-		start.setIdentifier(taskIdentifier);
-		startDoc.setStart(start);
-		adminOperations.setUserName(name);
-			return adminOperations.start(startDoc);
-	}
-	
-	public CompleteResponseDocument complete(CompleteDocument complete, String name) throws IllegalArgumentFault, IllegalStateFault, IllegalAccessFault{
-		adminOperations.setUserName(name);
-		return adminOperations.complete(complete);
-		
-	}
-	
-	public StopResponseDocument stop(StopDocument stop, String name) throws IllegalArgumentFault, IllegalStateFault, IllegalAccessFault{
-		adminOperations.setUserName(name);
-		return adminOperations.stop(stop);
-	}
-	public StopResponseDocument stop(String id, String name) throws IllegalArgumentFault, IllegalStateFault, IllegalAccessFault{
-		adminOperations.setUserName(name);
-		return adminOperations.stop(Long.parseLong(id));
-	}
-	
-	
-	public TaskOperationsAdministrativeImpl getTaskOperations() {
-		return taskOperations;
-	}
-
-	public void setTaskOperations(TaskOperationsAdministrativeImpl taskOperations) {
-		this.taskOperations = taskOperations;
-	}
-
-	public TaskOperations getTo() {
-		return to;
-	}
-
-	public void setTo(TaskOperations to) {
-		this.to = to;
-		
-	}
-	public TaskOperationsAdministrative getAdminOperations() {
-		return adminOperations;
-	}
-
-	public void setAdminOperations(TaskOperationsAdministrative adminOperations) {
-		this.adminOperations = adminOperations;
-	}
-	
-	
-	public GetTaskInfoResponseDocument getTaskInfo(GetTaskInfoDocument getTaskInfo) throws IllegalArgumentFault{
-		 return adminOperations.getTaskInfo(getTaskInfo);
-	 }
-	public GetTaskInfoResponseDocument getTaskInfo(Long id) throws IllegalArgumentFault{
-		 return adminOperations.getTaskInfo(id);
-	 }
-	
-	
-     public ReleaseResponseDocument release(ReleaseDocument release, String name) throws IllegalArgumentFault, IllegalStateFault, IllegalAccessFault{
-		 adminOperations.setUserName(name);
-		 return adminOperations.release(release);
-	 }
-	 public ReleaseResponseDocument release(Long id, String name) throws IllegalArgumentFault, IllegalStateFault, IllegalAccessFault{
-		 adminOperations.setUserName(name);
-		 return adminOperations.release(id);
-	 }
-	 
-	
-	 public GetMyTaskAbstractsResponseDocument getMyTaskAbstracts(GetMyTaskAbstractsDocument getMyTaskAbstracts, String name) throws IllegalArgumentFault, IllegalStateFault{
-		 adminOperations.setUserName(name);
-		 return adminOperations.getMyTaskAbstracts(getMyTaskAbstracts);
-	 }
-	 
-	 
-public NominateResponseDocument nominate(NominateDocument nominate, String name) throws IllegalArgumentFault, IllegalStateFault, IllegalAccessFault{
-		 adminOperations.setUserName(name);
-		 return adminOperations.nominate(nominate);		 
-	 }
-
-public SuspendResponseDocument suspend(SuspendDocument suspend, String name)
-		throws IllegalArgumentFault, IllegalStateFault, IllegalAccessFault {
-	// TODO Auto-generated method stub
-	return null;
-}
+    }
 
-public SuspendResponseDocument suspend(Long id, String name)
-		throws IllegalArgumentFault, IllegalStateFault, IllegalAccessFault {
-	 adminOperations.setUserName(name);
-	 return adminOperations.suspend(id);
-}
+    public StartResponseDocument start(StartDocument start, String name)
+            throws IllegalArgumentFault, IllegalStateFault, IllegalAccessFault {
 
-public SuspendUntilResponseDocument suspendUntil(
-		SuspendUntilDocument suspendUntil, String name)
-		throws IllegalArgumentFault, IllegalStateFault, IllegalAccessFault {
-	// TODO Auto-generated method stub
-	return null;
-}
+        adminOperations.setUserName(name);
+        return adminOperations.start(start);
+    }
 
-public SuspendUntilResponseDocument suspendUntil(Long id, TTime time,
-		String name) throws IllegalArgumentFault, IllegalStateFault,
-		IllegalAccessFault {
-	 adminOperations.setUserName(name);
-	 return adminOperations.suspendUntil(id, time);
-}
+    public StartResponseDocument start(String taskIdentifier, String name) throws IllegalArgumentFault, IllegalStateFault, IllegalAccessFault {
 
-public RemoveResponseDocument remove(RemoveDocument remove, String name)
-		throws IllegalArgumentFault, IllegalAccessFault {
-	// TODO Auto-generated method stub
-	return null;
-}
+        StartDocument startDoc = StartDocument.Factory.newInstance();
+        Start start = Start.Factory.newInstance();
+        start.setIdentifier(taskIdentifier);
+        startDoc.setStart(start);
+        adminOperations.setUserName(name);
+        return adminOperations.start(startDoc);
+    }
 
-public RemoveResponseDocument remove(Long id, String name)
-		throws IllegalArgumentFault, IllegalAccessFault {
-	 adminOperations.setUserName(name);
-	 return adminOperations.remove(id);
-}
+    public CompleteResponseDocument complete(CompleteDocument complete, String name) throws IllegalArgumentFault, IllegalStateFault, IllegalAccessFault {
+        adminOperations.setUserName(name);
+        return adminOperations.complete(complete);
 
-public ResumeResponseDocument resume(ResumeDocument resume, String name)
-		throws IllegalArgumentFault, IllegalStateFault, IllegalAccessFault {
-	// TODO Auto-generated method stub
-	return null;
-}
+    }
 
-public ResumeResponseDocument resume(Long id, String name)
-		throws IllegalArgumentFault, IllegalStateFault, IllegalAccessFault {
-	 adminOperations.setUserName(name);
-	 return adminOperations.resume(id);
-}
+    public StopResponseDocument stop(StopDocument stop, String name) throws IllegalArgumentFault, IllegalStateFault, IllegalAccessFault {
+        adminOperations.setUserName(name);
+        return adminOperations.stop(stop);
+    }
 
-public ActivateResponseDocument activate(ActivateDocument activate, String name)
-		throws IllegalArgumentFault, IllegalStateFault, IllegalAccessFault {
-	// TODO Auto-generated method stub
-	return null;
-}
+    public StopResponseDocument stop(String id, String name) throws IllegalArgumentFault, IllegalStateFault, IllegalAccessFault {
+        adminOperations.setUserName(name);
+        return adminOperations.stop(Long.parseLong(id));
+    }
 
-public ActivateResponseDocument activate(Long id, String name)
-		throws IllegalArgumentFault, IllegalStateFault, IllegalAccessFault {
-	 adminOperations.setUserName(name);
-	 return adminOperations.activate(id);
-}
 
-public ClaimResponseDocument claim(ClaimDocument claim, String name)
-		throws IllegalArgumentFault, IllegalStateFault, IllegalAccessFault {
-	// TODO Auto-generated method stub
-	return null;
-}
+    public TaskOperationsAdministrativeImpl getTaskOperations() {
+        return taskOperations;
+    }
 
-public ClaimResponseDocument claim(Long id, String name)
-		throws IllegalArgumentFault, IllegalStateFault, IllegalAccessFault {
-	 adminOperations.setUserName(name);
-	 return adminOperations.claim(id);
-}
+    public void setTaskOperations(TaskOperationsAdministrativeImpl taskOperations) {
+        this.taskOperations = taskOperations;
+    }
 
-public SetPriorityResponseDocument setPriority(Long id, java.math.BigInteger priority, String name)   
-		throws IllegalArgumentFault, IllegalStateFault, IllegalAccessFault {
-	 adminOperations.setUserName(name);
-	 return adminOperations.setPriority(id, priority);
-}
+    public TaskOperations getTo() {
+        return to;
+    }
+
+    public void setTo(TaskOperations to) {
+        this.to = to;
+
+    }
+
+    public TaskOperationsAdministrative getAdminOperations() {
+        return adminOperations;
+    }
+
+    public void setAdminOperations(TaskOperationsAdministrative adminOperations) {
+        this.adminOperations = adminOperations;
+    }
 
 
+    public GetTaskInfoResponseDocument getTaskInfo(GetTaskInfoDocument getTaskInfo) throws IllegalArgumentFault {
+        return adminOperations.getTaskInfo(getTaskInfo);
+    }
+
+    public GetTaskInfoResponseDocument getTaskInfo(Long id) throws IllegalArgumentFault {
+        return adminOperations.getTaskInfo(id);
+    }
+
+
+    public ReleaseResponseDocument release(ReleaseDocument release, String name) throws IllegalArgumentFault, IllegalStateFault, IllegalAccessFault {
+        adminOperations.setUserName(name);
+        return adminOperations.release(release);
+    }
+
+    public ReleaseResponseDocument release(Long id, String name) throws IllegalArgumentFault, IllegalStateFault, IllegalAccessFault {
+        adminOperations.setUserName(name);
+        return adminOperations.release(id);
+    }
+
+
+    public GetMyTaskAbstractsResponseDocument getMyTaskAbstracts(GetMyTaskAbstractsDocument getMyTaskAbstracts, String name) throws IllegalArgumentFault, IllegalStateFault {
+        adminOperations.setUserName(name);
+        return adminOperations.getMyTaskAbstracts(getMyTaskAbstracts);
+    }
+
+
+    public NominateResponseDocument nominate(NominateDocument nominate, String name) throws IllegalArgumentFault, IllegalStateFault, IllegalAccessFault {
+        adminOperations.setUserName(name);
+        return adminOperations.nominate(nominate);
+    }
+
+    public SuspendResponseDocument suspend(SuspendDocument suspend, String name)
+            throws IllegalArgumentFault, IllegalStateFault, IllegalAccessFault {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    public SuspendResponseDocument suspend(Long id, String name)
+            throws IllegalArgumentFault, IllegalStateFault, IllegalAccessFault {
+        adminOperations.setUserName(name);
+        return adminOperations.suspend(id);
+    }
+
+    public SuspendUntilResponseDocument suspendUntil(
+            SuspendUntilDocument suspendUntil, String name)
+            throws IllegalArgumentFault, IllegalStateFault, IllegalAccessFault {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    public SuspendUntilResponseDocument suspendUntil(Long id, TTime time,
+                                                     String name) throws IllegalArgumentFault, IllegalStateFault,
+            IllegalAccessFault {
+        adminOperations.setUserName(name);
+        return adminOperations.suspendUntil(id, time);
+    }
 
+    public RemoveResponseDocument remove(RemoveDocument remove, String name)
+            throws IllegalArgumentFault, IllegalAccessFault {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    public RemoveResponseDocument remove(Long id, String name)
+            throws IllegalArgumentFault, IllegalAccessFault {
+        adminOperations.setUserName(name);
+        return adminOperations.remove(id);
+    }
+
+    public ResumeResponseDocument resume(ResumeDocument resume, String name)
+            throws IllegalArgumentFault, IllegalStateFault, IllegalAccessFault {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    public ResumeResponseDocument resume(Long id, String name)
+            throws IllegalArgumentFault, IllegalStateFault, IllegalAccessFault {
+        adminOperations.setUserName(name);
+        return adminOperations.resume(id);
+    }
+
+    public ActivateResponseDocument activate(ActivateDocument activate, String name)
+            throws IllegalArgumentFault, IllegalStateFault, IllegalAccessFault {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    public ActivateResponseDocument activate(Long id, String name)
+            throws IllegalArgumentFault, IllegalStateFault, IllegalAccessFault {
+        adminOperations.setUserName(name);
+        return adminOperations.activate(id);
+    }
 
-	
-	
+    public ClaimResponseDocument claim(ClaimDocument claim, String name)
+            throws IllegalArgumentFault, IllegalStateFault, IllegalAccessFault {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    public ClaimResponseDocument claim(Long id, String name)
+            throws IllegalArgumentFault, IllegalStateFault, IllegalAccessFault {
+        adminOperations.setUserName(name);
+        return adminOperations.claim(id);
+    }
+
+    public SetPriorityResponseDocument setPriority(Long id, java.math.BigInteger priority, String name)
+            throws IllegalArgumentFault, IllegalStateFault, IllegalAccessFault {
+        adminOperations.setUserName(name);
+        return adminOperations.setPriority(id, priority);
+    }
 
+
+    public void setSkipable(Long id) {
+        adminOperations.setUserName(null);
+        org.apache.hise.dao.Task t = getHiseDao().find(org.apache.hise.dao.Task.class, id);
+        t.setSkippable(true);
+    }
+
+
+    public void recalculateValues(String taskDefinitionKey) {
+        for (org.apache.hise.dao.Task task :
+                hiseEngine.getHiseDao().listTasks(taskDefinitionKey)) {
+            adminOperations.recalculateValues(task.getId());
+        };
+
+
+    }
 }

Modified: incubator/hise/trunk/hise-services/src/main/java/org/apache/hise/engine/jaxws/TaskOperationsAdministrative.java
URL: http://svn.apache.org/viewvc/incubator/hise/trunk/hise-services/src/main/java/org/apache/hise/engine/jaxws/TaskOperationsAdministrative.java?rev=1151066&r1=1151065&r2=1151066&view=diff
==============================================================================
--- incubator/hise/trunk/hise-services/src/main/java/org/apache/hise/engine/jaxws/TaskOperationsAdministrative.java (original)
+++ incubator/hise/trunk/hise-services/src/main/java/org/apache/hise/engine/jaxws/TaskOperationsAdministrative.java Tue Jul 26 12:01:15 2011
@@ -45,7 +45,6 @@ import org.apache.hise.lang.xsd.htdt.TTi
 
 public interface TaskOperationsAdministrative extends TaskOperations {
 
-	String getUserName();
 	void setUserName(String userNameinAdministrativeMode);
 	StopResponseDocument stop(Long id) throws IllegalArgumentFault, IllegalStateFault, IllegalAccessFault;
 	ReleaseResponseDocument release(Long id) throws IllegalArgumentFault, IllegalStateFault, IllegalAccessFault ;
@@ -61,4 +60,6 @@ public interface TaskOperationsAdministr
             Integer maxTasks, Integer fromTaskNumber) throws IllegalArgumentFault, IllegalStateFault;
     GetMyTaskAbstractsResponseDocument getMyTaskAbstracts(String taskType, String genericHumanRole, String workQueue, List<TStatus.Enum> status, String whereClause,
             String createdOnClause, Integer maxTasks, Integer fromTaskNumber) throws IllegalArgumentFault, IllegalStateFault;
+
+    void recalculateValues(Long taskId);
 }

Modified: incubator/hise/trunk/hise-services/src/main/java/org/apache/hise/engine/jaxws/TaskOperationsAdministrativeImpl.java
URL: http://svn.apache.org/viewvc/incubator/hise/trunk/hise-services/src/main/java/org/apache/hise/engine/jaxws/TaskOperationsAdministrativeImpl.java?rev=1151066&r1=1151065&r2=1151066&view=diff
==============================================================================
--- incubator/hise/trunk/hise-services/src/main/java/org/apache/hise/engine/jaxws/TaskOperationsAdministrativeImpl.java (original)
+++ incubator/hise/trunk/hise-services/src/main/java/org/apache/hise/engine/jaxws/TaskOperationsAdministrativeImpl.java Tue Jul 26 12:01:15 2011
@@ -1,31 +1,37 @@
 package org.apache.hise.engine.jaxws;
 
+import org.apache.hise.engine.HISEEngineImpl;
 import org.apache.hise.engine.wsdl.TaskOperations;
+import org.apache.hise.runtime.Task;
 
 
 
 
 public class TaskOperationsAdministrativeImpl extends TaskOperationsBaseImpl implements TaskOperationsAdministrative, TaskOperations{
 
-	private String userName;
+    //FIXME this should be done in some nicer way (see Management) but now at least it's more or less working
+	private ThreadLocal<String> userName = new ThreadLocal<String>();
 	@Override
 	public String getUserString() {
-		if(userName==null)
-			return new String("Administrator");
-		else
-			return userName;
+        return getUserName();
 	}
 
 
-	public String getUserName() {
-		if(userName==null)
+	private String getUserName() {
+		if(userName.get()==null)
 			return new String("Administrator");
 		else
-			return userName;
+			return userName.get();
 	}
 
 	public void setUserName(String userNameinAdministrativeMode) {
-		this.userName = userNameinAdministrativeMode;
+		this.userName.set(userNameinAdministrativeMode);
 	}
 
+    public void recalculateValues(Long taskId) {
+          Task task = Task.load(hiseEngine, taskId);
+        task.computeCalculatedValues();
+    }
+
+
 }

Modified: incubator/hise/trunk/hise-services/src/main/java/org/apache/hise/engine/jaxws/TaskOperationsBaseImpl.java
URL: http://svn.apache.org/viewvc/incubator/hise/trunk/hise-services/src/main/java/org/apache/hise/engine/jaxws/TaskOperationsBaseImpl.java?rev=1151066&r1=1151065&r2=1151066&view=diff
==============================================================================
--- incubator/hise/trunk/hise-services/src/main/java/org/apache/hise/engine/jaxws/TaskOperationsBaseImpl.java (original)
+++ incubator/hise/trunk/hise-services/src/main/java/org/apache/hise/engine/jaxws/TaskOperationsBaseImpl.java Tue Jul 26 12:01:15 2011
@@ -174,7 +174,7 @@ public abstract class TaskOperationsBase
     
     private final Log log = LogFactory.getLog(TaskOperationsBaseImpl.class);
 
-    private HISEEngineImpl hiseEngine;
+    protected HISEEngineImpl hiseEngine;
 
     protected WebServiceContext context;
     
@@ -236,21 +236,17 @@ public abstract class TaskOperationsBase
         query.setStatuses(status);
         query.setWhereClause(whereClause);
         query.setOrderByClause(orderByClause);
-        query.setCreatedOnClause(createdOnClause);        
+        query.setCreatedOnClause(createdOnClause);
+        query.setMaxTasks(maxTasks);
+        query.setFromTaskNumber(fromTaskNumber);
 
         List<org.apache.hise.dao.Task> tasks = hiseEngine.getHiseDao().getUserTasks(query);
-        if(maxTasks == null){
-        	maxTasks = tasks.size();
-        }
-   
-        int taskCounter = 0;
-        for(int i = fromTaskNumber; i < tasks.size() && taskCounter < maxTasks; ++i){
-        	TTask t = null;
-        	
-        	t = convertTasktoTTask(tasks.get(i));
+
+        for (int i = 0; i < tasks.size(); ++i) {
+            TTask t = null;
+
+            t = convertTasktoTTask(tasks.get(i));
             result.add(t);
-            
-            taskCounter++;
         }
 
         GetMyTasksResponseDocument responseDocument = GetMyTasksResponseDocument.Factory.newInstance();
@@ -258,6 +254,13 @@ public abstract class TaskOperationsBase
         TTask[] taskArray = new TTask[result.size()];
         taskArray = result.toArray(taskArray);
         response.setTaskAbstractArray(taskArray);
+        if(maxTasks != null) {
+            if(maxTasks > tasks.size() && (fromTaskNumber == null || fromTaskNumber == 0)) {
+                response.setMatchingTasksNo(tasks.size());
+            } else {
+                response.setMatchingTasksNo(hiseEngine.getHiseDao().countUserTasks(query));
+            }
+        }
         responseDocument.setGetMyTasksResponse(response);
 
         return responseDocument;
@@ -1272,15 +1275,12 @@ public abstract class TaskOperationsBase
         query.setWhereClause(whereClause);
         //query.setOrderByClause(orderByClause);
         query.setCreatedOnClause(createdOnClause);
-        query.setMaxTasks(null); //TODO maxTasks + fromTaskNumber
+        query.setMaxTasks(maxTasks);
+        query.setFromTaskNumber(fromTaskNumber);
 
-        List<org.apache.hise.dao.Task> tasks = hiseEngine.getHiseDao().getUserTasks(query);
-   
-        if(maxTasks == null) {
-        	maxTasks = Integer.MAX_VALUE;
-        }
+        List<org.apache.hise.dao.Task> tasks = hiseEngine.getHiseDao().getUserTasks(query);   
         
-        for (int i = fromTaskNumber, count = 0; i < tasks.size() && count < maxTasks; i++, count++) {
+        for (int i = 0; i < tasks.size(); i++) {
         	TTaskAbstract t = convertTasktoTTaskAbstract(tasks.get(i).getId());
         	result.add(t);
         }
@@ -1290,6 +1290,13 @@ public abstract class TaskOperationsBase
         TTaskAbstract[] taskArray = new TTaskAbstract[result.size()];
         taskArray = result.toArray(taskArray);
         response.setTaskAbstractArray(taskArray);
+        if(maxTasks != null) {
+            if(maxTasks > tasks.size()) {
+                response.setMatchingTasksNo(tasks.size());
+            } else {
+                response.setMatchingTasksNo(hiseEngine.getHiseDao().countUserTasks(query));
+            }
+        }
         responseDocument.setGetMyTaskAbstractsResponse(response);
 
         return responseDocument;
@@ -1344,7 +1351,7 @@ public abstract class TaskOperationsBase
 	/**
      * TODO extract converters to external class
      */
-    private TTask convertTask(Long id) {
+    private TTask convertTask(Long id) throws IllegalArgumentFault {
         Task task = Task.load(hiseEngine, id);
         org.apache.hise.dao.Task taskDto = task.getTaskDto();
 
@@ -1362,6 +1369,7 @@ public abstract class TaskOperationsBase
             result.setPresentationSubject(task.getTaskEvaluator().evalPresentationSubject());
             result.setName(taskDto.getTaskDefinitionName());
             result.setStatus(TStatus.Enum.forString(taskDto.getStatus().toString()));
+            result.setDeadlinesInfo(convertToDeadlinesInfo(taskDto));
 
         if (taskDto.getActualOwner() != null) {
             result.setActualOwner(taskDto.getActualOwner());

Modified: incubator/hise/trunk/hise-services/src/main/java/org/apache/hise/engine/store/HISERouteBuilder.java
URL: http://svn.apache.org/viewvc/incubator/hise/trunk/hise-services/src/main/java/org/apache/hise/engine/store/HISERouteBuilder.java?rev=1151066&r1=1151065&r2=1151066&view=diff
==============================================================================
--- incubator/hise/trunk/hise-services/src/main/java/org/apache/hise/engine/store/HISERouteBuilder.java (original)
+++ incubator/hise/trunk/hise-services/src/main/java/org/apache/hise/engine/store/HISERouteBuilder.java Tue Jul 26 12:01:15 2011
@@ -12,7 +12,6 @@ import org.apache.hise.api.Handler;
 import org.apache.hise.api.Sender;
 import org.apache.hise.lang.HumanInteractions;
 import org.apache.hise.lang.TaskDefinition;
-import org.apache.hise.utils.DOMUtils;
 import org.springframework.core.io.Resource;
 import org.springframework.transaction.PlatformTransactionManager;
 import org.springframework.transaction.TransactionStatus;
@@ -41,8 +40,7 @@ public class HISERouteBuilder extends Ro
         	taskDD.setHandler(new CamelHandler());
         	final Sender sender = new Sender() {
 				public Node invoke(Node message, Node epr) {
-					String body = DOMUtils.domToString(message);
-					getContext().createProducerTemplate().sendBody("direct:" + responseService, body);
+					getContext().createProducerTemplate().sendBody("direct:" + responseService, message);
 					return null;
 				}
         	};



Mime
View raw message