incubator-agila-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mr...@apache.org
Subject svn commit: r165042 [25/30] - in /incubator/agila/trunk: ./ config/ modules/ modules/bpel/ modules/bpel/client/ modules/bpel/client/api/ modules/bpel/client/api/src/ modules/bpel/client/api/src/conf/ modules/bpel/client/api/src/java/ modules/bpel/client/api/src/java/org/ modules/bpel/client/api/src/java/org/apache/ modules/bpel/client/api/src/java/org/apache/agila/ modules/bpel/client/api/src/java/org/apache/agila/bpel/ modules/bpel/client/api/src/java/org/apache/agila/bpel/client/ modules/bpel/client/api/src/test/ modules/bpel/client/api/src/test/junit/ modules/bpel/client/api/src/test/junit/org/ modules/bpel/client/api/src/test/junit/org/apache/ modules/bpel/client/api/src/test/junit/org/apache/agila/ modules/bpel/client/api/src/test/junit/org/apache/agila/bpel/ modules/bpel/client/api/src/test/junit/org/apache/agila/bpel/client/ modules/bpel/client/web/ modules/bpel/client/web/src/ modules/bpel/client/web/src/conf/ modules/bpel/client/web/src/java/ modules/bpel/client/web/src/java/org/ modules/bpel/client/web/src/java/org/apache/ modules/bpel/client/web/src/java/org/apache/agila/ modules/bpel/client/web/src/java/org/apache/agila/bpel/ modules/bpel/client/web/src/java/org/apache/agila/bpel/web/ modules/bpel/client/web/src/java/org/apache/agila/bpel/web/common/ modules/bpel/client/web/src/java/org/apache/agila/bpel/web/deployer/ modules/bpel/client/web/src/java/org/apache/agila/bpel/web/deployer/action/ modules/bpel/client/web/src/java/org/apache/agila/bpel/web/deployer/form/ modules/bpel/client/web/src/java/org/apache/agila/bpel/web/engine/ modules/bpel/client/web/src/java/org/apache/agila/bpel/web/engine/action/ modules/bpel/client/web/src/java/org/apache/agila/bpel/web/engine/form/ modules/bpel/client/web/src/java/org/apache/agila/bpel/web/global/ modules/bpel/client/web/src/java/org/apache/agila/bpel/web/global/action/ modules/bpel/client/web/src/java/org/apache/agila/bpel/web/security/ modules/bpel/client/web/src/java/org/apache/agila/bpel/web/security/action/ modules/bpel/client/web/src/java/org/apache/agila/bpel/web/security/form/ modules/bpel/client/web/src/java/org/apache/agila/bpel/web/user/ modules/bpel/client/web/src/java/org/apache/agila/bpel/web/user/action/ modules/bpel/client/web/src/java/org/apache/agila/bpel/web/user/form/ modules/bpel/client/web/src/java/org/apache/agila/bpel/web/util/ modules/bpel/client/web/src/java/org/apache/agila/bpel/web/worklist/ modules/bpel/client/web/src/java/org/apache/agila/bpel/web/worklist/action/ modules/bpel/client/web/src/webapp/ modules/bpel/client/web/src/webapp/META-INF/ modules/bpel/client/web/src/webapp/WEB-INF/ modules/bpel/client/web/src/webapp/WEB-INF/classes/ modules/bpel/client/web/src/webapp/images/ modules/bpel/client/web/src/webapp/images/audit/ modules/bpel/client/web/src/webapp/style/ modules/bpel/common/ modules/bpel/common/src/ modules/bpel/common/src/aspect/ modules/bpel/common/src/conf/ modules/bpel/common/src/java/ modules/bpel/common/src/java/org/ modules/bpel/common/src/java/org/apache/ modules/bpel/common/src/java/org/apache/agila/ modules/bpel/common/src/java/org/apache/agila/bpel/ modules/bpel/common/src/java/org/apache/agila/bpel/common/ modules/bpel/common/src/java/org/apache/agila/bpel/common/aspect/ modules/bpel/common/src/java/org/apache/agila/bpel/common/configuration/ modules/bpel/common/src/java/org/apache/agila/bpel/common/util/ modules/bpel/common/src/java/org/apache/agila/bpel/common/util/logger/ modules/bpel/common/src/test/ modules/bpel/common/src/test/junit/ modules/bpel/common/src/test/junit/org/ modules/bpel/common/src/test/junit/org/apache/ modules/bpel/common/src/test/junit/org/apache/agila/ modules/bpel/common/src/test/junit/org/apache/agila/bpel/ modules/bpel/common/src/test/junit/org/apache/agila/bpel/common/ modules/bpel/common/src/test/junit/org/apache/agila/bpel/common/util/ modules/bpel/dist/ modules/bpel/dist/src/ modules/bpel/dist/src/java/ modules/bpel/dist/src/java/org/ modules/bpel/dist/src/java/org/apache/ modules/bpel/dist/src/java/org/apache/agila/ modules/bpel/dist/src/java/org/apache/agila/bpel/ modules/bpel/dist/src/java/org/apache/agila/bpel/util/ modules/bpel/dist/src/script/ modules/bpel/engine/ modules/bpel/engine/common/ modules/bpel/engine/common/src/ modules/bpel/engine/common/src/aspect/ modules/bpel/engine/common/src/hibernate/ modules/bpel/engine/common/src/hibernate/org/ modules/bpel/engine/common/src/hibernate/org/apache/ modules/bpel/engine/common/src/hibernate/org/apache/agila/ modules/bpel/engine/common/src/hibernate/org/apache/agila/bpel/ modules/bpel/engine/common/src/hibernate/org/apache/agila/bpel/engine/ modules/bpel/engine/common/src/hibernate/org/apache/agila/bpel/engine/common/ modules/bpel/engine/common/src/java/ modules/bpel/engine/common/src/java/org/ modules/bpel/engine/common/src/java/org/apache/ modules/bpel/engine/common/src/java/org/apache/agila/ modules/bpel/engine/common/src/java/org/apache/agila/bpel/ modules/bpel/engine/common/src/java/org/apache/agila/bpel/engine/ modules/bpel/engine/common/src/java/org/apache/agila/bpel/engine/common/ modules/bpel/engine/common/src/java/org/apache/agila/bpel/engine/common/aspect/ modules/bpel/engine/common/src/java/org/apache/agila/bpel/engine/common/event/ modules/bpel/engine/common/src/java/org/apache/agila/bpel/engine/common/event/execution/ modules/bpel/engine/common/src/java/org/apache/agila/bpel/engine/common/event/execution/impl/ modules/bpel/engine/common/src/java/org/apache/agila/bpel/engine/common/event/lifecycle/ modules/bpel/engine/common/src/java/org/apache/agila/bpel/engine/common/event/lifecycle/dao/ modules/bpel/engine/common/src/java/org/apache/agila/bpel/engine/common/lifecycle/ modules/bpel/engine/common/src/java/org/apache/agila/bpel/engine/common/monitoring/ modules/bpel/engine/common/src/java/org/apache/agila/bpel/engine/common/persistence/ modules/bpel/engine/common/src/java/org/apache/agila/bpel/engine/common/transaction/ modules/bpel/engine/common/src/test/ modules/bpel/engine/common/src/test/junit/ modules/bpel/engine/common/src/test/junit/org/ modules/bpel/engine/common/src/test/junit/org/apache/ modules/bpel/engine/common/src/test/junit/org/apache/agila/ modules/bpel/engine/common/src/test/junit/org/apache/agila/bpel/ modules/bpel/engine/common/src/test/junit/org/apache/agila/bpel/engine/ modules/bpel/engine/common/src/test/junit/org/apache/agila/bpel/engine/common/ modules/bpel/engine/common/src/test/junit/org/apache/agila/bpel/engine/common/event/ modules/bpel/engine/common/src/test/resources/ modules/bpel/engine/core/ modules/bpel/engine/core/src/ modules/bpel/engine/core/src/aspect/ modules/bpel/engine/core/src/hibernate/ modules/bpel/engine/core/src/hibernate/org/ modules/bpel/engine/core/src/hibernate/org/apache/ modules/bpel/engine/core/src/hibernate/org/apache/agila/ modules/bpel/engine/core/src/hibernate/org/apache/agila/bpel/ modules/bpel/engine/core/src/hibernate/org/apache/agila/bpel/engine/ modules/bpel/engine/core/src/java/ modules/bpel/engine/core/src/java/org/ modules/bpel/engine/core/src/java/org/apache/ modules/bpel/engine/core/src/java/org/apache/agila/ modules/bpel/engine/core/src/java/org/apache/agila/bpel/ modules/bpel/engine/core/src/java/org/apache/agila/bpel/engine/ modules/bpel/engine/core/src/java/org/apache/agila/bpel/engine/exception/ modules/bpel/engine/core/src/java/org/apache/agila/bpel/engine/priv/ modules/bpel/engine/core/src/java/org/apache/agila/bpel/engine/priv/core/ modules/bpel/engine/core/src/java/org/apache/agila/bpel/engine/priv/core/definition/ modules/bpel/engine/core/src/java/org/apache/agila/bpel/engine/priv/core/definition/impl/ modules/bpel/engine/core/src/java/org/apache/agila/bpel/engine/priv/core/definition/impl/dao/ modules/bpel/engine/core/src/java/org/apache/agila/bpel/engine/priv/core/dynamic/ modules/bpel/engine/core/src/java/org/apache/agila/bpel/engine/priv/core/dynamic/impl/ modules/bpel/engine/core/src/java/org/apache/agila/bpel/engine/priv/core/dynamic/impl/dao/ modules/bpel/engine/core/src/java/org/apache/agila/bpel/engine/priv/core/dynamic/impl/xao/ modules/bpel/engine/core/src/java/org/apache/agila/bpel/engine/priv/expression/ modules/bpel/engine/core/s
Date Wed, 27 Apr 2005 20:28:07 GMT
Added: incubator/agila/trunk/modules/bpel/engine/user/src/test/resource/cache.ccf
URL: http://svn.apache.org/viewcvs/incubator/agila/trunk/modules/bpel/engine/user/src/test/resource/cache.ccf?rev=165042&view=auto
==============================================================================
--- incubator/agila/trunk/modules/bpel/engine/user/src/test/resource/cache.ccf (added)
+++ incubator/agila/trunk/modules/bpel/engine/user/src/test/resource/cache.ccf Wed Apr 27 13:27:43 2005
@@ -0,0 +1,7 @@
+jcs.default=
+jcs.default.cacheattributes=org.apache.jcs.engine.CompositeCacheAttributes
+jcs.default.cacheattributes.MaxObjects=1000
+jcs.default.cacheattributes.MemoryCacheName=org.apache.jcs.engine.memory.lru.LRUMemoryCache
+jcs.default.cacheattributes.cacheattributes.UseMemoryShrinker=true
+jcs.default.cacheattributes.cacheattributes.MaxMemoryIdleTimeSeconds=3600
+jcs.default.cacheattributes.cacheattributes.ShrinkerIntervalSeconds=60

