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/19 13:29:21 UTC

svn commit: r965471 [1/2] - in /incubator/hise/trunk: hise-services/src/main/java/org/apache/hise/engine/ hise-services/src/main/java/org/apache/hise/engine/jaxws/ hise-test-example-osgi/src/main/java/org/apache/hise/test/ hise-test-example-osgi/src/ma...

Author: rr
Date: Mon Jul 19 13:29:21 2010
New Revision: 965471

URL: http://svn.apache.org/viewvc?rev=965471&view=rev
Log:
HISE-12: Final patch (thanks to Michał Więcław)

Modified:
    incubator/hise/trunk/hise-services/src/main/java/org/apache/hise/engine/TaskChecker.java
    incubator/hise/trunk/hise-services/src/main/java/org/apache/hise/engine/jaxws/TaskOperationsImpl.java
    incubator/hise/trunk/hise-test-example-osgi/src/main/java/org/apache/hise/test/SampleUsers.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

Modified: incubator/hise/trunk/hise-services/src/main/java/org/apache/hise/engine/TaskChecker.java
URL: http://svn.apache.org/viewvc/incubator/hise/trunk/hise-services/src/main/java/org/apache/hise/engine/TaskChecker.java?rev=965471&r1=965470&r2=965471&view=diff
==============================================================================
--- incubator/hise/trunk/hise-services/src/main/java/org/apache/hise/engine/TaskChecker.java (original)
+++ incubator/hise/trunk/hise-services/src/main/java/org/apache/hise/engine/TaskChecker.java Mon Jul 19 13:29:21 2010
@@ -74,7 +74,7 @@ public class TaskChecker {
 		switch(operaionName){
 			//every group of operations have the same conditions to get permission 
 		
-				//conditions: user is ActualOwner
+				//G1 conditions: user is ActualOwner
 			case COMPLETE:
 			case FAIL:
 			case SET_OUTPUT:
@@ -85,19 +85,19 @@ public class TaskChecker {
 					return true;
 				else return false;
 			
-				//conditions: user is PotentialOwner or BusinessOwner or TaskStakeholders
+				//G2 conditions: user is PotentialOwner or BusinessOwner or TaskStakeholders
 			case CLAIM:
 				if(isPotentialOwners(humanRoles) || isBusinessAdministrator(humanRoles) || isTaskStakeholders(humanRoles))
 					return true;
 				else return false;
 				
-				//conditions: user is ActualOwner or (is PotentalOwner and task's state is ready)
+				//G3 conditions: user is ActualOwner or (is PotentalOwner and task's state is ready)
 			case START:
 				if(isActualOwner(userID, task) || isPotentialOwnersWithReadyState(humanRoles, task))
 					return true;
 				else return false;
 				
-				//conditions: user is ActualOwner or BusinessOwner or TaskStakeholders
+				//G4 conditions: user is ActualOwner or BusinessOwner or TaskStakeholders
 			case STOP:
 			case RELEASE:
 			case SET_PRIORITY:
@@ -109,7 +109,7 @@ public class TaskChecker {
 					return true;
 				else return false;
 				
-				//conditions: user is (PotentalOwner and task's state is ready) or ActualOwner or BusinessOwner or TaskStakeholders
+				//G5 conditions: user is (PotentalOwner and task's state is ready) or ActualOwner or BusinessOwner or TaskStakeholders
 			case SUSPEND:
 			case SUSPEND_UNTIL:
 			case RESUME:
@@ -119,7 +119,7 @@ public class TaskChecker {
 						return true;
 				else return false;
 			
-				//conditions: user is PotentalOwner or ActualOwner or BusinessOwner or TaskStakeholders 
+				//G6 conditions: user is PotentalOwner or ActualOwner or BusinessOwner or TaskStakeholders 
 			case GET_ATTACHMENT_INFOS:
 			case GET_ATTACHMENTS:
 			case ADD_COMMENT:
@@ -131,20 +131,20 @@ public class TaskChecker {
 						return true;
 				else return false;
 				
-				//conditions: user is TaskInitiator or ActualOwner or BusinessOwner or TaskStakeholders 
+				//G7 conditions: user is TaskInitiator or ActualOwner or BusinessOwner or TaskStakeholders 
 			case SKIP:
 				if(isTaskInitiator(userID, task) || isActualOwner(userID, task) ||
 					isBusinessAdministrator(humanRoles) || isTaskStakeholders(humanRoles))
 						return true;
 				else return false;
 				
-				//conditions: user is Recipients
+				//G8 conditions: user is Recipients
 			case REMOVE:
 				if(isRecipients(humanRoles))
 					return true;
 				else return false;
 				
-				//conditions: user is BusinessOwner or TaskStakeholders 
+				//G9 conditions: user is BusinessOwner or TaskStakeholders 
 			case ACTIVATE:
 			case NOMINATE:
 			case SET_GENERIC_HUMAN_ROLE:

Modified: incubator/hise/trunk/hise-services/src/main/java/org/apache/hise/engine/jaxws/TaskOperationsImpl.java
URL: http://svn.apache.org/viewvc/incubator/hise/trunk/hise-services/src/main/java/org/apache/hise/engine/jaxws/TaskOperationsImpl.java?rev=965471&r1=965470&r2=965471&view=diff
==============================================================================
--- incubator/hise/trunk/hise-services/src/main/java/org/apache/hise/engine/jaxws/TaskOperationsImpl.java (original)
+++ incubator/hise/trunk/hise-services/src/main/java/org/apache/hise/engine/jaxws/TaskOperationsImpl.java Mon Jul 19 13:29:21 2010
@@ -158,7 +158,7 @@ public class TaskOperationsImpl implemen
     public Object getInput(String identifier, String part) throws IllegalAccessFault, IllegalStateFault, IllegalArgumentFault {
         Task t = Task.load(hiseEngine, Long.parseLong(identifier));
         if(!(TaskChecker.checkPermission(TaskChecker.HumanOperationName.GET_INPUT, getUserString(), t, hiseEngine))) 
-        	throw new IllegalAccessFault();
+        	throw new IllegalAccessFault("Illegal access to operations");
         t.setCurrentUser(getUserString());
         return t.getInput(part);
     }
@@ -169,7 +169,7 @@ public class TaskOperationsImpl implemen
     public Object getOutput(String identifier, String part) throws IllegalAccessFault, IllegalStateFault, IllegalArgumentFault {
         Task t = Task.load(hiseEngine, Long.parseLong(identifier));
         if(!(TaskChecker.checkPermission(TaskChecker.HumanOperationName.GET_OUTPUT, getUserString(), t, hiseEngine))) 
-        	throw new IllegalAccessFault();
+        	throw new IllegalAccessFault("Illegal access to operations");
         t.setCurrentUser(getUserString());
         return t.getOutput(part);
     }
@@ -180,7 +180,7 @@ public class TaskOperationsImpl implemen
     public void stop(String identifier) throws IllegalAccessFault, IllegalStateFault, IllegalArgumentFault {
         Task t = Task.load(hiseEngine, Long.parseLong(identifier));
         if(!(TaskChecker.checkPermission(TaskChecker.HumanOperationName.STOP, getUserString(), t, hiseEngine))) 
-        	throw new IllegalAccessFault();
+        	throw new IllegalAccessFault("Illegal access to operations");
         t.setCurrentUser(getUserString());
         
         try {
@@ -193,7 +193,7 @@ public class TaskOperationsImpl implemen
     public void suspend(String identifier) throws IllegalAccessFault, IllegalStateFault, IllegalArgumentFault {
         Task t = Task.load(hiseEngine, Long.parseLong(identifier));
         if(!(TaskChecker.checkPermission(TaskChecker.HumanOperationName.SUSPEND, getUserString(), t, hiseEngine))) 
-        	throw new IllegalAccessFault();
+        	throw new IllegalAccessFault("Illegal access to operations");
         t.setCurrentUser(getUserString());
         
         try {
@@ -206,7 +206,7 @@ public class TaskOperationsImpl implemen
     public void suspendUntil(String identifier, TTime time) throws IllegalAccessFault, IllegalStateFault, IllegalArgumentFault {
         Task t = Task.load(hiseEngine, Long.parseLong(identifier));
         if(!(TaskChecker.checkPermission(TaskChecker.HumanOperationName.SUSPEND_UNTIL, getUserString(), t, hiseEngine))) 
-        	throw new IllegalAccessFault();
+        	throw new IllegalAccessFault("Illegal access to operations");
         t.setCurrentUser(getUserString());
         Date when = time.getPointOfTime();
         if (when == null) {
@@ -225,7 +225,7 @@ public class TaskOperationsImpl implemen
     public void remove(String identifier) throws IllegalAccessFault, IllegalArgumentFault {
         Task t = Task.load(hiseEngine, Long.parseLong(identifier));
         if(!(TaskChecker.checkPermission(TaskChecker.HumanOperationName.REMOVE, getUserString(), t, hiseEngine))) 
-        	throw new IllegalAccessFault();
+        	throw new IllegalAccessFault("Illegal access to operations");
         t.setCurrentUser(getUserString());
         t.remove();
     }
@@ -234,7 +234,7 @@ public class TaskOperationsImpl implemen
         // OrgEntity user = loadUser();
         Task t = Task.load(hiseEngine, Long.parseLong(identifier));
         if(!(TaskChecker.checkPermission(TaskChecker.HumanOperationName.RESUME, getUserString(), t, hiseEngine))) 
-        	throw new IllegalAccessFault();
+        	throw new IllegalAccessFault("Illegal access to operations");
         t.setCurrentUser(getUserString());
         
         try {
@@ -251,7 +251,7 @@ public class TaskOperationsImpl implemen
     public void claim(String identifier) throws IllegalArgumentFault, IllegalStateFault, IllegalAccessFault {
         Task task = Task.load(hiseEngine, Long.valueOf(identifier));
         if(!(TaskChecker.checkPermission(TaskChecker.HumanOperationName.CLAIM, getUserString(), task, hiseEngine))) 
-        	throw new IllegalAccessFault();
+        	throw new IllegalAccessFault("Illegal access to operations");
         task.setCurrentUser(getUserString());
         
         try {
@@ -267,7 +267,7 @@ public class TaskOperationsImpl implemen
             IllegalOperationFault {
         Task t = Task.load(hiseEngine, Long.parseLong(identifier));
         if(!(TaskChecker.checkPermission(TaskChecker.HumanOperationName.FAIL, getUserString(), t, hiseEngine))) 
-        	throw new IllegalAccessFault();
+        	throw new IllegalAccessFault("Illegal access to operations");
         t.setCurrentUser(getUserString());
         
         try {
@@ -281,7 +281,7 @@ public class TaskOperationsImpl implemen
         
         Task t = Task.load(hiseEngine, Long.parseLong(identifier));
         if(!(TaskChecker.checkPermission(TaskChecker.HumanOperationName.FORWARD, getUserString(), t, hiseEngine))) 
-        	throw new IllegalAccessFault();
+        	throw new IllegalAccessFault("Illegal access to operations");
         t.setCurrentUser(getUserString());
         
         try {
@@ -300,7 +300,7 @@ public class TaskOperationsImpl implemen
     public void release(String identifier) throws IllegalArgumentFault, IllegalStateFault, IllegalAccessFault {
         Task t = Task.load(hiseEngine, Long.parseLong(identifier));
         if(!(TaskChecker.checkPermission(TaskChecker.HumanOperationName.RELEASE, getUserString(), t, hiseEngine))) {
-        	throw new IllegalAccessFault();
+        	throw new IllegalAccessFault("Illegal access to operations");
         }
         t.setCurrentUser(getUserString());
         
@@ -314,7 +314,7 @@ public class TaskOperationsImpl implemen
     public void start(String identifier) throws IllegalArgumentFault, IllegalStateFault, IllegalAccessFault {
         Task t = Task.load(hiseEngine, Long.parseLong(identifier));
         if(!(TaskChecker.checkPermission(TaskChecker.HumanOperationName.START, getUserString(), t, hiseEngine))) {
-        	throw new IllegalAccessFault();
+        	throw new IllegalAccessFault("Illegal access to operations");
         }
         t.setCurrentUser(getUserString());
         
@@ -328,7 +328,7 @@ public class TaskOperationsImpl implemen
     public void complete(String identifier, Object taskData) throws IllegalAccessFault, IllegalStateFault, IllegalArgumentFault {
         Task t = Task.load(hiseEngine, Long.parseLong(identifier));
         if(!(TaskChecker.checkPermission(TaskChecker.HumanOperationName.COMPLETE, getUserString(), t, hiseEngine))) {
-        	throw new IllegalAccessFault();
+        	throw new IllegalAccessFault("Illegal access to operations");
         }
         t.setCurrentUser(getUserString());
         //TODO set output
@@ -344,7 +344,7 @@ public class TaskOperationsImpl implemen
     public void setOutput(String identifier, String part, Object taskData) throws IllegalAccessFault, IllegalStateFault, IllegalArgumentFault {
         Task t = Task.load(hiseEngine, Long.valueOf(identifier));
         if(!(TaskChecker.checkPermission(TaskChecker.HumanOperationName.SET_OUTPUT, getUserString(), t, hiseEngine))) {
-        	throw new IllegalAccessFault();
+        	throw new IllegalAccessFault("Illegal access to operations");
         }
         t.setCurrentUser(getUserString());
         t.setOutput(((Node) taskData).getFirstChild());
@@ -362,7 +362,7 @@ public class TaskOperationsImpl implemen
 	public void addComment(String identifier, String text) throws IllegalAccessFault, IllegalStateFault, IllegalArgumentFault {
 		Task task = Task.load(hiseEngine, new Long(identifier));
 		if(!(TaskChecker.checkPermission(TaskChecker.HumanOperationName.ADD_COMMENT, getUserString(), task, hiseEngine))) { 
-        	throw new IllegalAccessFault();
+        	throw new IllegalAccessFault("Illegal access to operations");
 		}
 		org.apache.hise.dao.Task taskDto = task.getTaskDto();
 		org.apache.hise.dao.Comment newComment = new Comment(text, taskDto, getUserString());
@@ -381,7 +381,7 @@ public class TaskOperationsImpl implemen
     public List<TComment> getComments(String identifier) throws IllegalAccessFault, IllegalStateFault, IllegalArgumentFault {
         Task task = Task.load(hiseEngine, new Long(identifier));
         if(!(TaskChecker.checkPermission(TaskChecker.HumanOperationName.GET_COMMENTS, getUserString(), task, hiseEngine))) {
-        	throw new IllegalAccessFault();
+        	throw new IllegalAccessFault("Illegal access to operations");
         }
         org.apache.hise.dao.Task taskDto = task.getTaskDto();
         List<TComment> result = convertComments(taskDto.getComments());
@@ -399,7 +399,7 @@ public class TaskOperationsImpl implemen
     public void activate(String identifier) throws IllegalAccessFault, IllegalStateFault, IllegalArgumentFault {
     	Task task = Task.load(hiseEngine, new Long(identifier));
         if(!(TaskChecker.checkPermission(TaskChecker.HumanOperationName.ACTIVATE, getUserString(), task, hiseEngine))) 
-        	throw new IllegalAccessFault();
+        	throw new IllegalAccessFault("Illegal access to operations");
         // TODO Auto-generated method stub
 
     }
@@ -409,7 +409,7 @@ public class TaskOperationsImpl implemen
 
         Task task = Task.load(hiseEngine, new Long(identifier));
         if(!(TaskChecker.checkPermission(TaskChecker.HumanOperationName.ADD_ATTACHMENT, getUserString(), task, hiseEngine))) 
-        	throw new IllegalAccessFault();
+        	throw new IllegalAccessFault("Illegal access to operations");
         org.apache.hise.dao.Task taskDto = task.getTaskDto();
         org.apache.hise.dao.Attachment newAttachment= new Attachment();
         newAttachment.setAccessType(accessType);
@@ -433,14 +433,14 @@ public class TaskOperationsImpl implemen
 
         Task task = Task.load(hiseEngine, new Long(identifier));
         if(!(TaskChecker.checkPermission(TaskChecker.HumanOperationName.DELEGATE, getUserString(), task, hiseEngine))) 
-        	throw new IllegalAccessFault();
+        	throw new IllegalAccessFault("Illegal access to operations");
         org.apache.hise.dao.Task taskDto = task.getTaskDto();
     }
 
     public void deleteAttachments(String identifier, String attachmentName) throws IllegalAccessFault, IllegalStateFault, IllegalArgumentFault {
         Task task = Task.load(hiseEngine, new Long(identifier));
         if(!(TaskChecker.checkPermission(TaskChecker.HumanOperationName.DELETE_ATTACHMENTS, getUserString(), task, hiseEngine))) 
-        	throw new IllegalAccessFault();
+        	throw new IllegalAccessFault("Illegal access to operations");
         org.apache.hise.dao.Task taskDto = task.getTaskDto();
         List<Attachment> attachments=taskDto.getAttachments();
         Iterator<Attachment> attachemntIterator=attachments.iterator();
@@ -464,7 +464,7 @@ public class TaskOperationsImpl implemen
     public void deleteFault(String identifier) throws IllegalAccessFault, IllegalStateFault, IllegalArgumentFault {
     	Task task = Task.load(hiseEngine, new Long(identifier));
         if(!(TaskChecker.checkPermission(TaskChecker.HumanOperationName.DELELE_FAULT, getUserString(), task, hiseEngine))) 
-        	throw new IllegalAccessFault();
+        	throw new IllegalAccessFault("Illegal access to operations");
         
         // TODO Auto-generated method stub
 
@@ -473,7 +473,7 @@ public class TaskOperationsImpl implemen
     public void deleteOutput(String identifier) throws IllegalAccessFault, IllegalStateFault, IllegalArgumentFault {
     	Task task = Task.load(hiseEngine, new Long(identifier));
         if(!(TaskChecker.checkPermission(TaskChecker.HumanOperationName.DELETE_OUTPUT, getUserString(), task, hiseEngine))) 
-        	throw new IllegalAccessFault();
+        	throw new IllegalAccessFault("Illegal access to operations");
         
         // TODO Auto-generated method stub
 
@@ -483,7 +483,7 @@ public class TaskOperationsImpl implemen
 
         Task task = Task.load(hiseEngine, new Long(identifier));
         if(!(TaskChecker.checkPermission(TaskChecker.HumanOperationName.GET_ATTACHMENT_INFOS, getUserString(), task, hiseEngine))) 
-        	throw new IllegalAccessFault();
+        	throw new IllegalAccessFault("Illegal access to operations");
         org.apache.hise.dao.Task taskDto = task.getTaskDto();
         List<Attachment> attachments=taskDto.getAttachments();
         List<TAttachmentInfo> result= new ArrayList<TAttachmentInfo>();
@@ -502,7 +502,7 @@ public class TaskOperationsImpl implemen
 
         Task task = Task.load(hiseEngine, new Long(identifier));
         if(!(TaskChecker.checkPermission(TaskChecker.HumanOperationName.GET_ATTACHMENTS, getUserString(), task, hiseEngine))) 
-        	throw new IllegalAccessFault();
+        	throw new IllegalAccessFault("Illegal access to operations");
         org.apache.hise.dao.Task taskDto = task.getTaskDto();
         List<Attachment> attachments=taskDto.getAttachments();
         List<TAttachment> result= new ArrayList<TAttachment>();
@@ -583,7 +583,7 @@ public class TaskOperationsImpl implemen
     public void nominate(String identifier, TOrganizationalEntity organizationalEntity) throws IllegalAccessFault, IllegalStateFault, IllegalArgumentFault {
         Task task = Task.load(hiseEngine, new Long(identifier));
         if(!(TaskChecker.checkPermission(TaskChecker.HumanOperationName.NOMINATE, getUserString(), task, hiseEngine))) 
-        	throw new IllegalAccessFault();
+        	throw new IllegalAccessFault("Illegal access to operations");
         org.apache.hise.dao.Task taskDto = task.getTaskDto();
         if(taskDto.getStatus()==Status.CREATED){
         	TUserlist tUsers=organizationalEntity.getUsers();
@@ -598,7 +598,7 @@ public class TaskOperationsImpl implemen
             IllegalOperationFault {
     	Task task = Task.load(hiseEngine, new Long(identifier));
         if(!(TaskChecker.checkPermission(TaskChecker.HumanOperationName.SET_FAULT, getUserString(), task, hiseEngine))) 
-        	throw new IllegalAccessFault();
+        	throw new IllegalAccessFault("Illegal access to operations");
     	
         // TODO Auto-generated method stub
 
@@ -608,7 +608,7 @@ public class TaskOperationsImpl implemen
             IllegalStateFault, IllegalArgumentFault {
     	Task task = Task.load(hiseEngine, new Long(identifier));
         if(!(TaskChecker.checkPermission(TaskChecker.HumanOperationName.SET_GENERIC_HUMAN_ROLE, getUserString(), task, hiseEngine))) 
-        	throw new IllegalAccessFault();
+        	throw new IllegalAccessFault("Illegal access to operations");
     	
         // TODO Auto-generated method stub
 
@@ -617,7 +617,7 @@ public class TaskOperationsImpl implemen
     public void setPriority(String identifier, BigInteger priority) throws IllegalAccessFault, IllegalStateFault, IllegalArgumentFault {
         Task task = Task.load(hiseEngine, new Long(identifier));
         if(!(TaskChecker.checkPermission(TaskChecker.HumanOperationName.SET_PRIORITY, getUserString(), task, hiseEngine))) 
-        	throw new IllegalAccessFault();
+        	throw new IllegalAccessFault("Illegal access to operations");
         org.apache.hise.dao.Task taskDto = task.getTaskDto();
         taskDto.setPriority(priority.intValue());
         
@@ -629,7 +629,7 @@ public class TaskOperationsImpl implemen
     				IllegalOperationFault {
         Task task = Task.load(hiseEngine, new Long(identifier));
         if(!(TaskChecker.checkPermission(TaskChecker.HumanOperationName.SKIP, getUserString(), task, hiseEngine))) 
-        	throw new IllegalAccessFault();
+        	throw new IllegalAccessFault("Illegal access to operations");
         org.apache.hise.dao.Task taskDto = task.getTaskDto();
         if(taskDto.isSkippable()){
         try {
@@ -645,7 +645,7 @@ public class TaskOperationsImpl implemen
             IllegalOperationFault, IllegalAccessFault {
     	Task task = Task.load(hiseEngine, new Long(identifier));
         if(!(TaskChecker.checkPermission(TaskChecker.HumanOperationName.GET_FAULT, getUserString(), task, hiseEngine))) 
-        	throw new IllegalAccessFault();
+        	throw new IllegalAccessFault("Illegal access to operations");
     	
         // TODO Auto-generated method stub
 

Modified: incubator/hise/trunk/hise-test-example-osgi/src/main/java/org/apache/hise/test/SampleUsers.java
URL: http://svn.apache.org/viewvc/incubator/hise/trunk/hise-test-example-osgi/src/main/java/org/apache/hise/test/SampleUsers.java?rev=965471&r1=965470&r2=965471&view=diff
==============================================================================
--- incubator/hise/trunk/hise-test-example-osgi/src/main/java/org/apache/hise/test/SampleUsers.java (original)
+++ incubator/hise/trunk/hise-test-example-osgi/src/main/java/org/apache/hise/test/SampleUsers.java Mon Jul 19 13:29:21 2010
@@ -22,12 +22,13 @@ public class SampleUsers {
         this.transactionManager = transactionManager;
     }
     
-    private void addUser(String name, String pass) {
+    private OrgEntity addUser(String name, String pass) {
         OrgEntity o = new OrgEntity();
         o.setName(name);
         o.setType(TaskOrgEntity.OrgEntityType.USER);
         o.setUserPassword(pass);
         hiseEngine.getHiseDao().persist(o);
+        return o;
     }
 
 
@@ -36,6 +37,7 @@ public class SampleUsers {
         TransactionTemplate transactionTemplate = new TransactionTemplate(transactionManager);
         
         transactionTemplate.execute(new TransactionCallback() {
+        	
             public Object doInTransaction(TransactionStatus arg0) {
                 {
                     OrgEntity g = new OrgEntity();
@@ -43,6 +45,18 @@ public class SampleUsers {
                     g.setType(TaskOrgEntity.OrgEntityType.GROUP);
                     hiseEngine.getHiseDao().persist(g);
                 }
+                OrgEntity g3 = new OrgEntity();
+                {
+                    g3.setName("group3");
+                    g3.setType(TaskOrgEntity.OrgEntityType.GROUP);
+                    hiseEngine.getHiseDao().persist(g3);
+                }
+                OrgEntity g4 = new OrgEntity();
+                {
+                    g4.setName("group4");
+                    g4.setType(TaskOrgEntity.OrgEntityType.GROUP);
+                    hiseEngine.getHiseDao().persist(g4);
+                }
                 OrgEntity someGroup = new OrgEntity();
                 {
                 	OrgEntity g = someGroup;
@@ -91,9 +105,16 @@ public class SampleUsers {
                     hiseEngine.getHiseDao().persist(o);
                 }
                 
+                //user G1 and G2 belong to group1 and group2
+            	OrgEntity userG3 = addUser("userG3", "userG3");
+            	OrgEntity userG4 = addUser("userG4", "userG4");
+            	userG3.getUserGroups().add(g3);
+            	userG4.getUserGroups().add(g4);
+                
                 addUser("user1", "user1pass");
                 addUser("user2", "user2pass");
                 addUser("user3", "user3pass");
+                addUser("user4", "user4pass");
                 addUser("user5", "user5pass");
                 addUser("user6", "user6pass");
                 

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=965471&r1=965470&r2=965471&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 Mon Jul 19 13:29:21 2010
@@ -25,6 +25,7 @@ xsi:schemaLocation="
         <property name="humanInteractionsResource" value="classpath:testHtd1.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">
@@ -45,6 +46,15 @@ xsi:schemaLocation="
               <property name="sender" ref="hiseJaxWSSender2"/>
             </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}Task5"></constructor-arg>
+                </bean>
+              </property>
+              <property name="handler" ref="hiseJaxWSService3"/>
+              <property name="sender" ref="hiseJaxWSSender3"/>
+            </bean>
             
             <bean class="org.apache.hise.engine.store.TaskDD">
               <property name="taskName">
@@ -100,5 +110,23 @@ xsi:schemaLocation="
     </property>
   </bean>
 
+
+  <bean id="hiseJaxWSService3" class="org.apache.hise.engine.jaxws.HISEJaxWSService" init-method="init">
+    <!--property name="id" value="hiseJaxWSService3"/-->
+    <property name="hiseEngine" ref="hiseEngine"/>
+    <property name="transactionManager" ref="transactionManager"></property>
+  </bean>
+
+  <jaxws:endpoint id="testHtd3" address="/ClaimsHandlingService3/" implementor="#hiseJaxWSService3" serviceName="ins:ClaimsHandlingService" endpointName="ins:ClaimsHandlingPort" publish="true" wsdlLocation="classpath:ExampleTasks.wsdl"/>
+
+  <bean id="hiseJaxWSSender3" 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=965471&r1=965470&r2=965471&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 Mon Jul 19 13:29:21 2010
@@ -98,8 +98,7 @@ Business Machines Corporation, Oracle In
                         </htd:organizationalEntity>
                     </htd:literal>
                   </htd:from>
-                </htd:taskStakeholders>
-                
+                </htd:taskStakeholders>                
             </htd:peopleAssignments>
             
             <htd:delegation potentialDelegatees="nobody"/>
@@ -491,7 +490,6 @@ xs:double(htd:getInput("ClaimApprovalReq
                                 <htd:group>someGroup</htd:group>
                             </htd:groups>
                             <htd:users>
-                                <htd:user>user6</htd:user>
                                 <htd:user>user1</htd:user>
                             </htd:users>
                         </htd:organizationalEntity>
@@ -593,7 +591,125 @@ xs:double(htd:getInput("ClaimApprovalReq
                 ]]>
             </htd:outcome>
         </htd:task>    
-    </htd:tasks>    
+   
+    
+    
+    
+            <htd:task name="Task5">
+            
+            <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:peopleAssignments>
+            	<htd:potentialOwners>
+                  <htd:from>
+                    <htd:literal>
+                        <htd:organizationalEntity>
+                            <htd:groups>
+                                <htd:group>group3</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:potentialOwners>
+                
+                
+                <htd:businessAdministrators>
+                  <htd:from>
+                    <htd:literal>
+                        <htd:organizationalEntity>
+                            <htd:groups>
+                                <htd:group>group4</htd:group>
+                            </htd:groups>
+                            <htd:users>
+                                <htd:user>user5</htd:user>
+                            </htd:users>
+                        </htd:organizationalEntity>
+                    </htd:literal>
+                  </htd:from>
+                </htd:businessAdministrators>
+                
+            	<htd:taskStakeholders>
+                  <htd:from>
+                    <htd:literal>
+                        <htd:organizationalEntity>
+                            <htd:users>
+                                <htd:user>user6</htd:user>
+                            </htd:users>
+                        </htd:organizationalEntity>
+                    </htd:literal>
+                  </htd:from>
+                </htd:taskStakeholders>
+                
+                
+                <htd:recipients>
+                  <htd:from>
+                    <htd:literal>
+                        <htd:organizationalEntity>
+                            <htd:users>
+                                <htd:user>user4</htd:user>
+                            </htd:users>
+                        </htd:organizationalEntity>
+                    </htd:literal>
+                  </htd:from>
+                </htd:recipients>
+                
+            </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:task>   
+ 
+</htd:tasks> 
     
     <htd:notifications>
       <htd:notification name="Notify2">
@@ -611,6 +727,18 @@ xs:double(htd:getInput("ClaimApprovalReq
               </htd:literal>
             </htd:from>
           </htd:potentialOwners>
+          
+            <htd:recipients>
+                  <htd:from>
+                    <htd:literal>
+                        <htd:organizationalEntity>
+                            <htd:users>
+                                <htd:user>user6</htd:user>
+                            </htd:users>
+                        </htd:organizationalEntity>
+                    </htd:literal>
+                  </htd:from>
+                </htd:recipients>
 <!--         
           <htd:recipients>
             <htd:from>