incubator-hise-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From r.@apache.org
Subject svn commit: r984316 [1/2] - in /incubator/hise/trunk: hise-bundle/src/main/resources/META-INF/spring/ hise-services/src/main/java/org/apache/hise/api/ hise-services/src/main/java/org/apache/hise/engine/ hise-test-example-osgi/ hise-test-example-osgi/sr...
Date Wed, 11 Aug 2010 07:39:25 GMT
Author: rr
Date: Wed Aug 11 07:39:25 2010
New Revision: 984316

URL: http://svn.apache.org/viewvc?rev=984316&view=rev
Log:
HISE-63: Management API exposed as OSGI service (Thanks to Paweł Byszewski)

Added:
    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/engine/ManagementImpl.java
    incubator/hise/trunk/hise-test-example-osgi/src/main/java/org/apache/hise/test/TestingManagment.java
    incubator/hise/trunk/itest/hise-management.xml
Modified:
    incubator/hise/trunk/hise-bundle/src/main/resources/META-INF/spring/hise.xml
    incubator/hise/trunk/hise-test-example-osgi/pom.xml
    incubator/hise/trunk/hise-test-example-osgi/src/main/java/org/apache/hise/test/Test.java
    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/resources/META-INF/spring/beans.xml
    incubator/hise/trunk/hise-test-example-osgi/src/main/resources/META-INF/spring/hise-itest.xml
    incubator/hise/trunk/hise-test-example-osgi/src/main/resources/testHtd1.xml

Modified: incubator/hise/trunk/hise-bundle/src/main/resources/META-INF/spring/hise.xml
URL: http://svn.apache.org/viewvc/incubator/hise/trunk/hise-bundle/src/main/resources/META-INF/spring/hise.xml?rev=984316&r1=984315&r2=984316&view=diff
==============================================================================
--- incubator/hise/trunk/hise-bundle/src/main/resources/META-INF/spring/hise.xml (original)
+++ incubator/hise/trunk/hise-bundle/src/main/resources/META-INF/spring/hise.xml Wed Aug 11
07:39:25 2010
@@ -64,7 +64,13 @@
   </bean>
 
   <osgi:service id="hiseEngineOsgi" ref="hiseEngine" interface="org.apache.hise.api.HISEEngine"
/>
-
+  
+  <bean id="management" class="org.apache.hise.engine.ManagementImpl">
+  <property name="hiseEngine" ref="hiseEngine"/>
+  </bean>
+  
+  <osgi:service id="managmentOsgi" ref="management" interface="org.apache.hise.api.Management"/>
+  
   <bean id="hiseUserDetails" class="org.apache.hise.engine.DefaultHISEUserDetails">
     <property name="hiseDao" ref="hiseDao"/>
   </bean>

Added: 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=984316&view=auto
==============================================================================
--- incubator/hise/trunk/hise-services/src/main/java/org/apache/hise/api/Management.java (added)
+++ incubator/hise/trunk/hise-services/src/main/java/org/apache/hise/api/Management.java Wed
Aug 11 07:39:25 2010
@@ -0,0 +1,43 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.hise.api;
+
+import java.util.List;
+
+import org.apache.hise.dao.HISEDao;
+import org.apache.hise.engine.wsdl.IllegalArgumentFault;
+import org.apache.hise.engine.wsdl.IllegalStateFault;
+import org.apache.hise.engine.wsdl.RecipientNotAllowed;
+import org.apache.hise.lang.xsd.htd.TOrganizationalEntity;
+import org.apache.hise.lang.xsd.htda.TStatus;
+import org.apache.hise.lang.xsd.htda.TTask;
+
+public interface Management {
+
+	public String getText();
+	
+	
+	 public List<TTask> getMyTasks(String taskType, String genericHumanRole, String workQueue,
List<TStatus> status, String whereClause, String createdOnClause,
+	            Integer maxTasks) throws IllegalArgumentFault;
+	 
+	 public HISEDao getHiseDao();
+	 
+	 public void delegate(String identifier, TOrganizationalEntity organizationalEntity) throws
RecipientNotAllowed, IllegalStateFault;
+}
+