Added: incubator/agila/trunk/modules/bpel/engine/user/src/test/resource/hibernate.cfg.xml
URL: http://svn.apache.org/viewcvs/incubator/agila/trunk/modules/bpel/engine/user/src/test/resource/hibernate.cfg.xml?rev=165042&view=auto
==============================================================================
--- incubator/agila/trunk/modules/bpel/engine/user/src/test/resource/hibernate.cfg.xml (added)
+++ incubator/agila/trunk/modules/bpel/engine/user/src/test/resource/hibernate.cfg.xml Wed Apr 27 13:27:43 2005
@@ -0,0 +1,44 @@
+<?xml version='1.0' encoding='utf-8'?>
+<!DOCTYPE hibernate-configuration PUBLIC
+    "-//Hibernate/Hibernate Configuration DTD//EN"
+    "http://hibernate.sourceforge.net/hibernate-configuration-2.0.dtd">
+
+<hibernate-configuration>
+
+    <session-factory>
+
+        <!-- HSQLDB configuration -->
+
+        <property name="connection.driver_class">org.hsqldb.jdbcDriver</property>
+        <property name="connection.url">jdbc:hsqldb:hsql://localhost</property>
+        <property name="connection.username">sa</property>
+        <property name="connection.password"></property>
+        <property name="dialect">net.sf.hibernate.dialect.HSQLDialect</property>
+
+        <!-- McKoi configuration -->
+
+        <!--        <property name="connection.driver_class">com.mckoi.JDBCDriver</property> -->
+        <!--        <property name="connection.url">jdbc:mckoi://localhost/</property> -->
+        <!--        <property name="connection.username">root</property> -->
+        <!--        <property name="connection.password">toor</property> -->
+        <!--        <property name="dialect">net.sf.hibernate.dialect.McKoiDialect</property> -->
+
+        <property name="connection.pool_size">10</property>
+        <property name="statement_cache.size">50</property>
+
+        <property name="c3p0.max_size">10</property>
+        <property name="c3p0.min_size">1</property>
+        <property name="c3p0.timeout">60</property>
+        <property name="c3p0.max_statements">50</property>
+
+        <property name="transaction.factory_class">net.sf.hibernate.transaction.JDBCTransactionFactory</property>
+
+        <property name="show_sql">true</property>
+        <property name="use_outer_join">true</property>
+
+        <mapping resource="org/apache/agila/bpel/user/priv/UserImpl.hbm.xml"/>
+        <mapping resource="org/apache/agila/bpel/user/priv/GroupImpl.hbm.xml"/>
+        <mapping resource="org/apache/agila/bpel/user/priv/RoleImpl.hbm.xml"/>
+    </session-factory>
+
+</hibernate-configuration>

Added: incubator/agila/trunk/modules/bpel/engine/worklist/locator.ent
URL: http://svn.apache.org/viewcvs/incubator/agila/trunk/modules/bpel/engine/worklist/locator.ent?rev=165042&view=auto
==============================================================================
--- incubator/agila/trunk/modules/bpel/engine/worklist/locator.ent (added)
+++ incubator/agila/trunk/modules/bpel/engine/worklist/locator.ent Wed Apr 27 13:27:43 2005
@@ -0,0 +1 @@
+<!ENTITY % dependencies SYSTEM "file:../../dependencies.ent">%dependencies;

Added: incubator/agila/trunk/modules/bpel/engine/worklist/maven.xml
URL: http://svn.apache.org/viewcvs/incubator/agila/trunk/modules/bpel/engine/worklist/maven.xml?rev=165042&view=auto
==============================================================================
--- incubator/agila/trunk/modules/bpel/engine/worklist/maven.xml (added)
+++ incubator/agila/trunk/modules/bpel/engine/worklist/maven.xml Wed Apr 27 13:27:43 2005
@@ -0,0 +1,66 @@
+<project default="jar:jar"
+    xmlns:j="jelly:core"
+    xmlns:u="jelly:util"
+    xmlns:ant="jelly:ant"
+    xmlns:maven="jelly:maven"
+    xmlns:m="maven"
+    xmlns:deploy="deploy">
+
+    <!-- Module specific build, called by the reactor of the root module to build -->
+    <!-- all submodules. -->
+    <goal name="buildmodule">
+        <attainGoal name="jar:install"/>
+    </goal>
+
+    <goal name="sitemodule">
+        <attainGoal name="site:generate"/>
+    </goal>
+
+    <preGoal name="java:compile">
+        <!-- Copying necessary resources -->
+        <copy toDir="${maven.build.dest}/META-INF">
+            <fileset dir="src/aspect">
+                <include name="*.*"/>
+            </fileset>
+        </copy>
+    </preGoal>
+
+    <postGoal name="java:compile">
+        <!-- Preparing JBossAOP classpath -->
+        <path id="all.classpath.ref">
+            <pathelement path="${maven.build.dest}"/>
+            <path refid="maven.dependency.classpath"/>
+        </path>
+
+        <!-- Running JBossAOP Annotations compiler -->
+        <echo>Starting JBossAOP JDK 1.4 annotation compiler...</echo>
+        <taskdef name="annotationc" classname="org.jboss.aop.ant.AnnotationC" classpathref="all.classpath.ref"/>
+        <annotationc compilerclasspathref="all.classpath.ref" classpathref="all.classpath.ref" bytecode="true">
+        	<src path="src/java"/>
+        </annotationc>
+        <echo>JBossAOP annotation compilation done.</echo>
+
+        <!-- Calling JBoss AOP bytecode enhancer -->
+        <echo>Starting JBossAOP bytecode enhancer...</echo>
+        <taskdef name="aopc" classname="org.jboss.aop.ant.AopC" classpathref="maven.dependency.classpath"/>
+        <aopc compilerclasspathref="all.classpath.ref" classpathref="all.classpath.ref" verbose="true">
+            <classpath refid="all.classpath.ref"/>
+            <src path="${maven.build.dest}"/>
+            <aoppath>
+                <pathelement path="${maven.build.dest}/META-INF/jboss-aop.xml"/>
+            </aoppath>
+        </aopc>
+        <echo>JBossAOP bytecode enhancer done.</echo>
+    </postGoal>
+
+    <goal name="hsql:start">
+        <mkdir dir="etc/hsql"/>
+        <java classname="org.hsqldb.Server" fork="true" dir="etc/hsql">
+            <arg line="-database agila"/>
+            <classpath>
+                <pathelement location="${pom.getDependencyPath('hsqldb')}"/>
+            </classpath>
+	    </java>
+    </goal>
+
+</project>
\ No newline at end of file

Added: incubator/agila/trunk/modules/bpel/engine/worklist/project.properties
URL: http://svn.apache.org/viewcvs/incubator/agila/trunk/modules/bpel/engine/worklist/project.properties?rev=165042&view=auto
==============================================================================
--- incubator/agila/trunk/modules/bpel/engine/worklist/project.properties (added)
+++ incubator/agila/trunk/modules/bpel/engine/worklist/project.properties Wed Apr 27 13:27:43 2005
@@ -0,0 +1,3 @@
+maven.multiproject.type=jar
+maven.junit.fork=true
+maven.test.skip=true

Added: incubator/agila/trunk/modules/bpel/engine/worklist/project.xml
URL: http://svn.apache.org/viewcvs/incubator/agila/trunk/modules/bpel/engine/worklist/project.xml?rev=165042&view=auto
==============================================================================
--- incubator/agila/trunk/modules/bpel/engine/worklist/project.xml (added)
+++ incubator/agila/trunk/modules/bpel/engine/worklist/project.xml Wed Apr 27 13:27:43 2005
@@ -0,0 +1,82 @@
+<?xml version="1.0"?>
+<!DOCTYPE project [
+<!ENTITY % locator SYSTEM "file:locator.ent">%locator;
+]>
+<project>
+    <extend>${basedir}/../../project.xml</extend>
+    <name>Agila WorkList Manager</name>
+    <id>agila-worklist</id>
+    <package>org.apache.agila.bpel.worklist</package>
+
+    <shortDescription>Agila WorkList Manager</shortDescription>
+
+    <description>
+        The Agila WorkList Manager is a list of all current tasks a given user has
+        to do.
+    </description>
+
+    <dependencies>
+        &dependency-agila-agila-common;
+        &dependency-agila-agila-engine-common;
+        &dependency-agila-agila-user;
+        &dependency-agila-agila-client-api;
+        &dependency-axis-jaxrpc;
+        &dependency-commons-logging;
+        &dependency-concurrent;
+        &dependency-dom4j;
+        &dependency-hibernate;
+        &dependency-jboss-javassist-aop;
+        &dependency-jboss-jboss-aop;
+        &dependency-jboss-jboss-common-aop;
+    	&dependency-log4j;
+        &dependency-trove;
+        &dependency-qdox;
+        &dependency-msv;
+        &dependency-msv-isorelax;
+        &dependency-msv-relaxdata;
+        &dependency-msv-xsdlib;
+        &dependency-xdoclet-xdoclet-hibernate-module;
+    </dependencies>
+    <build>
+
+        <nagEmailAddress>
+            wf-agila-devel@lists.sourceforge.net
+        </nagEmailAddress>
+
+        <sourceDirectory>src/java</sourceDirectory>
+        <aspectSourceDirectory>src/aspect</aspectSourceDirectory>
+
+        <resources>
+            <resource>
+                <directory>src/hibernate</directory>
+                <includes><include>**/*.*</include></includes>
+            </resource>
+        </resources>
+
+        <unitTestSourceDirectory>src/test/junit</unitTestSourceDirectory>
+
+        <!-- Unit test cases -->
+        <unitTest>
+            <includes>
+                <include>**/Test*.java</include>
+            </includes>
+            <resources>
+                <resource>
+                    <directory>src/test/resource</directory>
+                    <includes><include>*.*</include></includes>
+                </resource>
+            </resources>
+        </unitTest>
+
+        <!-- Integration unit test cases -->
+        <integrationUnitTest/>
+
+        <jars>
+        </jars>
+
+        <nagEmailAddress>wf-agila-devel@lists.sourceforge.net</nagEmailAddress>
+    </build>
+    
+    &site-reports;
+    
+</project>

Added: incubator/agila/trunk/modules/bpel/engine/worklist/src/aspect/jboss-aop.xml
URL: http://svn.apache.org/viewcvs/incubator/agila/trunk/modules/bpel/engine/worklist/src/aspect/jboss-aop.xml?rev=165042&view=auto
==============================================================================
--- incubator/agila/trunk/modules/bpel/engine/worklist/src/aspect/jboss-aop.xml (added)
+++ incubator/agila/trunk/modules/bpel/engine/worklist/src/aspect/jboss-aop.xml Wed Apr 27 13:27:43 2005
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<aop>
+	<!-- Tracing binding, includes debug messages at method entrance and exit -->
+<!--   <bind pointcut="execution(public * org.smcp.*->*(..)) AND !all(*.aspect.*)">-->
+<!--      <interceptor class="org.apache.agila.bpel.common.aspect.LoggingInterceptor"/>-->
+<!--   </bind>-->
+   
+   <!-- Transaction commit, includes transaction behaviour at methods entranc and exit -->
+   <bind pointcut="all(@org.apache.agila.bpel.engine.common.aspect.Transactional)">
+       <interceptor class="org.apache.agila.bpel.engine.common.aspect.TransactionInterceptor"/>
+   </bind>
+
+</aop>

Added: incubator/agila/trunk/modules/bpel/engine/worklist/src/hibernate/org/apache/agila/bpel/worklist/workitem.hbm.xml
URL: http://svn.apache.org/viewcvs/incubator/agila/trunk/modules/bpel/engine/worklist/src/hibernate/org/apache/agila/bpel/worklist/workitem.hbm.xml?rev=165042&view=auto
==============================================================================
--- incubator/agila/trunk/modules/bpel/engine/worklist/src/hibernate/org/apache/agila/bpel/worklist/workitem.hbm.xml (added)
+++ incubator/agila/trunk/modules/bpel/engine/worklist/src/hibernate/org/apache/agila/bpel/worklist/workitem.hbm.xml Wed Apr 27 13:27:43 2005
@@ -0,0 +1,24 @@
+<?xml version="1.0"?>
+<!DOCTYPE hibernate-mapping PUBLIC
+        "-//Hibernate/Hibernate Mapping DTD//EN"
+        "http://hibernate.sourceforge.net/hibernate-mapping-2.0.dtd">
+
+<hibernate-mapping>
+    <class name="org.apache.agila.bpel.worklist.priv.po.WorkItemImpl" table="WORKITEM">
+        <id name="id" column="id" type="long">
+            <generator class="hilo">
+                <param name="table">WORKITEM_ID</param>
+                <param name="column">NEXTID</param>
+            </generator>
+        </id>
+        <property name="userOrGroup" type="string" not-null="true"/>
+        <property name="description" type="string" not-null="true"/>
+        <property name="acquiredBy" type="string"/>
+        <property name="information" type="text" length="2000"/>
+        <property name="creationDate" type="timestamp" not-null="true"/>
+        <property name="completionDate" type="timestamp"/>
+        <property name="fireEvent" type="boolean" not-null="true"/>
+        <property name="dueDate" type="timestamp"/>
+        <property name="status" type="int" not-null="true"/>
+    </class>
+</hibernate-mapping>
\ No newline at end of file

