[jbpm-commits] JBoss JBPM SVN: r5536 - in projects/demos/tapestry-spring-jbpm4: src and 39 other directories.

do-not-reply at jboss.org do-not-reply at jboss.org
Tue Aug 25 10:53:09 EDT 2009


Author: ainze
Date: 2009-08-25 10:53:07 -0400 (Tue, 25 Aug 2009)
New Revision: 5536

Added:
   projects/demos/tapestry-spring-jbpm4/pom.xml
   projects/demos/tapestry-spring-jbpm4/src/
   projects/demos/tapestry-spring-jbpm4/src/main/
   projects/demos/tapestry-spring-jbpm4/src/main/java/
   projects/demos/tapestry-spring-jbpm4/src/main/java/org/
   projects/demos/tapestry-spring-jbpm4/src/main/java/org/example/
   projects/demos/tapestry-spring-jbpm4/src/main/java/org/example/jbpmdemo/
   projects/demos/tapestry-spring-jbpm4/src/main/java/org/example/jbpmdemo/components/
   projects/demos/tapestry-spring-jbpm4/src/main/java/org/example/jbpmdemo/components/Layout.java
   projects/demos/tapestry-spring-jbpm4/src/main/java/org/example/jbpmdemo/dao/
   projects/demos/tapestry-spring-jbpm4/src/main/java/org/example/jbpmdemo/dao/UserDAO.java
   projects/demos/tapestry-spring-jbpm4/src/main/java/org/example/jbpmdemo/dao/impl/
   projects/demos/tapestry-spring-jbpm4/src/main/java/org/example/jbpmdemo/dao/impl/UserDAOImpl.java
   projects/demos/tapestry-spring-jbpm4/src/main/java/org/example/jbpmdemo/model/
   projects/demos/tapestry-spring-jbpm4/src/main/java/org/example/jbpmdemo/model/user/
   projects/demos/tapestry-spring-jbpm4/src/main/java/org/example/jbpmdemo/model/user/User.java
   projects/demos/tapestry-spring-jbpm4/src/main/java/org/example/jbpmdemo/pages/
   projects/demos/tapestry-spring-jbpm4/src/main/java/org/example/jbpmdemo/pages/About.java
   projects/demos/tapestry-spring-jbpm4/src/main/java/org/example/jbpmdemo/pages/Contact.java
   projects/demos/tapestry-spring-jbpm4/src/main/java/org/example/jbpmdemo/pages/Index.java
   projects/demos/tapestry-spring-jbpm4/src/main/java/org/example/jbpmdemo/service/
   projects/demos/tapestry-spring-jbpm4/src/main/java/org/example/jbpmdemo/service/AppModule.java
   projects/demos/tapestry-spring-jbpm4/src/main/java/org/example/jbpmdemo/service/JbpmService.java
   projects/demos/tapestry-spring-jbpm4/src/main/java/org/example/jbpmdemo/service/UserService.java
   projects/demos/tapestry-spring-jbpm4/src/main/java/org/example/jbpmdemo/service/impl/
   projects/demos/tapestry-spring-jbpm4/src/main/java/org/example/jbpmdemo/service/impl/IdentitySessionImpl.java
   projects/demos/tapestry-spring-jbpm4/src/main/java/org/example/jbpmdemo/service/impl/JbpmServiceImpl.java
   projects/demos/tapestry-spring-jbpm4/src/main/java/org/example/jbpmdemo/service/impl/UserServiceImpl.java
   projects/demos/tapestry-spring-jbpm4/src/main/resources/
   projects/demos/tapestry-spring-jbpm4/src/main/resources/jbpm.mail.properties
   projects/demos/tapestry-spring-jbpm4/src/main/resources/log4j.properties
   projects/demos/tapestry-spring-jbpm4/src/main/resources/org/
   projects/demos/tapestry-spring-jbpm4/src/main/resources/org/example/
   projects/demos/tapestry-spring-jbpm4/src/main/resources/org/example/jbpmdemo/
   projects/demos/tapestry-spring-jbpm4/src/main/resources/org/example/jbpmdemo/applicationContext-common.xml
   projects/demos/tapestry-spring-jbpm4/src/main/resources/org/example/jbpmdemo/applicationContext-dao.xml
   projects/demos/tapestry-spring-jbpm4/src/main/resources/org/example/jbpmdemo/applicationContext-process.xml
   projects/demos/tapestry-spring-jbpm4/src/main/resources/org/example/jbpmdemo/applicationContext-service.xml
   projects/demos/tapestry-spring-jbpm4/src/main/resources/org/example/jbpmdemo/components/
   projects/demos/tapestry-spring-jbpm4/src/main/resources/org/example/jbpmdemo/components/Layout.tml
   projects/demos/tapestry-spring-jbpm4/src/main/resources/org/example/jbpmdemo/jbpm.cfg.xml
   projects/demos/tapestry-spring-jbpm4/src/main/resources/org/example/jbpmdemo/pages/
   projects/demos/tapestry-spring-jbpm4/src/main/resources/org/example/jbpmdemo/pages/Index.properties
   projects/demos/tapestry-spring-jbpm4/src/main/resources/user.hbm.xml
   projects/demos/tapestry-spring-jbpm4/src/main/webapp/
   projects/demos/tapestry-spring-jbpm4/src/main/webapp/About.tml
   projects/demos/tapestry-spring-jbpm4/src/main/webapp/Contact.tml
   projects/demos/tapestry-spring-jbpm4/src/main/webapp/Index.tml
   projects/demos/tapestry-spring-jbpm4/src/main/webapp/WEB-INF/
   projects/demos/tapestry-spring-jbpm4/src/main/webapp/WEB-INF/app.properties
   projects/demos/tapestry-spring-jbpm4/src/main/webapp/WEB-INF/config/
   projects/demos/tapestry-spring-jbpm4/src/main/webapp/WEB-INF/config/applicationContext.xml
   projects/demos/tapestry-spring-jbpm4/src/main/webapp/WEB-INF/web.xml
   projects/demos/tapestry-spring-jbpm4/src/main/webapp/favicon.ico
   projects/demos/tapestry-spring-jbpm4/src/main/webapp/layout/
   projects/demos/tapestry-spring-jbpm4/src/main/webapp/layout/images/
   projects/demos/tapestry-spring-jbpm4/src/main/webapp/layout/images/img01.jpg
   projects/demos/tapestry-spring-jbpm4/src/main/webapp/layout/images/img02.jpg
   projects/demos/tapestry-spring-jbpm4/src/main/webapp/layout/images/img03.jpg
   projects/demos/tapestry-spring-jbpm4/src/main/webapp/layout/images/img04.jpg
   projects/demos/tapestry-spring-jbpm4/src/main/webapp/layout/images/img05.gif
   projects/demos/tapestry-spring-jbpm4/src/main/webapp/layout/images/img06.gif
   projects/demos/tapestry-spring-jbpm4/src/main/webapp/layout/images/img07.gif
   projects/demos/tapestry-spring-jbpm4/src/main/webapp/layout/images/img08.gif
   projects/demos/tapestry-spring-jbpm4/src/main/webapp/layout/images/img09.gif
   projects/demos/tapestry-spring-jbpm4/src/main/webapp/layout/images/img10.gif
   projects/demos/tapestry-spring-jbpm4/src/main/webapp/layout/images/img11.gif
   projects/demos/tapestry-spring-jbpm4/src/main/webapp/layout/images/img12.gif
   projects/demos/tapestry-spring-jbpm4/src/main/webapp/layout/images/img13.gif
   projects/demos/tapestry-spring-jbpm4/src/main/webapp/layout/images/img14.gif
   projects/demos/tapestry-spring-jbpm4/src/main/webapp/layout/images/img15.gif
   projects/demos/tapestry-spring-jbpm4/src/main/webapp/layout/images/img16.gif
   projects/demos/tapestry-spring-jbpm4/src/main/webapp/layout/images/img17.gif
   projects/demos/tapestry-spring-jbpm4/src/main/webapp/layout/images/img18.gif
   projects/demos/tapestry-spring-jbpm4/src/main/webapp/layout/images/img19.gif
   projects/demos/tapestry-spring-jbpm4/src/main/webapp/layout/images/img20.gif
   projects/demos/tapestry-spring-jbpm4/src/main/webapp/layout/images/spacer.gif
   projects/demos/tapestry-spring-jbpm4/src/main/webapp/layout/layout.css
   projects/demos/tapestry-spring-jbpm4/src/main/webapp/layout/license.txt
   projects/demos/tapestry-spring-jbpm4/src/site/
   projects/demos/tapestry-spring-jbpm4/src/site/apt/
   projects/demos/tapestry-spring-jbpm4/src/site/apt/index.apt
   projects/demos/tapestry-spring-jbpm4/src/site/site.xml
   projects/demos/tapestry-spring-jbpm4/src/test/
   projects/demos/tapestry-spring-jbpm4/src/test/conf/
   projects/demos/tapestry-spring-jbpm4/src/test/conf/testng.xml
   projects/demos/tapestry-spring-jbpm4/src/test/conf/webdefault.xml
   projects/demos/tapestry-spring-jbpm4/src/test/java/
   projects/demos/tapestry-spring-jbpm4/src/test/java/org/
   projects/demos/tapestry-spring-jbpm4/src/test/java/org/example/
   projects/demos/tapestry-spring-jbpm4/src/test/java/org/example/jbpmdemo/
   projects/demos/tapestry-spring-jbpm4/src/test/java/org/example/jbpmdemo/service/
   projects/demos/tapestry-spring-jbpm4/src/test/java/org/example/jbpmdemo/service/JbpmServiceTest.java
   projects/demos/tapestry-spring-jbpm4/src/test/java/org/jbpm/
   projects/demos/tapestry-spring-jbpm4/src/test/java/org/jbpm/spring/
   projects/demos/tapestry-spring-jbpm4/src/test/java/org/jbpm/spring/test/
   projects/demos/tapestry-spring-jbpm4/src/test/java/org/jbpm/spring/test/AbstractTransactionalSpringJbpmTestCase.java
   projects/demos/tapestry-spring-jbpm4/src/test/resources/
   projects/demos/tapestry-spring-jbpm4/src/test/resources/jbpm/
   projects/demos/tapestry-spring-jbpm4/src/test/resources/jbpm/process/
   projects/demos/tapestry-spring-jbpm4/src/test/resources/jbpm/process/Review.jpdl.xml
   projects/demos/tapestry-spring-jbpm4/src/test/resources/jbpm/process/Review.png
Modified:
   projects/demos/tapestry-spring-jbpm4/
Log:
initial import


Property changes on: projects/demos/tapestry-spring-jbpm4
___________________________________________________________________
Name: svn:ignore
   + .settings
target
.classpath
.project
jbpm4.properties
jbpm4.script