Added: 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=984316&view=auto
==============================================================================
--- incubator/hise/trunk/hise-services/src/main/java/org/apache/hise/engine/ManagementImpl.java
(added)
+++ incubator/hise/trunk/hise-services/src/main/java/org/apache/hise/engine/ManagementImpl.java
Wed Aug 11 07:39:25 2010
@@ -0,0 +1,128 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.hise.engine;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.apache.hise.api.HISEEngine;
+import org.apache.hise.api.Management;
+import org.apache.hise.dao.GenericHumanRole;
+import org.apache.hise.dao.HISEDao;
+import org.apache.hise.dao.TaskQuery;
+import org.apache.hise.engine.TaskChecker.HumanOperationName;
+
+import org.apache.hise.engine.wsdl.IllegalArgumentFault;
+import org.apache.hise.engine.wsdl.IllegalStateFault;
+import org.apache.hise.engine.wsdl.RecipientNotAllowed;
+import org.apache.hise.engine.wsdl.TaskOperations;
+import org.apache.hise.lang.xsd.htd.TOrganizationalEntity;
+import org.apache.hise.lang.xsd.htda.TStatus;
+import org.apache.hise.lang.xsd.htda.TTask;
+import org.apache.hise.runtime.HiseIllegalStateException;
+import org.apache.hise.runtime.Task;
+
+public class ManagementImpl implements Management {
+	
+	private HISEEngine hiseEngine;
+
+	
+	public String getText(){
+		return new String("test");
+	}
+
+	public HISEEngine getHiseEngine() {
+		return hiseEngine;
+	}
+
+	public void setHiseEngine(HISEEngine hiseEngine) {
+		this.hiseEngine = hiseEngine;
+	}
+	
+
+
+	public List<TTask> getMyTasks(String userName, String taskType, String genericHumanRole,
String workQueue, List<TStatus> status, String whereClause, String createdOnClause,
+            Integer maxTasks) throws IllegalArgumentFault  {
+
+        List<TTask> result = new ArrayList<TTask>();
+
+//        String user = userName;
+//
+//        TaskQuery query = new TaskQuery();
+//        query.setUser(user);
+//        query.setUserGroups(hiseEngine.getHiseUserDetails().getUserGroups(user));
+//        query.setTaskType(taskType);
+//        if(genericHumanRole==null)
+//        	query.setGenericHumanRole(null);
+//        else
+//        	query.setGenericHumanRole(GenericHumanRole.valueOf(genericHumanRole));
+//        query.setWorkQueue(workQueue);
+//        query.setStatuses(status);
+//        query.setWhereClause(whereClause);
+//        query.setCreatedOnClause(createdOnClause);
+//
+//        if (maxTasks != null) {
+//            query.setMaxTasks(maxTasks);
+//        }
+//
+//        List<org.apache.hise.dao.Task> tasks = hiseEngine.getHiseDao().getUserTasks(query);
+//        for (org.apache.hise.dao.Task u : tasks) {
+//            TTask t=null;
+//		
+//				t = convertTasktoTTask(u);
+//
+//            result.add(t);
+//        }
+
+        return result;
+           
+    }
+    
+    public HISEDao getHiseDao(){
+    	return hiseEngine.getHiseDao();
+    	
+    }
+
+	public List<TTask> getMyTasks(String taskType, String genericHumanRole,
+			String workQueue, List<TStatus> status, String whereClause,
+			String createdOnClause, Integer maxTasks)
+			throws IllegalArgumentFault {
+		// TODO Auto-generated method stub
+		return null;
+	}
+
+	public void delegate(String identifier,
+			TOrganizationalEntity organizationalEntity) throws RecipientNotAllowed, IllegalStateFault
{
+        Task task = Task.load((HISEEngineImpl) hiseEngine, new Long(identifier));       

+        String userID = task.checkCanDelegate(organizationalEntity);
+        task.setCurrentUser("administrator");
+        
+        try {
+			task.setActualOwner(userID);
+			task.addGenericHumanRole(userID, GenericHumanRole.POTENTIALOWNERS);
+		} catch (HiseIllegalStateException e) {
+			throw new IllegalStateFault();
+		}
+		
+	}
+	
+	
+
+}