Added: incubator/agila/trunk/modules/bpel/engine/worklist/src/java/org/apache/agila/bpel/worklist/AgilaWorkList.java
URL: http://svn.apache.org/viewcvs/incubator/agila/trunk/modules/bpel/engine/worklist/src/java/org/apache/agila/bpel/worklist/AgilaWorkList.java?rev=165042&view=auto
==============================================================================
--- incubator/agila/trunk/modules/bpel/engine/worklist/src/java/org/apache/agila/bpel/worklist/AgilaWorkList.java (added)
+++ incubator/agila/trunk/modules/bpel/engine/worklist/src/java/org/apache/agila/bpel/worklist/AgilaWorkList.java Wed Apr 27 13:27:43 2005
@@ -0,0 +1,123 @@
+/*
+ * Copyright 2004 The Apache Software Foundation.
+ *
+ * Licensed 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.agila.bpel.worklist;
+
+import java.util.Collection;
+import java.util.Date;
+
+import org.dom4j.Document;
+import org.apache.agila.bpel.engine.common.persistence.CreationException;
+import org.apache.agila.bpel.engine.common.persistence.FinderException;
+import org.apache.agila.bpel.worklist.exception.InvalidMessageException;
+import org.apache.agila.bpel.worklist.exception.WorkListException;
+
+/**
+ * <p>Main interface of the Agila WorkList Manager, used to arrange work items
+ * as a work list specific to one user and to complete, acquire, reassign or cancel
+ * work items. The work item state flow is:</p>
+ * <ul>
+ *    <ol>Active</ol>
+ *    <ol>Acquired: a user acquires a workitem to say that he's the one who is
+ *    going to complete it so that nobody else than him can complete him as the
+ *    same time. A work item can also be 'unacquired' to go back to an active
+ *    state. An acquired work item won't appear in anybody else's worklist.</ol>
+ *    <ol>Completed: only the user who acquired an activity can complete it.</ol>
+ *    <ol>Canceled</ol>
+ *    <ol>Wrongly assigned: the role or user attributed to the workitem couldn't
+ *    be found.</ol>
+ * </ul>
+ * <p>NOTE: no rights verrification are done here, identoty checks on
+ * whoever has the right to unacquire should be done in an upper layer.</p>
+ * @see WorkItem
+ */
+public interface AgilaWorkList {
+    /**
+     * Creating a new work item from a message (should only be used by Agila's process engine).
+     * @param creationMessage
+     * @return
+     * @throws InvalidMessageException
+     */
+    public Long createWorkItem(Document creationMessage) throws InvalidMessageException;
+
+    /**
+     * Creates a work item from the provided information.
+     * @param userOrRole
+     * @param description
+     * @param information
+     * @param dueDate
+     * @param fireEvent if this is set to true, the worklist manager will fire a message to the engine (should usually be set to false when using this method).
+     * @return work item id
+     * @throws CreationException thrown if the provided user or role doesn't exist. 
+     */
+    public Long createWorkItem(String userOrRole, String description, String information, Date dueDate,
+                               boolean fireEvent) throws CreationException;
+
+    public Collection getWorkList(String user) throws FinderException;
+
+    public WorkItem getWorkItem(Long id) throws WorkListException;
+
+    /**
+     * Completes a work item and fires a message to Agila's process engine to tell it
+     * that the work item has been completed and that it can continue its process
+     * execution.
+     * @param wiId
+     * @param message that will be sent to the process engine, should be the 'information' field of your work item plus some additional information that you may want your process instance to know about.
+     * @throws WorkListException
+     */
+    public void completeWorkItem(Long wiId, String message) throws WorkListException;
+
+    /**
+     * Change the status of a work item to acquired if it has not been acquired
+     * already before.
+     * @param wiId
+     * @param username
+     * @return true if the work item has been acquired, false if it can't be acquired.
+     * @throws WorkListException
+     */
+    public boolean acquireWorkItem(Long wiId, String username) throws WorkListException;
+
+    /**
+     * Change the status of an acquired work item to active so that sombedoy else can
+     * acquire it again.
+     * @param wiId
+     * @throws WorkListException
+     */
+    public void releaseWorkItem(Long wiId) throws WorkListException;
+
+    /**
+     * Reassign an already created work item to a new user. Before calling this method
+     * you have to make sure that the WorkItem is in an active state and has not been
+     * acquired previously, otherwise it will throw an exception. So if your work item
+     * is acquired, you should release it first.
+     * @param wiId
+     * @param newUserName
+     * @throws WorkListException
+     */
+    public void reassignWorkItem(Long wiId, String newUserName) throws WorkListException;
+
+    /**
+     * ## ADVANCED ## Updates the information held by the work item that will be sent to
+     * the engine. This information is stored as an XML document that should match the
+     * message definition expected in return of your work item completion by the process
+     * engine. You may want to add new information but you shouldn't remove any prior existing
+     * element in this XML document.
+     * @param wiId
+     * @param message
+     * @throws WorkListException
+     */
+    public void updateInformation(Long wiId, String message) throws WorkListException;
+
+}

Added: incubator/agila/trunk/modules/bpel/engine/worklist/src/java/org/apache/agila/bpel/worklist/AgilaWorkListFactory.java
URL: http://svn.apache.org/viewcvs/incubator/agila/trunk/modules/bpel/engine/worklist/src/java/org/apache/agila/bpel/worklist/AgilaWorkListFactory.java?rev=165042&view=auto
==============================================================================
--- incubator/agila/trunk/modules/bpel/engine/worklist/src/java/org/apache/agila/bpel/worklist/AgilaWorkListFactory.java (added)
+++ incubator/agila/trunk/modules/bpel/engine/worklist/src/java/org/apache/agila/bpel/worklist/AgilaWorkListFactory.java Wed Apr 27 13:27:43 2005
@@ -0,0 +1,28 @@
+/*
+ * Copyright 2004 The Apache Software Foundation.
+ *
+ * Licensed 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.agila.bpel.worklist;
+
+import org.apache.agila.bpel.worklist.priv.WorkListImpl;
+
+/**
+ * Factory class for the Agila WorkList Manager interface.
+ */
+public class AgilaWorkListFactory {
+
+    public static AgilaWorkList getWorkList() {
+        return new WorkListImpl();
+    }
+}

Added: incubator/agila/trunk/modules/bpel/engine/worklist/src/java/org/apache/agila/bpel/worklist/WorkItem.java
URL: http://svn.apache.org/viewcvs/incubator/agila/trunk/modules/bpel/engine/worklist/src/java/org/apache/agila/bpel/worklist/WorkItem.java?rev=165042&view=auto
==============================================================================
--- incubator/agila/trunk/modules/bpel/engine/worklist/src/java/org/apache/agila/bpel/worklist/WorkItem.java (added)
+++ incubator/agila/trunk/modules/bpel/engine/worklist/src/java/org/apache/agila/bpel/worklist/WorkItem.java Wed Apr 27 13:27:43 2005
@@ -0,0 +1,53 @@
+/*
+ * Copyright 2004 The Apache Software Foundation.
+ *
+ * Licensed 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.agila.bpel.worklist;
+
+import java.util.Date;
+
+/**
+ * A simple object holding all data of a Work Item.
+ */
+public interface WorkItem {
+
+    public final static int ACTIVE = 0;
+    public final static int ACQUIRED = 4;
+    public final static int COMPLETED = 1;
+    public final static int CANCELED = 2;
+    public final static int WRONGLY_ASSIGNED = 3;
+
+    public Long getId();
+    public void setId(Long id);
+
+    public String getUserOrGroup();
+    public void setUserOrGroup(String userOrGroup);
+
+    public String getDescription();
+    public void setDescription(String description);
+
+    public String getInformation();
+    public void setInformation(String information);
+
+    public String getAcquiredBy();
+    public void setAcquiredBy(String acquiredBy);
+
+    public Date getCreationDate();
+    public void setCreationDate(Date creationDate);
+
+    public Date getDueDate();
+    public void setDueDate(Date dueDate);
+
+    public int getStatus();
+}

Added: incubator/agila/trunk/modules/bpel/engine/worklist/src/java/org/apache/agila/bpel/worklist/WorkItemEvents.java
URL: http://svn.apache.org/viewcvs/incubator/agila/trunk/modules/bpel/engine/worklist/src/java/org/apache/agila/bpel/worklist/WorkItemEvents.java?rev=165042&view=auto
==============================================================================
--- incubator/agila/trunk/modules/bpel/engine/worklist/src/java/org/apache/agila/bpel/worklist/WorkItemEvents.java (added)
+++ incubator/agila/trunk/modules/bpel/engine/worklist/src/java/org/apache/agila/bpel/worklist/WorkItemEvents.java Wed Apr 27 13:27:43 2005
@@ -0,0 +1,30 @@
+/*
+ * Copyright 2004 The Apache Software Foundation.
+ *
+ * Licensed 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.agila.bpel.worklist;
+
+/**
+ * @author mriou
+ */
+public interface WorkItemEvents {
+
+    public static final int CREATED_BY_ENGINE_EVENT = 1;
+    public static final int CREATED_BY_USER_EVENT = 2;
+    public static final int ACQUIRING_EVENT = 3;
+    public static final int RELEASING_EVENT = 4;
+    public static final int COMPLETING_EVENT = 5;
+    public static final int REASSIGNING_EVENT = 6;
+    public static final int INFORMATION_UPDATE_EVENT = 7;
+}

Added: incubator/agila/trunk/modules/bpel/engine/worklist/src/java/org/apache/agila/bpel/worklist/exception/InvalidMessageException.java
URL: http://svn.apache.org/viewcvs/incubator/agila/trunk/modules/bpel/engine/worklist/src/java/org/apache/agila/bpel/worklist/exception/InvalidMessageException.java?rev=165042&view=auto
==============================================================================
--- incubator/agila/trunk/modules/bpel/engine/worklist/src/java/org/apache/agila/bpel/worklist/exception/InvalidMessageException.java (added)
+++ incubator/agila/trunk/modules/bpel/engine/worklist/src/java/org/apache/agila/bpel/worklist/exception/InvalidMessageException.java Wed Apr 27 13:27:43 2005
@@ -0,0 +1,35 @@
+/*
+ * Copyright 2004 The Apache Software Foundation.
+ *
+ * Licensed 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.agila.bpel.worklist.exception;
+
+/**
+ * Thrown when the work item creation message received by the WorList Manager
+ * is wrongly formated or lacks necessary elements.
+ */
+public class InvalidMessageException extends WorkListException {
+
+    public InvalidMessageException(String message) {
+        super(message);
+    }
+
+    public InvalidMessageException(String message, Throwable cause) {
+        super(message, cause);
+    }
+
+    public InvalidMessageException(Throwable cause) {
+        super(cause);
+    }
+}

Added: incubator/agila/trunk/modules/bpel/engine/worklist/src/java/org/apache/agila/bpel/worklist/exception/WorkListException.java
URL: http://svn.apache.org/viewcvs/incubator/agila/trunk/modules/bpel/engine/worklist/src/java/org/apache/agila/bpel/worklist/exception/WorkListException.java?rev=165042&view=auto
==============================================================================
--- incubator/agila/trunk/modules/bpel/engine/worklist/src/java/org/apache/agila/bpel/worklist/exception/WorkListException.java (added)
+++ incubator/agila/trunk/modules/bpel/engine/worklist/src/java/org/apache/agila/bpel/worklist/exception/WorkListException.java Wed Apr 27 13:27:43 2005
@@ -0,0 +1,34 @@
+/*
+ * Copyright 2004 The Apache Software Foundation.
+ *
+ * Licensed 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.agila.bpel.worklist.exception;
+
+/**
+ * Generic exception for the WorkList Manager.
+ */
+public class WorkListException extends Exception {
+
+    public WorkListException(String message) {
+        super(message);
+    }
+
+    public WorkListException(String message, Throwable cause) {
+        super(message, cause);
+    }
+
+    public WorkListException(Throwable cause) {
+        super(cause);
+    }
+}