Added: projects/demos/tapestry-spring-jbpm4/pom.xml
===================================================================
--- projects/demos/tapestry-spring-jbpm4/pom.xml	                        (rev 0)
+++ projects/demos/tapestry-spring-jbpm4/pom.xml	2009-08-25 14:53:07 UTC (rev 5536)
@@ -0,0 +1,291 @@
+<project
+	xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"
+	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://maven.apache.org/POM/4.0.0">
+	<modelVersion>4.0.0</modelVersion>
+	<groupId>org.example</groupId>
+	<artifactId>jbpmdemo</artifactId>
+	<version>1.0-SNAPSHOT</version>
+	<packaging>war</packaging>
+	<name>jbpmdemo Tapestry 5 Application</name>
+
+	<properties>
+		<tapestry.version>5.1.0.5</tapestry.version>
+		<tapestry-spring.version>5.1.0.5</tapestry-spring.version>
+		<spring.version>2.0.8</spring.version>
+		<hibernate.version>3.3.1.GA</hibernate.version>
+		<acegi-security.version>1.0.3</acegi-security.version>
+		<aspectjweaver.version>1.6.4</aspectjweaver.version>
+		<aspectjtools.version>1.5.4</aspectjtools.version>
+		<xerces.version>2.9.1</xerces.version>
+		<jbpm.version>4.0</jbpm.version>
+		<commons-collections.version>3.2.1</commons-collections.version>
+	</properties>
+
+	<dependencies>
+		<!-- dependencies from tapestry -->
+
+		<dependency>
+			<groupId>org.apache.tapestry</groupId>
+			<artifactId>tapestry-core</artifactId>
+			<version>${tapestry.version}</version>
+		</dependency>
+
+		<dependency>
+			<groupId>org.apache.tapestry</groupId>
+			<artifactId>tapestry-spring</artifactId>
+			<version>${tapestry-spring.version}</version>
+		</dependency>
+
+		<!--
+			A dependency on either JUnit or TestNG is required, or the surefire
+			plugin (which runs the tests) will fail, preventing Maven from
+			packaging the WAR. Tapestry includes a large number of testing
+			facilities designed for use with TestNG (http://testng.org/), so it's
+			recommended. <dependency> <groupId>org.testng</groupId>
+			<artifactId>testng</artifactId> <version>5.8</version>
+			<classifier>jdk15</classifier> <scope>test</scope> </dependency>
+		-->
+
+		<!--
+			TODO: see if we can reduce this to either easymock or spring-mock
+		-->
+		<dependency>
+			<groupId>org.easymock</groupId>
+			<artifactId>easymock</artifactId>
+			<version>2.4</version>
+			<scope>test</scope>
+		</dependency>
+
+		<!--
+			tapestry-test will conflict with RunJettyRun inside Eclipse.
+			tapestry-test brings in Selenium, which is based on Jetty 5.1;
+			RunJettyRun uses Jetty 6. <dependency>
+			<groupId>org.apache.tapestry</groupId>
+			<artifactId>tapestry-test</artifactId>
+			<version>${tapestry.version}</version> <scope>test</scope>
+			</dependency>
+		-->
+
+		<dependency>
+			<groupId>javax.servlet</groupId>
+			<artifactId>servlet-api</artifactId>
+			<version>2.5</version>
+			<scope>provided</scope>
+		</dependency>
+
+		<!-- jBPM4 specific dependencies -->
+
+		<dependency>
+			<groupId>org.jbpm.jbpm4</groupId>
+			<artifactId>jbpm-jpdl</artifactId>
+			<version>${jbpm.version}</version>
+		</dependency>
+
+
+		<dependency>
+			<groupId>junit</groupId>
+			<artifactId>junit</artifactId>
+			<version>3.8.1</version>
+			<scope>test</scope>
+		</dependency>
+
+		<dependency>
+			<groupId>org.springframework</groupId>
+			<artifactId>spring-mock</artifactId>
+			<version>${spring.version}</version>
+			<scope>test</scope>
+		</dependency>
+
+		<dependency>
+			<groupId>org.springframework</groupId>
+			<artifactId>spring</artifactId>
+			<version>${spring.version}</version>
+		</dependency>
+
+		<dependency>
+			<groupId>org.acegisecurity</groupId>
+			<artifactId>acegi-security</artifactId>
+			<version>${acegi-security.version}</version>
+			<exclusions>
+				<exclusion>
+					<groupId>org.springframework</groupId>
+					<artifactId>spring-remoting</artifactId>
+				</exclusion>
+				<exclusion>
+					<groupId>org.springframework</groupId>
+					<artifactId>spring-jdbc</artifactId>
+				</exclusion>
+				<exclusion>
+					<groupId>org.springframework</groupId>
+					<artifactId>spring-support</artifactId>
+				</exclusion>
+			</exclusions>
+		</dependency>
+
+		<dependency>
+			<groupId>org.hibernate</groupId>
+			<artifactId>hibernate-core</artifactId>
+			<version>${hibernate.version}</version>
+		</dependency>
+
+		<!-- 1.2.14 is minimum (jbpm is tracing) -->
+		<dependency>
+			<groupId>log4j</groupId>
+			<artifactId>log4j</artifactId>
+			<version>1.2.14</version>
+		</dependency>
+
+		<dependency>
+			<groupId>commons-dbcp</groupId>
+			<artifactId>commons-dbcp</artifactId>
+			<version>1.2.1</version>
+			<exclusions>
+				<exclusion>
+					<groupId>xerces</groupId>
+					<artifactId>xercesImpl</artifactId>
+				</exclusion>
+			</exclusions>
+		</dependency>
+
+		<dependency>
+			<groupId>xerces</groupId>
+			<artifactId>xercesImpl</artifactId>
+			<version>${xerces.version}</version>
+		</dependency>
+
+		<dependency>
+			<groupId>org.aspectj</groupId>
+			<artifactId>aspectjweaver</artifactId>
+			<version>${aspectjweaver.version}</version>
+			<scope>test</scope>
+		</dependency>
+
+		<dependency>
+			<groupId>org.aspectj</groupId>
+			<artifactId>aspectjtools</artifactId>
+			<version>${aspectjtools.version}</version>
+		</dependency>
+
+		<dependency>
+			<groupId>hsqldb</groupId>
+			<artifactId>hsqldb</artifactId>
+			<version>1.8.0.7</version>
+		</dependency>
+
+		<dependency>
+			<groupId>commons-collections</groupId>
+			<artifactId>commons-collections</artifactId>
+			<version>${commons-collections.version}</version>
+		</dependency>
+
+		<dependency>
+			<groupId>org.subethamail</groupId>
+			<artifactId>subethasmtp-wiser</artifactId>
+			<version>1.2</version>
+		</dependency>
+
+	</dependencies>
+
+	<build>
+		<finalName>jbpmdemo</finalName>
+		<plugins>
+			<plugin>
+				<groupId>org.apache.maven.plugins</groupId>
+				<artifactId>maven-compiler-plugin</artifactId>
+				<configuration>
+					<source>1.5</source>
+					<target>1.5</target>
+					<optimize>true</optimize>
+				</configuration>
+			</plugin>
+
+			<!-- Run the application using "mvn jetty:run" -->
+			<plugin>
+				<groupId>org.mortbay.jetty</groupId>
+				<artifactId>maven-jetty-plugin</artifactId>
+				<version>6.1.9</version>
+				<configuration>
+					<!-- Log to the console. -->
+					<requestLog implementation="org.mortbay.jetty.NCSARequestLog">
+						<!--
+							This doesn't do anything for Jetty, but is a workaround for a
+							Maven bug that prevents the requestLog from being set.
+						-->
+						<append>true</append>
+					</requestLog>
+				</configuration>
+			</plugin>
+		</plugins>
+	</build>
+
+	<reporting>
+
+		<!--
+			Adds a report detailing the components, mixins and base classes
+			defined by this module.
+		-->
+		<plugins>
+			<plugin>
+				<groupId>org.apache.tapestry</groupId>
+				<artifactId>tapestry-component-report</artifactId>
+				<version>${tapestry.version}</version>
+				<configuration>
+					<rootPackage>org.example.jbpmdemo</rootPackage>
+				</configuration>
+			</plugin>
+		</plugins>
+	</reporting>
+
+	<repositories>
+
+		<repository>
+			<id>jboss</id>
+			<url>http://repository.jboss.com/maven2</url>
+		</repository>
+
+		<!--
+			This repository is only needed if the Tapestry released artifacts
+			haven't made it to the central Maven repository yet.
+		-->
+		<repository>
+			<id>tapestry</id>
+			<url>http://tapestry.formos.com/maven-repository/</url>
+		</repository>
+
+		<!--
+			This repository is only needed when the tapestry.version is a
+			snapshot release.
+		-->
+		<repository>
+			<id>tapestry-snapshots</id>
+			<url>http://tapestry.formos.com/maven-snapshot-repository/</url>
+		</repository>
+
+		<repository>
+			<id>codehaus.snapshots</id>
+			<url>http://snapshots.repository.codehaus.org</url>
+		</repository>
+
+		<repository>
+			<id>OpenQA_Release</id>
+			<name>OpenQA Release Repository</name>
+			<url>http://archiva.openqa.org/repository/releases/</url>
+		</repository>
+
+	</repositories>
+
+	<pluginRepositories>
+
+		<!--
+			As above, this can be commented out when access to the snapshot
+			version of a Tapestry Maven plugin is not required.
+		-->
+		<pluginRepository>
+			<id>tapestry-snapshots</id>
+			<url>http://tapestry.formos.com/maven-snapshot-repository/</url>
+		</pluginRepository>
+
+
+	</pluginRepositories>
+
+</project>

Added: projects/demos/tapestry-spring-jbpm4/src/main/java/org/example/jbpmdemo/components/Layout.java
===================================================================
--- projects/demos/tapestry-spring-jbpm4/src/main/java/org/example/jbpmdemo/components/Layout.java	                        (rev 0)
+++ projects/demos/tapestry-spring-jbpm4/src/main/java/org/example/jbpmdemo/components/Layout.java	2009-08-25 14:53:07 UTC (rev 5536)
@@ -0,0 +1,40 @@
+package org.example.jbpmdemo.components;
+
+import org.apache.tapestry5.*;
+import org.apache.tapestry5.annotations.*;
+import org.apache.tapestry5.ioc.annotations.*;
+import org.apache.tapestry5.BindingConstants;
+
+/**
+ * Layout component for pages of application jbpmdemo.
+ */
+ at IncludeStylesheet("context:layout/layout.css")
+public class Layout {
+	/** The page title, for the <title> element and the <h1>element. */
+	@Property
+	@Parameter(required = true, defaultPrefix = BindingConstants.LITERAL)
+	private String title;
+
+	@Property
+	private String pageName;
+
+	@Property
+	@Parameter(defaultPrefix = BindingConstants.LITERAL)
+	private String sidebarTitle;
+
+	@Property
+	@Parameter(defaultPrefix = BindingConstants.LITERAL)
+	private Block sidebar;
+
+	@Inject
+	private ComponentResources resources;
+
+	public String getClassForPageName() {
+		return resources.getPageName().equalsIgnoreCase(pageName) ? "current_page_item"
+				: null;
+	}
+
+	public String[] getPageNames() {
+		return new String[] { "Index", "About", "Contact" };
+	}
+}

Added: projects/demos/tapestry-spring-jbpm4/src/main/java/org/example/jbpmdemo/dao/UserDAO.java
===================================================================
--- projects/demos/tapestry-spring-jbpm4/src/main/java/org/example/jbpmdemo/dao/UserDAO.java	                        (rev 0)
+++ projects/demos/tapestry-spring-jbpm4/src/main/java/org/example/jbpmdemo/dao/UserDAO.java	2009-08-25 14:53:07 UTC (rev 5536)
@@ -0,0 +1,19 @@
+package org.example.jbpmdemo.dao;
+
+import java.util.List;
+
+import org.example.jbpmdemo.model.user.User;
+
+public interface UserDAO {
+
+	public String createUser(String userId, String givenName,
+			String familyName, String businessEmail);
+
+	public User findUserById(String userId);
+
+	public List<User> findUsersById(String... userIds);
+
+	public List<User> findUsers();
+
+	public void deleteUser(String userId);
+}

Added: projects/demos/tapestry-spring-jbpm4/src/main/java/org/example/jbpmdemo/dao/impl/UserDAOImpl.java
===================================================================
--- projects/demos/tapestry-spring-jbpm4/src/main/java/org/example/jbpmdemo/dao/impl/UserDAOImpl.java	                        (rev 0)
+++ projects/demos/tapestry-spring-jbpm4/src/main/java/org/example/jbpmdemo/dao/impl/UserDAOImpl.java	2009-08-25 14:53:07 UTC (rev 5536)
@@ -0,0 +1,44 @@
+package org.example.jbpmdemo.dao.impl;
+
+import java.util.Arrays;
+import java.util.List;
+
+import org.example.jbpmdemo.dao.UserDAO;
+import org.example.jbpmdemo.model.user.User;
+import org.hibernate.criterion.Restrictions;
+import org.springframework.orm.hibernate3.support.HibernateDaoSupport;
+
+public class UserDAOImpl extends HibernateDaoSupport implements UserDAO {
+
+	public String createUser(String userId, String givenName,
+			String familyName, String businessEmail) {
+		User user = new User(userId, givenName, familyName, businessEmail);
+		getSession().save(user);
+		return user.getUserName();
+	}
+
+	public void deleteUser(String userId) {
+		User user = findUserById(userId);
+		getSession().delete(user);
+	}
+
+	public User findUserById(String userId) {
+		return (User) getSession().createCriteria(User.class).add(
+				Restrictions.eq("userName", userId)).uniqueResult();
+	}
+
+	public List<User> findUsers() {
+		return getSession().createCriteria(User.class).list();
+	}
+
+	public List<User> findUsersById(String... userIds) {
+		List<User> users = getSession().createCriteria(User.class).add(
+				Restrictions.in("userName", userIds)).list();
+		if (userIds.length != users.size()) {
+			throw new RuntimeException("not all users were found: "
+					+ Arrays.toString(userIds));
+		}
+		return users;
+	}
+
+}

Added: projects/demos/tapestry-spring-jbpm4/src/main/java/org/example/jbpmdemo/model/user/User.java
===================================================================
--- projects/demos/tapestry-spring-jbpm4/src/main/java/org/example/jbpmdemo/model/user/User.java	                        (rev 0)
+++ projects/demos/tapestry-spring-jbpm4/src/main/java/org/example/jbpmdemo/model/user/User.java	2009-08-25 14:53:07 UTC (rev 5536)
@@ -0,0 +1,55 @@
+package org.example.jbpmdemo.model.user;
+
+import java.io.Serializable;
+
+public class User implements Serializable {
+
+	private static final long serialVersionUID = -2218132567155784836L;
+
+	private Long dbid;
+
+	private String userName;
+	private String firstName;
+	private String lastName;
+	private String email;
+
+	public User(String userName, String firstName, String lastName, String email) {
+		super();
+		this.userName = userName;
+		this.firstName = firstName;
+		this.lastName = lastName;
+		this.email = email;
+	}
+
+	public void setUserName(String username) {
+		this.userName = username;
+	}
+
+	public String getUserName() {
+		return userName;
+	}
+
+	public void setFirstName(String firstName) {
+		this.firstName = firstName;
+	}
+
+	public String getFirstName() {
+		return firstName;
+	}
+
+	public void setLastName(String lastName) {
+		this.lastName = lastName;
+	}
+
+	public String getLastName() {
+		return lastName;
+	}
+
+	public void setEmail(String email) {
+		this.email = email;
+	}
+
+	public String getEmail() {
+		return email;
+	}
+}

Added: projects/demos/tapestry-spring-jbpm4/src/main/java/org/example/jbpmdemo/pages/About.java
===================================================================
--- projects/demos/tapestry-spring-jbpm4/src/main/java/org/example/jbpmdemo/pages/About.java	                        (rev 0)
+++ projects/demos/tapestry-spring-jbpm4/src/main/java/org/example/jbpmdemo/pages/About.java	2009-08-25 14:53:07 UTC (rev 5536)
@@ -0,0 +1,6 @@
+package org.example.jbpmdemo.pages;
+
+public class About
+{
+
+}

Added: projects/demos/tapestry-spring-jbpm4/src/main/java/org/example/jbpmdemo/pages/Contact.java
===================================================================
--- projects/demos/tapestry-spring-jbpm4/src/main/java/org/example/jbpmdemo/pages/Contact.java	                        (rev 0)
+++ projects/demos/tapestry-spring-jbpm4/src/main/java/org/example/jbpmdemo/pages/Contact.java	2009-08-25 14:53:07 UTC (rev 5536)
@@ -0,0 +1,6 @@
+package org.example.jbpmdemo.pages;
+
+public class Contact
+{
+
+}

Added: projects/demos/tapestry-spring-jbpm4/src/main/java/org/example/jbpmdemo/pages/Index.java
===================================================================
--- projects/demos/tapestry-spring-jbpm4/src/main/java/org/example/jbpmdemo/pages/Index.java	                        (rev 0)
+++ projects/demos/tapestry-spring-jbpm4/src/main/java/org/example/jbpmdemo/pages/Index.java	2009-08-25 14:53:07 UTC (rev 5536)
@@ -0,0 +1,72 @@
+package org.example.jbpmdemo.pages;
+
+import java.util.Date;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import org.apache.log4j.Logger;
+import org.apache.tapestry5.annotations.OnEvent;
+import org.apache.tapestry5.annotations.Persist;
+import org.apache.tapestry5.annotations.Property;
+import org.apache.tapestry5.ioc.annotations.Inject;
+import org.example.jbpmdemo.model.user.User;
+import org.example.jbpmdemo.service.JbpmService;
+import org.jbpm.api.ProcessDefinition;
+import org.jbpm.api.task.Task;
+
+/**
+ * Start page of application jbpmdemo.
+ */
+public class Index {
+
+	private static final Logger logger = Logger.getLogger(Index.class);
+
+	@Inject
+	private JbpmService jbpmService;
+
+	@Persist
+	@Property
+	private User user;
+
+     void beginRender() {
+        if(user == null)
+            user = new User("john.doe", "John", "Doe", "john.doe at example.org");
+    }
+	
+	public Date getCurrentTime() {
+		return new Date();
+	}
+
+	public List<Task> getTasks() {
+		return jbpmService.getAllTasks();
+	}
+
+	public List<ProcessDefinition> getAllDeployedProcesses() {
+		return jbpmService.getAllDeployedProcesses();
+	}
+
+	@OnEvent(component = "deployProcess")
+	public void doDeployProcess() {
+		jbpmService
+				.deployProcessFromString("<?xml version=\"1.0\" encoding=\"UTF-8\"?>"
+						+ "<process name=\"Demo Process\" key=\"DP\" xmlns=\"http://jbpm.org/4.0/jpdl\">"
+						+ "<start>"
+						+ "  <transition to=\"Test\"/>"
+						+ "</start>"
+						+ "<state name=\"running\"/>"
+						+ "<task name=\"Test\" assignee=\"#{user.userName}\">"
+						+ "<timer duedate=\"10 minutes\"/> "
+						+ "<description>This is just a demo task.</description>"
+						+ "<transition to=\"end\" />"
+						+ "</task>"
+						+ "<state name=\"end\"/>" + "</process>");
+	}
+
+	@OnEvent(component = "startProcessInstance")
+	public void doStartProcessInstance() {
+		Map<String, Object> variables = new HashMap<String, Object>();
+		variables.put("user", user);
+		jbpmService.startProcessInstanceByKey("DP", variables);
+	}
+}

Added: projects/demos/tapestry-spring-jbpm4/src/main/java/org/example/jbpmdemo/service/AppModule.java
===================================================================
--- projects/demos/tapestry-spring-jbpm4/src/main/java/org/example/jbpmdemo/service/AppModule.java	                        (rev 0)
+++ projects/demos/tapestry-spring-jbpm4/src/main/java/org/example/jbpmdemo/service/AppModule.java	2009-08-25 14:53:07 UTC (rev 5536)
@@ -0,0 +1,119 @@
+package org.example.jbpmdemo.service;
+
+import java.io.IOException;
+
+import org.apache.tapestry5.*;
+import org.apache.tapestry5.ioc.MappedConfiguration;
+import org.apache.tapestry5.ioc.OrderedConfiguration;
+import org.apache.tapestry5.ioc.ServiceBinder;
+import org.apache.tapestry5.ioc.annotations.Local;
+import org.apache.tapestry5.services.Request;
+import org.apache.tapestry5.services.RequestFilter;
+import org.apache.tapestry5.services.RequestHandler;
+import org.apache.tapestry5.services.Response;
+import org.slf4j.Logger;
+
+/**
+ * This module is automatically included as part of the Tapestry IoC Registry, it's a good place to
+ * configure and extend Tapestry, or to place your own service definitions.
+ */
+public class AppModule
+{
+    public static void bind(ServiceBinder binder)
+    {
+        // binder.bind(MyServiceInterface.class, MyServiceImpl.class);
+        
+        // Make bind() calls on the binder object to define most IoC services.
+        // Use service builder methods (example below) when the implementation
+        // is provided inline, or requires more initialization than simply
+        // invoking the constructor.
+    }
+    
+    
+    public static void contributeApplicationDefaults(
+            MappedConfiguration<String, String> configuration)
+    {
+        // Contributions to ApplicationDefaults will override any contributions to
+        // FactoryDefaults (with the same key). Here we're restricting the supported
+        // locales to just "en" (English). As you add localised message catalogs and other assets,
+        // you can extend this list of locales (it's a comma separated series of locale names;
+        // the first locale name is the default when there's no reasonable match).
+        
+        configuration.add(SymbolConstants.SUPPORTED_LOCALES, "en");
+
+        // The factory default is true but during the early stages of an application
+        // overriding to false is a good idea. In addition, this is often overridden
+        // on the command line as -Dtapestry.production-mode=false
+        configuration.add(SymbolConstants.PRODUCTION_MODE, "false");
+
+        // The application version number is incorprated into URLs for some
+        // assets. Web browsers will cache assets because of the far future expires
+        // header. If existing assets are changed, the version number should also
+        // change, to force the browser to download new versions.
+        configuration.add(SymbolConstants.APPLICATION_VERSION, "1.0-SNAPSHOT");
+    }
+    
+
+    /**
+     * This is a service definition, the service will be named "TimingFilter". The interface,
+     * RequestFilter, is used within the RequestHandler service pipeline, which is built from the
+     * RequestHandler service configuration. Tapestry IoC is responsible for passing in an
+     * appropriate Logger instance. Requests for static resources are handled at a higher level, so
+     * this filter will only be invoked for Tapestry related requests.
+     * 
+     * <p>
+     * Service builder methods are useful when the implementation is inline as an inner class
+     * (as here) or require some other kind of special initialization. In most cases,
+     * use the static bind() method instead. 
+     * 
+     * <p>
+     * If this method was named "build", then the service id would be taken from the 
+     * service interface and would be "RequestFilter".  Since Tapestry already defines
+     * a service named "RequestFilter" we use an explicit service id that we can reference
+     * inside the contribution method.
+     */    
+    public RequestFilter buildTimingFilter(final Logger log)
+    {
+        return new RequestFilter()
+        {
+            public boolean service(Request request, Response response, RequestHandler handler)
+                    throws IOException
+            {
+                long startTime = System.currentTimeMillis();
+
+                try
+                {
+                    // The responsibility of a filter is to invoke the corresponding method
+                    // in the handler. When you chain multiple filters together, each filter
+                    // received a handler that is a bridge to the next filter.
+                    
+                    return handler.service(request, response);
+                }
+                finally
+                {
+                    long elapsed = System.currentTimeMillis() - startTime;
+
+                    log.info(String.format("Request time: %d ms", elapsed));
+                }
+            }
+        };
+    }
+
+    /**
+     * This is a contribution to the RequestHandler service configuration. This is how we extend
+     * Tapestry using the timing filter. A common use for this kind of filter is transaction
+     * management or security. The @Local annotation selects the desired service by type, but only
+     * from the same module.  Without @Local, there would be an error due to the other service(s)
+     * that implement RequestFilter (defined in other modules).
+     */
+    public void contributeRequestHandler(OrderedConfiguration<RequestFilter> configuration,
+            @Local
+            RequestFilter filter)
+    {
+        // Each contribution to an ordered configuration has a name, When necessary, you may
+        // set constraints to precisely control the invocation order of the contributed filter
+        // within the pipeline.
+        
+        configuration.add("Timing", filter);
+    }
+}

Added: projects/demos/tapestry-spring-jbpm4/src/main/java/org/example/jbpmdemo/service/JbpmService.java
===================================================================
--- projects/demos/tapestry-spring-jbpm4/src/main/java/org/example/jbpmdemo/service/JbpmService.java	                        (rev 0)
+++ projects/demos/tapestry-spring-jbpm4/src/main/java/org/example/jbpmdemo/service/JbpmService.java	2009-08-25 14:53:07 UTC (rev 5536)
@@ -0,0 +1,19 @@
+package org.example.jbpmdemo.service;
+
+import java.util.List;
+import java.util.Map;
+
+import org.jbpm.api.ProcessDefinition;
+import org.jbpm.api.task.Task;
+
+public interface JbpmService {
+
+	public void deployProcessFromString(String processDefinition);
+
+	public List<Task> getAllTasks();
+
+	public void startProcessInstanceByKey(String key,
+			Map<String, Object> variables);
+
+	public List<ProcessDefinition> getAllDeployedProcesses();
+}

Added: projects/demos/tapestry-spring-jbpm4/src/main/java/org/example/jbpmdemo/service/UserService.java
===================================================================
--- projects/demos/tapestry-spring-jbpm4/src/main/java/org/example/jbpmdemo/service/UserService.java	                        (rev 0)
+++ projects/demos/tapestry-spring-jbpm4/src/main/java/org/example/jbpmdemo/service/UserService.java	2009-08-25 14:53:07 UTC (rev 5536)
@@ -0,0 +1,40 @@
+package org.example.jbpmdemo.service;
+
+import java.util.List;
+
+import org.example.jbpmdemo.model.user.User;
+
+public interface UserService {
+
+	/** create a new user */
+	String createUser(String userId, String givenName, String familyName,
+			String businessEmail);
+
+	/**
+	 * lookup a user.
+	 * 
+	 * @return the user or null if no such user exists
+	 */
+	User findUserById(String userId);
+
+	/**
+	 * lookup users with the given identifiers.
+	 * 
+	 * @return an empty list if no such users exist
+	 */
+	List<User> findUsersById(String... userIds);
+
+	/**
+	 * get all the users in the system.
+	 * 
+	 * @return an empty list if no users exist.
+	 */
+	List<User> findUsers();
+
+	/**
+	 * delete the given user. No effect (no exception) if the user does not
+	 * exist.
+	 */
+	void deleteUser(String userId);
+
+}

Added: projects/demos/tapestry-spring-jbpm4/src/main/java/org/example/jbpmdemo/service/impl/IdentitySessionImpl.java
===================================================================
--- projects/demos/tapestry-spring-jbpm4/src/main/java/org/example/jbpmdemo/service/impl/IdentitySessionImpl.java	                        (rev 0)
+++ projects/demos/tapestry-spring-jbpm4/src/main/java/org/example/jbpmdemo/service/impl/IdentitySessionImpl.java	2009-08-25 14:53:07 UTC (rev 5536)
@@ -0,0 +1,92 @@
+package org.example.jbpmdemo.service.impl;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.example.jbpmdemo.service.UserService;
+import org.jbpm.api.identity.Group;
+import org.jbpm.api.identity.User;
+import org.jbpm.pvm.internal.identity.impl.UserImpl;
+import org.jbpm.pvm.internal.identity.spi.IdentitySession;
+
+public class IdentitySessionImpl implements IdentitySession {
+
+	private UserService userService;
+
+	public void setUserService(UserService userService) {
+		this.userService = userService;
+	}
+
+	public String createGroup(String groupName, String groupType,
+			String parentGroupId) {
+		throw new RuntimeException("Not implemented");
+	}
+
+	public void createMembership(String userId, String groupId, String role) {
+		throw new RuntimeException("Not implemented");
+	}
+
+	public void deleteGroup(String groupId) {
+		throw new RuntimeException("Not implemented");
+	}
+
+	public void deleteMembership(String userId, String groupId, String role) {
+		throw new RuntimeException("Not implemented");
+	}
+
+	public Group findGroupById(String groupId) {
+		throw new RuntimeException("Not implemented");
+	}
+
+	public List<Group> findGroupsByUser(String userId) {
+		throw new RuntimeException("Not implemented");
+	}
+
+	public List<Group> findGroupsByUserAndGroupType(String userId,
+			String groupType) {
+		throw new RuntimeException("Not implemented");
+	}
+
+	public List<User> findUsersByGroup(String groupId) {
+		throw new RuntimeException("Not implemented");
+	}
+
+	public String createUser(String userId, String givenName,
+			String familyName, String businessEmail) {
+		return userService.createUser(userId, givenName, familyName,
+				businessEmail);
+	}
+
+	public void deleteUser(String userId) {
+		userService.deleteUser(userId);
+	}
+
+	public User findUserById(String userId) {
+		org.example.jbpmdemo.model.user.User user = userService.findUserById(userId);
+		return new UserImpl(user.getUserName(), user.getFirstName(), user
+				.getLastName());
+	}
+
+	public List<User> findUsers() {
+		List<org.example.jbpmdemo.model.user.User> users = userService.findUsers();
+		List<User> jbpmUsers = new ArrayList<User>();
+		for (org.example.jbpmdemo.model.user.User user : users) {
+			jbpmUsers.add(new UserImpl(user.getUserName(), user.getFirstName(),
+					user.getLastName()));
+		}
+		return jbpmUsers;
+	}
+
+	public List<User> findUsersById(String... userIds) {
+		List<org.example.jbpmdemo.model.user.User> users = userService
+				.findUsersById(userIds);
+		List<User> jbpmUsers = new ArrayList<User>();
+		for (org.example.jbpmdemo.model.user.User user : users) {
+			UserImpl jbpmUser = new UserImpl(user.getUserName(), user.getFirstName(),
+					user.getLastName());
+			jbpmUser.setBusinessEmail(user.getEmail());
+			jbpmUsers.add(jbpmUser);
+		}
+		return jbpmUsers;
+	}
+}

Added: projects/demos/tapestry-spring-jbpm4/src/main/java/org/example/jbpmdemo/service/impl/JbpmServiceImpl.java
===================================================================
--- projects/demos/tapestry-spring-jbpm4/src/main/java/org/example/jbpmdemo/service/impl/JbpmServiceImpl.java	                        (rev 0)
+++ projects/demos/tapestry-spring-jbpm4/src/main/java/org/example/jbpmdemo/service/impl/JbpmServiceImpl.java	2009-08-25 14:53:07 UTC (rev 5536)
@@ -0,0 +1,56 @@
+package org.example.jbpmdemo.service.impl;
+
+import java.util.List;
+import java.util.Map;
+
+import org.apache.log4j.Logger;
+import org.example.jbpmdemo.service.JbpmService;
+import org.jbpm.api.ExecutionService;
+import org.jbpm.api.ProcessDefinition;
+import org.jbpm.api.RepositoryService;
+import org.jbpm.api.TaskService;
+import org.jbpm.api.task.Task;
+
+public class JbpmServiceImpl implements JbpmService {
+
+	private static final Logger logger = Logger.getLogger(JbpmService.class);
+
+	private RepositoryService repositoryService;
+	private ExecutionService executionService;
+	private TaskService taskService;
+
+	private String deploymentDbid;
+
+	public void setRepositoryService(RepositoryService repositoryService) {
+		this.repositoryService = repositoryService;
+	}
+
+	public void setExecutionService(ExecutionService executionService) {
+		this.executionService = executionService;
+	}
+
+	public void setTaskService(TaskService taskService) {
+		this.taskService = taskService;
+	}
+
+	public List<Task> getAllTasks() {
+		return taskService.createTaskQuery().list();
+	}
+
+	public void startProcessInstanceByKey(String key,
+			Map<String, Object> variables) {
+		executionService.startProcessInstanceByKey(key, variables);
+	}
+
+	public void deployProcessFromString(String processDefinition) {
+		deploymentDbid = repositoryService.createDeployment()
+				.addResourceFromString("xmlstring.jpdl.xml", processDefinition)
+				.deploy();
+		logger.info("Process deployed with deplymentDbid: " + deploymentDbid);
+	}
+
+	public List<ProcessDefinition> getAllDeployedProcesses() {
+		return repositoryService.createProcessDefinitionQuery().list();
+	}
+	
+}

Added: projects/demos/tapestry-spring-jbpm4/src/main/java/org/example/jbpmdemo/service/impl/UserServiceImpl.java
===================================================================
--- projects/demos/tapestry-spring-jbpm4/src/main/java/org/example/jbpmdemo/service/impl/UserServiceImpl.java	                        (rev 0)
+++ projects/demos/tapestry-spring-jbpm4/src/main/java/org/example/jbpmdemo/service/impl/UserServiceImpl.java	2009-08-25 14:53:07 UTC (rev 5536)
@@ -0,0 +1,38 @@
+package org.example.jbpmdemo.service.impl;
+
+import java.util.List;
+
+import org.example.jbpmdemo.dao.UserDAO;
+import org.example.jbpmdemo.model.user.User;
+import org.example.jbpmdemo.service.UserService;
+
+public class UserServiceImpl implements UserService {
+
+	private UserDAO userDAO;
+
+	public void setUserDAO(UserDAO userDAO) {
+		this.userDAO = userDAO;
+	}
+
+	public String createUser(String userId, String givenName,
+			String familyName, String businessEmail) {
+		return userDAO.createUser(userId, givenName, familyName, businessEmail);
+	}
+
+	public void deleteUser(String userId) {
+		userDAO.deleteUser(userId);
+	}
+
+	public User findUserById(String userId) {
+		return userDAO.findUserById(userId);
+	}
+
+	public List<User> findUsers() {
+		return userDAO.findUsers();
+	}
+
+	public List<User> findUsersById(String... userIds) {
+		return userDAO.findUsersById(userIds);
+	}
+
+}

Added: projects/demos/tapestry-spring-jbpm4/src/main/resources/jbpm.mail.properties
===================================================================
--- projects/demos/tapestry-spring-jbpm4/src/main/resources/jbpm.mail.properties	                        (rev 0)
+++ projects/demos/tapestry-spring-jbpm4/src/main/resources/jbpm.mail.properties	2009-08-25 14:53:07 UTC (rev 5536)
@@ -0,0 +1,3 @@
+mail.smtp.host	localhost
+mail.smtp.port	2525
+mail.from		noreply at test.com
\ No newline at end of file

Added: projects/demos/tapestry-spring-jbpm4/src/main/resources/log4j.properties
===================================================================
--- projects/demos/tapestry-spring-jbpm4/src/main/resources/log4j.properties	                        (rev 0)
+++ projects/demos/tapestry-spring-jbpm4/src/main/resources/log4j.properties	2009-08-25 14:53:07 UTC (rev 5536)
@@ -0,0 +1,44 @@
+# Default to info level output; this is very handy if you eventually use Hibernate as well.
+log4j.rootCategory=info, A1
+
+# A1 is set to be a ConsoleAppender.
+log4j.appender.A1=org.apache.log4j.ConsoleAppender
+
+# A1 uses PatternLayout.
+log4j.appender.A1.layout=org.apache.log4j.PatternLayout
+log4j.appender.A1.layout.ConversionPattern=[%p] %c{2} %m%n
+
+# Service category names are the name of the defining module class
+# and then the service id.
+log4j.category.org.example.jbpmdemo.services.AppModule.TimingFilter=info
+
+# Outputs a list of pages, components and mixins at startup.
+log4j.category.org.apache.tapestry5.services.TapestryModule.ComponentClassResolver=info
+
+# Outputs startup statistics; elapsed time to setup and initialize the registry, and a list of
+# available services.
+log4j.category.org.apache.tapestry5.TapestryFilter=info
+
+
+# Turning on debug mode for a page's or component's transformer logger
+# will show all of the code changes that occur when the
+# class is loaded.
+
+# log4j.category.tapestry.transformer.org.example.jbpmdemo.pages.Index=debug
+
+# Turning on debug mode for a component's events logger will show all the events triggered on the
+# component, and which component methods are invoked as a result.
+
+# log4j.category.tapestry.events.org.example.jbpmdemo.pages.Index=debug
+
+# Turning on trace mode for a page's render logger provides extended information about every step
+# in rendering (this is not generally helpful).  Turning on debug mode will add a one-line
+# summary that includes the elapsed render time, which can be useful in tracking down
+# performance issues.
+
+# log4j.category.tapestry.render.org.example.jbpmdemo.pages.Index=debug
+
+# Turn on some verbose debugging about everything in the application. This is nice initially,
+# while getting everything set up.  You'll probably want to remove this once you are 
+# up and running, replacing it with more selective debugging output.
+log4j.category.org.example.jbpmdemo=debug
\ No newline at end of file

Added: projects/demos/tapestry-spring-jbpm4/src/main/resources/org/example/jbpmdemo/applicationContext-common.xml
===================================================================
--- projects/demos/tapestry-spring-jbpm4/src/main/resources/org/example/jbpmdemo/applicationContext-common.xml	                        (rev 0)
+++ projects/demos/tapestry-spring-jbpm4/src/main/resources/org/example/jbpmdemo/applicationContext-common.xml	2009-08-25 14:53:07 UTC (rev 5536)
@@ -0,0 +1,77 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<beans xmlns="http://www.springframework.org/schema/beans"
+	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:aop="http://www.springframework.org/schema/aop"
+	xmlns:tx="http://www.springframework.org/schema/tx"
+	xsi:schemaLocation="
+    http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
+    http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-2.0.xsd
+    http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-2.0.xsd">
+
+
+	<bean
+		class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
+		<property name="locations">
+			<list>
+				<value>classpath:/log4j.properties
+				</value>
+			</list>
+		</property>
+	</bean>
+
+	<aop:aspectj-autoproxy />
+
+	<tx:advice id="txAdvice" transaction-manager="transactionManager">
+		<tx:attributes>
+			<tx:method name="*" propagation="REQUIRED" />
+		</tx:attributes>
+	</tx:advice>
+
+	<aop:config>
+		<aop:pointcut id="serviceOperation"
+			expression="execution(* org.example.jbpmdemo.service.**.*(..))" type="regex" />
+		<aop:advisor advice-ref="txAdvice" pointcut-ref="serviceOperation" />
+	</aop:config>
+
+	<bean id="dataSource" class="org.apache.commons.dbcp.BasicDataSource"
+		destroy-method="close">
+		<property name="driverClassName" value="org.hsqldb.jdbcDriver" />
+		<property name="url" value="jdbc:hsqldb:jbpm4;shutdown=true" />
+		<property name="username" value="sa" />
+		<property name="password" value="" />
+	</bean>
+
+	<bean id="sessionFactory"
+		class="org.springframework.orm.hibernate3.annotation.AnnotationSessionFactoryBean">
+		<property name="dataSource" ref="dataSource" />
+		<property name="hibernateProperties">
+			<props>
+				<prop key="hibernate.dialect">org.hibernate.dialect.HSQLDialect
+				</prop>
+				<prop key="hibernate.show_sql">true</prop>
+				<prop key="hibernate.hbm2ddl.auto">create-drop</prop>
+			</props>
+		</property>
+		<property name="mappingLocations">
+			<list>
+				<!-- jBPM Mappings -->
+				<value>classpath:jbpm.execution.hbm.xml
+				</value>
+				<value>classpath:jbpm.repository.hbm.xml
+				</value>
+				<value>classpath:jbpm.task.hbm.xml
+				</value>
+				<value>classpath:jbpm.history.hbm.xml
+				</value>
+				<!-- jBPM Demo Model Mappings -->
+				<value>classpath:user.hbm.xml
+				</value>
+			</list>
+		</property>
+	</bean>
+
+	<bean id="transactionManager"
+		class="org.springframework.orm.hibernate3.HibernateTransactionManager">
+		<property name="sessionFactory" ref="sessionFactory" />
+	</bean>
+
+</beans>
\ No newline at end of file

Added: projects/demos/tapestry-spring-jbpm4/src/main/resources/org/example/jbpmdemo/applicationContext-dao.xml
===================================================================
--- projects/demos/tapestry-spring-jbpm4/src/main/resources/org/example/jbpmdemo/applicationContext-dao.xml	                        (rev 0)
+++ projects/demos/tapestry-spring-jbpm4/src/main/resources/org/example/jbpmdemo/applicationContext-dao.xml	2009-08-25 14:53:07 UTC (rev 5536)
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<beans xmlns="http://www.springframework.org/schema/beans"
+	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+	xsi:schemaLocation="
+	http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd">
+
+	<bean id="userDAO" class="org.example.jbpmdemo.dao.impl.UserDAOImpl">
+		<property name="sessionFactory" ref="sessionFactory" />
+	</bean>
+
+</beans>
\ No newline at end of file

Added: projects/demos/tapestry-spring-jbpm4/src/main/resources/org/example/jbpmdemo/applicationContext-process.xml
===================================================================
--- projects/demos/tapestry-spring-jbpm4/src/main/resources/org/example/jbpmdemo/applicationContext-process.xml	                        (rev 0)
+++ projects/demos/tapestry-spring-jbpm4/src/main/resources/org/example/jbpmdemo/applicationContext-process.xml	2009-08-25 14:53:07 UTC (rev 5536)
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<beans xmlns="http://www.springframework.org/schema/beans"
+	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+	xsi:schemaLocation="
+	http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd">
+
+
+	<bean id="jbpmConfiguration" class="org.jbpm.pvm.internal.cfg.SpringConfiguration">
+		<constructor-arg value="org/example/jbpmdemo/jbpm.cfg.xml" />
+	</bean>
+	
+	<bean id="processEngine" factory-bean="jbpmConfiguration" factory-method="buildProcessEngine" />
+	<bean id="repositoryService" factory-bean="processEngine" factory-method="getRepositoryService" />
+	<bean id="executionService" factory-bean="processEngine" factory-method="getExecutionService" />
+	<bean id="taskService" factory-bean="processEngine" factory-method="getTaskService" />
+	
+</beans>
\ No newline at end of file

Added: projects/demos/tapestry-spring-jbpm4/src/main/resources/org/example/jbpmdemo/applicationContext-service.xml
===================================================================
--- projects/demos/tapestry-spring-jbpm4/src/main/resources/org/example/jbpmdemo/applicationContext-service.xml	                        (rev 0)
+++ projects/demos/tapestry-spring-jbpm4/src/main/resources/org/example/jbpmdemo/applicationContext-service.xml	2009-08-25 14:53:07 UTC (rev 5536)
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<beans xmlns="http://www.springframework.org/schema/beans"
+	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+	xsi:schemaLocation="
+	http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd">
+
+	<bean id="jbpmService" class="org.example.jbpmdemo.service.impl.JbpmServiceImpl">
+		<property name="repositoryService" ref="repositoryService" />
+		<property name="executionService" ref="executionService" />
+		<property name="taskService" ref="taskService" />
+	</bean>
+
+	<bean id="userService" class="org.example.jbpmdemo.service.impl.UserServiceImpl">
+		<property name="userDAO" ref="userDAO" />
+	</bean>
+
+	<bean id="identitySession" class="org.example.jbpmdemo.service.impl.IdentitySessionImpl">
+		<property name="userService" ref="userService" />
+	</bean>
+
+</beans>
\ No newline at end of file

Added: projects/demos/tapestry-spring-jbpm4/src/main/resources/org/example/jbpmdemo/components/Layout.tml
===================================================================
--- projects/demos/tapestry-spring-jbpm4/src/main/resources/org/example/jbpmdemo/components/Layout.tml	                        (rev 0)
+++ projects/demos/tapestry-spring-jbpm4/src/main/resources/org/example/jbpmdemo/components/Layout.tml	2009-08-25 14:53:07 UTC (rev 5536)
@@ -0,0 +1,82 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<!--
+
+Design by Free CSS Templates
+http://www.freecsstemplates.org
+Released for free under a Creative Commons Attribution 2.5 License
+
+Title      : Concrete
+Version    : 1.0
+Released   : 20080825
+Description: A Web 2.0 design with fluid width suitable for blogs and small websites.
+-->
+        <html xmlns="http://www.w3.org/1999/xhtml"
+      xmlns:t="http://tapestry.apache.org/schema/tapestry_5_1_0.xsd"
+      xmlns:p="tapestry:parameter">
+    <head>
+        <meta http-equiv="content-type" content="text/html; charset=utf-8"/>
+        <title>${title}</title>
+    </head>
+    <body>
+        <!-- start header -->
+        <div id="header">
+            <div id="logo">
+                <h1>
+                    <t:pagelink page="index">org.example:jbpmdemo</t:pagelink>
+                </h1>
+            </div>
+            <div id="menu">
+                <ul>
+                    <li t:type="loop" source="pageNames" value="pageName" class="prop:classForPageName">
+                        <t:pagelink page="prop:pageName">${pageName}</t:pagelink>
+                    </li>
+                </ul>
+            </div>
+        </div>
+        <!-- end header -->
+        <!-- start page -->
+        <div id="page">
+            <!-- start sidebar -->
+            <div id="sidebar">
+                <ul>
+                    <li id="search" style="background: none;">
+                    </li>
+                    <li t:type="if" test="sidebar">
+                        <h2>${sidebarTitle}</h2>
+                        <div class="sidebar-content">
+                            <t:delegate to="sidebar"/>
+                        </div>
+                    </li>
+                </ul>
+            </div>
+            <!-- end sidebar -->
+            <!-- start content -->
+            <div id="content">
+                <div class="post">
+                    <div class="title">
+                        <h2>${title}</h2>
+                    </div>
+                    <div class="entry">
+                        <t:body/>
+                    </div>
+                </div>
+            </div>
+            <!-- end content -->
+            <br style="clear: both;"/>
+        </div>
+        <!-- end page -->
+        <!-- start footer -->
+        <div id="footer">
+            <p class="legal">
+                &copy;2009 org.example. All Rights Reserved.
+                &nbsp;&nbsp;&bull;&nbsp;&nbsp;
+                Design by
+                <a href="http://www.freecsstemplates.org/">Free CSS Templates</a>
+                &nbsp;&nbsp;&bull;&nbsp;&nbsp;
+                Icons by
+                <a href="http://famfamfam.com/">FAMFAMFAM</a>.
+            </p>
+        </div>
+        <!-- end footer -->
+    </body>
+</html>

Added: projects/demos/tapestry-spring-jbpm4/src/main/resources/org/example/jbpmdemo/jbpm.cfg.xml
===================================================================
--- projects/demos/tapestry-spring-jbpm4/src/main/resources/org/example/jbpmdemo/jbpm.cfg.xml	                        (rev 0)
+++ projects/demos/tapestry-spring-jbpm4/src/main/resources/org/example/jbpmdemo/jbpm.cfg.xml	2009-08-25 14:53:07 UTC (rev 5536)
@@ -0,0 +1,88 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<jbpm-configuration>
+
+	<import resource="jbpm.jpdl.cfg.xml" />
+
+	<!-- This is commented out to use a custom IdentitySessionImpl -->
+	<!--<import resource="jbpm.identity.cfg.xml" />-->
+
+	<process-engine-context>
+
+		<repository-service />
+		<repository-cache />
+		<execution-service />
+		<history-service />
+		<management-service />
+		<identity-service />
+		<task-service />
+
+		<script-manager default-expression-language="juel"
+			default-script-language="juel"
+			read-contexts="execution, environment, process-engine, spring"
+			write-context="">
+			<script-language name="juel"
+				factory="org.jbpm.pvm.internal.script.JuelScriptEngineFactory" />
+		</script-manager>
+
+		<authentication />
+
+		<id-generator />
+		<types resource="jbpm.variable.types.xml" />
+
+		<address-resolver />
+
+		<business-calendar>
+			<monday hours="9:00-12:00 and 12:30-17:00" />
+			<tuesday hours="9:00-12:00 and 12:30-17:00" />
+			<wednesday hours="9:00-12:00 and 12:30-17:00" />
+			<thursday hours="9:00-12:00 and 12:30-17:00" />
+			<friday hours="9:00-12:00 and 12:30-17:00" />
+			<holiday period="01/07/2008 - 31/08/2008" />
+		</business-calendar>
+
+		<mail-template name='task-notification'>
+			<to users="${task.assignee}" />
+			<subject>${task.name}</subject>
+			<text><![CDATA[Hi ${task.assignee},
+Task "${task.name}" has been assigned to you.
+${task.description}
+
+Sent by JBoss jBPM
+]]></text>
+		</mail-template>
+
+		<mail-template name='task-reminder'>
+			<to users="${task.assignee}" />
+			<subject>${task.name}</subject>
+			<text><![CDATA[Hey ${task.assignee},
+Do not forget about task "${task.name}".
+${task.description}
+
+Sent by JBoss jBPM
+]]></text>
+		</mail-template>
+
+		<command-service>
+			<retry-interceptor />
+			<environment-interceptor />
+			<spring-transaction-interceptor
+				current="true" />
+		</command-service>
+	</process-engine-context>
+
+	<transaction-context>
+		<env class="identitySession" />
+		<repository-session />
+		<db-session />
+		<message-session />
+		<timer-session />
+		<history-session />
+		<mail-session>
+			<mail-server>
+				<session-properties resource="jbpm.mail.properties" />
+			</mail-server>
+		</mail-session>
+		<hibernate-session current="true" />
+	</transaction-context>
+</jbpm-configuration>
\ No newline at end of file

Added: projects/demos/tapestry-spring-jbpm4/src/main/resources/org/example/jbpmdemo/pages/Index.properties
===================================================================
--- projects/demos/tapestry-spring-jbpm4/src/main/resources/org/example/jbpmdemo/pages/Index.properties	                        (rev 0)
+++ projects/demos/tapestry-spring-jbpm4/src/main/resources/org/example/jbpmdemo/pages/Index.properties	2009-08-25 14:53:07 UTC (rev 5536)
@@ -0,0 +1 @@
+greeting=Welcome to Tapestry 5!  We hope that this project template will get you going in style.
\ No newline at end of file

Added: projects/demos/tapestry-spring-jbpm4/src/main/resources/user.hbm.xml
===================================================================
--- projects/demos/tapestry-spring-jbpm4/src/main/resources/user.hbm.xml	                        (rev 0)
+++ projects/demos/tapestry-spring-jbpm4/src/main/resources/user.hbm.xml	2009-08-25 14:53:07 UTC (rev 5536)
@@ -0,0 +1,18 @@
+<?xml version="1.0"?>
+<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN" "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
+
+<hibernate-mapping package="org.example.jbpmdemo.model.user" default-access="field">
+
+  <!-- ### USER ########################################################### -->
+  <class name="User" table="JBPMDEMO_USER">
+    <id name="dbid" column="DBID_">
+      <generator class="native" />
+    </id>
+
+    <property name="userName" column="USERNAME_" />
+    <property name="firstName" column="FIRSTNAME_" />
+    <property name="lastName" column="LASTNAME_" />
+    <property name="email" column="EMAIL_" />
+  </class>
+  
+</hibernate-mapping>
\ No newline at end of file

Added: projects/demos/tapestry-spring-jbpm4/src/main/webapp/About.tml
===================================================================
--- projects/demos/tapestry-spring-jbpm4/src/main/webapp/About.tml	                        (rev 0)
+++ projects/demos/tapestry-spring-jbpm4/src/main/webapp/About.tml	2009-08-25 14:53:07 UTC (rev 5536)
@@ -0,0 +1,7 @@
+<html t:type="layout" title="About jbpmdemo"
+      xmlns:t="http://tapestry.apache.org/schema/tapestry_5_1_0.xsd"
+      xmlns:p="tapestry:parameter">
+
+    <p>About jbpmdemo application ...</p>
+
+</html>

Added: projects/demos/tapestry-spring-jbpm4/src/main/webapp/Contact.tml
===================================================================
--- projects/demos/tapestry-spring-jbpm4/src/main/webapp/Contact.tml	                        (rev 0)
+++ projects/demos/tapestry-spring-jbpm4/src/main/webapp/Contact.tml	2009-08-25 14:53:07 UTC (rev 5536)
@@ -0,0 +1,7 @@
+<html t:type="layout" title="Contact org.example"
+      xmlns:t="http://tapestry.apache.org/schema/tapestry_5_1_0.xsd"
+      xmlns:p="tapestry:parameter">
+
+    <p>Contact org.example ...</p>
+
+</html>

Added: projects/demos/tapestry-spring-jbpm4/src/main/webapp/Index.tml
===================================================================
--- projects/demos/tapestry-spring-jbpm4/src/main/webapp/Index.tml	                        (rev 0)
+++ projects/demos/tapestry-spring-jbpm4/src/main/webapp/Index.tml	2009-08-25 14:53:07 UTC (rev 5536)
@@ -0,0 +1,23 @@
+<html t:type="layout" title="jbpmdemo Index" t:sidebarTitle="Current Time"
+	xmlns:t="http://tapestry.apache.org/schema/tapestry_5_1_0.xsd" xmlns:p="tapestry:parameter">
+	<!--
+		Most of the page content, including <head>, <body>, etc. tags, comes
+		from Layout.tml
+	-->
+	<ol>
+		<li>
+			<p>First we need to <t:actionlink t:id="deployProcess">Deploy a Process...</t:actionlink></p>
+			<b>Deployed Processes</b><br/>
+			<t:grid source="allDeployedProcesses" />	
+		</li>
+		<li>
+			<p>Then we can create a user that will be persisted on the page and passed on to jBPM when starting a new process instance...</p>
+			<t:beaneditform id="test-assignee" object="user"/>
+		</li>
+		<li>
+			<p>Now we're ready to <t:actionlink t:id="startProcessInstance">start a new Process Instance...</t:actionlink></p>		
+			<b>Task List</b><br/>
+			<t:grid source="tasks" />
+		</li>
+	</ol>
+</html>

Added: projects/demos/tapestry-spring-jbpm4/src/main/webapp/WEB-INF/app.properties
===================================================================
--- projects/demos/tapestry-spring-jbpm4/src/main/webapp/WEB-INF/app.properties	                        (rev 0)
+++ projects/demos/tapestry-spring-jbpm4/src/main/webapp/WEB-INF/app.properties	2009-08-25 14:53:07 UTC (rev 5536)
@@ -0,0 +1,4 @@
+# This is where global application properties go.
+# You can also have individual message catalogs for each page and each
+# component that override these defaults.
+# The name of this file is based on the <filter-name> element in web.
\ No newline at end of file

Added: projects/demos/tapestry-spring-jbpm4/src/main/webapp/WEB-INF/config/applicationContext.xml
===================================================================
--- projects/demos/tapestry-spring-jbpm4/src/main/webapp/WEB-INF/config/applicationContext.xml	                        (rev 0)
+++ projects/demos/tapestry-spring-jbpm4/src/main/webapp/WEB-INF/config/applicationContext.xml	2009-08-25 14:53:07 UTC (rev 5536)
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<beans xmlns="http://www.springframework.org/schema/beans"
+	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+	xmlns:aop="http://www.springframework.org/schema/aop"
+	xmlns:tx="http://www.springframework.org/schema/tx"
+	xsi:schemaLocation="
+    http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
+    http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-2.0.xsd
+    http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-2.0.xsd">
+
+	<import resource="classpath:org/example/jbpmdemo/applicationContext-common.xml" />
+	<import resource="classpath:org/example/jbpmdemo/applicationContext-dao.xml" />
+	<import resource="classpath:org/example/jbpmdemo/applicationContext-service.xml" />
+	<import resource="classpath:org/example/jbpmdemo/applicationContext-process.xml" />
+
+</beans>
\ No newline at end of file

Added: projects/demos/tapestry-spring-jbpm4/src/main/webapp/WEB-INF/web.xml
===================================================================
--- projects/demos/tapestry-spring-jbpm4/src/main/webapp/WEB-INF/web.xml	                        (rev 0)
+++ projects/demos/tapestry-spring-jbpm4/src/main/webapp/WEB-INF/web.xml	2009-08-25 14:53:07 UTC (rev 5536)
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE web-app
+        PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
+        "http://java.sun.com/dtd/web-app_2_3.dtd">
+<web-app>
+	<display-name>jbpmdemo Tapestry 5 Application</display-name>
+	<context-param>
+		<param-name>contextConfigLocation</param-name>
+		<param-value>/WEB-INF/config/applicationContext.xml</param-value>
+	</context-param>
+	<context-param>
+		<!--
+			The only significant configuration for Tapestry 5, this informs
+			Tapestry of where to look for pages, components and mixins.
+		-->
+		<param-name>tapestry.app-package</param-name>
+		<param-value>org.example.jbpmdemo</param-value>
+	</context-param>
+	<filter>
+		<filter-name>app</filter-name>
+		<!--
+			Special filter that adds in a T5 IoC module derived from the Spring
+			WebApplicationContext.
+		-->
+		<filter-class>org.apache.tapestry5.spring.TapestrySpringFilter</filter-class>
+	</filter>
+	<!--
+	<filter>
+		<filter-name>app</filter-name>
+		<filter-class>org.apache.tapestry5.TapestryFilter</filter-class>
+	</filter>
+	-->
+	<filter-mapping>
+		<filter-name>app</filter-name>
+		<url-pattern>/*</url-pattern>
+	</filter-mapping>
+</web-app>
+      

Added: projects/demos/tapestry-spring-jbpm4/src/main/webapp/favicon.ico
===================================================================
(Binary files differ)


Property changes on: projects/demos/tapestry-spring-jbpm4/src/main/webapp/favicon.ico
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: projects/demos/tapestry-spring-jbpm4/src/main/webapp/layout/images/img01.jpg
===================================================================
(Binary files differ)


Property changes on: projects/demos/tapestry-spring-jbpm4/src/main/webapp/layout/images/img01.jpg
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: projects/demos/tapestry-spring-jbpm4/src/main/webapp/layout/images/img02.jpg
===================================================================
(Binary files differ)


Property changes on: projects/demos/tapestry-spring-jbpm4/src/main/webapp/layout/images/img02.jpg
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: projects/demos/tapestry-spring-jbpm4/src/main/webapp/layout/images/img03.jpg
===================================================================
(Binary files differ)


Property changes on: projects/demos/tapestry-spring-jbpm4/src/main/webapp/layout/images/img03.jpg
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: projects/demos/tapestry-spring-jbpm4/src/main/webapp/layout/images/img04.jpg
===================================================================
(Binary files differ)


Property changes on: projects/demos/tapestry-spring-jbpm4/src/main/webapp/layout/images/img04.jpg
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: projects/demos/tapestry-spring-jbpm4/src/main/webapp/layout/images/img05.gif
===================================================================
(Binary files differ)


Property changes on: projects/demos/tapestry-spring-jbpm4/src/main/webapp/layout/images/img05.gif
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: projects/demos/tapestry-spring-jbpm4/src/main/webapp/layout/images/img06.gif
===================================================================
(Binary files differ)


Property changes on: projects/demos/tapestry-spring-jbpm4/src/main/webapp/layout/images/img06.gif
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: projects/demos/tapestry-spring-jbpm4/src/main/webapp/layout/images/img07.gif
===================================================================
(Binary files differ)


Property changes on: projects/demos/tapestry-spring-jbpm4/src/main/webapp/layout/images/img07.gif
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: projects/demos/tapestry-spring-jbpm4/src/main/webapp/layout/images/img08.gif
===================================================================
(Binary files differ)


Property changes on: projects/demos/tapestry-spring-jbpm4/src/main/webapp/layout/images/img08.gif
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: projects/demos/tapestry-spring-jbpm4/src/main/webapp/layout/images/img09.gif
===================================================================
(Binary files differ)


Property changes on: projects/demos/tapestry-spring-jbpm4/src/main/webapp/layout/images/img09.gif
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: projects/demos/tapestry-spring-jbpm4/src/main/webapp/layout/images/img10.gif
===================================================================
(Binary files differ)


Property changes on: projects/demos/tapestry-spring-jbpm4/src/main/webapp/layout/images/img10.gif
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: projects/demos/tapestry-spring-jbpm4/src/main/webapp/layout/images/img11.gif
===================================================================
(Binary files differ)


Property changes on: projects/demos/tapestry-spring-jbpm4/src/main/webapp/layout/images/img11.gif
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: projects/demos/tapestry-spring-jbpm4/src/main/webapp/layout/images/img12.gif
===================================================================
(Binary files differ)


Property changes on: projects/demos/tapestry-spring-jbpm4/src/main/webapp/layout/images/img12.gif
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: projects/demos/tapestry-spring-jbpm4/src/main/webapp/layout/images/img13.gif
===================================================================
(Binary files differ)


Property changes on: projects/demos/tapestry-spring-jbpm4/src/main/webapp/layout/images/img13.gif
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: projects/demos/tapestry-spring-jbpm4/src/main/webapp/layout/images/img14.gif
===================================================================
(Binary files differ)


Property changes on: projects/demos/tapestry-spring-jbpm4/src/main/webapp/layout/images/img14.gif
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: projects/demos/tapestry-spring-jbpm4/src/main/webapp/layout/images/img15.gif
===================================================================
(Binary files differ)


Property changes on: projects/demos/tapestry-spring-jbpm4/src/main/webapp/layout/images/img15.gif
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: projects/demos/tapestry-spring-jbpm4/src/main/webapp/layout/images/img16.gif
===================================================================
(Binary files differ)


Property changes on: projects/demos/tapestry-spring-jbpm4/src/main/webapp/layout/images/img16.gif
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: projects/demos/tapestry-spring-jbpm4/src/main/webapp/layout/images/img17.gif
===================================================================
(Binary files differ)


Property changes on: projects/demos/tapestry-spring-jbpm4/src/main/webapp/layout/images/img17.gif
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: projects/demos/tapestry-spring-jbpm4/src/main/webapp/layout/images/img18.gif
===================================================================
(Binary files differ)


Property changes on: projects/demos/tapestry-spring-jbpm4/src/main/webapp/layout/images/img18.gif
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: projects/demos/tapestry-spring-jbpm4/src/main/webapp/layout/images/img19.gif
===================================================================
(Binary files differ)


Property changes on: projects/demos/tapestry-spring-jbpm4/src/main/webapp/layout/images/img19.gif
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: projects/demos/tapestry-spring-jbpm4/src/main/webapp/layout/images/img20.gif
===================================================================
(Binary files differ)


Property changes on: projects/demos/tapestry-spring-jbpm4/src/main/webapp/layout/images/img20.gif
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: projects/demos/tapestry-spring-jbpm4/src/main/webapp/layout/images/spacer.gif
===================================================================
(Binary files differ)


Property changes on: projects/demos/tapestry-spring-jbpm4/src/main/webapp/layout/images/spacer.gif
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: projects/demos/tapestry-spring-jbpm4/src/main/webapp/layout/layout.css
===================================================================
--- projects/demos/tapestry-spring-jbpm4/src/main/webapp/layout/layout.css	                        (rev 0)
+++ projects/demos/tapestry-spring-jbpm4/src/main/webapp/layout/layout.css	2009-08-25 14:53:07 UTC (rev 5536)
@@ -0,0 +1,369 @@
+/*
+Design by Free CSS Templates
+http://www.freecsstemplates.org
+Released for free under a Creative Commons Attribution 2.5 License
+*/
+
+body {
+    margin: 0;
+    padding: 0;
+    background: #FFFFFF url( images/img01.jpg ) repeat-x;
+    text-align: justify;
+    font: 15px Arial, Helvetica, sans-serif;
+    color: #626262;
+}
+
+form {
+    margin: 0;
+    padding: 0;
+}
+
+input {
+    padding: 5px;
+    background: #FEFEFE url( images/img13.gif ) repeat-x;
+    border: 1px solid #626262;
+    font: normal 1em Arial, Helvetica, sans-serif;
+}
+
+h1, h1 a, h2, h2 a, h3, h3 a {
+    margin: 0;
+    text-decoration: none;
+    font-family: Tahoma, Georgia, "Times New Roman", Times, serif;
+    font-weight: normal;
+    color: #444444;
+}
+
+h1 {
+    letter-spacing: -1px;
+    font-size: 2.2em;
+    font-family: Verdana, Arial, Helvetica, sans-serif;
+}
+
+h2 {
+    letter-spacing: -1px;
+    font-size: 2em;
+}
+
+h3 {
+    font-size: 1em;
+}
+
+p, ol, ul {
+    margin-bottom: 2em;
+    line-height: 200%;
+}
+
+blockquote {
+    margin: 0 0 0 1.5em;
+    padding-left: 1em;
+    border-left: 5px solid #DDDDDD;
+}
+
+a {
+    color: #1692B8;
+}
+
+a:hover {
+    text-decoration: none;
+}
+
+/* Header */
+
+#header {
+    height: 42px;
+}
+
+#logo h1, #logo p {
+    float: left;
+    text-transform: lowercase;
+}
+
+#logo h1 {
+    padding: 0px 0 0 40px;
+}
+
+#logo p {
+    margin: 0;
+    padding: 14px 0 0 4px;
+    line-height: normal;
+    font-family: Verdana, Arial, Helvetica, sans-serif;
+    font-size: 14px;
+}
+
+#logo a {
+    text-decoration: none;
+    color: #D0C7A6;
+}
+
+#menu {
+    float: right;
+}
+
+#menu ul {
+    margin: 0;
+    padding: 0;
+    list-style: none;
+}
+
+#menu li {
+    display: block;
+    float: left;
+    height: 42px;
+}
+
+#menu a {
+    display: block;
+    padding: 8px 20px 0px 20px;
+    text-decoration: none;
+    text-align: center;
+    text-transform: lowercase;
+    font-family: Verdana, Arial, Helvetica, sans-serif;
+    font-weight: normal;
+    font-size: 14px;
+    color: #CEC5A4;
+}
+
+#menu .last {
+    margin-right: 20px;
+}
+
+#menu a:hover {
+    color: #FFFFFF;
+}
+
+#menu .current_page_item A {
+    text-decoration: underline;
+}
+
+#menu .current_page_item a {
+}
+
+/* Page */
+
+#page {
+    padding: 40px 40px 0 40px;
+}
+
+/* Content */
+
+#content {
+    margin-right: 340px;
+}
+
+.post {
+    margin-bottom: 10px;
+}
+
+.post .title {
+    border-bottom: 1px #999999 dashed;
+    font-family: Tahoma, Georgia, "Times New Roman", Times, serif;
+}
+
+.post .title h2 {
+    padding: 30px 30px 0 0px;
+    text-transform: lowercase;
+    font-weight: normal;
+    font-size: 2.2em;
+}
+
+.post .title p {
+    margin: 0;
+    padding: 0 0 10px 0px;
+    line-height: normal;
+    color: #BABABA;
+}
+
+.post .title p a {
+    color: #BABABA;
+}
+
+.post .entry {
+    padding: 20px 0px 20px 0px;
+}
+
+.post .links {
+    margin: 0;
+    padding: 0 30px 30px 0px;
+}
+
+.post .links a {
+    display: block;
+    float: left;
+    margin-right: 10px;
+    margin-bottom: 5px;
+    text-align: center;
+    text-decoration: none;
+    font-weight: bold;
+    color: #FFFFFF;
+}
+
+.post .links a:hover {
+}
+
+.post .links .more {
+    width: 128px;
+    height: 30px;
+    background: url( images/img03.jpg ) no-repeat left center;
+}
+
+.post .links .comments {
+    width: 152px;
+    height: 30px;
+    background: url( images/img04.jpg ) no-repeat left center;
+}
+
+/* Sidebar */
+
+#sidebar {
+    float: right;
+    width: 300px;
+    margin-top: 30px;
+}
+
+#sidebar ul {
+    margin: 0;
+    padding: 0;
+    list-style: none;
+}
+
+#sidebar li {
+    margin-bottom: 10px;
+    background: url( images/img10.gif ) no-repeat left bottom;
+}
+
+#sidebar li ul {
+    padding: 0 30px 40px 30px;
+}
+
+#sidebar li li {
+    margin: 0;
+    padding-left: 20px;
+}
+
+#sidebar h2 {
+    padding: 30px 30px 5px 10px;
+    background: url( images/img09.gif ) no-repeat;
+    text-transform: lowercase;
+    font-weight: normal;
+    font-size: 1.6em;
+    color: #302D26;
+}
+
+#sidebar DIV.sidebar-content {
+    width: 265px;
+    margin-left: 10px;
+    padding-bottom: 1px;
+}
+
+/* Search */
+
+#search {
+    padding: 20px 30px 40px 30px;
+}
+
+#search input {
+    padding: 0;
+    width: 70px;
+    height: 29px;
+    background: #DFDFDF url( images/img14.gif ) repeat-x;
+    font-weight: bold;
+}
+
+#search #s {
+    padding: 5px;
+    width: 150px;
+    height: auto;
+    background: #FEFEFE url( images/img13.gif ) repeat-x;
+    border: 1px solid #626262;
+    font: normal 1em Arial, Helvetica, sans-serif;
+}
+
+#search br {
+    display: none;
+}
+
+/* Categories */
+
+#sidebar #categories li {
+    background: url( images/img12.gif ) no-repeat left center;
+}
+
+/* Calendar */
+
+#calendar_wrap {
+    padding: 0 30px 40px 30px;
+}
+
+#calendar table {
+    width: 100%;
+    text-align: center;
+}
+
+#calendar thead {
+    background: #F1F1F1;
+}
+
+#calendar tbody td {
+    border: 1px solid #F1F1F1;
+}
+
+#calendar #prev {
+    text-align: left;
+}
+
+#calendar #next {
+    text-align: right;
+}
+
+#calendar tfoot a {
+    text-decoration: none;
+    font-weight: bold;
+}
+
+#calendar #today {
+    background: #FFF3A7;
+    border: 1px solid #EB1400;
+    font-weight: bold;
+    color: #EB1400
+}
+
+/* Footer */
+
+#footer {
+    padding: 70px 0 50px 0;
+    background: #757575 url( images/img08.gif ) repeat-x;
+}
+
+#footer p {
+    margin-bottom: 1em;
+    text-align: center;
+    line-height: normal;
+    font-size: .9em;
+    color: #BABABA;
+}
+
+#footer a {
+    padding: 0 20px;
+    text-decoration: none;
+    color: #DDDDDD;
+}
+
+#footer a:hover {
+    color: #FFFFFF;
+}
+
+#footer .rss {
+    background: url( images/img18.gif ) no-repeat left center;
+}
+
+#footer .xhtml {
+    background: url( images/img19.gif ) no-repeat left center;
+}
+
+#footer .css {
+    background: url( images/img20.gif ) no-repeat left center;
+}
+
+#footer .legal a {
+    padding: 0;
+}