Modified: incubator/hise/trunk/hise-test-example-osgi/pom.xml
URL: http://svn.apache.org/viewvc/incubator/hise/trunk/hise-test-example-osgi/pom.xml?rev=984316&r1=984315&r2=984316&view=diff
==============================================================================
--- incubator/hise/trunk/hise-test-example-osgi/pom.xml (original)
+++ incubator/hise/trunk/hise-test-example-osgi/pom.xml Wed Aug 11 07:39:25 2010
@@ -72,15 +72,18 @@ org.apache.hise,
                             org.apache.cxf.configuration.spring,
                             org.apache.cxf.resource,
                             org.apache.cxf.transport.http_osgi,
-                            org.apache.servicemix.util,
+                        	org.apache.servicemix.util,
                             org.springframework.beans.factory.config
                         </Import-Package>
-                        <Private-Package>org.apache.hise.test</Private-Package>
+                        <Private-Package>org.apache.hise.test, org.apache.hise</Private-Package>
+                      
                         <Require-Bundle>org.apache.cxf.bundle</Require-Bundle>
 
 
 
-                        <Export-Package>org.apache.hise.test</Export-Package>
+                        <Export-Package>org.apache.hise.test,
+                        org.apache.hise</Export-Package>
+                         
                         <DynamicImport-Package>*</DynamicImport-Package>
                         <!--
                         <Require-Bundle>

Modified: incubator/hise/trunk/hise-test-example-osgi/src/main/java/org/apache/hise/test/Test.java
URL: http://svn.apache.org/viewvc/incubator/hise/trunk/hise-test-example-osgi/src/main/java/org/apache/hise/test/Test.java?rev=984316&r1=984315&r2=984316&view=diff
==============================================================================
--- incubator/hise/trunk/hise-test-example-osgi/src/main/java/org/apache/hise/test/Test.java
(original)
+++ incubator/hise/trunk/hise-test-example-osgi/src/main/java/org/apache/hise/test/Test.java
Wed Aug 11 07:39:25 2010
@@ -2,7 +2,10 @@ package org.apache.hise.test;
 
 import javax.jws.WebService;
 
+import org.apache.hise.lang.xsd.htd.TOrganizationalEntity;
+
 @WebService
 public interface Test {
     void cleanup() throws Exception;
+    void delegateViaApi(final String identifier, final TOrganizationalEntity organizationalEntity);
 }

Modified: incubator/hise/trunk/hise-test-example-osgi/src/main/java/org/apache/hise/test/TestImpl.java
URL: http://svn.apache.org/viewvc/incubator/hise/trunk/hise-test-example-osgi/src/main/java/org/apache/hise/test/TestImpl.java?rev=984316&r1=984315&r2=984316&view=diff
==============================================================================
--- incubator/hise/trunk/hise-test-example-osgi/src/main/java/org/apache/hise/test/TestImpl.java
(original)
+++ incubator/hise/trunk/hise-test-example-osgi/src/main/java/org/apache/hise/test/TestImpl.java
Wed Aug 11 07:39:25 2010
@@ -3,8 +3,12 @@ package org.apache.hise.test;
 import javax.jws.WebService;
 
 import org.apache.hise.api.HISEEngine;
+import org.apache.hise.api.Management;
 import org.apache.hise.dao.Job;
 import org.apache.hise.dao.Task;