Added: incubator/agila/trunk/modules/bpel/engine/worklist/src/java/org/apache/agila/bpel/worklist/exception/WorkListRuntimeException.java
URL: http://svn.apache.org/viewcvs/incubator/agila/trunk/modules/bpel/engine/worklist/src/java/org/apache/agila/bpel/worklist/exception/WorkListRuntimeException.java?rev=165042&view=auto
==============================================================================
--- incubator/agila/trunk/modules/bpel/engine/worklist/src/java/org/apache/agila/bpel/worklist/exception/WorkListRuntimeException.java (added)
+++ incubator/agila/trunk/modules/bpel/engine/worklist/src/java/org/apache/agila/bpel/worklist/exception/WorkListRuntimeException.java Wed Apr 27 13:27:43 2005
@@ -0,0 +1,31 @@
+/*
+ * Copyright 2004 The Apache Software Foundation.
+ *
+ * Licensed 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.agila.bpel.worklist.exception;
+
+public class WorkListRuntimeException extends RuntimeException {
+
+    public WorkListRuntimeException(String message) {
+        super(message);
+    }
+
+    public WorkListRuntimeException(Throwable cause) {
+        super(cause);
+    }
+
+    public WorkListRuntimeException(String message, Throwable cause) {
+        super(message, cause);
+    }
+}

Added: incubator/agila/trunk/modules/bpel/engine/worklist/src/java/org/apache/agila/bpel/worklist/priv/UserHelper.java
URL: http://svn.apache.org/viewcvs/incubator/agila/trunk/modules/bpel/engine/worklist/src/java/org/apache/agila/bpel/worklist/priv/UserHelper.java?rev=165042&view=auto
==============================================================================
--- incubator/agila/trunk/modules/bpel/engine/worklist/src/java/org/apache/agila/bpel/worklist/priv/UserHelper.java (added)
+++ incubator/agila/trunk/modules/bpel/engine/worklist/src/java/org/apache/agila/bpel/worklist/priv/UserHelper.java Wed Apr 27 13:27:43 2005
@@ -0,0 +1,66 @@
+/*
+ * Copyright 2004 The Apache Software Foundation.
+ *
+ * Licensed 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.agila.bpel.worklist.priv;
+
+import java.util.Collection;
+
+import org.apache.agila.bpel.engine.common.persistence.FinderException;
+import org.apache.agila.bpel.user.Group;
+import org.apache.agila.bpel.user.Role;
+import org.apache.agila.bpel.user.AgilaUserFactory;
+import org.apache.agila.bpel.user.User;
+import org.apache.agila.bpel.user.exception.AgilaUserException;
+
+/**
+ * Helper class that does the interaction between the work list manager
+ * and the user service.
+ */
+public class UserHelper {
+
+    public static Collection getRoleNames(String username) throws FinderException {
+        Collection result = null;
+        try {
+            result = AgilaUserFactory.getAgilaUser().findRolesForUser(username);
+        } catch (AgilaUserException e) {
+            throw new FinderException("Could not find the user " + username, e);
+        }
+        return result;
+    }
+
+    public static boolean userOrGroupExists(String userOrGroup) {
+        User user = null;
+        Group group = null;
+        Role role = null;
+        try {
+            user = AgilaUserFactory.getAgilaUser().findUserByName(userOrGroup);
+        } catch (AgilaUserException e) {
+        } catch (FinderException e) {
+        }
+        try {
+            group = AgilaUserFactory.getAgilaUser().findGroupByName(userOrGroup);
+        } catch (AgilaUserException e) {
+        } catch (FinderException e) {
+        }
+        try {
+            role = AgilaUserFactory.getAgilaUser().findRoleByName(userOrGroup);
+        } catch (AgilaUserException e) {
+        } catch (FinderException e) {
+        }
+        
+        if (user == null && group == null && role == null) return false;
+        return true;
+    }
+}

Added: incubator/agila/trunk/modules/bpel/engine/worklist/src/java/org/apache/agila/bpel/worklist/priv/WorkListImpl.java
URL: http://svn.apache.org/viewcvs/incubator/agila/trunk/modules/bpel/engine/worklist/src/java/org/apache/agila/bpel/worklist/priv/WorkListImpl.java?rev=165042&view=auto
==============================================================================
--- incubator/agila/trunk/modules/bpel/engine/worklist/src/java/org/apache/agila/bpel/worklist/priv/WorkListImpl.java (added)
+++ incubator/agila/trunk/modules/bpel/engine/worklist/src/java/org/apache/agila/bpel/worklist/priv/WorkListImpl.java Wed Apr 27 13:27:43 2005
@@ -0,0 +1,324 @@
+/*
+ * Copyright 2004 The Apache Software Foundation.
+ *
+ * Licensed 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.agila.bpel.worklist.priv;
+
+import java.rmi.RemoteException;
+import java.util.*;
+
+import org.dom4j.Document;
+import org.dom4j.DocumentException;
+import org.dom4j.DocumentHelper;
+import org.dom4j.Element;
+import org.dom4j.Node;
+import org.dom4j.io.DOMWriter;
+import org.relaxng.datatype.DatatypeException;
+import org.apache.agila.bpel.client.AgilaEngine;
+import org.apache.agila.bpel.common.util.DurationUtil;
+import org.apache.agila.bpel.engine.common.persistence.CreationException;
+import org.apache.agila.bpel.engine.common.persistence.DBSessionException;
+import org.apache.agila.bpel.engine.common.persistence.FinderException;
+import org.apache.agila.bpel.engine.common.persistence.PersistentDataAccess;
+import org.apache.agila.bpel.engine.common.event.EventManager;
+import org.apache.agila.bpel.engine.common.event.lifecycle.ObjectLifecycleEvent;
+import org.apache.agila.bpel.user.Role;
+import org.apache.agila.bpel.worklist.AgilaWorkList;
+import org.apache.agila.bpel.worklist.WorkItem;
+import org.apache.agila.bpel.worklist.WorkItemEvents;
+import org.apache.agila.bpel.worklist.exception.InvalidMessageException;
+import org.apache.agila.bpel.worklist.exception.WorkListException;
+import org.apache.agila.bpel.worklist.exception.WorkListRuntimeException;
+import org.apache.agila.bpel.worklist.priv.dao.WorkItemDAO;
+import org.apache.agila.bpel.worklist.priv.po.WorkItemImpl;
+
+import com.sun.msv.datatype.xsd.DatatypeFactory;
+import com.sun.msv.datatype.xsd.XSDatatype;
+import com.sun.msv.datatype.xsd.datetime.BigTimeDurationValueType;
+
+/**
+ * Implementation of the WorkList interface.
+ */
+public class WorkListImpl implements AgilaWorkList {
+
+    private static AgilaEngine engine = null;
+    private static DOMWriter writer = null;
+
+    private static String THIS_PARTNER = "WorkListMgr";
+    private static String THIS_PORTTYPE = "WorkListAnswerPT";
+    private static String THIS_OPERATION = "receiveAnswer";
+    private static String THIS_NAMESPACE = "http://www.apache.org/agila/worklist"; 
+
+    /**
+     * @@org.apache.agila.bpel.engine.common.aspect.Transactional
+     */
+    public Long createWorkItem(Document creationMessage) throws InvalidMessageException {
+        WorkItemImpl impl = new WorkItemImpl();
+
+        Node userNode = creationMessage.selectSingleNode("/message/wipart/user");
+        Node groupNode = creationMessage.selectSingleNode("/message/wipart/group");
+        Node descriptionNode = creationMessage.selectSingleNode("/message/wipart/description");
+        Node deadlineNode = creationMessage.selectSingleNode("/message/wipart/deadline");
+
+        if (userNode == null && groupNode == null) {
+            throw new InvalidMessageException("Received message doesn't follow the necessary format " +
+                    creationMessage.asXML());
+        }
+
+        if (groupNode == null) {
+            impl.setUserOrGroup(userNode.getText());
+        } else {
+            impl.setUserOrGroup(groupNode.getText());
+        }
+        if (descriptionNode != null) {
+            impl.setDescription(descriptionNode.getText());
+        }
+
+        if (deadlineNode != null) {
+            try {
+                XSDatatype dateTimeType = DatatypeFactory.getTypeByName("dateTime");
+                if (dateTimeType.isValid(deadlineNode.getText(), null)) {
+                    Calendar cal = (Calendar) dateTimeType.createJavaObject(deadlineNode.getText(), null);
+                    impl.setDueDate(cal.getTime());
+                } else {
+                    XSDatatype durationType = DatatypeFactory.getTypeByName("duration");
+                    if (durationType.isValid(deadlineNode.getText(), null)) {
+                        Calendar cal = Calendar.getInstance();
+                        BigTimeDurationValueType duration =
+                                (BigTimeDurationValueType) durationType.createJavaObject(deadlineNode.getText(), null);
+                        DurationUtil.addDuration(cal, duration);
+                        impl.setDueDate(cal.getTime());
+                    } else {
+                        throw new InvalidMessageException("The deadline node in the message could not be parsed " + creationMessage);
+                    }
+                }
+            } catch (DatatypeException e) {
+                throw new WorkListRuntimeException(e);
+            }
+        }
+
+        impl.setCreationDate(new Date());
+
+        if (UserHelper.userOrGroupExists(impl.getUserOrGroup())) {
+            impl.setStatus(WorkItem.ACTIVE);
+        } else {
+            impl.setStatus(WorkItem.WRONGLY_ASSIGNED);
+        }
+
+        Element wiPart = creationMessage.getRootElement().element("wipart");
+        wiPart.detach();
+        impl.setInformation(creationMessage.getRootElement().asXML());
+
+        WorkItemDAO.create(impl);
+
+        EventManager.fireObjectLifecycleEvent(ObjectLifecycleEvent.CREATION, WorkItemEvents.CREATED_BY_ENGINE_EVENT,
+                impl.getUserOrGroup(), impl);
+
+        return impl.getId();
+    }
+
+    /**
+     * @@org.apache.agila.bpel.engine.common.aspect.Transactional
+     */
+    public Long createWorkItem(String userOrRole, String description, String information, Date dueDate,
+                               boolean fireEvent) throws CreationException {
+
+        if (!UserHelper.userOrGroupExists(userOrRole)) {
+            throw new CreationException("The provided user or role doesn't exist: " + userOrRole);
+        }
+        WorkItemImpl impl = new WorkItemImpl();
+        impl.setUserOrGroup(userOrRole);
+        impl.setDescription(description);
+        impl.setInformation(information);
+        impl.setDueDate(dueDate);
+        impl.setFireEvent(fireEvent);
+        impl.setCreationDate(new Date());
+        impl.setStatus(WorkItem.ACTIVE);
+        WorkItemDAO.create(impl);
+
+        EventManager.fireObjectLifecycleEvent(ObjectLifecycleEvent.CREATION, WorkItemEvents.CREATED_BY_USER_EVENT,
+                impl.getUserOrGroup(), impl);
+
+        return impl.getId();
+    }
+
+    /**
+     * @@org.apache.agila.bpel.engine.common.aspect.Transactional
+     */
+    public Collection getWorkList(String user) throws FinderException {
+        // Extracting all role names the provided user is in
+        Collection roles = UserHelper.getRoleNames(user);
+        ArrayList roleNames = new ArrayList(roles.size() + 1);
+        for (Iterator rolesIter = roles.iterator(); rolesIter.hasNext();) {
+            Object role = rolesIter.next();
+            String rolename = ((Role)role).getName();
+            roleNames.add(rolename);
+        }
+        // Adding the user himself
+        roleNames.add(user);
+
+        // And querying for workitems assigned to anything in that list
+        Collection result;
+        try {
+            result = WorkItemDAO.findByUserAndRoles(user, roleNames);
+        } catch (DBSessionException e) {
+            throw new FinderException(e);
+        }
+
+        return result;
+    }
+
+    /**
+     * @@org.apache.agila.bpel.engine.common.aspect.Transactional
+     */
+    public WorkItem getWorkItem(Long id) throws WorkListException {
+        WorkItemImpl wi;
+        try {
+            wi = (WorkItemImpl) WorkItemDAO.findById(id, WorkItemImpl.class);
+        } catch (org.apache.agila.bpel.engine.common.persistence.FinderException e) {
+            throw new WorkListException("Could not find work item with id " + id, e);
+        }
+
+        return wi;
+    }
+
+    /**
+     * @@org.apache.agila.bpel.engine.common.aspect.Transactional
+     */
+    public boolean acquireWorkItem(Long wiId, String username) throws WorkListException {
+        boolean acquired = false;
+
+        WorkItemImpl wi = (WorkItemImpl) getWorkItem(wiId);
+        if (wi.getStatus() == WorkItem.ACTIVE) {
+            wi.setAcquiredBy(username);
+            wi.setStatus(WorkItem.ACQUIRED);
+            WorkItemDAO.update(wi);
+            acquired = true;
+
+            EventManager.fireObjectLifecycleEvent(ObjectLifecycleEvent.STATE_CHANGE,
+                    WorkItemEvents.ACQUIRING_EVENT, username, wi);
+        } else if (wi.getStatus() != WorkItem.ACQUIRED) {
+            throw new WorkListException("Can't acquire a work item that has already been completed " +
+                                            "or canceled (id = \" + wiId + \").\"");
+        }
+        return acquired;
+    }
+
+    /**
+     * @@org.apache.agila.bpel.engine.common.aspect.Transactional
+     */
+    public void releaseWorkItem(Long wiId) throws WorkListException {
+        WorkItemImpl wi = (WorkItemImpl) getWorkItem(wiId);
+        if (wi.getStatus() == WorkItem.ACQUIRED) {
+            wi.setAcquiredBy(null);
+            wi.setStatus(WorkItem.ACTIVE);
+            WorkItemDAO.update(wi);
+
+            EventManager.fireObjectLifecycleEvent(ObjectLifecycleEvent.STATE_CHANGE,
+                    WorkItemEvents.RELEASING_EVENT, wi.getUserOrGroup(), wi);
+        } else {
+            throw new WorkListException("The provided work item wasn't acquired (id = " + wiId + ").");
+        }
+    }
+
+    /**
+     * @@org.apache.agila.bpel.engine.common.aspect.Transactional
+     */
+    public void completeWorkItem(Long wiId, String message) throws WorkListException {
+        WorkItemImpl wi;
+        try {
+            wi = (WorkItemImpl) WorkItemDAO.findById(wiId, WorkItemImpl.class);
+        } catch (org.apache.agila.bpel.engine.common.persistence.FinderException e) {
+            throw new WorkListException("Could not find work item with id " + wiId, e);
+        }
+
+        if (wi.getStatus() != WorkItem.ACQUIRED) {
+            throw new WorkListException("You can't complete a process that hasn't been acquired previously.");
+        }
+
+        Document messageAsDoc;
+        try {
+            messageAsDoc = DocumentHelper.parseText(message);
+        } catch (DocumentException e) {
+            throw new WorkListException(e);
+        }
+
+        wi.setStatus(WorkItem.COMPLETED);
+        wi.setInformation(message);
+        wi.setCompletionDate(new Date());
+
+        PersistentDataAccess.update(wi);
+
+        EventManager.fireObjectLifecycleEvent(ObjectLifecycleEvent.STATE_CHANGE,
+                WorkItemEvents.COMPLETING_EVENT, wi.getAcquiredBy(), wi);
+
+        if (wi.isFireEvent()) {
+            Element root = messageAsDoc.getRootElement();
+            root.addElement("wipart").addElement("workitemid").setText(wi.getId().toString());
+            try {
+                //TODO tu je to treba otestovat
+                getEngine().acknowledge(THIS_PARTNER, THIS_NAMESPACE, THIS_PORTTYPE, THIS_OPERATION, getDOMWriter().write(messageAsDoc));
+            } catch (javax.xml.rpc.ServiceException e) {
+                throw new WorkListException("Could not invoke Agila's engine when completing a work item " + wiId, e);
+            } catch (RemoteException e) {
+                throw new WorkListException("Could not invoke Agila's engine when completing a work item " + wiId, e);
+            } catch (DocumentException e) {
+                throw new WorkListException("Could not produce document to send to engine : " + messageAsDoc.asXML(), e);
+            }
+        }
+    }
+
+    /**
+     * @@org.apache.agila.bpel.engine.common.aspect.Transactional
+     */
+    public void reassignWorkItem(Long wiId, String newUserName) throws WorkListException {
+        WorkItemImpl wi = (WorkItemImpl) getWorkItem(wiId);
+        if (wi.getStatus() == WorkItem.ACTIVE) {
+            wi.setUserOrGroup(newUserName);
+            WorkItemDAO.update(wi);
+
+            EventManager.fireObjectLifecycleEvent(ObjectLifecycleEvent.STATE_CHANGE,
+                    WorkItemEvents.REASSIGNING_EVENT, newUserName, wi);
+        } else {
+            throw new WorkListException("The provided work item isn't active (id = " + wiId + ").");
+        }
+    }
+
+    /**
+     * @@org.apache.agila.bpel.engine.common.aspect.Transactional
+     */
+    public void updateInformation(Long wiId, String message) throws WorkListException {
+        WorkItemImpl wi = (WorkItemImpl) getWorkItem(wiId);
+        wi.setInformation(message);
+        WorkItemDAO.update(wi);
+
+        EventManager.fireObjectLifecycleEvent(ObjectLifecycleEvent.STATE_CHANGE,
+                WorkItemEvents.INFORMATION_UPDATE_EVENT, wi.getUserOrGroup(), wi);
+    }
+
+    private AgilaEngine getEngine() {
+        if (engine == null) {
+            engine = new AgilaEngine();
+        }
+        return engine;
+    }
+
+    private DOMWriter getDOMWriter() {
+        if (writer == null) {
+            writer = new DOMWriter();
+        }
+        return writer;
+    }
+
+}

