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/02/03 09:58:11 UTC
svn commit: r905964 [3/3] - in /incubator/hise/trunk: ./ hise-bundle/
hise-bundle/soapui-tests/ hise-bundle/src/ hise-bundle/src/main/
hise-bundle/src/main/karaf/ hise-bundle/src/main/resources/
hise-bundle/src/main/resources/META-INF/ hise-bundle/src/...
Propchange: incubator/hise/trunk/hise-bundle/soapui-tests/hise-soapui-project.xml
------------------------------------------------------------------------------
svn:eol-style = native
Added: incubator/hise/trunk/hise-bundle/src/main/karaf/features.xml
URL: http://svn.apache.org/viewvc/incubator/hise/trunk/hise-bundle/src/main/karaf/features.xml?rev=905964&view=auto
==============================================================================
--- incubator/hise/trunk/hise-bundle/src/main/karaf/features.xml (added)
+++ incubator/hise/trunk/hise-bundle/src/main/karaf/features.xml Wed Feb 3 09:58:00 2010
@@ -0,0 +1,19 @@
+<features>
+ <repository>mvn:org.apache.felix.karaf/apache-felix-karaf/1.1.0-SNAPSHOT/xml/features</repository>
+
+ <feature name="hise-deps" version="${project.version}">
+ <bundle>mvn:org.apache.geronimo.specs/geronimo-jta_1.1_spec/1.1.1</bundle>
+ <bundle>mvn:org.apache.geronimo.specs/geronimo-j2ee-connector_1.5_spec/2.0.0</bundle>
+ <bundle>mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.howl/1.0.1-1_1</bundle>
+ <bundle>mvn:org.apache.geronimo.components/geronimo-transaction/2.2-r634076</bundle>
+ <bundle>mvn:org.springframework/spring-tx/2.5.6</bundle>
+ <bundle>mvn:org.apache.servicemix.transaction/org.apache.servicemix.transaction/1.0.0</bundle>
+ </feature>
+ <!--
+ -->
+
+ <feature name="hise" version="${project.version}">
+ <feature version="${project.version}">hise-deps</feature>
+ <bundle>mvn:org.apache.hise/hise-bundle/${project.version}</bundle>
+ </feature>
+</features>
Propchange: incubator/hise/trunk/hise-bundle/src/main/karaf/features.xml
------------------------------------------------------------------------------
svn:eol-style = native
Added: incubator/hise/trunk/hise-bundle/src/main/resources/META-INF/spring/beans.xml
URL: http://svn.apache.org/viewvc/incubator/hise/trunk/hise-bundle/src/main/resources/META-INF/spring/beans.xml?rev=905964&view=auto
==============================================================================
--- incubator/hise/trunk/hise-bundle/src/main/resources/META-INF/spring/beans.xml (added)
+++ incubator/hise/trunk/hise-bundle/src/main/resources/META-INF/spring/beans.xml Wed Feb 3 09:58:00 2010
@@ -0,0 +1,125 @@
+<?xml version="1.0" encoding="UTF-8"?>
+ <!--
+ ~ Licensed to the Apache Software Foundation (ASF) under one ~ or more contributor license agreements. See the NOTICE file ~ distributed with this work for additional information ~ regarding copyright ownership. The ASF licenses this file ~ to you under the Apache License, Version 2.0 (the ~ "License"); you may not use this file except in compliance ~ with the License. You may obtain a copy of the License at ~ ~ http://www.apache.org/licenses/LICENSE-2.0 ~ ~ Unless required by applicable law or agreed to in writing, ~ software distributed under the License is distributed on an ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY ~ KIND, either express or implied. See the License for the ~ specific
+ language governing permissions and limitations ~ under the License.
+ -->
+<beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:context="http://www.springframework.org/schema/context" xmlns:util="http://www.springframework.org/schema/util" xmlns:http-conf="http://cxf.apache.org/transports/http/configuration" xmlns:tx="http://www.springframework.org/schema/tx" xmlns:jaxws="http://cxf.apache.org/jaxws" xmlns:cxf="http://cxf.apache.org/core" xmlns:htd="http://www.example.org/WS-HT" xmlns:htda="http://www.example.org/WS-HT/api" xmlns:htdt="http://www.example.org/WS-HT/api/xsd" xmlns:htdaw="http://www.example.org/WS-HT/api/wsdl" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:ins="http://www.insurance.example.com/claims"
+xmlns:osgi="http://www.springframework.org/schema/osgi"
+ xsi:schemaLocation="
+ http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
+ http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-2.0.xsd
+ http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util-2.0.xsd
+ http://cxf.apache.org/transports/http/configuration http://cxf.apache.org/schemas/configuration/http-conf.xsd
+ http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
+ http://cxf.apache.org/jaxws http://cxf.apache.org/schemas/jaxws.xsd
+ http://cxf.apache.org/core http://cxf.apache.org/schemas/core.xsd
+ http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-2.5.xsd
+ http://www.springframework.org/schema/osgi http://www.springframework.org/schema/osgi/spring-osgi.xsd
+ ">
+
+<!--
+ <import resource="classpath:META-INF/cxf/cxf.xml"/>
+ <import resource="classpath:META-INF/cxf/cxf-extension-soap.xml"/>
+ <import resource="classpath:META-INF/cxf/cxf-servlet.xml"/>
+-->
+ <import resource="classpath:META-INF/cxf/cxf.xml" />
+ <import resource="classpath:META-INF/cxf/cxf-extension-soap.xml" />
+ <import resource="classpath:META-INF/cxf/cxf-extension-http.xml" />
+ <import resource="classpath:META-INF/cxf/osgi/cxf-extension-osgi.xml" />
+
+
+<!--
+ <bean id="hisePasswordCallback" class="org.apache.hise.engine.MapPasswordCallback">
+ <property name="passwords" ref="hiseLoginProperties"/>
+ </bean>
+ -->
+
+<!--
+ <bean id="transactionHandler" class="org.apache.hise.engine.jaxws.TransactionHandler">
+ <property name="transactionManager" ref="transactionManager"/>
+ </bean>
+ -->
+
+ <bean id="hiseDao" class="org.apache.hise.dao.HISEDao">
+ <property name="entityManagerFactory" ref="htEntityManagerFactory"/>
+ </bean>
+
+ <bean id="hiseEngine" class="org.apache.hise.engine.HISEEngineImpl">
+ <property name="hiseDao" ref="hiseDao"/>
+ <property name="hiseScheduler" ref="hiseScheduler"/>
+ <property name="hiseUserDetails" ref="hiseUserDetails"/>
+ </bean>
+
+ <osgi:service id="hiseEngineOsgi" ref="hiseEngine" interface="org.apache.hise.api.HISEEngine" />
+
+
+ <bean id="hiseUserDetails" class="org.apache.hise.engine.DefaultHISEUserDetails">
+ <property name="hiseDao" ref="hiseDao"/>
+ </bean>
+
+ <bean id="hisePasswordCallback" class="org.apache.hise.engine.HISEPasswordCallback">
+ <property name="hiseUserDetails" ref="hiseUserDetails"/>
+ </bean>
+
+ <bean id="hiseScheduler" class="org.apache.hise.engine.HISEScheduler" init-method="init" destroy-method="destroy">
+ <property name="hiseEngine" ref="hiseEngine"/>
+ <property name="transactionManager" ref="transactionManager"/>
+ </bean>
+
+ <tx:annotation-driven transaction-manager="transactionManager"/>
+
+ <!--
+ <util:properties id="hiseLoginProperties" location="classpath:hise-login.properties"/>
+ -->
+
+ <bean id="transactionManager" class="org.springframework.orm.jpa.JpaTransactionManager">
+ <property name="entityManagerFactory" ref="htEntityManagerFactory"/>
+ <property name="dataSource" ref="dataSource"/>
+ </bean>
+ <osgi:service id="transactionManagerOsgi" interface="org.springframework.transaction.PlatformTransactionManager" ref="transactionManager"/>
+
+
+ <bean name="taskOperations" class="org.apache.hise.engine.jaxws.TaskOperationsImpl" init-method="init">
+ <property name="hiseEngine" ref="hiseEngine"/>
+ </bean>
+
+ <jaxws:endpoint id="taskOperationsEndpoint" name="taskOperationsEndpoint" address="/taskOperations/" implementor="#taskOperations" serviceName="htdaw:taskOperations" publish="true" wsdlLocation="classpath:ws-humantask.wsdl">
+ <!--
+ <jaxws:handlers>
+ <ref bean="transactionHandler"/>
+ </jaxws:handlers>
+ -->
+ <jaxws:inInterceptors>
+ <bean class="org.apache.cxf.ws.security.wss4j.WSS4JInInterceptor">
+ <constructor-arg>
+ <map>
+ <entry key="action" value="UsernameToken"/>
+ <entry key="passwordType" value="PasswordDigest"/>
+ <entry key="passwordCallbackRef">
+ <ref bean="hisePasswordCallback"/>
+ </entry>
+ </map>
+ </constructor-arg>
+ </bean>
+ </jaxws:inInterceptors>
+ </jaxws:endpoint>
+
+<!--
+ <bean id="logInbound" class="org.apache.cxf.interceptor.LoggingInInterceptor"/>
+ <bean id="logOutbound" class="org.apache.cxf.interceptor.LoggingOutInterceptor"/>
+ <cxf:bus>
+ <cxf:inInterceptors>
+ <ref bean="logInbound"/>
+ </cxf:inInterceptors>
+ <cxf:outInterceptors>
+ <ref bean="logOutbound"/>
+ </cxf:outInterceptors>
+ <cxf:inFaultInterceptors>
+ <ref bean="logInbound"/>
+ </cxf:inFaultInterceptors>
+ <cxf:outFaultInterceptors>
+ <ref bean="logOutbound"/>
+ </cxf:outFaultInterceptors>
+ </cxf:bus>
+-->
+</beans>
Propchange: incubator/hise/trunk/hise-bundle/src/main/resources/META-INF/spring/beans.xml
------------------------------------------------------------------------------
svn:eol-style = native
Added: incubator/hise/trunk/hise-bundle/src/main/resources/META-INF/spring/hise-ds.xml
URL: http://svn.apache.org/viewvc/incubator/hise/trunk/hise-bundle/src/main/resources/META-INF/spring/hise-ds.xml?rev=905964&view=auto
==============================================================================
--- incubator/hise/trunk/hise-bundle/src/main/resources/META-INF/spring/hise-ds.xml (added)
+++ incubator/hise/trunk/hise-bundle/src/main/resources/META-INF/spring/hise-ds.xml Wed Feb 3 09:58:00 2010
@@ -0,0 +1,140 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ ~ Licensed to the Apache Software Foundation (ASF) under one
+ ~ or more contributor license agreements. See the NOTICE file
+ ~ distributed with this work for additional information
+ ~ regarding copyright ownership. The ASF licenses this file
+ ~ to you under the Apache License, Version 2.0 (the
+ ~ "License"); you may not use this file except in compliance
+ ~ with the License. You may obtain a copy of the License at
+ ~
+ ~ http://www.apache.org/licenses/LICENSE-2.0
+ ~
+ ~ Unless required by applicable law or agreed to in writing,
+ ~ software distributed under the License is distributed on an
+ ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ ~ KIND, either express or implied. See the License for the
+ ~ specific language governing permissions and limitations
+ ~ under the License.
+ -->
+<beans xmlns="http://www.springframework.org/schema/beans"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns:util="http://www.springframework.org/schema/util"
+
+ xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
+ http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-2.5.xsd
+ http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-2.5.xsd http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-2.5.xsd
+ http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util-2.5.xsd
+ ">
+
+ <bean id="htEntityManagerFactory" class="org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean">
+ <property name="dataSource" ref="dataSource" />
+ <property name="jpaPropertyMap" ref="jpaPropertyMap"/>
+ <property name="jpaVendorAdapter" ref="jpaVendorAdapter"/>
+ <property name="persistenceXmlLocation" value="classpath:/org/apache/hise/persistence.xml" />
+ <property name="persistenceUnitName" value="org.apache.hise"/>
+ </bean>
+
+ <util:map id="jpaPropertyMap">
+ <!--
+ <entry key="hibernate.search.default.directory_provider" value="org.hibernate.search.store.RAMDirectoryProvider" />
+ <entry key="hibernate.cache.provider_class" value="net.sf.ehcache.hibernate.SingletonEhCacheProvider" />
+ <entry key="hibernate.cache.provider_configuration" value="classpath:ehCache.xml" />
+ <entry key="hibernate.cache.use_second_level_cache" value="true" />
+ <entry key="hibernate.generate_statistics" value="true" />
+ <entry key="hibernate.cache.use_structured_entries" value="true" />
+ <entry key="hibernate.jdbc.batch_size" value="0" />
+ <entry key="hibernate.default_batch_fetch_size" value="20"/>
+ <entry key="hibernate.hbm2ddl.auto" value="create" />
+ -->
+ </util:map>
+
+ <!-- OpenJPA H2 Driver -->
+ <bean id="jpaVendorAdapter" class="org.apache.hise.dao.vendor.OpenJpaVendorAdapter">
+ <property name="database" value="H2"/>
+ <property name="databasePlatform" value="org.apache.openjpa.jdbc.sql.H2Dictionary"/>
+ <property name="generateDdl" value="true" />
+ <property name="showSql" value="false" />
+ <property name="extProperties">
+ <util:map>
+ <entry key="openjpa.jdbc.SynchronizeMappings" value="buildSchema(ForeignKeys=true,SchemaAction='add')"/>
+ </util:map>
+ </property>
+ </bean>
+
+<!--
+ <bean id="dataSource" class="org.apache.commons.dbcp.BasicDataSource" destroy-method="close">
+ <property name="driverClassName" value="org.h2.Driver" />
+ <property name="url" value="jdbc:h2:file:hise-h2-db;DB_CLOSE_ON_EXIT=false" />
+ <property name="username" value="sa" />
+ <property name="password">
+ <value></value>
+ </property>
+ </bean>
+-->
+ <!--
+ <bean id="dataSource" class="org.springframework.jdbc.datasource.SingleConnectionDataSource">
+ <property name="driverClassName" value="org.h2.Driver" />
+ <property name="url" value="jdbc:h2:file:hise-h2-db;DB_CLOSE_ON_EXIT=false"/>
+ <property name="username" value="sa" />
+ <property name="password">
+ <value></value>
+ </property>
+ <property name="autoCommit" value="false" />
+ <property name="suppressClose" value="true" />
+ </bean>
+ -->
+
+ <bean id="dataSource" class="org.springframework.jdbc.datasource.SimpleDriverDataSource">
+ <property name="driverClass" value="org.h2.Driver" />
+ <property name="url" value="jdbc:h2:file:hise-h2-db;DB_CLOSE_ON_EXIT=false"/>
+ <property name="username" value="sa" />
+ <property name="password">
+ <value></value>
+ </property>
+ </bean>
+ <!--
+ -->
+
+ <!-- Hibernate MySQL Driver
+ <bean id="htJPAVendorAdapter" class="org.springframework.orm.jpa.vendor.HibernateJpaVendorAdapter">
+ <property name="showSql" value="true" />
+ <property name="generateDdl" value="true" />
+ <property name="databasePlatform" value="org.hibernate.dialect.MySQL5Dialect" />
+ </bean>
+
+ <bean id="dataSource" class="org.springframework.jdbc.datasource.SingleConnectionDataSource" lazy-init="true">
+ <property name="driverClassName" value="com.mysql.jdbc.Driver" />
+ <property name="url" value="jdbc:mysql://localhost/hise"/>
+ <property name="username" value="root" />
+ <property name="password" value="abc"/>
+ <property name="autoCommit" value="false" />
+ <property name="suppressClose" value="true" />
+ </bean>
+ -->
+
+
+<!-- OpenJPA Oracle Driver
+ <bean id="jpaVendorAdapter" class="org.apache.hise.dao.vendor.OpenJpaVendorAdapter">
+ <property name="database" value="ORACLE"/>
+ <property name="databasePlatform" value="org.apache.openjpa.jdbc.sql.OracleDictionary"/>
+ <property name="generateDdl" value="true" />
+ <property name="showSql" value="true" />
+ <property name="extProperties">
+ <util:map>
+ <entry key="openjpa.jdbc.SynchronizeMappings" value="buildSchema(ForeignKeys=true,SchemaAction='drop,add')"/>
+ </util:map>
+ </property>
+ </bean>
+
+
+ <bean id="dataSource" class="org.springframework.jdbc.datasource.SingleConnectionDataSource" lazy-init="true">
+ <property name="driverClassName" value="oracle.jdbc.driver.OracleDriver" />
+ <property name="url" value="jdbc:oracle:thin:@localhost:1521:XE"/>
+ <property name="username" value="hise" />
+ <property name="password" value="hise"/>
+ <property name="autoCommit" value="false" />
+ <property name="suppressClose" value="true" />
+ </bean>
+ -->
+ </beans>
Propchange: incubator/hise/trunk/hise-bundle/src/main/resources/META-INF/spring/hise-ds.xml
------------------------------------------------------------------------------
svn:eol-style = native
Modified: incubator/hise/trunk/hise-services/pom.xml
URL: http://svn.apache.org/viewvc/incubator/hise/trunk/hise-services/pom.xml?rev=905964&r1=905963&r2=905964&view=diff
==============================================================================
--- incubator/hise/trunk/hise-services/pom.xml (original)
+++ incubator/hise/trunk/hise-services/pom.xml Wed Feb 3 09:58:00 2010
@@ -216,6 +216,11 @@
<version>${cxf.version}</version>
</dependency>
<dependency>
+ <groupId>org.apache.cxf</groupId>
+ <artifactId>cxf-rt-frontend-jaxws</artifactId>
+ <version>${cxf.version}</version>
+ </dependency>
+ <dependency>
<groupId>net.sf.saxon</groupId>
<artifactId>saxon</artifactId>
<version>9.1.0.8</version>
Added: incubator/hise/trunk/hise-services/src/main/java/org/apache/hise/SampleUsers.java
URL: http://svn.apache.org/viewvc/incubator/hise/trunk/hise-services/src/main/java/org/apache/hise/SampleUsers.java?rev=905964&view=auto
==============================================================================
--- incubator/hise/trunk/hise-services/src/main/java/org/apache/hise/SampleUsers.java (added)
+++ incubator/hise/trunk/hise-services/src/main/java/org/apache/hise/SampleUsers.java Wed Feb 3 09:58:00 2010
@@ -0,0 +1,50 @@
+package org.apache.hise;
+
+import org.apache.hise.dao.HISEDao;
+import org.apache.hise.dao.OrgEntity;
+import org.apache.hise.dao.TaskOrgEntity;
+import org.springframework.orm.jpa.JpaTransactionManager;
+import org.springframework.transaction.TransactionStatus;
+import org.springframework.transaction.support.TransactionCallback;
+import org.springframework.transaction.support.TransactionTemplate;
+
+public class SampleUsers {
+
+ private HISEDao hiseDao;
+ private JpaTransactionManager transactionManager;
+
+ public void setHiseDao(HISEDao hiseDao) {
+ this.hiseDao = hiseDao;
+ }
+
+ public void setTransactionManager(JpaTransactionManager transactionManager) {
+ this.transactionManager = transactionManager;
+ }
+
+ private void addUser(String name, String pass) {
+ OrgEntity o = new OrgEntity();
+ o.setName(name);
+ o.setType(TaskOrgEntity.OrgEntityType.USER);
+ o.setUserPassword(pass);
+ hiseDao.persist(o);
+ }
+
+ public void init() {
+ TransactionTemplate transactionTemplate = new TransactionTemplate(transactionManager);
+
+ transactionTemplate.execute(new TransactionCallback() {
+ public Object doInTransaction(TransactionStatus arg0) {
+ OrgEntity g = new OrgEntity();
+ {
+ g.setName("group1");
+ g.setType(TaskOrgEntity.OrgEntityType.GROUP);
+ hiseDao.persist(g);
+ }
+ addUser("user1", "user1pass");
+ addUser("user2", "user2pass");
+ addUser("user5", "user5pass");
+ return null;
+ }
+ });
+ }
+}
Propchange: incubator/hise/trunk/hise-services/src/main/java/org/apache/hise/SampleUsers.java
------------------------------------------------------------------------------
svn:eol-style = native
Added: incubator/hise/trunk/hise-services/src/main/java/org/apache/hise/api/HISEEngine.java
URL: http://svn.apache.org/viewvc/incubator/hise/trunk/hise-services/src/main/java/org/apache/hise/api/HISEEngine.java?rev=905964&view=auto
==============================================================================
--- incubator/hise/trunk/hise-services/src/main/java/org/apache/hise/api/HISEEngine.java (added)
+++ incubator/hise/trunk/hise-services/src/main/java/org/apache/hise/api/HISEEngine.java Wed Feb 3 09:58:00 2010
@@ -0,0 +1,21 @@
+package org.apache.hise.api;
+
+import javax.xml.namespace.QName;
+
+import org.apache.hise.engine.store.HISEDD;
+import org.apache.hise.engine.store.TaskDD;
+import org.apache.hise.lang.TaskDefinition;
+import org.w3c.dom.Element;
+import org.w3c.dom.Node;
+
+public interface HISEEngine {
+ public static class TaskInfo {
+ public String taskKey;
+ public TaskDefinition taskDefinition;
+ public HISEDD parent;
+ public TaskDD dd;
+ }
+
+ public void registerTask(TaskInfo ti);
+ public Node receive(QName portType, String operation, Element body, Node requestHeader);
+}
Propchange: incubator/hise/trunk/hise-services/src/main/java/org/apache/hise/api/HISEEngine.java
------------------------------------------------------------------------------
svn:eol-style = native
Added: incubator/hise/trunk/hise-services/src/main/java/org/apache/hise/engine/HISEEngineImpl.java
URL: http://svn.apache.org/viewvc/incubator/hise/trunk/hise-services/src/main/java/org/apache/hise/engine/HISEEngineImpl.java?rev=905964&view=auto
==============================================================================
--- incubator/hise/trunk/hise-services/src/main/java/org/apache/hise/engine/HISEEngineImpl.java (added)
+++ incubator/hise/trunk/hise-services/src/main/java/org/apache/hise/engine/HISEEngineImpl.java Wed Feb 3 09:58:00 2010
@@ -0,0 +1,201 @@
+/*
+ * 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.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import javax.xml.namespace.QName;
+
+import org.apache.commons.lang.Validate;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.apache.hise.api.HISEEngine;
+import org.apache.hise.api.HISEUserDetails;
+import org.apache.hise.dao.HISEDao;
+import org.apache.hise.dao.Job;
+import org.apache.hise.engine.jaxws.HISEJaxWSClient;
+import org.apache.hise.engine.store.HISEDD;
+import org.apache.hise.engine.store.TaskDD;
+import org.apache.hise.lang.TaskDefinition;
+import org.apache.hise.runtime.Task;
+import org.apache.hise.runtime.TaskEvaluator;
+import org.apache.hise.utils.DOMUtils;
+import org.apache.hise.utils.XQueryEvaluator;
+import org.w3c.dom.Element;
+import org.w3c.dom.Node;
+
+public class HISEEngineImpl implements HISEEngine {
+ private static Log log = LogFactory.getLog(HISEEngineImpl.class);
+
+ public final Map<String, QName> tasksMap = new HashMap<String, QName>();
+ public final Map<QName, TaskInfo> tasks = new HashMap<QName, TaskInfo>();
+ private HISEDao hiseDao;
+ private HISEUserDetails hiseUserDetails;
+
+ private HISEScheduler hiseScheduler;
+
+ public HISEDao getHiseDao() {
+ return hiseDao;
+ }
+
+ public void setHiseUserDetails(HISEUserDetails hiseUserDetails) {
+ this.hiseUserDetails = hiseUserDetails;
+ }
+
+ public HISEUserDetails getHiseUserDetails() {
+ return hiseUserDetails;
+ }
+
+ public void setHiseDao(HISEDao hiseDao) {
+ this.hiseDao = hiseDao;
+ }
+
+ public HISEScheduler getHiseScheduler() {
+ return hiseScheduler;
+ }
+
+ public void setHiseScheduler(HISEScheduler hiseScheduler) {
+ this.hiseScheduler = hiseScheduler;
+ }
+
+ public static QName getCanonicalQName(QName q) {
+ String ns = q.getNamespaceURI();
+ ns = ns.endsWith("/") ? ns.substring(0, ns.length() - 1) : ns;
+ return new QName(ns, q.getLocalPart());
+ }
+
+ public static String tasksKey(QName portType, String operation) {
+ return getCanonicalQName(portType) + ";" + operation;
+ }
+
+ public void registerTask(TaskInfo ti) {
+ log.debug("registering route " + ti.taskKey + " -> " + ti.taskDefinition.getTaskName());
+
+ if (tasks.containsKey(ti.taskDefinition.getTaskName()) || tasksMap.containsKey(ti.taskKey)) {
+ throw new IllegalArgumentException("Unable to deploy " + ti + " is already deployed.");
+ }
+
+ tasksMap.put(ti.taskKey, ti.taskDefinition.getTaskName());
+ tasks.put(ti.taskDefinition.getTaskName(), ti);
+
+ log.debug("registered");
+ }
+
+ public TaskDefinition getTaskDefinition(QName taskName) {
+ Validate.notNull(tasks.get(taskName), "" + taskName + " not found");
+ return tasks.get(taskName).taskDefinition;
+ }
+
+ public QName getTaskName(QName portType, String operation) {
+ QName n = tasksMap.get(tasksKey(portType, operation));
+ Validate.notNull(n, "Task for " + portType + " " + operation + " not found in routing table.");
+ return n;
+ }
+
+ public static String fetchCreatedBy(Node requestHeader) {
+ log.debug("header " + DOMUtils.domToString(requestHeader));
+ XQueryEvaluator e = new XQueryEvaluator();
+ List r = e.evaluateExpression("declare namespace htd='http://www.example.org/WS-HT'; xs:string(*/htd:initiator)", requestHeader);
+ return r.size() == 1 ? (String) r.get(0) : "";
+ }
+
+ public Node receive(QName portType, String operation, Element body, Node requestHeader) {
+ String createdBy = fetchCreatedBy(requestHeader);
+
+ QName taskName = getTaskName(portType, operation);
+ assert(taskName != null);
+ log.debug("routed " + portType + " " + operation + " -> " + taskName);
+ TaskDefinition def = getTaskDefinition(taskName);
+ Task t;
+ if (def.isNotification()) {
+ t = Task.createNotification(this, getTaskDefinition(taskName), createdBy, DOMUtils.getFirstElement(body), requestHeader);
+ } else {
+ t = Task.create(this, getTaskDefinition(taskName), createdBy, DOMUtils.getFirstElement(body), requestHeader);
+ }
+ return t.getTaskEvaluator().evaluateApproveResponseHeader();
+ }
+
+ public void receiveNotification(QName notificationName, Node request) {
+ notificationName = DOMUtils.uniqueQName(notificationName);
+ log.debug("Receiving notification " + notificationName);
+ TaskInfo n = tasks.get(notificationName);
+ Validate.notNull(n, "Can't find notification in registry " + notificationName);
+ Validate.isTrue(n.taskDefinition.isNotification());
+ Task.createNotification(this, n.taskDefinition, "", request, TaskEvaluator.defaultHeader());
+ }
+
+ public void sendResponse(QName taskName, Node body, Node epr) {
+ TaskInfo ti = tasks.get(taskName);
+ log.debug("sending response for " + taskName + " to " + DOMUtils.domToString(epr) + " body " + DOMUtils.domToString(body) + " " + ti.dd.sender);
+ HISEJaxWSClient c = (HISEJaxWSClient) ti.dd.sender;
+ log.debug("result: " + c.invoke(body, epr));
+ }
+
+
+ public void executeJob(Job job) {
+ Task t = Task.load(this, job.getTask().getId());
+ try {
+ t.setCurrentJob(job);
+ t.getClass().getMethod(job.getAction() + "JobAction").invoke(t);
+ } catch (Exception e) {
+ throw new RuntimeException("timer job failed", e);
+ }
+ }
+
+// /**
+// * {@inheritDoc}
+// */
+// public Task createTask(QName taskName, String createdBy, String requestXml) {
+//
+// Validate.notNull(taskName);
+// Validate.notNull(requestXml);
+//
+// log.info("Creating task: " + taskName + " , createdBy: " + createdBy);
+//
+// TaskDefinition taskDefinition = getTaskDefinition(taskName);
+//
+// Task newTask = new Task();
+// newTask.init(taskDefinition, createdBy, requestXml);
+// return newTask;
+// }
+
+// /**
+// * {@inheritDoc}
+// */
+// public List<org.apache.hise.dao.Task> getMyTasks(String personName, TaskTypes taskType, GenericHumanRole genericHumanRole, String workQueue, List<org.apache.hise.dao.Task.Status> statuses,
+// String whereClause, String orderByClause, String createdOnClause, Integer maxTasks, Integer offset) {
+//
+// Person person = null;
+//
+// EntityManager em = entityManagerFactory.createEntityManager();
+// if (workQueue == null) {
+// person = new AssigneeDao(em).getPerson(personName);
+// }
+//
+// return new TaskDao(em).getTasks(person, taskType, genericHumanRole, workQueue, statuses,
+// whereClause, orderByClause, createdOnClause, maxTasks, offset);
+// }
+
+// public Person loadUser(String userId, EntityManager em) {
+// return new AssigneeDao(em).getPerson(userId);
+// }
+}
Propchange: incubator/hise/trunk/hise-services/src/main/java/org/apache/hise/engine/HISEEngineImpl.java
------------------------------------------------------------------------------
svn:eol-style = native
Modified: incubator/hise/trunk/hise-services/src/main/java/org/apache/hise/engine/HISEScheduler.java
URL: http://svn.apache.org/viewvc/incubator/hise/trunk/hise-services/src/main/java/org/apache/hise/engine/HISEScheduler.java?rev=905964&r1=905963&r2=905964&view=diff
==============================================================================
--- incubator/hise/trunk/hise-services/src/main/java/org/apache/hise/engine/HISEScheduler.java (original)
+++ incubator/hise/trunk/hise-services/src/main/java/org/apache/hise/engine/HISEScheduler.java Wed Feb 3 09:58:00 2010
@@ -43,7 +43,7 @@
private Log __log = LogFactory.getLog(HISEScheduler.class);
- private HISEEngine hiseEngine;
+ private HISEEngineImpl hiseEngine;
private ScheduledExecutorService executor;
private PlatformTransactionManager transactionManager;
@@ -96,11 +96,11 @@
}
- public HISEEngine getHiseEngine() {
+ public HISEEngineImpl getHiseEngine() {
return hiseEngine;
}
- public void setHiseEngine(HISEEngine hiseEngine) {
+ public void setHiseEngine(HISEEngineImpl hiseEngine) {
this.hiseEngine = hiseEngine;
}
Modified: incubator/hise/trunk/hise-services/src/main/java/org/apache/hise/engine/jaxws/HISEJaxWSClient.java
URL: http://svn.apache.org/viewvc/incubator/hise/trunk/hise-services/src/main/java/org/apache/hise/engine/jaxws/HISEJaxWSClient.java?rev=905964&r1=905963&r2=905964&view=diff
==============================================================================
--- incubator/hise/trunk/hise-services/src/main/java/org/apache/hise/engine/jaxws/HISEJaxWSClient.java (original)
+++ incubator/hise/trunk/hise-services/src/main/java/org/apache/hise/engine/jaxws/HISEJaxWSClient.java Wed Feb 3 09:58:00 2010
@@ -26,20 +26,19 @@
import javax.xml.soap.MessageFactory;
import javax.xml.soap.SOAPException;
import javax.xml.soap.SOAPMessage;
-import javax.xml.transform.dom.DOMSource;
import javax.xml.ws.Dispatch;
-import javax.xml.ws.EndpointReference;
import javax.xml.ws.Service;
-import javax.xml.ws.wsaddressing.W3CEndpointReference;
+import javax.xml.ws.spi.ServiceDelegate;
import org.apache.commons.lang.Validate;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
-import org.apache.cxf.ws.addressing.EndpointReferenceType;
+import org.apache.cxf.jaxws.spi.ProviderImpl;
import org.apache.hise.utils.XQueryEvaluator;
import org.w3c.dom.Document;
import org.w3c.dom.Node;
+
public class HISEJaxWSClient {
private Log __log = LogFactory.getLog(HISEJaxWSClient.class);
@@ -49,13 +48,15 @@
URL wsdlDocumentLocation;
QName serviceName;
- private Service destinationService;
+ private ServiceDelegate destinationService;
private QName destinationPort;
private XQueryEvaluator evaluator = new XQueryEvaluator();
public void init() throws Exception {
messageFactory = MessageFactory.newInstance();
- destinationService = Service.create(wsdlDocumentLocation, serviceName);
+ javax.xml.ws.spi.Provider provider = new ProviderImpl();
+ destinationService = provider.createServiceDelegate(wsdlDocumentLocation, serviceName, Service.class);
+// destinationService = Service.create(wsdlDocumentLocation, serviceName);
destinationPort = null;
{
Iterator<QName> it = destinationService.getPorts();
Modified: incubator/hise/trunk/hise-services/src/main/java/org/apache/hise/engine/jaxws/HISEJaxWSService.java
URL: http://svn.apache.org/viewvc/incubator/hise/trunk/hise-services/src/main/java/org/apache/hise/engine/jaxws/HISEJaxWSService.java?rev=905964&r1=905963&r2=905964&view=diff
==============================================================================
--- incubator/hise/trunk/hise-services/src/main/java/org/apache/hise/engine/jaxws/HISEJaxWSService.java (original)
+++ incubator/hise/trunk/hise-services/src/main/java/org/apache/hise/engine/jaxws/HISEJaxWSService.java Wed Feb 3 09:58:00 2010
@@ -34,10 +34,12 @@
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
-import org.apache.hise.engine.HISEEngine;
+import org.apache.hise.api.HISEEngine;
+import org.apache.hise.engine.HISEEngineImpl;
import org.springframework.orm.jpa.JpaCallback;
import org.springframework.orm.jpa.JpaTemplate;
import org.springframework.orm.jpa.JpaTransactionManager;
+import org.springframework.transaction.PlatformTransactionManager;
import org.springframework.transaction.TransactionStatus;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.transaction.support.TransactionCallback;
@@ -53,7 +55,7 @@
private HISEEngine hiseEngine;
private WebServiceContext context;
- private JpaTransactionManager transactionManager;
+ private PlatformTransactionManager transactionManager;
private MessageFactory messageFactory;
private TransactionTemplate transactionTemplate;
@@ -73,7 +75,7 @@
return context;
}
- public void setTransactionManager(JpaTransactionManager transactionManager) {
+ public void setTransactionManager(PlatformTransactionManager transactionManager) {
this.transactionManager = transactionManager;
}
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=905964&r1=905963&r2=905964&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 Wed Feb 3 09:58:00 2010
@@ -36,7 +36,7 @@
import org.apache.hise.dao.OrgEntity;
import org.apache.hise.dao.TaskOrgEntity;
import org.apache.hise.dao.TaskQuery;
-import org.apache.hise.engine.HISEEngine;
+import org.apache.hise.engine.HISEEngineImpl;
import org.apache.hise.engine.wsdl.IllegalAccessFault;
import org.apache.hise.engine.wsdl.IllegalArgumentFault;
import org.apache.hise.engine.wsdl.IllegalOperationFault;
@@ -66,7 +66,7 @@
@WebService
public class TaskOperationsImpl implements TaskOperations {
- private HISEEngine hiseEngine;
+ private HISEEngineImpl hiseEngine;
private WebServiceContext context;
@@ -77,7 +77,7 @@
context = (WebServiceContext) Class.forName("org.apache.cxf.jaxws.context.WebServiceContextImpl").newInstance();
}
- public void setHiseEngine(HISEEngine hiseEngine) {
+ public void setHiseEngine(HISEEngineImpl hiseEngine) {
this.hiseEngine = hiseEngine;
}
Modified: incubator/hise/trunk/hise-services/src/main/java/org/apache/hise/engine/store/HISEDeployer.java
URL: http://svn.apache.org/viewvc/incubator/hise/trunk/hise-services/src/main/java/org/apache/hise/engine/store/HISEDeployer.java?rev=905964&r1=905963&r2=905964&view=diff
==============================================================================
--- incubator/hise/trunk/hise-services/src/main/java/org/apache/hise/engine/store/HISEDeployer.java (original)
+++ incubator/hise/trunk/hise-services/src/main/java/org/apache/hise/engine/store/HISEDeployer.java Wed Feb 3 09:58:00 2010
@@ -20,8 +20,8 @@
package org.apache.hise.engine.store;
import org.apache.commons.lang.Validate;
-import org.apache.hise.engine.HISEEngine;
-import org.apache.hise.engine.HISEEngine.TaskInfo;
+import org.apache.hise.api.HISEEngine;
+import org.apache.hise.engine.HISEEngineImpl;
import org.apache.hise.lang.HumanInteractions;
import org.apache.hise.lang.TaskDefinition;
@@ -39,10 +39,10 @@
for (TaskDD t : di.getTasksDI()) {
TaskDefinition d = tasks.getTaskDefinitions().get(t.getTaskName());
Validate.notNull(d, "Can't find Task name specified in deployment descriptor " + t.getTaskName());
- TaskInfo ti = new HISEEngine.TaskInfo();
+ org.apache.hise.api.HISEEngine.TaskInfo ti = new org.apache.hise.api.HISEEngine.TaskInfo();
ti.dd = t;
ti.parent = di;
- ti.taskKey = HISEEngine.tasksKey(d.getTaskInterface().getPortType(), d.getTaskInterface().getOperation());
+ ti.taskKey = HISEEngineImpl.tasksKey(d.getTaskInterface().getPortType(), d.getTaskInterface().getOperation());
ti.taskDefinition = d;
hiseEngine.registerTask(ti);
}
Modified: incubator/hise/trunk/hise-services/src/main/java/org/apache/hise/runtime/Task.java
URL: http://svn.apache.org/viewvc/incubator/hise/trunk/hise-services/src/main/java/org/apache/hise/runtime/Task.java?rev=905964&r1=905963&r2=905964&view=diff
==============================================================================
--- incubator/hise/trunk/hise-services/src/main/java/org/apache/hise/runtime/Task.java (original)
+++ incubator/hise/trunk/hise-services/src/main/java/org/apache/hise/runtime/Task.java Wed Feb 3 09:58:00 2010
@@ -36,7 +36,7 @@
import org.apache.hise.dao.TaskOrgEntity;
import org.apache.hise.dao.Task.Status;
import org.apache.hise.dao.TaskOrgEntity.OrgEntityType;
-import org.apache.hise.engine.HISEEngine;
+import org.apache.hise.engine.HISEEngineImpl;
import org.apache.hise.lang.TaskDefinition;
import org.apache.hise.lang.xsd.htd.TGrouplist;
import org.apache.hise.lang.xsd.htd.TOrganizationalEntity;
@@ -57,7 +57,7 @@
private final Log __log = LogFactory.getLog(Task.class);
- private HISEEngine hiseEngine;
+ private HISEEngineImpl hiseEngine;
private org.apache.hise.dao.Task taskDto;
private TaskDefinition taskDefinition;
@@ -99,11 +99,11 @@
this.currentUser = currentUser;
}
- public HISEEngine getHiseEngine() {
+ public HISEEngineImpl getHiseEngine() {
return hiseEngine;
}
- private Task(HISEEngine engine, boolean notification) {
+ private Task(HISEEngineImpl engine, boolean notification) {
this.hiseEngine = engine;
Validate.notNull(hiseEngine);
@@ -133,7 +133,7 @@
this.taskEvaluator = taskEvaluator;
}
- public static Task load(HISEEngine engine, Long id) {
+ public static Task load(HISEEngineImpl engine, Long id) {
HISEDao dao = engine.getHiseDao();
org.apache.hise.dao.Task dto = dao.find(org.apache.hise.dao.Task.class, id);
Task t = new Task(engine, dto.isNotification());
@@ -162,7 +162,7 @@
}
}
- public static Task create(HISEEngine engine, TaskDefinition taskDefinition, String createdBy, Node requestXml, Node requestHeader) {
+ public static Task create(HISEEngineImpl engine, TaskDefinition taskDefinition, String createdBy, Node requestXml, Node requestHeader) {
Task t = new Task(engine, false);
Validate.notNull(taskDefinition);
Validate.isTrue(!taskDefinition.isNotification());
@@ -232,7 +232,7 @@
// recalculatePriority();
}
- public static Task createNotification(HISEEngine engine, TaskDefinition taskDefinition, String createdBy, Node requestXml, Node requestHeader) {
+ public static Task createNotification(HISEEngineImpl engine, TaskDefinition taskDefinition, String createdBy, Node requestXml, Node requestHeader) {
Task t = new Task(engine, true);
Validate.notNull(taskDefinition);
Validate.isTrue(taskDefinition.isNotification());
Modified: incubator/hise/trunk/hise-services/src/main/resources/org/apache/hise/persistence.xml
URL: http://svn.apache.org/viewvc/incubator/hise/trunk/hise-services/src/main/resources/org/apache/hise/persistence.xml?rev=905964&r1=905963&r2=905964&view=diff
==============================================================================
--- incubator/hise/trunk/hise-services/src/main/resources/org/apache/hise/persistence.xml (original)
+++ incubator/hise/trunk/hise-services/src/main/resources/org/apache/hise/persistence.xml Wed Feb 3 09:58:00 2010
@@ -1,34 +1,35 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!--
- ~ Licensed to the Apache Software Foundation (ASF) under one
- ~ or more contributor license agreements. See the NOTICE file
- ~ distributed with this work for additional information
- ~ regarding copyright ownership. The ASF licenses this file
- ~ to you under the Apache License, Version 2.0 (the
- ~ "License"); you may not use this file except in compliance
- ~ with the License. You may obtain a copy of the License at
- ~
- ~ http://www.apache.org/licenses/LICENSE-2.0
- ~
- ~ Unless required by applicable law or agreed to in writing,
- ~ software distributed under the License is distributed on an
- ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- ~ KIND, either express or implied. See the License for the
- ~ specific language governing permissions and limitations
- ~ under the License.
+ <!--
+ ~ 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.
-->
<persistence xmlns="http://java.sun.com/xml/ns/persistence" version="1.0">
- <persistence-unit name="org.apache.hise">
- <class>org.apache.hise.dao.Attachment</class>
- <class>org.apache.hise.dao.Comment</class>
- <class>org.apache.hise.dao.Fault</class>
- <class>org.apache.hise.dao.JpaBase</class>
- <class>org.apache.hise.dao.Message</class>
- <class>org.apache.hise.dao.OrgEntity</class>
- <class>org.apache.hise.dao.TaskOrgEntity</class>
- <class>org.apache.hise.dao.PresentationParameter</class>
- <class>org.apache.hise.dao.Task</class>
- <class>org.apache.hise.dao.Job</class>
- <exclude-unlisted-classes/>
- </persistence-unit>
+ <persistence-unit name="org.apache.hise">
+ <class>org.apache.hise.dao.Attachment</class>
+ <class>org.apache.hise.dao.Comment</class>
+ <class>org.apache.hise.dao.Fault</class>
+ <class>org.apache.hise.dao.JpaBase</class>
+ <class>org.apache.hise.dao.Message</class>
+ <class>org.apache.hise.dao.OrgEntity</class>
+ <class>org.apache.hise.dao.TaskOrgEntity</class>
+ <class>org.apache.hise.dao.PresentationParameter</class>
+ <class>org.apache.hise.dao.Task</class>
+ <class>org.apache.hise.dao.Job</class>
+ <exclude-unlisted-classes/>
+
+ <!-- OpenJPA & HSQL -->
+ <!--
+ <properties>
+ <property name="openjpa.ConnectionDriverName" value="org.h2.Driver"/>
+ <property name="openjpa.ConnectionURL" value="jdbc:h2:file:hise-h2-db;DB_CLOSE_ON_EXIT=false"/>
+ <property name="openjpa.ConnectionUserName" value="sa"/>
+ <property name="openjpa.ConnectionPassword" value=""/>
+ <property name="openjpa.jdbc.SynchronizeMappings" value="buildSchema"/>
+ <property name="openjpa.Log" value="commons"/>
+ value="DefaultLevel=INFO, Runtime=TRACE, Tool=INFO,
+SQL=TRACE" />
+ <property name="openjpa.ConnectionFactoryProperties" value="PrettyPrint=true, PrettyPrintLineLength=72"/>
+ </properties>
+ -->
+ </persistence-unit>
</persistence>
Modified: incubator/hise/trunk/hise-services/src/test/java/org/apache/hise/HISEEngineTest.java
URL: http://svn.apache.org/viewvc/incubator/hise/trunk/hise-services/src/test/java/org/apache/hise/HISEEngineTest.java?rev=905964&r1=905963&r2=905964&view=diff
==============================================================================
--- incubator/hise/trunk/hise-services/src/test/java/org/apache/hise/HISEEngineTest.java (original)
+++ incubator/hise/trunk/hise-services/src/test/java/org/apache/hise/HISEEngineTest.java Wed Feb 3 09:58:00 2010
@@ -2,14 +2,14 @@
import junit.framework.Assert;
-import org.apache.hise.engine.HISEEngine;
+import org.apache.hise.engine.HISEEngineImpl;
import org.apache.hise.utils.DOMUtils;
import org.junit.Test;
public class HISEEngineTest {
@Test
public void testEval2() throws Exception {
- String r = HISEEngine.fetchCreatedBy(DOMUtils.parse(getClass().getResourceAsStream("/approveHeader.xml")));
+ String r = HISEEngineImpl.fetchCreatedBy(DOMUtils.parse(getClass().getResourceAsStream("/approveHeader.xml")));
Assert.assertEquals("soapui", r);
}
}
Modified: incubator/hise/trunk/hise-services/src/test/java/org/apache/hise/TaskOperationsTest.java
URL: http://svn.apache.org/viewvc/incubator/hise/trunk/hise-services/src/test/java/org/apache/hise/TaskOperationsTest.java?rev=905964&r1=905963&r2=905964&view=diff
==============================================================================
--- incubator/hise/trunk/hise-services/src/test/java/org/apache/hise/TaskOperationsTest.java (original)
+++ incubator/hise/trunk/hise-services/src/test/java/org/apache/hise/TaskOperationsTest.java Wed Feb 3 09:58:00 2010
@@ -16,7 +16,7 @@
import junit.framework.Assert;
import org.apache.hise.api.HISEUserDetails;
-import org.apache.hise.engine.HISEEngine;
+import org.apache.hise.engine.HISEEngineImpl;
import org.apache.hise.engine.jaxws.TaskOperationsImpl;
import org.apache.hise.lang.xsd.htda.TTask;
import org.apache.hise.lang.xsd.htdt.SuspendUntil;
@@ -28,7 +28,7 @@
@Test
public void testGetMyTasks() throws Exception {
TaskOperationsImpl ti = new MockTaskOperationsImpl();
- HISEEngine he = new HISEEngine();
+ HISEEngineImpl he = new HISEEngineImpl();
he.setHiseUserDetails(new HISEUserDetails() {
public String getUserPassword(String user) {
return null;
Added: 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=905964&view=auto
==============================================================================
--- incubator/hise/trunk/hise-test-example-osgi/pom.xml (added)
+++ incubator/hise/trunk/hise-test-example-osgi/pom.xml Wed Feb 3 09:58:00 2010
@@ -0,0 +1,115 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ ~ Licensed to the Apache Software Foundation (ASF) under one
+ ~ or more contributor license agreements. See the NOTICE file
+ ~ distributed with this work for additional information
+ ~ regarding copyright ownership. The ASF licenses this file
+ ~ to you under the Apache License, Version 2.0 (the
+ ~ "License"); you may not use this file except in compliance
+ ~ with the License. You may obtain a copy of the License at
+ ~
+ ~ http://www.apache.org/licenses/LICENSE-2.0
+ ~
+ ~ Unless required by applicable law or agreed to in writing,
+ ~ software distributed under the License is distributed on an
+ ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ ~ KIND, either express or implied. See the License for the
+ ~ specific language governing permissions and limitations
+ ~ under the License.
+ -->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <groupId>org.apache.hise</groupId>
+ <artifactId>hise</artifactId>
+ <version>0.2.0-SNAPSHOT</version>
+ </parent>
+ <artifactId>hise-test-example-osgi</artifactId>
+ <packaging>bundle</packaging>
+ <version>0.2.0-SNAPSHOT</version>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.felix</groupId>
+ <artifactId>maven-bundle-plugin</artifactId>
+ <version>1.4.3</version>
+ <extensions>true</extensions>
+ <configuration>
+ <instructions>
+ <Bundle-SymbolicName>${pom.artifactId}</Bundle-SymbolicName>
+ <Import-Package>
+ javax.persistence,
+ org.apache.openjpa.persistence,
+ javax.xml.bind,
+ javax.xml.soap,
+ META-INF.cxf,
+ META-INF.cxf.osgi,
+org.apache.hise,
+
+ org.apache.cxf.resource,
+ org.apache.cxf.binding.soap.spring,
+ org.springframework.beans,
+ org.apache.cxf.jaxws.spi,
+
+ org.springframework.osgi.config,
+ org.springframework.osgi.context,
+ org.springframework.osgi.context.support,
+ org.springframework.osgi.service,
+ org.springframework.osgi.service.importer,
+ </Import-Package>
+ <!--
+ <Private-Package>org.apache.hise*</Private-Package>
+ <Export-Package>org.apache.hise*,org.w3._2001.xmlschema</Export-Package>
+ -->
+ <DynamicImport-Package>*</DynamicImport-Package>
+ <Require-Bundle>
+ org.apache.cxf.bundle
+ </Require-Bundle>
+ <!--
+ -->
+ <!--
+
+ <DynamicImport-Package>org.w3.*,javax.xml.xquery</DynamicImport-Package>
+ org.w3.*,
+ net.sf.saxon*
+ <Embed-Dependency>saxon*,spring-orm,spring-jdbc,ojdbc5;scope=compile|runtime</Embed-Dependency>
+ <Embed-Dependency>saxon*,hise-wsdl;scope=compile|runtime</Embed-Dependency>
+ <Embed-Transitive>true</Embed-Transitive>
+ -->
+ <!--
+ -->
+
+ <!--
+ <_exportcontents>org.apache.hise*</_exportcontents>
+ -->
+ <!--
+ <DynamicImport-Package>*</DynamicImport-Package>
+<Include-Resource>
+ {maven-resources}, {maven-dependencies}
+</Include-Resource>
+ -->
+ <!--
+ <Bundle-ClassPath>.,{maven-dependencies}</Bundle-ClassPath>
+ -->
+ </instructions>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+
+ <dependencies>
+ <!--
+ <dependency>
+ <groupId>oracle</groupId>
+ <artifactId>ojdbc5</artifactId>
+ <version>11.1.0.6.0</version>
+ </dependency>
+ <dependency>
+ <groupId>mysql</groupId>
+ <artifactId>mysql-connector-java</artifactId>
+ <version>5.1.10</version>
+ <scope>test</scope>
+ </dependency>
+ -->
+ </dependencies>
+</project>
Added: incubator/hise/trunk/hise-test-example-osgi/src/main/resources/ExampleTasks.wsdl
URL: http://svn.apache.org/viewvc/incubator/hise/trunk/hise-test-example-osgi/src/main/resources/ExampleTasks.wsdl?rev=905964&view=auto
==============================================================================
--- incubator/hise/trunk/hise-test-example-osgi/src/main/resources/ExampleTasks.wsdl (added)
+++ incubator/hise/trunk/hise-test-example-osgi/src/main/resources/ExampleTasks.wsdl Wed Feb 3 09:58:00 2010
@@ -0,0 +1,144 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/a0c9ce4c-ee02-2a10-4b96-cb205464aa02
+
+© 2007 Active Endpoints Inc., Adobe Systems Inc., BEA Systems Inc., International
+Business Machines Corporation, Oracle Inc., and SAP AG. All rights reserved.
+ -->
+<wsdl:definitions name="ClaimApproval"
+ targetNamespace="http://www.insurance.example.com/claims"
+ xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
+ xmlns:tns="http://www.insurance.example.com/claims"
+ xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
+ xmlns:xsd="http://www.w3.org/2001/XMLSchema">
+ <wsdl:types>
+ <xsd:schema elementFormDefault="qualified"
+ targetNamespace="http://www.insurance.example.com/claims"
+ xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ xmlns:tns="http://www.insurance.example.com/claims">
+ <xsd:complexType name="ClaimApprovalData">
+ <xsd:sequence>
+ <xsd:element name="cust">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="id" type="xsd:string">
+ </xsd:element>
+ <xsd:element name="firstname" type="xsd:string">
+ </xsd:element>
+ <xsd:element name="lastname" type="xsd:string">
+ </xsd:element>
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="amount" type="xsd:double" />
+ <xsd:element name="region" type="xsd:string" />
+ <xsd:element name="prio" type="xsd:int" />
+ <xsd:element name="activateAt" type="xsd:dateTime" />
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:schema>
+ </wsdl:types>
+ <wsdl:message name="ClaimApprovalRequest">
+ <wsdl:part name="ClaimApprovalRequest"
+ type="tns:ClaimApprovalData" />
+ </wsdl:message>
+ <wsdl:message name="ClaimApprovalResponse">
+ </wsdl:message>
+ <wsdl:message name="ClaimResolveRequest">
+ <wsdl:part name="claimId" type="xsd:int" />
+ <wsdl:part name="ok" type="xsd:boolean" />
+ </wsdl:message>
+ <wsdl:message name="ClaimResolveResponse">
+ </wsdl:message>
+ <wsdl:message name="notifyRequest">
+ <wsdl:part name="firstname" type="xsd:string" />
+ <wsdl:part name="lastname" type="xsd:string" />
+ <wsdl:part name="taskId" type="xsd:string" />
+ </wsdl:message>
+ <wsdl:message name="notifyResponse"></wsdl:message>
+ <wsdl:portType name="ClaimsHandlingPT">
+ <wsdl:operation name="approve">
+ <wsdl:input message="tns:ClaimApprovalRequest" />
+ <wsdl:output message="tns:ClaimApprovalResponse" />
+ </wsdl:operation>
+ <wsdl:operation name="escalate">
+ <wsdl:input message="tns:ClaimApprovalRequest" />
+ <wsdl:output message="tns:ClaimApprovalResponse"></wsdl:output>
+ </wsdl:operation>
+ </wsdl:portType>
+ <wsdl:portType name="ClaimsResolvingPT">
+ <wsdl:operation name="resolve">
+ <wsdl:input message="tns:ClaimResolveRequest" />
+ <wsdl:output message="tns:ClaimResolveResponse" />
+ </wsdl:operation>
+ </wsdl:portType>
+ <wsdl:portType name="ClaimApprovalReminderPT">
+ <wsdl:operation name="notify">
+ <wsdl:input message="tns:notifyRequest" />
+ <wsdl:output message="tns:notifyResponse" />
+ </wsdl:operation>
+ </wsdl:portType>
+
+ <wsdl:binding name="ClaimsHandlingBinding" type="tns:ClaimsHandlingPT">
+ <soap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http" />
+ <wsdl:operation name="approve">
+ <soap:operation />
+ <wsdl:input>
+ <soap:body use="literal" namespace="http://www.insurance.example.com/claims" />
+ </wsdl:input>
+ <wsdl:output>
+ <soap:body use="literal" namespace="http://www.insurance.example.com/claims" />
+ </wsdl:output>
+ </wsdl:operation>
+ <wsdl:operation name="escalate">
+ <soap:operation />
+ <wsdl:input>
+ <soap:body use="literal" namespace="http://www.insurance.example.com/claims" />
+ </wsdl:input>
+ <wsdl:output>
+ <soap:body use="literal" namespace="http://www.insurance.example.com/claims" />
+ </wsdl:output>
+ </wsdl:operation>
+ </wsdl:binding>
+ <wsdl:service name="ClaimsHandlingService">
+ <wsdl:port name="ClaimsHandlingPort" binding="tns:ClaimsHandlingBinding">
+ <soap:address location="http://localhost:8090"/>
+ </wsdl:port>
+ </wsdl:service>
+
+ <wsdl:binding name="ClaimsResolvingBinding" type="tns:ClaimsResolvingPT">
+ <soap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http" />
+ <wsdl:operation name="resolve">
+ <soap:operation/>
+ <wsdl:input>
+ <soap:body use="literal" namespace="http://www.insurance.example.com/claims" />
+ </wsdl:input>
+ <wsdl:output>
+ <soap:body use="literal" namespace="http://www.insurance.example.com/claims" />
+ </wsdl:output>
+ </wsdl:operation>
+ </wsdl:binding>
+ <wsdl:service name="ClaimsResolvingService">
+ <wsdl:port name="ClaimsResolvingPort" binding="tns:ClaimsResolvingBinding">
+ <soap:address location="http://localhost:9999"/> <!--some non existing destination, since it has to be initialized from callback EPR -->
+ </wsdl:port>
+ </wsdl:service>
+
+ <wsdl:binding name="ClaimApprovalReminderBinding" type="tns:ClaimApprovalReminderPT">
+ <soap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http" />
+ <wsdl:operation name="notify">
+ <soap:operation/>
+ <wsdl:input>
+ <soap:body use="literal" namespace="http://www.insurance.example.com/claims" />
+ </wsdl:input>
+ <wsdl:output>
+ <soap:body use="literal" namespace="http://www.insurance.example.com/claims" />
+ </wsdl:output>
+ </wsdl:operation>
+ </wsdl:binding>
+ <wsdl:service name="ClaimApprovalReminderService">
+ <wsdl:port name="ClaimApprovalReminderPort" binding="tns:ClaimApprovalReminderBinding">
+ <soap:address location="http://localhost:8090"/> <!--some non existing destination, since it has to be initialized from callback EPR -->
+ </wsdl:port>
+ </wsdl:service>
+</wsdl:definitions>
Propchange: incubator/hise/trunk/hise-test-example-osgi/src/main/resources/ExampleTasks.wsdl
------------------------------------------------------------------------------
svn:eol-style = native
Added: 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=905964&view=auto
==============================================================================
--- incubator/hise/trunk/hise-test-example-osgi/src/main/resources/META-INF/spring/beans.xml (added)
+++ incubator/hise/trunk/hise-test-example-osgi/src/main/resources/META-INF/spring/beans.xml Wed Feb 3 09:58:00 2010
@@ -0,0 +1,89 @@
+<?xml version="1.0" encoding="UTF-8"?>
+ <!--
+ ~ Licensed to the Apache Software Foundation (ASF) under one ~ or more contributor license agreements. See the NOTICE file ~ distributed with this work for additional information ~ regarding copyright ownership. The ASF licenses this file ~ to you under the Apache License, Version 2.0 (the ~ "License"); you may not use this file except in compliance ~ with the License. You may obtain a copy of the License at ~ ~ http://www.apache.org/licenses/LICENSE-2.0 ~ ~ Unless required by applicable law or agreed to in writing, ~ software distributed under the License is distributed on an ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY ~ KIND, either express or implied. See the License for the ~ specific
+ language governing permissions and limitations ~ under the License.
+ -->
+<beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:jaxws="http://cxf.apache.org/jaxws" xmlns:ins="http://www.insurance.example.com/claims"
+xmlns:osgi="http://www.springframework.org/schema/osgi"
+xsi:schemaLocation="
+ http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
+ http://cxf.apache.org/jaxws http://cxf.apache.org/schemas/jaxws.xsd
+ http://www.springframework.org/schema/osgi http://www.springframework.org/schema/osgi/spring-osgi.xsd
+ ">
+
+<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">
+ <property name="hiseEngine" ref="hiseEngine"/>
+ <property name="deploymentInfo">
+ <bean class="org.apache.hise.engine.store.HISEDD">
+ <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">
+ <constructor-arg type="java.lang.String" value="{http://www.insurance.example.com/claims}Task1"></constructor-arg>
+ </bean>
+ </property>
+ <property name="handler" ref="hiseJaxWSService1"/>
+ <property name="sender" ref="hiseJaxWSSender1"/>
+ </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}Notify2"></constructor-arg>
+ </bean>
+ </property>
+ <property name="handler" ref="hiseJaxWSService1"/>
+ </bean>
+ </list>
+ </property>
+ </bean>
+ </property>
+ </bean>
+
+ <bean id="hiseJaxWSService1" class="org.apache.hise.engine.jaxws.HISEJaxWSService" init-method="init">
+ <property name="hiseEngine" ref="hiseEngine"/>
+ <property name="transactionManager" ref="transactionManager"></property>
+ </bean>
+
+ <jaxws:endpoint id="testHtd1" address="/ClaimsHandlingService/" implementor="#hiseJaxWSService1" serviceName="ins:ClaimsHandlingService" endpointName="ins:ClaimsHandlingPort" publish="true" wsdlLocation="classpath:ExampleTasks.wsdl">
+ <!--
+ <jaxws:handlers>
+ <ref bean="transactionHandler"/>
+ </jaxws:handlers>
+ <jaxws:inInterceptors>
+ <bean class="org.apache.cxf.ws.security.wss4j.WSS4JInInterceptor">
+ <constructor-arg>
+ <map>
+ <entry key="action" value="UsernameToken"/>
+ <entry key="passwordType" value="PasswordDigest"/>
+ <entry key="passwordCallbackRef">
+ <ref bean="hisePasswordCallback"/>
+ </entry>
+ </map>
+ </constructor-arg>
+ </bean>
+ </jaxws:inInterceptors>
+ -->
+ </jaxws:endpoint>
+
+ <bean id="hiseJaxWSSender1" class="org.apache.hise.engine.jaxws.HISEJaxWSClient" init-method="init">
+ <property name="wsdlDocumentLocation" value="classpath:ExampleTasks.wsdl"></property>
+ <property name="serviceName">
+ <bean class="javax.xml.namespace.QName" factory-method="valueOf">
+ <constructor-arg type="java.lang.String" value="{http://www.insurance.example.com/claims}ClaimsResolvingService"></constructor-arg>
+ </bean>
+ </property>
+ </bean>
+
+<!--
+ <jaxws:client id="testHtd1Sender" address="http://localhost:9999" wsdlLocation="classpath:ExampleTasks.wsdl"/>
+ -->
+ <jaxws:endpoint id="testHtd2" address="/ClaimApprovalReminderService/" implementor="#hiseJaxWSService1" serviceName="ins:ClaimApprovalReminderService" endpointName="ins:ClaimApprovalReminderPort" publish="true" wsdlLocation="classpath:ExampleTasks.wsdl"/>
+
+</beans>
+
Propchange: incubator/hise/trunk/hise-test-example-osgi/src/main/resources/META-INF/spring/beans.xml
------------------------------------------------------------------------------
svn:eol-style = native
Added: 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=905964&view=auto
==============================================================================
--- incubator/hise/trunk/hise-test-example-osgi/src/main/resources/testHtd1.xml (added)
+++ incubator/hise/trunk/hise-test-example-osgi/src/main/resources/testHtd1.xml Wed Feb 3 09:58:00 2010
@@ -0,0 +1,443 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/a0c9ce4c-ee02-2a10-4b96-cb205464aa02
+
+© 2007 Active Endpoints Inc., Adobe Systems Inc., BEA Systems Inc., International
+Business Machines Corporation, Oracle Inc., and SAP AG. All rights reserved.
+ -->
+<htd:humanInteractions xmlns:htd="http://www.example.org/WS-HT"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ xmlns:tns="http://www.insurance.example.com/claims/"
+ targetNamespace="http://www.insurance.example.com/claims/"
+ xsi:schemaLocation="http://www.example.org/WS-HT file:/usr/share/schemas/ws-humantask.xsd">
+
+ <!--
+
+ Test human task definition. Contains: task definitions, different human roles definitions,
+ descriptions with parameters.
+
+ TODO:
+
+ - matching business request
+
+ -->
+
+ <htd:import importType="http://schemas.xmlsoap.org/wsdl/" location="ExampleTasks.wsdl" namespace="http://www.insurance.example.com/claims/"/>
+
+ <htd:logicalPeopleGroups>
+
+ <htd:logicalPeopleGroup name="lpg1">
+ <htd:documentation xml:lang="en-US">Employee group.</htd:documentation>
+ <htd:parameter name="region" type="xsd:string"/>
+ </htd:logicalPeopleGroup>
+
+ </htd:logicalPeopleGroups>
+
+ <htd:tasks>
+
+ <!-- Please change properties other than potential owners i both Task1 and Task2 -->
+
+ <!-- One potential owners -->
+ <htd:task name="Task1">
+
+ <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> htd:getInput("ClaimApprovalRequest")/priority </htd:priority>
+
+ <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:businessAdministrators>
+ <htd:from logicalPeopleGroup="lpg1">
+ <htd:argument name="region"> htd:getInput("ClahimApprovalRequest")/region </htd:argument>
+ </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">
+ htd:getInput("ClaimApprovalRequest")/cust/firstname </htd:presentationParameter>
+
+ <htd:presentationParameter name="lastname" type="xsd:string">
+ htd:getInput("ClaimApprovalRequest")/cust/lastname </htd:presentationParameter>
+
+ <htd:presentationParameter name="euroAmount" type="xsd:double">
+ htd:getInput("ClaimApprovalRequest")/amount </htd:presentationParameter>
+
+ </htd:presentationParameters>
+
+ <htd:subject xml:lang="en-US"> Approve the insurance claim for PLN $euroAmount$ on behalf of $firstname$ $lastname$ </htd:subject>
+
+ <htd:description xml:lang="en-US" contentType="text/plain"> Approve this claim following corporate guideline #4711.0815/7 ... </htd:description>
+
+ </htd:presentationElements>
+
+ <htd:outcome>
+ <![CDATA[
+ <cla:resolve xmlns:cla="http://www.insurance.example.com/claims" xmlns:htd="http://www.example.org/WS-HT">
+ <claimId>{htd:getInput("request")/ClaimApprovalRequest/cla:cust/cla:id/text()}</claimId>
+ <ok>{$outcome}</ok>
+ </cla:resolve>
+ ]]>
+ </htd:outcome>
+ <htd:deadlines>
+ <htd:startDeadline>
+ <htd:for>'PT5S'</htd:for>
+ <htd:escalation name="reassignTask3">
+ <htd:reassignment>
+ <htd:potentialOwners>
+ <htd:from>
+ <htd:literal>
+ <htd:organizationalEntity>
+ <htd:users>
+ <htd:user>user3</htd:user>
+ </htd:users>
+ </htd:organizationalEntity>
+
+ </htd:literal>
+ </htd:from>
+ </htd:potentialOwners>
+ </htd:reassignment>
+ </htd:escalation>
+
+ </htd:startDeadline>
+
+ <htd:startDeadline>
+ <htd:for>'PT5S'</htd:for>
+ <htd:escalation name="startDeadline2">
+ <htd:toParts>
+ <htd:toPart name="request">
+ <![CDATA[
+ <cla:notify xmlns:cla="http://www.insurance.example.com/claims" xmlns:htd="http://www.example.org/WS-HT">
+ <firstname>{htd:getInput("request")/ClaimApprovalRequest/cla:cust/cla:firstname/text()}</firstname>
+ <lastname>{htd:getInput("request")/ClaimApprovalRequest/cla:cust/cla:lastname/text()}</lastname>
+ <taskId>{$taskId}</taskId>
+ </cla:notify>
+ ]]>
+ </htd:toPart>
+ </htd:toParts>
+ <htd:localNotification reference="tns:Notify2"/>
+ </htd:escalation>
+ </htd:startDeadline>
+
+ <htd:completionDeadline>
+ <htd:for>'PT10S'</htd:for>
+ <htd:escalation name="reassignTask3Completion">
+ <htd:reassignment>
+ <htd:potentialOwners>
+ <htd:from>
+ <htd:literal>
+ <htd:organizationalEntity>
+ <htd:users>
+ <htd:user>user4</htd:user>
+ </htd:users>
+ </htd:organizationalEntity>
+ </htd:literal>
+ </htd:from>
+ </htd:potentialOwners>
+ </htd:reassignment>
+ </htd:escalation>
+ </htd:completionDeadline>
+ </htd:deadlines>
+ </htd:task>
+
+ <!-- Two potential owners -->
+ <htd:task name="Task2">
+
+ <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="approve2" responsePortType="tns:ClaimsHandlingCallbackPT" responseOperation="approvalResponse"/>
+ <htd:priority> htd:getInput("ClaimApprovalRequest")/prio </htd:priority>
+
+ <htd:peopleAssignments>
+
+ <htd:potentialOwners>
+ <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: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:businessAdministrators>
+ <htd:from logicalPeopleGroup="lpg1">
+ <htd:argument name="region"> htd:getInput("ClahimApprovalRequest")/region </htd:argument>
+ </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">
+ htd:getInput("ClaimApprovalRequest")/cust/firstname </htd:presentationParameter>
+
+ <htd:presentationParameter name="lastname" type="xsd:string">
+ htd:getInput("ClaimApprovalRequest")/cust/lastname </htd:presentationParameter>
+
+ <htd:presentationParameter name="euroAmount" type="xsd:double">
+ htd:getInput("ClaimApprovalRequest")/amount </htd:presentationParameter>
+
+ </htd:presentationParameters>
+
+ <htd:subject xml:lang="en-US"> Approve the insurance claim for PLN $euroAmount$ on behalf of $firstname$ $lastname$ </htd:subject>
+
+ <htd:description xml:lang="en-US" contentType="text/plain"> Approve this claim following corporate guideline #4711.0815/7 ... </htd:description>
+
+ </htd:presentationElements>
+
+ </htd:task>
+
+
+ <!-- Escalation -->
+ <htd:task name="Task3">
+
+ <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="approve3"/>
+
+ <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:users>
+ <htd:user>user2</htd:user>
+ </htd:users>
+ </htd:organizationalEntity>
+ </htd:literal>
+ </htd:from>
+ </htd:businessAdministrators>
+ </htd:peopleAssignments>
+
+ <htd:presentationElements>
+
+ <htd:name xml:lang="en-US"> Approve Claim </htd:name>
+
+ <htd:presentationParameters>
+
+ <htd:presentationParameter name="firstname" type="xsd:string">
+ htd:getInput("ClaimApprovalRequest")/cust/firstname </htd:presentationParameter>
+
+ <htd:presentationParameter name="lastname" type="xsd:string">
+ htd:getInput("ClaimApprovalRequest")/cust/lastname </htd:presentationParameter>
+
+ <htd:presentationParameter name="euroAmount" type="xsd:double">
+ htd:getInput("ClaimApprovalRequest")/amount </htd:presentationParameter>
+
+ </htd:presentationParameters>
+
+ <htd:subject xml:lang="en-US"> Approve the insurance claim for PLN $euroAmount$ on behalf of $firstname$ $lastname$ </htd:subject>
+
+ <htd:description xml:lang="en-US" contentType="text/plain"> Approve this claim following corporate guideline #4711.0815/7 ... </htd:description>
+
+ </htd:presentationElements>
+
+ <htd:deadlines>
+ <htd:startDeadline>
+ <htd:for>PT5S</htd:for>
+ <htd:escalation name="startDeadline1">
+ <htd:reassignment>
+ <htd:potentialOwners>
+ <htd:from>
+ <htd:literal>
+ <htd:organizationalEntity>
+ <htd:users>
+ <htd:user>user3</htd:user>
+ </htd:users>
+ </htd:organizationalEntity>
+
+ </htd:literal>
+ </htd:from>
+ </htd:potentialOwners>
+ </htd:reassignment>
+ </htd:escalation>
+ </htd:startDeadline>
+
+ <htd:startDeadline>
+ <htd:for>PT5S</htd:for>
+ <htd:escalation name="startDeadline2">
+ <htd:localNotification reference="tns:Notify2"/>
+ </htd:escalation>
+ </htd:startDeadline>
+
+ <!--
+ <htd:startDeadline>
+ <htd:for>PT5S</htd:for>
+ <htd:escalation name="startDeadline3">
+ <htd:notification name="NotifyInline">
+ <htd:interface portType="req" operation="notify"></htd:interface>
+ <htd:priority>2</htd:priority>
+ <htd:peopleAssignments>
+ </htd:peopleAssignments>
+ <htd:presentationElements>
+ </htd:presentationElements>
+ </htd:notification>
+ </htd:escalation>
+ </htd:startDeadline>
+ -->
+
+ <htd:completionDeadline>
+ <htd:for>PT10S</htd:for>
+ <htd:escalation name="reassignTask3Completion">
+ <htd:reassignment>
+ <htd:potentialOwners>
+ <htd:from>
+ <htd:literal>
+ <htd:organizationalEntity>
+ <htd:users>
+ <htd:user>user4</htd:user>
+ </htd:users>
+ </htd:organizationalEntity>
+ </htd:literal>
+ </htd:from>
+ </htd:potentialOwners>
+ </htd:reassignment>
+ </htd:escalation>
+ </htd:completionDeadline>
+ </htd:deadlines>
+ </htd:task>
+ </htd:tasks>
+
+ <htd:notifications>
+ <htd:notification name="Notify2">
+ <htd:interface portType="tns:ClaimApprovalReminderPT" operation="notify"></htd:interface>
+ <htd:peopleAssignments>
+ <htd:potentialOwners>
+ <htd:from>
+ <htd:literal>
+ <htd:organizationalEntity>
+ <htd:users>
+ <htd:user>user5</htd:user>
+ </htd:users>
+ </htd:organizationalEntity>
+ </htd:literal>
+ </htd:from>
+ </htd:potentialOwners>
+ </htd:peopleAssignments>
+ <htd:presentationElements>
+ <htd:name>Notify2Name</htd:name>
+ <htd:subject>Name2Subject</htd:subject>
+ </htd:presentationElements>
+ </htd:notification>
+ </htd:notifications>
+</htd:humanInteractions>
Propchange: incubator/hise/trunk/hise-test-example-osgi/src/main/resources/testHtd1.xml
------------------------------------------------------------------------------
svn:eol-style = native
Modified: incubator/hise/trunk/pom.xml
URL: http://svn.apache.org/viewvc/incubator/hise/trunk/pom.xml?rev=905964&r1=905963&r2=905964&view=diff
==============================================================================
--- incubator/hise/trunk/pom.xml (original)
+++ incubator/hise/trunk/pom.xml Wed Feb 3 09:58:00 2010
@@ -26,13 +26,15 @@
<modules>
<module>hise-wsdl</module>
<module>hise-test-example</module>
+ <module>hise-test-example-osgi</module>
<module>hise-wsdl-classes</module>
<module>hise-services</module>
<module>hise-web</module>
+ <module>hise-bundle</module>
</modules>
<properties>
- <cxf.version>2.2.4</cxf.version>
- <spring.version>2.5.6</spring.version>
+ <cxf.version>2.2.6</cxf.version>
+ <spring.version>2.5.6.SEC01</spring.version>
<saxon.version>9.1.0.8</saxon.version>
</properties>
<repositories>