+import org.apache.hise.engine.wsdl.IllegalStateFault;
+import org.apache.hise.engine.wsdl.RecipientNotAllowed;
+import org.apache.hise.lang.xsd.htd.TOrganizationalEntity;
 import org.springframework.transaction.PlatformTransactionManager;
 import org.springframework.transaction.TransactionStatus;
 import org.springframework.transaction.support.TransactionCallback;
@@ -17,6 +21,8 @@ public class TestImpl implements Test {
     
     private HISEEngine e;
     
+    private Management management;
+    
     public void setE(HISEEngine hiseEngine) {
 		this.e = hiseEngine;
 	}
@@ -36,4 +42,32 @@ public class TestImpl implements Test {
             }
         });
     }
+    public void delegateViaApi(final String identifier, final TOrganizationalEntity organizationalEntity){
+        TransactionTemplate tt = new TransactionTemplate(transactionManager);
+        tt.execute(new TransactionCallback() {
+            public Object doInTransaction(TransactionStatus status) {
+            	try {
+					management.delegate(identifier, organizationalEntity);
+				} catch (RecipientNotAllowed e) {
+				
+				} catch (IllegalStateFault e) {
+				
+				}
+            	return null;
+            }
+        });
+    	
+    }
+
+	public Management getManagement() {
+		return management;
+	}
+
+	public void setManagement(Management management) {
+		this.management = management;
+	}
+    
+    
+
+    
 }

Added: incubator/hise/trunk/hise-test-example-osgi/src/main/java/org/apache/hise/test/TestingManagment.java
URL: http://svn.apache.org/viewvc/incubator/hise/trunk/hise-test-example-osgi/src/main/java/org/apache/hise/test/TestingManagment.java?rev=984316&view=auto
==============================================================================
--- incubator/hise/trunk/hise-test-example-osgi/src/main/java/org/apache/hise/test/TestingManagment.java
(added)
+++ incubator/hise/trunk/hise-test-example-osgi/src/main/java/org/apache/hise/test/TestingManagment.java
Wed Aug 11 07:39:25 2010
@@ -0,0 +1,71 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.hise.test;
+
+import java.util.List;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.apache.hise.api.Management;
+import org.apache.hise.api.Sender;
+import org.apache.hise.engine.jaxws.HISEJaxWSClient;
+import org.apache.hise.engine.wsdl.IllegalArgumentFault;
+import org.apache.hise.lang.xsd.htda.TTask;
+import org.w3c.dom.Node;
+
+public class TestingManagment implements Sender {
+
+	 private Log __log = LogFactory.getLog(TestingManagment.class);
+	
+	Management management;
+	
+	
+	public TestingManagment() {
+		super();
+	}
+	public void init(){
+		return;
+	}
+	public Node invoke(Node message, Node epr) {
+		String text=management.getText();
+		
+		if(text!=null && text.length()>0)
+				text.charAt(0);
+		try {
+			List<TTask> l = management.getMyTasks(null, null, null, null, null, null, null);
+			__log.debug("TestingManagment wielkosc listy:"+l.size());
+		} catch (IllegalArgumentFault e) {
+			// TODO Auto-generated catch block
+			e.printStackTrace();
+		}
+		
+		__log.debug("TestingManagment is alive");
+		return null;
+	}
+	public Management getManagement() {
+		return management;
+	}
+	public void setManagement(Management managment) {
+		this.management = managment;
+	}
+	
+	
+
+}

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=984316&r1=984315&r2=984316&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
Wed Aug 11 07:39:25 2010
@@ -18,6 +18,7 @@ xsi:schemaLocation="
 <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 class="org.apache.hise.engine.store.HISEDeployer" init-method="init" destroy-method="destroy">
     <property name="hiseEngine" ref="hiseEngine"/>
     <property name="deploymentInfo">
@@ -110,6 +111,16 @@ xsi:schemaLocation="
              <property name="handler" ref="hiseJaxWSService11"/>
              <property name="sender" ref="hiseJaxWSSender11"/>
             </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}Task12"></constructor-arg>