Added: incubator/agila/trunk/modules/bpel/engine/worklist/src/java/org/apache/agila/bpel/worklist/priv/dao/WorkItemDAO.java
URL: http://svn.apache.org/viewcvs/incubator/agila/trunk/modules/bpel/engine/worklist/src/java/org/apache/agila/bpel/worklist/priv/dao/WorkItemDAO.java?rev=165042&view=auto
==============================================================================
--- incubator/agila/trunk/modules/bpel/engine/worklist/src/java/org/apache/agila/bpel/worklist/priv/dao/WorkItemDAO.java (added)
+++ incubator/agila/trunk/modules/bpel/engine/worklist/src/java/org/apache/agila/bpel/worklist/priv/dao/WorkItemDAO.java Wed Apr 27 13:27:43 2005
@@ -0,0 +1,58 @@
+/*
+ * Copyright 2004 The Apache Software Foundation.
+ *
+ * Licensed 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.agila.bpel.worklist.priv.dao;
+
+import java.util.List;
+import java.util.Collection;
+
+import net.sf.hibernate.Hibernate;
+import net.sf.hibernate.HibernateException;
+import net.sf.hibernate.Session;
+import net.sf.hibernate.Query;
+
+import org.apache.agila.bpel.engine.common.persistence.DBSessionException;
+import org.apache.agila.bpel.engine.common.persistence.DBSessionManager;
+import org.apache.agila.bpel.engine.common.persistence.PersistentDataAccess;
+import org.apache.log4j.Logger;
+
+/**
+ * Data Acces Object for WorkItemImpl persistent object
+ */
+public class WorkItemDAO extends PersistentDataAccess {
+
+	private static Logger log = Logger.getLogger(WorkItemDAO.class);
+
+	private static String FINDBY_USERANDROLE =
+			"FROM org.apache.agila.bpel.worklist.priv.po.WorkItemImpl as wi " +
+			"WHERE (wi.userOrGroup in (:rolesList) AND wi.status = 0) " +
+                "OR (wi.status = 4 AND wi.acquiredBy = :username)";
+
+	public static List findByUserAndRoles(String username, Collection userAndRoles) throws DBSessionException {
+        Session session = DBSessionManager.getActiveSession();
+
+		List result;
+		try {
+            Query q = session.createQuery(FINDBY_USERANDROLE);
+            q.setParameterList("rolesList", userAndRoles);
+            q.setParameter("username", username);
+            result = q.list();
+		} catch (HibernateException e) {
+			log.error("Got a database exception when querying for a worklist.", e);
+			throw new DBSessionException(e);
+		}
+		return result;
+	}
+}

Added: incubator/agila/trunk/modules/bpel/engine/worklist/src/java/org/apache/agila/bpel/worklist/priv/po/WorkItemImpl.java
URL: http://svn.apache.org/viewcvs/incubator/agila/trunk/modules/bpel/engine/worklist/src/java/org/apache/agila/bpel/worklist/priv/po/WorkItemImpl.java?rev=165042&view=auto
==============================================================================
--- incubator/agila/trunk/modules/bpel/engine/worklist/src/java/org/apache/agila/bpel/worklist/priv/po/WorkItemImpl.java (added)
+++ incubator/agila/trunk/modules/bpel/engine/worklist/src/java/org/apache/agila/bpel/worklist/priv/po/WorkItemImpl.java Wed Apr 27 13:27:43 2005
@@ -0,0 +1,120 @@
+/*
+ * Copyright 2004 The Apache Software Foundation.
+ *
+ * Licensed 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.agila.bpel.worklist.priv.po;
+
+import java.util.Date;
+
+import org.apache.agila.bpel.worklist.WorkItem;
+
+/**
+ * The persistent representation of a Work Item. The fireEvent attribute is just
+ * used to know whether this work item has been created by a third party (in which
+ * case the engine doesn't care to know that it has been completed).
+ */
+public class WorkItemImpl implements WorkItem {
+
+	private Long id;
+    private String userOrGroup;
+    private String description;
+    private String information;
+    private String acquiredBy;
+    private boolean fireEvent = true;
+    private Date creationDate;
+    private Date completionDate;
+    private Date dueDate;
+    private int status;
+
+
+	public Long getId() {
+		return id;
+	}
+
+	public void setId(Long id) {
+		this.id = id;
+	}
+
+    public String getUserOrGroup() {
+        return userOrGroup;
+    }
+
+    public void setUserOrGroup(String userOrGroup) {
+        this.userOrGroup = userOrGroup;
+    }
+
+    public String getDescription() {
+        return description;
+    }
+
+    public void setDescription(String description) {
+        this.description = description;
+    }
+
+    public String getInformation() {
+        return information;
+    }
+
+    public void setInformation(String information) {
+        this.information = information;
+    }
+
+    public String getAcquiredBy() {
+        return acquiredBy;
+    }
+
+    public void setAcquiredBy(String acquiredBy) {
+        this.acquiredBy = acquiredBy;
+    }
+
+    public Date getCreationDate() {
+        return creationDate;
+    }
+
+    public void setCreationDate(Date creationDate) {
+        this.creationDate = creationDate;
+    }
+
+    public Date getCompletionDate() {
+        return completionDate;
+    }
+
+    public void setCompletionDate(Date completionDate) {
+        this.completionDate = completionDate;
+    }
+
+    public Date getDueDate() {
+        return dueDate;
+    }
+
+    public void setDueDate(Date dueDate) {
+        this.dueDate = dueDate;
+    }
+
+    public int getStatus() {
+        return status;
+    }
+
+    public void setStatus(int status) {
+        this.status = status;
+    }
+
+    public boolean isFireEvent() {
+        return fireEvent;
+    }
+
+    public void setFireEvent(boolean fireEvent) {
+        this.fireEvent = fireEvent;
+    }
+}