Added: projects/demos/tapestry-spring-jbpm4/src/main/webapp/layout/license.txt
===================================================================
--- projects/demos/tapestry-spring-jbpm4/src/main/webapp/layout/license.txt	                        (rev 0)
+++ projects/demos/tapestry-spring-jbpm4/src/main/webapp/layout/license.txt	2009-08-25 14:53:07 UTC (rev 5536)
@@ -0,0 +1,243 @@
+Creative Commons </>
+
+Creative Commons Legal Code
+
+*Attribution 2.5*
+
+CREATIVE COMMONS CORPORATION IS NOT A LAW FIRM AND DOES NOT PROVIDE
+LEGAL SERVICES. DISTRIBUTION OF THIS LICENSE DOES NOT CREATE AN
+ATTORNEY-CLIENT RELATIONSHIP. CREATIVE COMMONS PROVIDES THIS INFORMATION
+ON AN "AS-IS" BASIS. CREATIVE COMMONS MAKES NO WARRANTIES REGARDING THE
+INFORMATION PROVIDED, AND DISCLAIMS LIABILITY FOR DAMAGES RESULTING FROM
+ITS USE.
+
+/License/
+
+THE WORK (AS DEFINED BELOW) IS PROVIDED UNDER THE TERMS OF THIS CREATIVE
+COMMONS PUBLIC LICENSE ("CCPL" OR "LICENSE"). THE WORK IS PROTECTED BY
+COPYRIGHT AND/OR OTHER APPLICABLE LAW. ANY USE OF THE WORK OTHER THAN AS
+AUTHORIZED UNDER THIS LICENSE OR COPYRIGHT LAW IS PROHIBITED.
+
+BY EXERCISING ANY RIGHTS TO THE WORK PROVIDED HERE, YOU ACCEPT AND AGREE
+TO BE BOUND BY THE TERMS OF THIS LICENSE. THE LICENSOR GRANTS YOU THE
+RIGHTS CONTAINED HERE IN CONSIDERATION OF YOUR ACCEPTANCE OF SUCH TERMS
+AND CONDITIONS.
+
+*1. Definitions*
+
+   1. *"Collective Work"* means a work, such as a periodical issue,
+      anthology or encyclopedia, in which the Work in its entirety in
+      unmodified form, along with a number of other contributions,
+      constituting separate and independent works in themselves, are
+      assembled into a collective whole. A work that constitutes a
+      Collective Work will not be considered a Derivative Work (as
+      defined below) for the purposes of this License.
+   2. *"Derivative Work"* means a work based upon the Work or upon the
+      Work and other pre-existing works, such as a translation, musical
+      arrangement, dramatization, fictionalization, motion picture
+      version, sound recording, art reproduction, abridgment,
+      condensation, or any other form in which the Work may be recast,
+      transformed, or adapted, except that a work that constitutes a
+      Collective Work will not be considered a Derivative Work for the
+      purpose of this License. For the avoidance of doubt, where the
+      Work is a musical composition or sound recording, the
+      synchronization of the Work in timed-relation with a moving image
+      ("synching") will be considered a Derivative Work for the purpose
+      of this License.
+   3. *"Licensor"* means the individual or entity that offers the Work
+      under the terms of this License.
+   4. *"Original Author"* means the individual or entity who created the
+      Work.
+   5. *"Work"* means the copyrightable work of authorship offered under
+      the terms of this License.
+   6. *"You"* means an individual or entity exercising rights under this
+      License who has not previously violated the terms of this License
+      with respect to the Work, or who has received express permission
+      from the Licensor to exercise rights under this License despite a
+      previous violation.
+
+*2. Fair Use Rights.* Nothing in this license is intended to reduce,
+limit, or restrict any rights arising from fair use, first sale or other
+limitations on the exclusive rights of the copyright owner under
+copyright law or other applicable laws.
+
+*3. License Grant.* Subject to the terms and conditions of this License,
+Licensor hereby grants You a worldwide, royalty-free, non-exclusive,
+perpetual (for the duration of the applicable copyright) license to
+exercise the rights in the Work as stated below:
+
+   1. to reproduce the Work, to incorporate the Work into one or more
+      Collective Works, and to reproduce the Work as incorporated in the
+      Collective Works;
+   2. to create and reproduce Derivative Works;
+   3. to distribute copies or phonorecords of, display publicly, perform
+      publicly, and perform publicly by means of a digital audio
+      transmission the Work including as incorporated in Collective Works;
+   4. to distribute copies or phonorecords of, display publicly, perform
+      publicly, and perform publicly by means of a digital audio
+      transmission Derivative Works.
+   5.
+
+      For the avoidance of doubt, where the work is a musical composition:
+
+         1. *Performance Royalties Under Blanket Licenses*. Licensor
+            waives the exclusive right to collect, whether individually
+            or via a performance rights society (e.g. ASCAP, BMI,
+            SESAC), royalties for the public performance or public
+            digital performance (e.g. webcast) of the Work.
+         2. *Mechanical Rights and Statutory Royalties*. Licensor waives
+            the exclusive right to collect, whether individually or via
+            a music rights agency or designated agent (e.g. Harry Fox
+            Agency), royalties for any phonorecord You create from the
+            Work ("cover version") and distribute, subject to the
+            compulsory license created by 17 USC Section 115 of the US
+            Copyright Act (or the equivalent in other jurisdictions).
+   6. *Webcasting Rights and Statutory Royalties*. For the avoidance of
+      doubt, where the Work is a sound recording, Licensor waives the
+      exclusive right to collect, whether individually or via a
+      performance-rights society (e.g. SoundExchange), royalties for the
+      public digital performance (e.g. webcast) of the Work, subject to
+      the compulsory license created by 17 USC Section 114 of the US
+      Copyright Act (or the equivalent in other jurisdictions).
+
+The above rights may be exercised in all media and formats whether now
+known or hereafter devised. The above rights include the right to make
+such modifications as are technically necessary to exercise the rights
+in other media and formats. All rights not expressly granted by Licensor
+are hereby reserved.
+
+*4. Restrictions.*The license granted in Section 3 above is expressly
+made subject to and limited by the following restrictions:
+
+   1. You may distribute, publicly display, publicly perform, or
+      publicly digitally perform the Work only under the terms of this
+      License, and You must include a copy of, or the Uniform Resource
+      Identifier for, this License with every copy or phonorecord of the
+      Work You distribute, publicly display, publicly perform, or
+      publicly digitally perform. You may not offer or impose any terms
+      on the Work that alter or restrict the terms of this License or
+      the recipients' exercise of the rights granted hereunder. You may
+      not sublicense the Work. You must keep intact all notices that
+      refer to this License and to the disclaimer of warranties. You may
+      not distribute, publicly display, publicly perform, or publicly
+      digitally perform the Work with any technological measures that
+      control access or use of the Work in a manner inconsistent with
+      the terms of this License Agreement. The above applies to the Work
+      as incorporated in a Collective Work, but this does not require
+      the Collective Work apart from the Work itself to be made subject
+      to the terms of this License. If You create a Collective Work,
+      upon notice from any Licensor You must, to the extent practicable,
+      remove from the Collective Work any credit as required by clause
+      4(b), as requested. If You create a Derivative Work, upon notice
+      from any Licensor You must, to the extent practicable, remove from
+      the Derivative Work any credit as required by clause 4(b), as
+      requested.
+   2. If you distribute, publicly display, publicly perform, or publicly
+      digitally perform the Work or any Derivative Works or Collective
+      Works, You must keep intact all copyright notices for the Work and
+      provide, reasonable to the medium or means You are utilizing: (i)
+      the name of the Original Author (or pseudonym, if applicable) if
+      supplied, and/or (ii) if the Original Author and/or Licensor
+      designate another party or parties (e.g. a sponsor institute,
+      publishing entity, journal) for attribution in Licensor's
+      copyright notice, terms of service or by other reasonable means,
+      the name of such party or parties; the title of the Work if
+      supplied; to the extent reasonably practicable, the Uniform
+      Resource Identifier, if any, that Licensor specifies to be
+      associated with the Work, unless such URI does not refer to the
+      copyright notice or licensing information for the Work; and in the
+      case of a Derivative Work, a credit identifying the use of the
+      Work in the Derivative Work (e.g., "French translation of the Work
+      by Original Author," or "Screenplay based on original Work by
+      Original Author"). Such credit may be implemented in any
+      reasonable manner; provided, however, that in the case of a
+      Derivative Work or Collective Work, at a minimum such credit will
+      appear where any other comparable authorship credit appears and in
+      a manner at least as prominent as such other comparable authorship
+      credit.
+
+*5. Representations, Warranties and Disclaimer*
+
+UNLESS OTHERWISE MUTUALLY AGREED TO BY THE PARTIES IN WRITING, LICENSOR
+OFFERS THE WORK AS-IS AND MAKES NO REPRESENTATIONS OR WARRANTIES OF ANY
+KIND CONCERNING THE WORK, EXPRESS, IMPLIED, STATUTORY OR OTHERWISE,
+INCLUDING, WITHOUT LIMITATION, WARRANTIES OF TITLE, MERCHANTIBILITY,
+FITNESS FOR A PARTICULAR PURPOSE, NONINFRINGEMENT, OR THE ABSENCE OF
+LATENT OR OTHER DEFECTS, ACCURACY, OR THE PRESENCE OF ABSENCE OF ERRORS,
+WHETHER OR NOT DISCOVERABLE. SOME JURISDICTIONS DO NOT ALLOW THE
+EXCLUSION OF IMPLIED WARRANTIES, SO SUCH EXCLUSION MAY NOT APPLY TO YOU.
+
+*6. Limitation on Liability.* EXCEPT TO THE EXTENT REQUIRED BY
+APPLICABLE LAW, IN NO EVENT WILL LICENSOR BE LIABLE TO YOU ON ANY LEGAL
+THEORY FOR ANY SPECIAL, INCIDENTAL, CONSEQUENTIAL, PUNITIVE OR EXEMPLARY
+DAMAGES ARISING OUT OF THIS LICENSE OR THE USE OF THE WORK, EVEN IF
+LICENSOR HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+
+*7. Termination*
+
+   1. This License and the rights granted hereunder will terminate
+      automatically upon any breach by You of the terms of this License.
+      Individuals or entities who have received Derivative Works or
+      Collective Works from You under this License, however, will not
+      have their licenses terminated provided such individuals or
+      entities remain in full compliance with those licenses. Sections
+      1, 2, 5, 6, 7, and 8 will survive any termination of this License.
+   2. Subject to the above terms and conditions, the license granted
+      here is perpetual (for the duration of the applicable copyright in
+      the Work). Notwithstanding the above, Licensor reserves the right
+      to release the Work under different license terms or to stop
+      distributing the Work at any time; provided, however that any such
+      election will not serve to withdraw this License (or any other
+      license that has been, or is required to be, granted under the
+      terms of this License), and this License will continue in full
+      force and effect unless terminated as stated above.
+
+*8. Miscellaneous*
+
+   1. Each time You distribute or publicly digitally perform the Work or
+      a Collective Work, the Licensor offers to the recipient a license
+      to the Work on the same terms and conditions as the license
+      granted to You under this License.
+   2. Each time You distribute or publicly digitally perform a
+      Derivative Work, Licensor offers to the recipient a license to the
+      original Work on the same terms and conditions as the license
+      granted to You under this License.
+   3. If any provision of this License is invalid or unenforceable under
+      applicable law, it shall not affect the validity or enforceability
+      of the remainder of the terms of this License, and without further
+      action by the parties to this agreement, such provision shall be
+      reformed to the minimum extent necessary to make such provision
+      valid and enforceable.
+   4. No term or provision of this License shall be deemed waived and no
+      breach consented to unless such waiver or consent shall be in
+      writing and signed by the party to be charged with such waiver or
+      consent.
+   5. This License constitutes the entire agreement between the parties
+      with respect to the Work licensed here. There are no
+      understandings, agreements or representations with respect to the
+      Work not specified here. Licensor shall not be bound by any
+      additional provisions that may appear in any communication from
+      You. This License may not be modified without the mutual written
+      agreement of the Licensor and You.
+
+Creative Commons is not a party to this License, and makes no warranty
+whatsoever in connection with the Work. Creative Commons will not be
+liable to You or any party on any legal theory for any damages
+whatsoever, including without limitation any general, special,
+incidental or consequential damages arising in connection to this
+license. Notwithstanding the foregoing two (2) sentences, if Creative
+Commons has expressly identified itself as the Licensor hereunder, it
+shall have all rights and obligations of Licensor.
+
+Except for the limited purpose of indicating to the public that the Work
+is licensed under the CCPL, neither party will use the trademark
+"Creative Commons" or any related trademark or logo of Creative Commons
+without the prior written consent of Creative Commons. Any permitted use
+will be in compliance with Creative Commons' then-current trademark
+usage guidelines, as may be published on its website or otherwise made
+available upon request from time to time.
+
+Creative Commons may be contacted at http://creativecommons.org/
+<http://creativecommons.org>.
+
+� Back to Commons Deed <./>

Added: projects/demos/tapestry-spring-jbpm4/src/site/apt/index.apt
===================================================================
--- projects/demos/tapestry-spring-jbpm4/src/site/apt/index.apt	                        (rev 0)
+++ projects/demos/tapestry-spring-jbpm4/src/site/apt/index.apt	2009-08-25 14:53:07 UTC (rev 5536)
@@ -0,0 +1,9 @@
+ ----
+ Module org.example:jbpmdemo
+ ----
+
+org.example:jbpmdemo Documentation
+
+  This is where you can start to document your module.
+
+  Create new files in the Maven APT format, and update the site.xml file to point to them.

Added: projects/demos/tapestry-spring-jbpm4/src/site/site.xml
===================================================================
--- projects/demos/tapestry-spring-jbpm4/src/site/site.xml	                        (rev 0)
+++ projects/demos/tapestry-spring-jbpm4/src/site/site.xml	2009-08-25 14:53:07 UTC (rev 5536)
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<project name="Generated site for jbpmdemo">
+
+    <publishDate format="dd MMM yyyy"/>
+
+    <version/>
+
+    <body>
+
+        <menu name="jbpmdemo Project">
+            <item name="About" href="index.html"/>
+        </menu>
+
+        <menu ref="reports"/>
+
+    </body>
+</project>

Added: projects/demos/tapestry-spring-jbpm4/src/test/conf/testng.xml
===================================================================
--- projects/demos/tapestry-spring-jbpm4/src/test/conf/testng.xml	                        (rev 0)
+++ projects/demos/tapestry-spring-jbpm4/src/test/conf/testng.xml	2009-08-25 14:53:07 UTC (rev 5536)
@@ -0,0 +1,8 @@
+<!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd">
+<suite name="jbpmdemo Application Test Suite" annotations="1.5">
+    <test name="Unit Tests">
+        <packages>
+            <package name="org.example.jbpmdemo"/>
+        </packages>
+    </test>
+</suite>

Added: projects/demos/tapestry-spring-jbpm4/src/test/conf/webdefault.xml
===================================================================
--- projects/demos/tapestry-spring-jbpm4/src/test/conf/webdefault.xml	                        (rev 0)
+++ projects/demos/tapestry-spring-jbpm4/src/test/conf/webdefault.xml	2009-08-25 14:53:07 UTC (rev 5536)
@@ -0,0 +1,278 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<web-app
+        xmlns="http://java.sun.com/xml/ns/j2ee"
+        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+        xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"
+        version="2.4">
+
+    <description>
+        Default web.xml file.
+        This file is applied to a Web application before it's own WEB_INF/web.xml file
+    </description>
+
+
+    <!-- ==================================================================== -->
+    <!-- Context params to control Session Cookies                            -->
+    <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -  -->
+    <!-- UNCOMMENT TO ACTIVATE
+    <context-param>
+      <param-name>org.mortbay.jetty.servlet.SessionDomain</param-name>
+      <param-value>127.0.0.1</param-value>
+    </context-param>
+
+    <context-param>
+      <param-name>org.mortbay.jetty.servlet.SessionPath</param-name>
+      <param-value>/</param-value>
+    </context-param>
+
+    <context-param>
+      <param-name>org.mortbay.jetty.servlet.MaxAge</param-name>
+      <param-value>-1</param-value>
+    </context-param>
+    -->
+
+
+    <!-- ==================================================================== -->
+    <!-- The default servlet.                                                 -->
+    <!-- This servlet, normally mapped to /, provides the handling for static -->
+    <!-- content, OPTIONS and TRACE methods for the context.                  -->
+    <!-- The following initParameters are supported:                          -->
+    <!--                                                                      -->
+    <!--   acceptRanges     If true, range requests and responses are         -->
+    <!--                    supported                                         -->
+    <!--                                                                      -->
+    <!--   dirAllowed       If true, directory listings are returned if no    -->
+    <!--                    welcome file is found. Else 403 Forbidden.        -->
+    <!--                                                                      -->
+    <!--   putAllowed       If true, the PUT method is allowed                -->
+    <!--                                                                      -->
+    <!--   delAllowed       If true, the DELETE method is allowed             -->
+    <!--                                                                      -->
+    <!--   redirectWelcome  If true, redirect welcome file requests           -->
+    <!--                    else use request dispatcher forwards              -->
+    <!--                                                                      -->
+    <!--   minGzipLength    If set to a positive integer, then static content -->
+    <!--                    larger than this will be served as gzip content   -->
+    <!--                    encoded if a matching resource is found ending    -->
+    <!--                    with ".gz"                                        -->
+    <!--                                                                      -->
+    <!--   resoureBase      Can be set to replace the context resource base   -->
+    <!--                                                                      -->
+    <!--   relativeResourceBase                                               -->
+    <!--                    Set with a pathname relative to the base of the   -->
+    <!--                    servlet context root. Useful for only serving     -->
+    <!--                    static content from only specific subdirectories. -->
+    <!--                                                                      -->
+    <!-- The MOVE method is allowed if PUT and DELETE are allowed             -->
+    <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -  -->
+    <servlet>
+        <servlet-name>default</servlet-name>
+        <servlet-class>org.mortbay.jetty.servlet.Default</servlet-class>
+        <init-param>
+            <param-name>acceptRanges</param-name>
+            <param-value>true</param-value>
+        </init-param>
+        <init-param>
+            <param-name>dirAllowed</param-name>
+            <param-value>true</param-value>
+        </init-param>
+        <init-param>
+            <param-name>putAllowed</param-name>
+            <param-value>false</param-value>
+        </init-param>
+        <init-param>
+            <param-name>delAllowed</param-name>
+            <param-value>false</param-value>
+        </init-param>
+        <init-param>
+            <param-name>redirectWelcome</param-name>
+            <param-value>false</param-value>
+        </init-param>
+        <init-param>
+            <param-name>minGzipLength</param-name>
+            <param-value>8192</param-value>
+        </init-param>
+        <load-on-startup>0</load-on-startup>
+    </servlet>
+
+
+    <servlet-mapping>
+        <servlet-name>default</servlet-name>
+        <url-pattern>/</url-pattern>
+    </servlet-mapping>
+
+    <!-- ==================================================================== -->
+    <session-config>
+        <session-timeout>30</session-timeout>
+    </session-config>
+
+
+    <!-- ==================================================================== -->
+    <welcome-file-list>
+        <welcome-file>index.html</welcome-file>
+        <welcome-file>index.htm</welcome-file>
+    </welcome-file-list>
+
+    <!-- ==================================================================== -->
+    <locale-encoding-mapping-list>
+        <locale-encoding-mapping>
+            <locale>ar</locale>
+            <encoding>ISO-8859-6</encoding>
+        </locale-encoding-mapping>
+        <locale-encoding-mapping>
+            <locale>be</locale>
+            <encoding>ISO-8859-5</encoding>
+        </locale-encoding-mapping>
+        <locale-encoding-mapping>
+            <locale>bg</locale>
+            <encoding>ISO-8859-5</encoding>
+        </locale-encoding-mapping>
+        <locale-encoding-mapping>
+            <locale>ca</locale>
+            <encoding>ISO-8859-1</encoding>
+        </locale-encoding-mapping>
+        <locale-encoding-mapping>
+            <locale>cs</locale>
+            <encoding>ISO-8859-2</encoding>
+        </locale-encoding-mapping>
+        <locale-encoding-mapping>
+            <locale>da</locale>
+            <encoding>ISO-8859-1</encoding>
+        </locale-encoding-mapping>
+        <locale-encoding-mapping>
+            <locale>de</locale>
+            <encoding>ISO-8859-1</encoding>
+        </locale-encoding-mapping>
+        <locale-encoding-mapping>
+            <locale>el</locale>
+            <encoding>ISO-8859-7</encoding>
+        </locale-encoding-mapping>
+        <locale-encoding-mapping>
+            <locale>en</locale>
+            <encoding>ISO-8859-1</encoding>
+        </locale-encoding-mapping>
+        <locale-encoding-mapping>
+            <locale>es</locale>
+            <encoding>ISO-8859-1</encoding>
+        </locale-encoding-mapping>
+        <locale-encoding-mapping>
+            <locale>et</locale>
+            <encoding>ISO-8859-1</encoding>
+        </locale-encoding-mapping>
+        <locale-encoding-mapping>
+            <locale>fi</locale>
+            <encoding>ISO-8859-1</encoding>
+        </locale-encoding-mapping>
+        <locale-encoding-mapping>
+            <locale>fr</locale>
+            <encoding>ISO-8859-1</encoding>
+        </locale-encoding-mapping>
+        <locale-encoding-mapping>
+            <locale>hr</locale>
+            <encoding>ISO-8859-2</encoding>
+        </locale-encoding-mapping>
+        <locale-encoding-mapping>
+            <locale>hu</locale>
+            <encoding>ISO-8859-2</encoding>
+        </locale-encoding-mapping>
+        <locale-encoding-mapping>
+            <locale>is</locale>
+            <encoding>ISO-8859-1</encoding>
+        </locale-encoding-mapping>
+        <locale-encoding-mapping>
+            <locale>it</locale>
+            <encoding>ISO-8859-1</encoding>
+        </locale-encoding-mapping>
+        <locale-encoding-mapping>
+            <locale>iw</locale>
+            <encoding>ISO-8859-8</encoding>
+        </locale-encoding-mapping>
+        <locale-encoding-mapping>
+            <locale>ja</locale>
+            <encoding>Shift_JIS</encoding>
+        </locale-encoding-mapping>
+        <locale-encoding-mapping>
+            <locale>ko</locale>
+            <encoding>EUC-KR</encoding>
+        </locale-encoding-mapping>
+        <locale-encoding-mapping>
+            <locale>lt</locale>
+            <encoding>ISO-8859-2</encoding>
+        </locale-encoding-mapping>
+        <locale-encoding-mapping>
+            <locale>lv</locale>
+            <encoding>ISO-8859-2</encoding>
+        </locale-encoding-mapping>
+        <locale-encoding-mapping>
+            <locale>mk</locale>
+            <encoding>ISO-8859-5</encoding>
+        </locale-encoding-mapping>
+        <locale-encoding-mapping>
+            <locale>nl</locale>
+            <encoding>ISO-8859-1</encoding>
+        </locale-encoding-mapping>
+        <locale-encoding-mapping>
+            <locale>no</locale>
+            <encoding>ISO-8859-1</encoding>
+        </locale-encoding-mapping>
+        <locale-encoding-mapping>
+            <locale>pl</locale>
+            <encoding>ISO-8859-2</encoding>
+        </locale-encoding-mapping>
+        <locale-encoding-mapping>
+            <locale>pt</locale>
+            <encoding>ISO-8859-1</encoding>
+        </locale-encoding-mapping>
+        <locale-encoding-mapping>
+            <locale>ro</locale>
+            <encoding>ISO-8859-2</encoding>
+        </locale-encoding-mapping>
+        <locale-encoding-mapping>
+            <locale>ru</locale>
+            <encoding>ISO-8859-5</encoding>
+        </locale-encoding-mapping>
+        <locale-encoding-mapping>
+            <locale>sh</locale>
+            <encoding>ISO-8859-5</encoding>
+        </locale-encoding-mapping>
+        <locale-encoding-mapping>
+            <locale>sk</locale>
+            <encoding>ISO-8859-2</encoding>
+        </locale-encoding-mapping>
+        <locale-encoding-mapping>
+            <locale>sl</locale>
+            <encoding>ISO-8859-2</encoding>
+        </locale-encoding-mapping>
+        <locale-encoding-mapping>
+            <locale>sq</locale>
+            <encoding>ISO-8859-2</encoding>
+        </locale-encoding-mapping>
+        <locale-encoding-mapping>
+            <locale>sr</locale>
+            <encoding>ISO-8859-5</encoding>
+        </locale-encoding-mapping>
+        <locale-encoding-mapping>
+            <locale>sv</locale>
+            <encoding>ISO-8859-1</encoding>
+        </locale-encoding-mapping>
+        <locale-encoding-mapping>
+            <locale>tr</locale>
+            <encoding>ISO-8859-9</encoding>
+        </locale-encoding-mapping>
+        <locale-encoding-mapping>
+            <locale>uk</locale>
+            <encoding>ISO-8859-5</encoding>
+        </locale-encoding-mapping>
+        <locale-encoding-mapping>
+            <locale>zh</locale>
+            <encoding>GB2312</encoding>
+        </locale-encoding-mapping>
+        <locale-encoding-mapping>
+            <locale>zh_TW</locale>
+            <encoding>Big5</encoding>
+        </locale-encoding-mapping>
+    </locale-encoding-mapping-list>
+
+
+</web-app>
+

Added: projects/demos/tapestry-spring-jbpm4/src/test/java/org/example/jbpmdemo/service/JbpmServiceTest.java
===================================================================
--- projects/demos/tapestry-spring-jbpm4/src/test/java/org/example/jbpmdemo/service/JbpmServiceTest.java	                        (rev 0)
+++ projects/demos/tapestry-spring-jbpm4/src/test/java/org/example/jbpmdemo/service/JbpmServiceTest.java	2009-08-25 14:53:07 UTC (rev 5536)
@@ -0,0 +1,73 @@
+package org.example.jbpmdemo.service;
+
+import java.io.IOException;
+import java.util.HashMap;
+import java.util.Map;
+
+import javax.mail.MessagingException;
+
+import org.example.jbpmdemo.model.user.User;
+import org.jbpm.api.ProcessInstance;
+import org.jbpm.spring.test.AbstractTransactionalSpringJbpmTestCase;
+import org.subethamail.wiser.Wiser;
+import org.subethamail.wiser.WiserMessage;
+
+public class JbpmServiceTest extends AbstractTransactionalSpringJbpmTestCase {
+
+	protected UserService userService;
+	Wiser wiser = null;
+
+	private String deploymentId;
+	private String processInstanceId;
+
+	@Override
+	protected String[] getConfigLocations() {
+		return new String[] {
+				"org/example/jbpmdemo/applicationContext-common.xml",
+				"org/example/jbpmdemo/applicationContext-dao.xml",
+				"org/example/jbpmdemo/applicationContext-process.xml",
+				"org/example/jbpmdemo/applicationContext-service.xml" };
+	}
+
+	@Override
+	protected void onSetUpInTransaction() throws Exception {
+		userService = (UserService) applicationContext.getBean("userService");
+
+		// start mail server
+		wiser = new Wiser();
+		wiser.setPort(2525);
+		wiser.start();
+
+		super.onSetUpInTransaction();
+		deploymentId = repositoryService.createDeployment().addResourceFromUrl(
+				JbpmServiceTest.class
+						.getResource("/jbpm/process/Review.jpdl.xml")).deploy();
+	}
+
+	public void testReviewProcess() throws IOException, MessagingException {
+		String userId = userService.createUser("john.doe", "John", "Doe", "john.doe at test.org");
+		Map<String, Object> variables = new HashMap<String, Object>();
+		variables.put("user", userService.findUserById(userId));
+		try {
+			ProcessInstance processInstance = executionService
+					.startProcessInstanceByKey("Review_Process", variables);
+			processInstanceId = processInstance.getId();
+			assertTrue(processInstance.isActive("Review"));
+		} catch (RuntimeException e) {
+			assertEquals("Not implemented", e.getMessage());
+		}
+		assertEquals(1, wiser.getMessages().size());
+		for (WiserMessage message : wiser.getMessages()) {
+			logger.info(message.getEnvelopeSender());
+			logger.info(message.getEnvelopeReceiver());
+			logger.info(message.getMimeMessage().getSubject());
+			logger.info(message.getMimeMessage().getContent());
+			// TODO add asserts for email message
+		}
+	}
+
+	@Override
+	protected void onTearDownAfterTransaction() throws Exception {
+		wiser.stop();
+	}
+}

Added: projects/demos/tapestry-spring-jbpm4/src/test/java/org/jbpm/spring/test/AbstractTransactionalSpringJbpmTestCase.java
===================================================================
--- projects/demos/tapestry-spring-jbpm4/src/test/java/org/jbpm/spring/test/AbstractTransactionalSpringJbpmTestCase.java	                        (rev 0)
+++ projects/demos/tapestry-spring-jbpm4/src/test/java/org/jbpm/spring/test/AbstractTransactionalSpringJbpmTestCase.java	2009-08-25 14:53:07 UTC (rev 5536)
@@ -0,0 +1,162 @@
+package org.jbpm.spring.test;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.example.jbpmdemo.service.UserService;
+import org.jbpm.api.Configuration;
+import org.jbpm.api.ExecutionService;
+import org.jbpm.api.HistoryService;
+import org.jbpm.api.IdentityService;
+import org.jbpm.api.ManagementService;
+import org.jbpm.api.ProcessEngine;
+import org.jbpm.api.RepositoryService;
+import org.jbpm.api.TaskService;
+import org.jbpm.api.task.Task;
+import org.jbpm.pvm.internal.cmd.CommandService;
+import org.springframework.test.AbstractTransactionalDataSourceSpringContextTests;
+
+/**
+ * Abstract test class that - builds the application context - runs in 1
+ * transaction - adds convenience methods: e.g. deploying a process.
+ * 
+ * @author Andries Inze
+ * 
+ */
+public abstract class AbstractTransactionalSpringJbpmTestCase extends
+		AbstractTransactionalDataSourceSpringContextTests {
+
+	private Configuration configuration;
+	protected ProcessEngine processEngine;
+
+	protected RepositoryService repositoryService;
+	protected ExecutionService executionService;
+	protected ManagementService managementService;
+	protected TaskService taskService;
+	protected HistoryService historyService;
+	protected IdentityService identityService;
+
+	protected CommandService commandService;
+	
+	protected List<String> taskIds;
+
+	/**
+	 * registered deployments. registered deployments will be deleted
+	 * automatically in the tearDown. This is a convenience function as each
+	 * test is expected to clean up the DB.
+	 */
+	protected List<String> registeredDeployments = new ArrayList<String>();
+
+	public AbstractTransactionalSpringJbpmTestCase() {
+		super();
+
+		// AUTOWIRE_BY_NAME is default behavior for Spring version 2.5.x
+		// AUTOWIRE_BY_TYPE is default behavior for Spring version 2.0.8, but
+		// fails because of Hibernate specific instances.
+		setAutowireMode(AUTOWIRE_BY_NAME);
+	}
+
+	/**
+	 * {@inheritDoc)
+
+	 */
+	protected void injectDependencies() throws Exception {
+		super.injectDependencies();
+
+		configuration = (Configuration) applicationContext
+				.getBean("jbpmConfiguration");
+		processEngine = configuration.buildProcessEngine();
+
+		repositoryService = processEngine.get(RepositoryService.class);
+		executionService = processEngine.getExecutionService();
+		historyService = processEngine.getHistoryService();
+		managementService = processEngine.getManagementService();
+		taskService = processEngine.getTaskService();
+		identityService = processEngine.getIdentityService();
+		commandService = processEngine.get(CommandService.class);
+	}
+
+	@Override
+	protected void onSetUp() throws Exception {
+		super.onSetUp();
+
+	}
+
+	@Override
+	protected void onTearDownInTransaction() throws Exception {
+		// super.onTearDownInTransaction();
+		// for (Long deploymentDbid : registeredDeployments) {
+		// repositoryService.deleteDeploymentCascade(deploymentDbid);
+		// }
+
+		// Db.verifyClean(processEngine);
+
+	}
+
+	/**
+	 * deploys the process, keeps a reference to the deployment and
+	 * automatically deletes the deployment in the tearDown
+	 */
+	public String deployJpdlXmlString(String jpdlXmlString) {
+		String deploymentDbid = repositoryService.createDeployment()
+				.addResourceFromString("xmlstring.jpdl.xml", jpdlXmlString)
+				.deploy();
+		registerDeployment(deploymentDbid);
+		return deploymentDbid;
+	}
+
+	/** registered deployments will be deleted in the tearDown */
+	protected void registerDeployment(String deploymentDbid) {
+		registeredDeployments.add(deploymentDbid);
+	}
+
+	public void assertTextPresent(String expected, String value) {
+		// TODO utility!
+		if ((value == null) || (value.indexOf(expected) == -1)) {
+			fail("expected presence of '" + expected + "' but was '" + value
+					+ "'");
+		}
+	}
+
+	public static void assertContainsTask(List<Task> taskList, String taskName) {
+		if (getTask(taskList, taskName) == null) {
+			fail("tasklist doesn't contain task '" + taskName + "': "
+					+ taskList);
+		}
+	}
+
+	public static void assertContainsTask(List<Task> taskList, String taskName,
+			String assignee) {
+		if (getTask(taskList, taskName, assignee) == null) {
+			fail("tasklist doesn't contain task '" + taskName
+					+ "' for assignee '" + assignee + "': " + taskList);
+		}
+	}
+
+	public static Task getTask(List<Task> taskList, String taskName) {
+		for (Task task : taskList) {
+			if (taskName.equals(task.getName())) {
+				return task;
+			}
+		}
+		return null;
+	}
+
+	public static Task getTask(List<Task> taskList, String taskName,
+			String assignee) {
+		for (Task task : taskList) {
+			if (taskName.equals(task.getName())) {
+				if (assignee == null) {
+					if (task.getAssignee() == null) {
+						return task;
+					}
+				} else {
+					if (assignee.equals(task.getAssignee())) {
+						return task;
+					}
+				}
+			}
+		}
+		return null;
+	}
+}

Added: projects/demos/tapestry-spring-jbpm4/src/test/resources/jbpm/process/Review.jpdl.xml
===================================================================
--- projects/demos/tapestry-spring-jbpm4/src/test/resources/jbpm/process/Review.jpdl.xml	                        (rev 0)
+++ projects/demos/tapestry-spring-jbpm4/src/test/resources/jbpm/process/Review.jpdl.xml	2009-08-25 14:53:07 UTC (rev 5536)
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<process name="Review Process" xmlns="http://jbpm.org/4.0/jpdl">
+
+	<start g="10,10,48,48" name="start review process">
+    	<transition to="Review"/>
+	</start>
+  
+	<task assignee="#{user.userName}" name="Review" g="111,13,80,40">
+		<description>Please review the document.</description>
+		<notification/>
+		<transition to="end"/>-->
+	</task>
+	
+	<end g="238,10,48,48" name="end"/>
+	
+</process>
\ No newline at end of file

Added: projects/demos/tapestry-spring-jbpm4/src/test/resources/jbpm/process/Review.png
===================================================================
(Binary files differ)


Property changes on: projects/demos/tapestry-spring-jbpm4/src/test/resources/jbpm/process/Review.png
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream



More information about the jbpm-commits mailing list