+                </bean>
+              </property>
+             <property name="handler" ref="hiseJaxWSService12"/>
+             <property name="sender" ref="hiseJaxWSSender12"/>
+            </bean>
             
             
             <bean class="org.apache.hise.engine.store.TaskDD">
@@ -164,6 +175,7 @@ xsi:schemaLocation="
     <property name="hiseEngine" ref="hiseEngine"/>
     <property name="transactionManager" ref="transactionManager"></property>
   </bean>
+  
   <jaxws:endpoint id="testHtd2" address="/ClaimsHandlingService2/" implementor="#hiseJaxWSService2"
serviceName="ins:ClaimsHandlingService" endpointName="ins:ClaimsHandlingPort" publish="true"
wsdlLocation="classpath:ExampleTasks.wsdl"/>
 
   <bean id="hiseJaxWSSender2" class="org.apache.hise.engine.jaxws.HISEJaxWSClient" init-method="init">
@@ -279,6 +291,25 @@ xsi:schemaLocation="
       </bean>
     </property>
   </bean>
+  
+    <bean id="hiseJaxWSService12" class="org.apache.hise.engine.jaxws.HISEJaxWSService"
init-method="init">
+     <!--property name="id" value="hiseJaxWSService12"/-->
+    <property name="hiseEngine" ref="hiseEngine"/>
+    <property name="transactionManager" ref="transactionManager"></property>
+  </bean>
+ 
+  <jaxws:endpoint id="testHtd12" address="/ClaimsHandlingService12/" implementor="#hiseJaxWSService12"
serviceName="ins:ClaimsHandlingService" endpointName="ins:ClaimsHandlingPort" publish="true"
wsdlLocation="classpath:ExampleTasks.wsdl"/>
+
+
+  <bean id="hiseJaxWSSender12" 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/META-INF/spring/hise-itest.xml
URL: http://svn.apache.org/viewvc/incubator/hise/trunk/hise-test-example-osgi/src/main/resources/META-INF/spring/hise-itest.xml?rev=984316&r1=984315&r2=984316&view=diff
==============================================================================
--- incubator/hise/trunk/hise-test-example-osgi/src/main/resources/META-INF/spring/hise-itest.xml
(original)
+++ incubator/hise/trunk/hise-test-example-osgi/src/main/resources/META-INF/spring/hise-itest.xml
Wed Aug 11 07:39:25 2010
@@ -19,12 +19,14 @@ xmlns:osgi="http://www.springframework.o
 
 <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"/>
-
+<osgi:reference id="managementApi" interface="org.apache.hise.api.Management" bean-name="management"/>
+ 
   <jaxws:endpoint id="test" address="/test/" implementor="#test2" publish="true"/>
   
   <bean id="test2" class="org.apache.hise.test.TestImpl">
     <property name="transactionManager" ref="transactionManager"/>
     <property name="e" ref="hiseEngine"></property>