Added: incubator/agila/trunk/modules/bpel/engine/worklist/src/test/junit/org/apache/agila/bpel/worklist/TestGetWorklist.java
URL: http://svn.apache.org/viewcvs/incubator/agila/trunk/modules/bpel/engine/worklist/src/test/junit/org/apache/agila/bpel/worklist/TestGetWorklist.java?rev=165042&view=auto
==============================================================================
--- incubator/agila/trunk/modules/bpel/engine/worklist/src/test/junit/org/apache/agila/bpel/worklist/TestGetWorklist.java (added)
+++ incubator/agila/trunk/modules/bpel/engine/worklist/src/test/junit/org/apache/agila/bpel/worklist/TestGetWorklist.java Wed Apr 27 13:27:43 2005
@@ -0,0 +1,47 @@
+/*
+ * Copyright 2004 The Apache Software Foundation.
+ *
+ * Licensed 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.agila.bpel.worklist;
+
+import junit.framework.TestCase;
+import net.sf.hibernate.cfg.Configuration;
+import net.sf.hibernate.tool.hbm2ddl.SchemaExport;
+
+import org.apache.agila.bpel.engine.common.lifecycle.LifecycleManager;
+
+/**
+ * Read only test class for the worklist manager (create or updtes involve the user
+ * component as well).
+ */
+public class TestGetWorklist extends TestCase {
+
+    protected void setUp() throws Exception {
+        SchemaExport schemaExport = new SchemaExport(new Configuration().configure());
+        schemaExport.create(true, true);
+
+        LifecycleManager.getLifecycleManager().createResources();
+        LifecycleManager.getLifecycleManager().startResources();
+    }
+
+    protected void tearDown() throws Exception {
+        LifecycleManager.getLifecycleManager().stopResources();
+        LifecycleManager.getLifecycleManager().destroyResources();
+    }
+
+    public void testGetWorklist() throws Exception {
+        // TODO initialize the database with an admin user
+//        AgilaWorkListFactory.getWorkList().getWorkList("admin");
+    }
+}

Added: incubator/agila/trunk/modules/bpel/engine/worklist/src/test/resource/agila-configuration.xml
URL: http://svn.apache.org/viewcvs/incubator/agila/trunk/modules/bpel/engine/worklist/src/test/resource/agila-configuration.xml?rev=165042&view=auto
==============================================================================
--- incubator/agila/trunk/modules/bpel/engine/worklist/src/test/resource/agila-configuration.xml (added)
+++ incubator/agila/trunk/modules/bpel/engine/worklist/src/test/resource/agila-configuration.xml Wed Apr 27 13:27:43 2005
@@ -0,0 +1,121 @@
+<agila>
+    <lifecycle>
+        <resource>org.apache.agila.bpel.engine.common.transaction.TransactionManager</resource>
+        <resource>org.apache.agila.bpel.engine.common.event.EventManager</resource>
+        <resource>org.apache.agila.bpel.engine.priv.timer.EngineTimer</resource>
+    </lifecycle>
+    <transaction>
+        <resource>org.apache.agila.bpel.engine.common.persistence.DBSessionManager</resource>
+        <resource>org.apache.agila.bpel.engine.common.persistence.XMLSessionManager</resource>
+    </transaction>
+    <event-listeners>
+        <listener>org.apache.agila.bpel.engine.common.event.DebuggingListener</listener>
+    </event-listeners>
+    <tools>
+        <xindice>
+            <url>xmldb:xindice://localhost:8080/db</url>
+        </xindice>
+    </tools>
+    <deployer>
+        <namespaces>
+            <map remote-url="http://www.apache.org/agila/examples/loop/service/"
+                 local-url="loop-defs.xml"/>
+            <map remote-url="http://www.apache.org/agila/examples/process-defs.xml"
+                 local-url="process-defs.xml"/>
+            <map remote-url="http://www.apache.org/agila/test/flow/service/"
+                 local-url="test-flow-defs.xml"/>
+            <map remote-url="http://www.apache.org/agila/test/pick/service/"
+                 local-url="test-pick-defs.xml"/>
+            <map remote-url="http://www.apache.org/agila/test/reply/service/"
+                 local-url="test-reply-defs.xml"/>
+            <ignore>http://schemas.xmlsoap.org/ws/2003/03/business-process/</ignore>
+        </namespaces>
+    </deployer>
+    <engine>
+        <history>
+            <sent-messages>true</sent-messages>
+        </history>
+        <implementations>
+            <message-broker impl="org.apache.agila.bpel.engine.priv.messaging.impl.DefaultMessageBrokerImpl"/>
+
+            <activity interface="org.apache.agila.bpel.engine.priv.core.definition.Assign"
+                impl="org.apache.agila.bpel.engine.priv.core.definition.impl.AssignImpl"/>
+            <activity interface="org.apache.agila.bpel.engine.priv.core.definition.Empty"
+                impl="org.apache.agila.bpel.engine.priv.core.definition.impl.EmptyImpl"/>
+            <activity interface="org.apache.agila.bpel.engine.priv.core.definition.Flow"
+                impl="org.apache.agila.bpel.engine.priv.core.definition.impl.FlowImpl"/>
+            <activity interface="org.apache.agila.bpel.engine.priv.core.definition.Invoke"
+                impl="org.apache.agila.bpel.engine.priv.core.definition.impl.InvokeImpl"/>
+            <activity interface="org.apache.agila.bpel.engine.priv.core.definition.Pick"
+                impl="org.apache.agila.bpel.engine.priv.core.definition.impl.PickImpl"/>
+            <activity interface="org.apache.agila.bpel.engine.priv.core.definition.Receive"
+                impl="org.apache.agila.bpel.engine.priv.core.definition.impl.ReceiveImpl"/>
+            <activity interface="org.apache.agila.bpel.engine.priv.core.definition.Reply"
+                impl="org.apache.agila.bpel.engine.priv.core.definition.impl.ReplyImpl"/>
+            <activity interface="org.apache.agila.bpel.engine.priv.core.definition.Sequence"
+                impl="org.apache.agila.bpel.engine.priv.core.definition.impl.SequenceImpl"/>
+            <activity interface="org.apache.agila.bpel.engine.priv.core.definition.Scope"
+                impl="org.apache.agila.bpel.engine.priv.core.definition.impl.ScopeImpl"/>
+            <activity interface="org.apache.agila.bpel.engine.priv.core.definition.Switch"
+                impl="org.apache.agila.bpel.engine.priv.core.definition.impl.SwitchImpl"/>
+            <activity interface="org.apache.agila.bpel.engine.priv.core.definition.Terminate"
+                impl="org.apache.agila.bpel.engine.priv.core.definition.impl.TerminateImpl"/>
+            <activity interface="org.apache.agila.bpel.engine.priv.core.definition.Wait"
+                impl="org.apache.agila.bpel.engine.priv.core.definition.impl.WaitImpl"/>
+            <activity interface="org.apache.agila.bpel.engine.priv.core.definition.While"
+                impl="org.apache.agila.bpel.engine.priv.core.definition.impl.WhileImpl"/>
+
+            <execution-context interface="org.apache.agila.bpel.engine.priv.core.dynamic.AssignEC"
+                impl="org.apache.agila.bpel.engine.priv.core.dynamic.impl.AssignECImpl"/>
+            <execution-context interface="org.apache.agila.bpel.engine.priv.core.dynamic.EmptyEC"
+                impl="org.apache.agila.bpel.engine.priv.core.dynamic.impl.EmptyECImpl"/>
+            <execution-context interface="org.apache.agila.bpel.engine.priv.core.dynamic.FlowEC"
+                impl="org.apache.agila.bpel.engine.priv.core.dynamic.impl.FlowECImpl"/>
+            <execution-context interface="org.apache.agila.bpel.engine.priv.core.dynamic.InvokeEC"
+                impl="org.apache.agila.bpel.engine.priv.core.dynamic.impl.InvokeECImpl"/>
+            <execution-context interface="org.apache.agila.bpel.engine.priv.core.dynamic.PickEC"
+                impl="org.apache.agila.bpel.engine.priv.core.dynamic.impl.PickECImpl"/>
+            <execution-context interface="org.apache.agila.bpel.engine.priv.core.dynamic.ReceiveEC"
+                impl="org.apache.agila.bpel.engine.priv.core.dynamic.impl.ReceiveECImpl"/>
+            <execution-context interface="org.apache.agila.bpel.engine.priv.core.dynamic.ReplyEC"
+                impl="org.apache.agila.bpel.engine.priv.core.dynamic.impl.ReplyECImpl"/>
+            <execution-context interface="org.apache.agila.bpel.engine.priv.core.dynamic.SequenceEC"
+                impl="org.apache.agila.bpel.engine.priv.core.dynamic.impl.SequenceECImpl"/>
+            <execution-context interface="org.apache.agila.bpel.engine.priv.core.dynamic.SwitchEC"
+                impl="org.apache.agila.bpel.engine.priv.core.dynamic.impl.SwitchECImpl"/>
+            <execution-context interface="org.apache.agila.bpel.engine.priv.core.dynamic.TerminateEC"
+                impl="org.apache.agila.bpel.engine.priv.core.dynamic.impl.TerminateECImpl"/>
+            <execution-context interface="org.apache.agila.bpel.engine.priv.core.dynamic.WaitEC"
+                impl="org.apache.agila.bpel.engine.priv.core.dynamic.impl.WaitECImpl"/>
+            <execution-context interface="org.apache.agila.bpel.engine.priv.core.dynamic.WhileEC"
+                impl="org.apache.agila.bpel.engine.priv.core.dynamic.impl.WhileECImpl"/>
+        </implementations>
+
+        <executions>
+            <activity interface="org.apache.agila.bpel.engine.priv.core.definition.Assign"
+                execution="org.apache.agila.bpel.engine.priv.core.dynamic.AssignEC"/>
+            <activity interface="org.apache.agila.bpel.engine.priv.core.definition.Empty"
+                execution="org.apache.agila.bpel.engine.priv.core.dynamic.EmptyEC"/>
+            <activity interface="org.apache.agila.bpel.engine.priv.core.definition.Flow"
+                execution="org.apache.agila.bpel.engine.priv.core.dynamic.FlowEC"/>
+            <activity interface="org.apache.agila.bpel.engine.priv.core.definition.Invoke"
+                execution="org.apache.agila.bpel.engine.priv.core.dynamic.InvokeEC"/>
+            <activity interface="org.apache.agila.bpel.engine.priv.core.definition.Pick"
+                execution="org.apache.agila.bpel.engine.priv.core.dynamic.PickEC"/>
+            <activity interface="org.apache.agila.bpel.engine.priv.core.definition.Receive"
+                execution="org.apache.agila.bpel.engine.priv.core.dynamic.ReceiveEC"/>
+            <activity interface="org.apache.agila.bpel.engine.priv.core.definition.Reply"
+                execution="org.apache.agila.bpel.engine.priv.core.dynamic.ReplyEC"/>
+            <activity interface="org.apache.agila.bpel.engine.priv.core.definition.Sequence"
+                execution="org.apache.agila.bpel.engine.priv.core.dynamic.SequenceEC"/>
+            <activity interface="org.apache.agila.bpel.engine.priv.core.definition.Switch"
+                execution="org.apache.agila.bpel.engine.priv.core.dynamic.SwitchEC"/>
+            <activity interface="org.apache.agila.bpel.engine.priv.core.definition.Terminate"
+                execution="org.apache.agila.bpel.engine.priv.core.dynamic.TerminateEC"/>
+            <activity interface="org.apache.agila.bpel.engine.priv.core.definition.Wait"
+                execution="org.apache.agila.bpel.engine.priv.core.dynamic.WaitEC"/>
+            <activity interface="org.apache.agila.bpel.engine.priv.core.definition.While"
+                execution="org.apache.agila.bpel.engine.priv.core.dynamic.WhileEC"/>
+        </executions>
+    </engine>
+</agila>
\ No newline at end of file

Added: incubator/agila/trunk/modules/bpel/engine/worklist/src/test/resource/cache.ccf
URL: http://svn.apache.org/viewcvs/incubator/agila/trunk/modules/bpel/engine/worklist/src/test/resource/cache.ccf?rev=165042&view=auto
==============================================================================
--- incubator/agila/trunk/modules/bpel/engine/worklist/src/test/resource/cache.ccf (added)
+++ incubator/agila/trunk/modules/bpel/engine/worklist/src/test/resource/cache.ccf Wed Apr 27 13:27:43 2005
@@ -0,0 +1,7 @@
+jcs.default=
+jcs.default.cacheattributes=org.apache.jcs.engine.CompositeCacheAttributes
+jcs.default.cacheattributes.MaxObjects=1000
+jcs.default.cacheattributes.MemoryCacheName=org.apache.jcs.engine.memory.lru.LRUMemoryCache
+jcs.default.cacheattributes.cacheattributes.UseMemoryShrinker=true
+jcs.default.cacheattributes.cacheattributes.MaxMemoryIdleTimeSeconds=3600
+jcs.default.cacheattributes.cacheattributes.ShrinkerIntervalSeconds=60

Added: incubator/agila/trunk/modules/bpel/engine/worklist/src/test/resource/hibernate.cfg.xml
URL: http://svn.apache.org/viewcvs/incubator/agila/trunk/modules/bpel/engine/worklist/src/test/resource/hibernate.cfg.xml?rev=165042&view=auto
==============================================================================
--- incubator/agila/trunk/modules/bpel/engine/worklist/src/test/resource/hibernate.cfg.xml (added)
+++ incubator/agila/trunk/modules/bpel/engine/worklist/src/test/resource/hibernate.cfg.xml Wed Apr 27 13:27:43 2005
@@ -0,0 +1,45 @@
+<?xml version='1.0' encoding='utf-8'?>
+<!DOCTYPE hibernate-configuration PUBLIC
+    "-//Hibernate/Hibernate Configuration DTD//EN"
+    "http://hibernate.sourceforge.net/hibernate-configuration-2.0.dtd">
+
+<hibernate-configuration>
+
+    <session-factory>
+
+        <!-- HSQLDB configuration -->
+
+        <property name="connection.driver_class">org.hsqldb.jdbcDriver</property>
+        <property name="connection.url">jdbc:hsqldb:hsql://localhost</property>
+        <property name="connection.username">sa</property>
+        <property name="connection.password"></property>
+        <property name="dialect">net.sf.hibernate.dialect.HSQLDialect</property>
+
+        <!-- McKoi configuration -->
+
+        <!--        <property name="connection.driver_class">com.mckoi.JDBCDriver</property> -->
+        <!--        <property name="connection.url">jdbc:mckoi://localhost/</property> -->
+        <!--        <property name="connection.username">root</property> -->
+        <!--        <property name="connection.password">toor</property> -->
+        <!--        <property name="dialect">net.sf.hibernate.dialect.McKoiDialect</property> -->
+
+        <property name="connection.pool_size">10</property>
+        <property name="statement_cache.size">50</property>
+
+        <property name="c3p0.max_size">10</property>
+        <property name="c3p0.min_size">1</property>
+        <property name="c3p0.timeout">60</property>
+        <property name="c3p0.max_statements">50</property>
+
+        <property name="transaction.factory_class">net.sf.hibernate.transaction.JDBCTransactionFactory</property>
+
+        <property name="show_sql">true</property>
+        <property name="use_outer_join">true</property>
+
+        <mapping resource="org/apache/agila/bpel/worklist/workitem.hbm.xml"/>
+        <mapping resource="org/apache/agila/bpel/user/priv/UserImpl.hbm.xml"/>
+        <mapping resource="org/apache/agila/bpel/user/priv/GroupImpl.hbm.xml"/>
+        <mapping resource="org/apache/agila/bpel/user/priv/RoleImpl.hbm.xml"/>
+    </session-factory>
+
+</hibernate-configuration>

Added: incubator/agila/trunk/modules/bpel/engine/wsa/locator.ent
URL: http://svn.apache.org/viewcvs/incubator/agila/trunk/modules/bpel/engine/wsa/locator.ent?rev=165042&view=auto
==============================================================================
--- incubator/agila/trunk/modules/bpel/engine/wsa/locator.ent (added)
+++ incubator/agila/trunk/modules/bpel/engine/wsa/locator.ent Wed Apr 27 13:27:43 2005
@@ -0,0 +1 @@
+<!ENTITY % dependencies SYSTEM "file:../../dependencies.ent">%dependencies;

Added: incubator/agila/trunk/modules/bpel/engine/wsa/maven.xml
URL: http://svn.apache.org/viewcvs/incubator/agila/trunk/modules/bpel/engine/wsa/maven.xml?rev=165042&view=auto
==============================================================================
--- incubator/agila/trunk/modules/bpel/engine/wsa/maven.xml (added)
+++ incubator/agila/trunk/modules/bpel/engine/wsa/maven.xml Wed Apr 27 13:27:43 2005
@@ -0,0 +1,23 @@
+<project default="war"
+    xmlns:j="jelly:core"
+    xmlns:u="jelly:util"
+    xmlns:ant="jelly:ant"
+    xmlns:maven="jelly:maven"
+    xmlns:m="maven"
+    xmlns:deploy="deploy">
+
+    <preGoal name="java:jar-resources">
+        <copy toDir="${maven.war.webapp.dir}/WEB-INF/schema">
+            <fileset dir="src/schema">
+                <include name="*.*"/>
+            </fileset>
+        </copy>
+    </preGoal>
+
+    <!-- Module specific build, called by the reactor of the root module to build -->
+    <!-- all submodules. -->
+    <goal name="buildmodule">
+        <attainGoal name="war:install"/>
+    </goal>
+
+</project>
\ No newline at end of file

Added: incubator/agila/trunk/modules/bpel/engine/wsa/project.properties
URL: http://svn.apache.org/viewcvs/incubator/agila/trunk/modules/bpel/engine/wsa/project.properties?rev=165042&view=auto
==============================================================================
--- incubator/agila/trunk/modules/bpel/engine/wsa/project.properties (added)
+++ incubator/agila/trunk/modules/bpel/engine/wsa/project.properties Wed Apr 27 13:27:43 2005
@@ -0,0 +1,8 @@
+maven.multiproject.type=war
+maven.junit.fork=true
+maven.war.src=src/webapp
+
+maven.junit.sysproperties=jboss.aop.path
+jboss.aop.path=target/classes/META-INF/jboss-aop.xml;target/classes/META-INF/metadata-aop.xml
+
+maven.test.skip=true

Added: incubator/agila/trunk/modules/bpel/engine/wsa/project.xml
URL: http://svn.apache.org/viewcvs/incubator/agila/trunk/modules/bpel/engine/wsa/project.xml?rev=165042&view=auto
==============================================================================
--- incubator/agila/trunk/modules/bpel/engine/wsa/project.xml (added)
+++ incubator/agila/trunk/modules/bpel/engine/wsa/project.xml Wed Apr 27 13:27:43 2005
@@ -0,0 +1,97 @@
+<?xml version="1.0"?>
+<!DOCTYPE project [
+                  <!ENTITY % locator SYSTEM "file:locator.ent">%locator;
+                  ]>
+<project>
+    <extend>${basedir}/../../project.xml</extend>
+    <name>Agila Web Services</name>
+    <id>agila-ws</id>
+    <package>org.apache.agila.bpel.wsa</package>
+
+    <shortDescription>Agila Engine</shortDescription>
+
+    <description>
+        Web Services web application for Agila Services. Messages are received
+        by those web services, converted and transfered to according Agila
+        components.
+    </description>
+
+    <dependencies>
+        &dependency-asm;
+        &dependency-c3p0;
+        &dependency-cglib;
+        &dependency-commons-beanutils;
+        &dependency-commons-collections;
+        &dependency-commons-dbcp;
+        &dependency-commons-discovery;
+        &dependency-commons-lang;
+        &dependency-commons-logging;
+        &dependency-commons-pool;
+        &dependency-concurrent;
+        &dependency-jta;
+        &dependency-dom4j;
+        &dependency-ehcache;
+        &dependency-hibernate;
+        &dependency-jboss-jboss-aop;
+        &dependency-jboss-jboss-common-aop;
+        &dependency-jboss-javassist-aop;
+        &dependency-jcs;
+        &dependency-odmg;
+        &dependency-qdox;
+        &dependency-trove;
+        &dependency-axis;
+        &dependency-axis-jaxrpc;
+        &dependency-axis-saaj;
+        &dependency-commons-discovery;
+        &dependency-concurrent;
+        &dependency-dom4j;
+        &dependency-log4j;
+        &dependency-msv;
+        &dependency-msv-isorelax;
+        &dependency-msv-relaxdata;
+        &dependency-msv-xsdlib;
+        &dependency-servletapi;
+        &dependency-agila-client-api;
+        &dependency-agila-common;
+        &dependency-agila-common;
+        &dependency-agila-deployer;
+        &dependency-agila-engine;
+        &dependency-agila-engine-common;
+        &dependency-agila-worklist;
+        &dependency-agilauser;
+        &dependency-wsdl4j;
+        &dependency-xerces;
+        &dependency-xindice;
+        &dependency-wsvt-model;
+        &dependency-wsvt-validator;
+        &dependency-xml-apis;
+        &dependency-xmldb-api;
+        &dependency-xmldb-api-sdk;
+        &dependency-xmldb-common;
+        &dependency-xmldb-xupdate;
+        &dependency-xmlrpc;
+        &dependency-xstream;
+        &dependency-xstream-xpp3;
+    </dependencies>
+
+    <build>
+        <sourceDirectory>src/java</sourceDirectory>
+        <unitTestSourceDirectory>src/test/junit</unitTestSourceDirectory>
+
+        <resources>
+            <resource>
+                <directory>src/hibernate</directory>
+                <includes><include>**/*.*</include></includes>
+            </resource>
+            <resource>
+                <directory>src/aspect</directory>
+                <includes><include>**/*.*</include></includes>
+            </resource>
+        </resources>
+
+        <nagEmailAddress>wf-agila-devel@lists.sourceforge.net</nagEmailAddress>
+    </build>
+
+    &site-reports;
+
+</project>

Added: incubator/agila/trunk/modules/bpel/engine/wsa/src/aspect/jboss-aop.xml
URL: http://svn.apache.org/viewcvs/incubator/agila/trunk/modules/bpel/engine/wsa/src/aspect/jboss-aop.xml?rev=165042&view=auto
==============================================================================
--- incubator/agila/trunk/modules/bpel/engine/wsa/src/aspect/jboss-aop.xml (added)
+++ incubator/agila/trunk/modules/bpel/engine/wsa/src/aspect/jboss-aop.xml Wed Apr 27 13:27:43 2005
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<aop>
+	<!-- Tracing binding, includes debug messages at method entrance and exit -->
+   <bind pointcut="execution(public * org.smcp.*->*(..)) AND !all(*.aspect.*)">
+      <interceptor class="org.apache.agila.bpel.common.aspect.LoggingInterceptor"/>
+   </bind>
+   
+   <!-- Transaction commit, includes transaction behaviour at methods entranc and exit -->
+   <bind pointcut="all(@transactional)">
+       <interceptor class="org.apache.agila.bpel.engine.common.aspect.TransactionInterceptor"/>       
+   </bind>
+
+</aop>