+   <property name="management" ref="managementApi"></property>
   </bean>
   
     <bean id="sampleUsers" class="org.apache.hise.test.SampleUsers" init-method="init">

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=984316&r1=984315&r2=984316&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 Wed Aug 11
07:39:25 2010
@@ -1473,7 +1473,120 @@ xs:double(htd:getInput("ClaimApprovalReq
       
         </htd:task> 
         
-        
+        <htd:task name="Task12">
+
+          <htd:documentation xml:lang="en-US">This task is used to handle claims that
require manual approval. </htd:documentation>
+            <htd:interface portType="tns:ClaimsHandlingPT" operation="approve" responsePortType="tns:ClaimsResolvingPT"
responseOperation="resolve"/>
+            <htd:priority> 
+                declare namespace cla="http://www.insurance.example.com/claims";
+				declare namespace htd="http://www.example.org/WS-HT";  
+				xs:integer(htd:getInput("ClaimApprovalRequest")/cla:prio)
+            </htd:priority>
+            
+            <htd:autoActivate>true</htd:autoActivate>
+             
+            
+            <htd:peopleAssignments>
+            	<htd:potentialOwners>
+                  <htd:from>
+                    <htd:literal>
+                        <htd:organizationalEntity>
+                            <htd:users>
+                                <htd:user>user1</htd:user>
+                            </htd:users>
+                            
+                        </htd:organizationalEntity>
+                    </htd:literal>
+                  </htd:from>
+                </htd:potentialOwners>
+                
+                <htd:businessAdministrators>
+                  <htd:from>
+                    <htd:literal>
+                        <htd:organizationalEntity>
+                            <htd:groups>
+                                <htd:group>group1</htd:group>
+                                <htd:group>group2</htd:group>
+                            </htd:groups>
+                        </htd:organizationalEntity>
+                    </htd:literal>
+                  </htd:from>
+                </htd:businessAdministrators>
+
+                <htd:businessAdministrators>
+                  <htd:from>
+                    <htd:literal>
+                        <htd:organizationalEntity>
+                            <htd:users>
+                                <htd:user>user1</htd:user>
+                                <htd:user>user2</htd:user>
+                            </htd:users>
+                        </htd:organizationalEntity>
+                    </htd:literal>
+                  </htd:from>
+                </htd:businessAdministrators>
+                
+            	<htd:taskStakeholders>
+                  <htd:from>
+                    <htd:literal>
+                        <htd:organizationalEntity>
+                            <htd:users>
+                                <htd:user>user3</htd:user>
+                            </htd:users>
+                        </htd:organizationalEntity>
+                    </htd:literal>
+                  </htd:from>
+                </htd:taskStakeholders>                
+            </htd:peopleAssignments>
+            
+            <htd:delegation potentialDelegatees="nobody"/>
+            
+            <htd:presentationElements>
+                
+                <htd:name xml:lang="en-US"> Approve Claim </htd:name>
+                
+                <htd:presentationParameters>
+                    
+                    <htd:presentationParameter name="firstname" type="xsd:string">
+declare namespace cla="http://www.insurance.example.com/claims";
+declare namespace htd="http://www.example.org/WS-HT";
+xs:string(htd:getInput("ClaimApprovalRequest")/cla:cust/cla:firstname)
+</htd:presentationParameter>
+                    
+                    <htd:presentationParameter name="lastname" type="xsd:string">
+declare namespace cla="http://www.insurance.example.com/claims";
+declare namespace htd="http://www.example.org/WS-HT";
+xs:string(htd:getInput("ClaimApprovalRequest")/cla:cust/cla:lastname)
+</htd:presentationParameter>
+                    
+                    <htd:presentationParameter name="euroAmount" type="xsd:double">
+declare namespace cla="http://www.insurance.example.com/claims";
+declare namespace htd="http://www.example.org/WS-HT";
+xs:double(htd:getInput("ClaimApprovalRequest")/cla:amount)
+</htd:presentationParameter>
+                        
+                </htd:presentationParameters>
+                
+<htd:subject xml:lang="en-US"> Approve the insurance claim for PLN {$euroAmount} on
behalf of {$firstname} {$lastname} </htd:subject>
+
+                <htd:description xml:lang="en-US" contentType="text/plain"> Approve
this claim following corporate guideline #4711.0815/7 for {$firstname} {$lastname} </htd:description>
+
+            </htd:presentationElements>
+            
+            <htd:outcome>
+                <![CDATA[
+                  <cla:resolve xmlns:cla="http://www.insurance.example.com/claims" xmlns:htd="http://www.example.org/WS-HT">
+                     <claimId>{htd:getInput("ClaimApprovalRequest")/cla:cust/cla:id/text()}</claimId>
+                     <ok>{$outcome}</ok>
+                  </cla:resolve>
+                ]]>
+            </htd:outcome>
+            
+                
+            
+  
+      
+        </htd:task> 
         
         
         



Mime
View raw message