Added: incubator/agila/trunk/modules/bpel/engine/wsa/src/conf/agila-ws.xml
URL: http://svn.apache.org/viewcvs/incubator/agila/trunk/modules/bpel/engine/wsa/src/conf/agila-ws.xml?rev=165042&view=auto
==============================================================================
--- incubator/agila/trunk/modules/bpel/engine/wsa/src/conf/agila-ws.xml (added)
+++ incubator/agila/trunk/modules/bpel/engine/wsa/src/conf/agila-ws.xml Wed Apr 27 13:27:43 2005
@@ -0,0 +1,2 @@
+<Context path="/agila-ws" docBase="agila-ws.war" debug="0" reloadable="true">
+</Context>

Added: incubator/agila/trunk/modules/bpel/engine/wsa/src/hibernate/cache.ccf
URL: http://svn.apache.org/viewcvs/incubator/agila/trunk/modules/bpel/engine/wsa/src/hibernate/cache.ccf?rev=165042&view=auto
==============================================================================
--- incubator/agila/trunk/modules/bpel/engine/wsa/src/hibernate/cache.ccf (added)
+++ incubator/agila/trunk/modules/bpel/engine/wsa/src/hibernate/cache.ccf Wed Apr 27 13:27:43 2005
@@ -0,0 +1,7 @@
+jcs.default=
+jcs.default.cacheattributes=org.apache.jcs.engine.CompositeCacheAttributes
+jcs.default.cacheattributes.MaxObjects=1000
+jcs.default.cacheattributes.MemoryCacheName=org.apache.jcs.engine.memory.lru.LRUMemoryCache
+jcs.default.cacheattributes.cacheattributes.UseMemoryShrinker=true
+jcs.default.cacheattributes.cacheattributes.MaxMemoryIdleTimeSeconds=3600
+jcs.default.cacheattributes.cacheattributes.ShrinkerIntervalSeconds=60

Added: incubator/agila/trunk/modules/bpel/engine/wsa/src/java/org/apache/agila/bpel/wsa/DeployerWSA.java
URL: http://svn.apache.org/viewcvs/incubator/agila/trunk/modules/bpel/engine/wsa/src/java/org/apache/agila/bpel/wsa/DeployerWSA.java?rev=165042&view=auto
==============================================================================
--- incubator/agila/trunk/modules/bpel/engine/wsa/src/java/org/apache/agila/bpel/wsa/DeployerWSA.java (added)
+++ incubator/agila/trunk/modules/bpel/engine/wsa/src/java/org/apache/agila/bpel/wsa/DeployerWSA.java Wed Apr 27 13:27:43 2005
@@ -0,0 +1,129 @@
+/*
+ * Copyright 2004 The Apache Software Foundation.
+ *
+ * Licensed 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.agila.bpel.wsa;
+
+import java.net.MalformedURLException;
+import java.net.URL;
+
+import org.apache.agila.bpel.deployer.AgilaDeployerFactory;
+import org.apache.agila.bpel.deployer.exception.DeploymentException;
+import org.apache.log4j.Logger;
+
+/**
+ * Web Service Adapter for the Agila Deployer, just forwards the received
+ * document to the deployer an lets it deploy the process description.
+ */
+public class DeployerWSA {
+
+    private final Logger log = Logger.getLogger(DeployerWSA.class);
+
+    public void deployResource(String resourceContent) throws DeploymentException {
+        try {
+            AgilaDeployerFactory.getAgilaDeployer().deployResource(resourceContent);
+        } catch (DeploymentException de) {
+            log.error("A DeploymentException has been caught in DeployerWSA", de);
+            throw de;
+        } catch (RuntimeException re) {
+            log.error("A RuntimeException has been caught in DeployerWSA", re);
+            throw re;
+        }
+    }
+
+    public String[] deployWSDL(String resourceContent, boolean validate) throws DeploymentException {
+        String [] result = null;
+        try {
+            result = AgilaDeployerFactory.getAgilaDeployer().deployWSDL(resourceContent, validate);
+        } catch (DeploymentException de) {
+            log.error("A DeploymentException has been caught in DeployerWSA", de);
+            throw de;
+        } catch (RuntimeException re) {
+            log.error("A RuntimeException has been caught in DeployerWSA", re);
+            throw re;
+        }
+        return result;
+    }
+
+    public String[] deployBPEL(String resourceContent) throws DeploymentException {
+        String [] result = null;
+        try {
+            result = AgilaDeployerFactory.getAgilaDeployer().deployBPEL(resourceContent);
+        } catch (DeploymentException de) {
+            log.error("A DeploymentException has been caught in DeployerWSA", de);
+            throw de;
+        } catch (RuntimeException re) {
+            log.error("A RuntimeException has been caught in DeployerWSA", re);
+            throw re;
+        }
+        return result;
+    }
+
+    /** @deprecated **/
+    public void deployURL(String url) throws DeploymentException {
+        URL descURL = null;
+        try {
+            descURL = new URL(url);
+        } catch (MalformedURLException e) {
+            throw new DeploymentException("URL is malformed.", e);
+        }
+
+        try {
+            AgilaDeployerFactory.getAgilaDeployer().deploy(descURL);
+        } catch (DeploymentException de) {
+            log.error("A DeploymentException has been caught in DeployerWSA", de);
+            throw de;
+        } catch (RuntimeException re) {
+            log.error("A RuntimeException has been caught in DeployerWSA", re);
+            throw re;
+        }
+    }
+
+    /** @deprecated **/
+    public void deployDescription(String description) throws DeploymentException {
+        try {
+            AgilaDeployerFactory.getAgilaDeployer().deploy(description);
+        } catch (DeploymentException de) {
+            log.error("A DeploymentException has been caught in DeployerWSA", de);
+            throw de;
+        } catch (RuntimeException re) {
+            log.error("A RuntimeException has been caught in DeployerWSA", re);
+            throw re;
+        }
+    }
+
+    /** @deprecated **/
+    public void deployDefinedDescription(String process, String definition) throws DeploymentException {
+        try {
+            AgilaDeployerFactory.getAgilaDeployer().deploy(process,definition);
+        } catch (DeploymentException de) {
+            log.error("A DeploymentException has been caught in DeployerWSA", de);
+            throw de;
+        } catch (RuntimeException re) {
+            log.error("A RuntimeException has been caught in DeployerWSA", re);
+            throw re;
+        }
+    }
+
+    /** @deprecated **/
+    public void deployFile(String localFile) throws DeploymentException {
+        try {
+            AgilaDeployerFactory.getAgilaDeployer().deploy(getClass().getClassLoader().getResource("loop.xml"));
+        } catch (RuntimeException re) {
+            log.error("A RuntimeException has been caught in DeployerWSA", re);
+            throw re;
+        }
+    }
+
+}

Added: incubator/agila/trunk/modules/bpel/engine/wsa/src/java/org/apache/agila/bpel/wsa/EngineAdminWSA.java
URL: http://svn.apache.org/viewcvs/incubator/agila/trunk/modules/bpel/engine/wsa/src/java/org/apache/agila/bpel/wsa/EngineAdminWSA.java?rev=165042&view=auto
==============================================================================
--- incubator/agila/trunk/modules/bpel/engine/wsa/src/java/org/apache/agila/bpel/wsa/EngineAdminWSA.java (added)
+++ incubator/agila/trunk/modules/bpel/engine/wsa/src/java/org/apache/agila/bpel/wsa/EngineAdminWSA.java Wed Apr 27 13:27:43 2005
@@ -0,0 +1,147 @@
+/*
+ * Copyright 2004 The Apache Software Foundation.
+ *
+ * Licensed 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.agila.bpel.wsa;
+
+import org.apache.log4j.Logger;
+import org.apache.agila.bpel.engine.common.monitoring.Audit;
+import org.apache.agila.bpel.engine.AgilaEngineAdminFactory;
+import org.apache.agila.bpel.engine.exception.EngineException;
+import org.apache.agila.bpel.engine.priv.messaging.MessageBroker;
+
+import java.util.Collection;
+import java.util.HashSet;
+import java.util.Map;
+
+/**
+ * Web Service Adapter for the Engine Administration service
+ */
+public class EngineAdminWSA {
+
+  private static final Logger log = Logger.getLogger(EngineAdminWSA.class);
+
+  public void deleteProcess(String namespace) throws EngineException {
+    try {
+      AgilaEngineAdminFactory.getEngineAdmin().deleteProcess(namespace);
+    } catch (RuntimeException re) {
+      log.error("A RuntimeException has been caught in EngineAdminWSA", re);
+      throw re;
+    }
+  }
+
+  public Collection findAllProcessName() throws EngineException {
+    Collection res = new HashSet();
+    try {
+      res = AgilaEngineAdminFactory.getEngineAdmin().findAllProcessNames();
+    } catch (RuntimeException re) {
+      log.error("A RuntimeException has been caught in EngineAdminWSA", re);
+      throw re;
+    }
+    return res;
+  }
+
+  public Collection findAllWSDLName() throws EngineException {
+    Collection res = new HashSet();
+    try {
+      res = AgilaEngineAdminFactory.getEngineAdmin().findAllWSDLNames();
+    } catch (RuntimeException re) {
+      log.error("A RuntimeException has been caught in EngineAdminWSA", re);
+      throw re;
+    }
+    return res;
+  }
+
+  public Collection findAllResourceName() throws EngineException {
+    Collection res = new HashSet();
+    try {
+      res = AgilaEngineAdminFactory.getEngineAdmin().findAllResourceNames();
+    } catch (RuntimeException re) {
+      log.error("A RuntimeException has been caught in EngineAdminWSA", re);
+      throw re;
+    }
+    return res;
+  }
+
+  public String findProcessAsXML(String processId) throws EngineException {
+    try {
+      return AgilaEngineAdminFactory.getEngineAdmin().findProcessAsXml(processId);
+    } catch (RuntimeException re) {
+      log.error("A RuntimeException has been caught in EngineAdminWSA", re);
+      throw re;
+    }
+  }
+
+  public String findProcessDefAsXml(String processId) throws EngineException {
+    try {
+      return AgilaEngineAdminFactory.getEngineAdmin().findProcessDefAsXml(processId);
+    } catch (RuntimeException re) {
+      log.error("A RuntimeException has been caught in EngineAdminWSA", re);
+      throw re;
+    }
+  }
+
+  public Map findActiveInstances() throws EngineException {
+    try {
+      return AgilaEngineAdminFactory.getEngineAdmin().findActiveInstances();
+    } catch (RuntimeException re) {
+      log.error("A RuntimeException has been caught in EngineAdminWSA", re);
+      throw re;
+    }
+  }
+
+  public Collection getEventLog() throws EngineException {
+    try {
+      return AgilaEngineAdminFactory.getEngineAdmin().getEventLog();
+    } catch (RuntimeException re) {
+      log.error("A RuntimeException has been caught in EngineAdminWSA", re);
+      throw re;
+    }
+  }
+
+  public Audit getAuditTrailForProcessInstance(Long instanceId) throws EngineException {
+    try {
+      return AgilaEngineAdminFactory.getEngineAdmin().getAuditTrailForProcessInstance(instanceId);
+    } catch (RuntimeException re) {
+      log.error("A RuntimeException has been caught in EngineAdminWSA", re);
+      throw re;
+    }
+  }
+
+  public Map findTerminatedInstances() throws EngineException {
+    try {
+      return AgilaEngineAdminFactory.getEngineAdmin().findTerminatedInstances();
+    } catch (RuntimeException re) {
+      log.error("A RuntimeException has been caught in EngineAdminWSA", re);
+      throw re;
+    }
+  }
+
+  /**
+   * Gets all messages that the engine has sent. Returns a map holding as key a string with
+   * format partner/porttype/operation of the sent message and as value the sent message as
+   * a XML string. Message records are not persisted so they do not survive a server shutdown.
+   *
+   * @return a Map with string key and string value
+   */
+  public static Map getSentMessages() {
+    try {
+      return MessageBroker.getMessages();
+    } catch (RuntimeException re) {
+      log.error("A RuntimeException has been caught in EngineAdminWSA", re);
+      throw re;
+    }
+  }
+
+}



Mime
View raw message