JBoss JBPM SVN: r3075 - in jbpm4/trunk: hudson/hudson-home and 1 other directories.
by do-not-reply@jboss.org
Author: tom.baeyens(a)jboss.com
Date: 2008-11-25 06:05:56 -0500 (Tue, 25 Nov 2008)
New Revision: 3075
Modified:
jbpm4/trunk/build.xml
jbpm4/trunk/hudson/hudson-home/command.sh
jbpm4/trunk/modules/api/pom.xml
Log:
adding schemadoc generation as a profile
Modified: jbpm4/trunk/build.xml
===================================================================
--- jbpm4/trunk/build.xml 2008-11-25 11:05:53 UTC (rev 3074)
+++ jbpm4/trunk/build.xml 2008-11-25 11:05:56 UTC (rev 3075)
@@ -59,7 +59,7 @@
<target name="schemadocs">
<exec executable="cmd" dir="modules/api">
- <arg line="/C mvn package" />
+ <arg line="/C mvn -Pschemadocs package" />
</exec>
<antcall target="show.html">
<param name="page" value="modules/api/target/doc/schemadoc/index.html"/>
Modified: jbpm4/trunk/hudson/hudson-home/command.sh
===================================================================
--- jbpm4/trunk/hudson/hudson-home/command.sh 2008-11-25 11:05:53 UTC (rev 3074)
+++ jbpm4/trunk/hudson/hudson-home/command.sh 2008-11-25 11:05:56 UTC (rev 3075)
@@ -16,7 +16,7 @@
#
cd $JBPMDIR
cp profiles.xml.example profiles.xml
-MVN_CMD="mvn $ENVIRONMENT clean install"
+MVN_CMD="mvn $ENVIRONMENT -DskiptTests clean install"
echo $MVN_CMD; $MVN_CMD 2>&1; MVN_STATUS=$?
if [ $MVN_STATUS -ne 0 ]; then
echo maven exit status $MVN_STATUS
@@ -35,3 +35,12 @@
MVN_CMD="mvn -o $ENVIRONMENT -DtestFailureIgnore=true test"
echo $MVN_CMD; $MVN_CMD 2>&1 | tee $WORKSPACE/tests.log
cat $WORKSPACE/tests.log | egrep FIXME\|FAILED | sort -u | tee $WORKSPACE/fixme.txt
+
+#
+# generate schema docs
+# ( for some reason or another xsddoc has to be called from
+# the modules/api dir and can't be called from the parent
+# project directory )
+#
+MVN_CMD="cd modules/api; mvn $ENVIRONMENT -Pschemadocs package"
+echo $MVN_CMD; $MVN_CMD 2>&1 | tee $WORKSPACE/schemadocs.log
Modified: jbpm4/trunk/modules/api/pom.xml
===================================================================
--- jbpm4/trunk/modules/api/pom.xml 2008-11-25 11:05:53 UTC (rev 3074)
+++ jbpm4/trunk/modules/api/pom.xml 2008-11-25 11:05:56 UTC (rev 3075)
@@ -11,6 +11,7 @@
<!-- $Id$ -->
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+
<modelVersion>4.0.0</modelVersion>
<name>jBPM 4 - API</name>
<groupId>org.jbpm.jbpm4</groupId>
@@ -47,40 +48,6 @@
<build>
<plugins>
<!--
- <plugin>
- <artifactId>maven-antrun-plugin</artifactId>
- <executions>
- <execution>
- <id>generate-jpdlxsd-doc</id>
- <phase>package</phase>
- <goals>
- <goal>run</goal>
- </goals>
- <configuration>
- <tasks>
- <echo message="basedir: ${basedir}" />
- <taskdef name="xsddoc" classname="net.sf.xframe.xsddoc.Task" classpathref="maven.plugin.classpath" />
- <mkdir dir="target/doc/schemadoc" />
- <xsddoc out="${basedir}/target/doc/schemadoc" title="jBPM 4 Schema's" verbose="false">
- <fileset dir="src/main/resources" />
- </xsddoc>
- </tasks>
- </configuration>
- </execution>
- </executions>
- <dependencies>
- <dependency>
- <groupId>xsddoc</groupId>
- <artifactId>xsddoc</artifactId>
- <version>1.0</version>
- </dependency>
- <dependency>
- <groupId>xalan</groupId>
- <artifactId>xalan</artifactId>
- <version>2.7.0</version>
- </dependency>
- </dependencies>
- </plugin>
-->
</plugins>
</build>
@@ -97,5 +64,49 @@
</plugin>
</plugins>
</reporting>
+
+ <profiles>
+ <profile>
+ <id>schemadocs</id>
+ <build>
+ <plugins>
+ <plugin>
+ <artifactId>maven-antrun-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>generate-schemadocs</id>
+ <phase>package</phase>
+ <goals>
+ <goal>run</goal>
+ </goals>
+ <configuration>
+ <tasks>
+ <echo message="basedir: ${basedir}" />
+ <mkdir dir="target/doc/schemadoc" />
+ <taskdef name="xsddoc" classname="net.sf.xframe.xsddoc.Task" classpathref="maven.plugin.classpath" />
+ <xsddoc out="${basedir}/target/doc/schemadoc" title="jBPM 4 Schema's" verbose="false">
+ <fileset dir="src/main/resources" />
+ </xsddoc>
+ </tasks>
+ </configuration>
+ </execution>
+ </executions>
+ <dependencies>
+ <dependency>
+ <groupId>xsddoc</groupId>
+ <artifactId>xsddoc</artifactId>
+ <version>1.0</version>
+ </dependency>
+ <dependency>
+ <groupId>xalan</groupId>
+ <artifactId>xalan</artifactId>
+ <version>2.7.0</version>
+ </dependency>
+ </dependencies>
+ </plugin>
+ </plugins>
+ </build>
+ </profile>
+ </profiles>
</project>
\ No newline at end of file
17 years, 5 months
JBoss JBPM SVN: r3074 - in projects/gwt-console/trunk/server: src/main/java/org/jboss/bpm/console/server and 4 other directories.
by do-not-reply@jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2008-11-25 06:05:53 -0500 (Tue, 25 Nov 2008)
New Revision: 3074
Added:
projects/gwt-console/trunk/server/src/main/java/org/jboss/bpm/console/server/integration/jbpm3/
projects/gwt-console/trunk/server/src/main/java/org/jboss/bpm/console/server/integration/jbpm3/DiagramInfoParser.java
projects/gwt-console/trunk/server/src/main/java/org/jboss/bpm/console/server/integration/jbpm3/GetGroupMembershipCommand.java
projects/gwt-console/trunk/server/src/main/java/org/jboss/bpm/console/server/integration/jbpm3/GetUsersForGroupCommand.java
projects/gwt-console/trunk/server/src/main/java/org/jboss/bpm/console/server/integration/jbpm3/JBPM3CommandDelegate.java
projects/gwt-console/trunk/server/src/main/java/org/jboss/bpm/console/server/integration/jbpm3/JBPM3FormParser.java
projects/gwt-console/trunk/server/src/main/java/org/jboss/bpm/console/server/integration/jbpm3/JBPM3ManagementExtension.java
projects/gwt-console/trunk/server/src/main/java/org/jboss/bpm/console/server/integration/jbpm3/JBPM3ManagementFactory.java
projects/gwt-console/trunk/server/src/main/java/org/jboss/bpm/console/server/integration/jbpm3/JBPM3ProcessManagement.java
projects/gwt-console/trunk/server/src/main/java/org/jboss/bpm/console/server/integration/jbpm3/JBPM3TaskManagement.java
projects/gwt-console/trunk/server/src/main/java/org/jboss/bpm/console/server/integration/jbpm3/JBPM3UserManagement.java
projects/gwt-console/trunk/server/src/main/java/org/jboss/bpm/console/server/integration/jbpm3/Transform.java
projects/gwt-console/trunk/server/src/main/java/org/jboss/bpm/console/server/integration/jbpm3/cmd/
projects/gwt-console/trunk/server/src/main/java/org/jboss/bpm/console/server/integration/spec/
projects/gwt-console/trunk/server/src/main/java/org/jboss/bpm/console/server/integration/spec/ProcessManagementImpl.java
Removed:
projects/gwt-console/trunk/server/src/main/java/org/jboss/bpm/console/server/integration/internal/
projects/gwt-console/trunk/server/src/main/java/org/jboss/bpm/console/server/integration/jbpm3/cmd/GetGroupMembershipCommand.java
projects/gwt-console/trunk/server/src/main/java/org/jboss/bpm/console/server/integration/jbpm3/cmd/GetUsersForGroupCommand.java
Modified:
projects/gwt-console/trunk/server/pom.xml
projects/gwt-console/trunk/server/src/main/java/org/jboss/bpm/console/server/TaskMgmtFacade.java
projects/gwt-console/trunk/server/src/main/java/org/jboss/bpm/console/server/integration/ManagementFactory.java
Log:
Add jBPM spec integration
Modified: projects/gwt-console/trunk/server/pom.xml
===================================================================
--- projects/gwt-console/trunk/server/pom.xml 2008-11-25 10:29:55 UTC (rev 3073)
+++ projects/gwt-console/trunk/server/pom.xml 2008-11-25 11:05:53 UTC (rev 3074)
@@ -18,7 +18,6 @@
</parent>
<dependencies>
-
<!-- Module -->
<dependency>
<groupId>org.jbpm.jbpm3</groupId>
@@ -42,8 +41,13 @@
<artifactId>jbpm-identity</artifactId>
<scope>provided</scope>
</dependency>
+ <dependency>
+ <groupId>org.jbpm.jbpm4</groupId>
+ <artifactId>jbpm-spec-api</artifactId>
+ <version>${version}</version>
+ <scope>provided</scope>
+ </dependency>
-
<!-- GWT related -->
<dependency>
<groupId>com.google.gwt</groupId>
Modified: projects/gwt-console/trunk/server/src/main/java/org/jboss/bpm/console/server/TaskMgmtFacade.java
===================================================================
--- projects/gwt-console/trunk/server/src/main/java/org/jboss/bpm/console/server/TaskMgmtFacade.java 2008-11-25 10:29:55 UTC (rev 3073)
+++ projects/gwt-console/trunk/server/src/main/java/org/jboss/bpm/console/server/TaskMgmtFacade.java 2008-11-25 11:05:53 UTC (rev 3074)
@@ -32,7 +32,7 @@
import org.jboss.bpm.console.server.integration.JBPM3Extension;
import org.jboss.bpm.console.server.integration.ManagementFactory;
import org.jboss.bpm.console.server.integration.TaskManagement;
-import org.jboss.bpm.console.server.integration.internal.JBPM3FormParser;
+import org.jboss.bpm.console.server.integration.jbpm3.JBPM3FormParser;
import javax.ws.rs.*;
import javax.ws.rs.core.Response;
Modified: projects/gwt-console/trunk/server/src/main/java/org/jboss/bpm/console/server/integration/ManagementFactory.java
===================================================================
--- projects/gwt-console/trunk/server/src/main/java/org/jboss/bpm/console/server/integration/ManagementFactory.java 2008-11-25 10:29:55 UTC (rev 3073)
+++ projects/gwt-console/trunk/server/src/main/java/org/jboss/bpm/console/server/integration/ManagementFactory.java 2008-11-25 11:05:53 UTC (rev 3074)
@@ -25,7 +25,7 @@
/**
* Construct management implementations.
- * Defaults to <code>org.jboss.bpm.console.server.integration.internal.JBPM3ManagementFactory</code>
+ * Defaults to <code>org.jboss.bpm.console.server.integration.jbpm3.JBPM3ManagementFactory</code>
*
* @see org.jboss.bpm.console.server.util.ServiceLoader
*
@@ -33,7 +33,7 @@
*/
public abstract class ManagementFactory
{
- private static final String DEFAULT_FACTORY = "org.jboss.bpm.console.server.integration.internal.JBPM3ManagementFactory";
+ private static final String DEFAULT_FACTORY = "org.jboss.bpm.console.server.integration.jbpm3.JBPM3ManagementFactory";
public abstract ProcessManagement createProcessManagement();
Copied: projects/gwt-console/trunk/server/src/main/java/org/jboss/bpm/console/server/integration/jbpm3/DiagramInfoParser.java (from rev 3072, projects/gwt-console/trunk/server/src/main/java/org/jboss/bpm/console/server/integration/internal/DiagramInfoParser.java)
===================================================================
--- projects/gwt-console/trunk/server/src/main/java/org/jboss/bpm/console/server/integration/jbpm3/DiagramInfoParser.java (rev 0)
+++ projects/gwt-console/trunk/server/src/main/java/org/jboss/bpm/console/server/integration/jbpm3/DiagramInfoParser.java 2008-11-25 11:05:53 UTC (rev 3074)
@@ -0,0 +1,91 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.bpm.console.server.integration.jbpm3;
+
+import org.jboss.bpm.console.client.model.jbpm3.DiagramInfo;
+import org.jboss.bpm.console.client.model.jbpm3.DiagramNodeInfo;
+import org.jbpm.util.XmlUtil;
+import org.w3c.dom.Document;
+import org.w3c.dom.Element;
+import org.w3c.dom.Node;
+import org.w3c.dom.NodeList;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * @author Heiko.Braun <heiko.braun(a)jboss.com>
+ */
+class DiagramInfoParser
+{
+ /**
+ * Will close the stream after successfull read
+ * @param in
+ * @return
+ */
+ public static DiagramInfo parse(InputStream in )
+ {
+ Document document = XmlUtil.parseXmlInputStream(in);
+ Element processDiagramElement = document.getDocumentElement();
+ final String widthString = processDiagramElement.getAttribute("width");
+ final String heightString = processDiagramElement.getAttribute("height");
+ final List<DiagramNodeInfo> diagramNodeInfoList = new ArrayList<DiagramNodeInfo>();
+ final NodeList nodeNodeList = processDiagramElement.getElementsByTagName("node");
+ final int nodeNodeListLength = nodeNodeList.getLength();
+ for (int i = 0; i < nodeNodeListLength; i ++) {
+ final Node nodeNode = nodeNodeList.item(i);
+ if (nodeNode instanceof Node && nodeNode.getParentNode() == processDiagramElement) {
+ final Element nodeElement = (Element) nodeNode;
+ final String nodeName = nodeElement.getAttribute("name");
+ final String nodeXString = nodeElement.getAttribute("x");
+ final String nodeYString = nodeElement.getAttribute("y");
+ final String nodeWidthString = nodeElement.getAttribute("width");
+ final String nodeHeightString = nodeElement.getAttribute("height");
+ final DiagramNodeInfo nodeInfo = new DiagramNodeInfo(
+ nodeName,
+ Integer.parseInt(nodeXString),
+ Integer.parseInt(nodeYString),
+ Integer.parseInt(nodeWidthString),
+ Integer.parseInt(nodeHeightString)
+ );
+ diagramNodeInfoList.add(nodeInfo);
+ }
+ }
+ DiagramInfo diagramInfo = new DiagramInfo(
+ Integer.parseInt(heightString),
+ Integer.parseInt(widthString),
+ diagramNodeInfoList
+ );
+
+ try
+ {
+ in.close();
+ } catch (IOException e)
+ {
+ throw new RuntimeException("Failed to close stream", e);
+ }
+
+ return diagramInfo;
+ }
+}
Added: projects/gwt-console/trunk/server/src/main/java/org/jboss/bpm/console/server/integration/jbpm3/GetGroupMembershipCommand.java
===================================================================
--- projects/gwt-console/trunk/server/src/main/java/org/jboss/bpm/console/server/integration/jbpm3/GetGroupMembershipCommand.java (rev 0)
+++ projects/gwt-console/trunk/server/src/main/java/org/jboss/bpm/console/server/integration/jbpm3/GetGroupMembershipCommand.java 2008-11-25 11:05:53 UTC (rev 3074)
@@ -0,0 +1,72 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.bpm.console.server.integration.jbpm3;
+
+import org.jbpm.JbpmContext;
+import org.jbpm.command.AbstractGetObjectBaseCommand;
+import org.jbpm.command.Command;
+import org.jbpm.identity.Group;
+import org.jbpm.identity.User;
+import org.jbpm.identity.hibernate.IdentitySession;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Set;
+
+/**
+ * TODO: Group resolution should be pluggable
+ *
+ * @author Heiko.Braun <heiko.braun(a)jboss.com>
+ */
+public class GetGroupMembershipCommand extends AbstractGetObjectBaseCommand implements Command
+{
+ private static final long serialVersionUID = -1627380259541998349L;
+
+ private String actorName;
+
+ public GetGroupMembershipCommand(String actorName)
+ {
+ super();
+ this.actorName = actorName;
+ }
+
+ public Object execute(JbpmContext jbpmContext) throws Exception
+ {
+ List<String> groupNames = new ArrayList<String>();
+
+ setJbpmContext(jbpmContext);
+
+ IdentitySession session = new IdentitySession(
+ jbpmContext.getSession()
+ );
+
+ User user = session.getUserByName(actorName);
+ Set<Group> groups = (Set<Group>)user.getGroupsForGroupType("organisation");
+
+ for(Group g : groups)
+ {
+ groupNames.add(g.getName());
+ }
+
+ return groupNames;
+ }
+}
Property changes on: projects/gwt-console/trunk/server/src/main/java/org/jboss/bpm/console/server/integration/jbpm3/GetGroupMembershipCommand.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: projects/gwt-console/trunk/server/src/main/java/org/jboss/bpm/console/server/integration/jbpm3/GetUsersForGroupCommand.java
===================================================================
--- projects/gwt-console/trunk/server/src/main/java/org/jboss/bpm/console/server/integration/jbpm3/GetUsersForGroupCommand.java (rev 0)
+++ projects/gwt-console/trunk/server/src/main/java/org/jboss/bpm/console/server/integration/jbpm3/GetUsersForGroupCommand.java 2008-11-25 11:05:53 UTC (rev 3074)
@@ -0,0 +1,71 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.bpm.console.server.integration.jbpm3;
+
+import org.jbpm.JbpmContext;
+import org.jbpm.command.AbstractGetObjectBaseCommand;
+import org.jbpm.command.Command;
+import org.jbpm.identity.Group;
+import org.jbpm.identity.User;
+import org.jbpm.identity.hibernate.IdentitySession;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Set;
+
+/**
+ * TODO: Group resolution should be pluggable
+ *
+ * @author Heiko.Braun <heiko.braun(a)jboss.com>
+ */
+public class GetUsersForGroupCommand extends AbstractGetObjectBaseCommand implements Command
+{
+ private static final long serialVersionUID = -1627380259541998349L;
+
+ private String groupName;
+
+ public GetUsersForGroupCommand(String groupName)
+ {
+ super();
+ this.groupName = groupName;
+ }
+
+ public Object execute(JbpmContext jbpmContext) throws Exception
+ {
+ List<String> userNames = new ArrayList<String>();
+
+ setJbpmContext(jbpmContext);
+
+ IdentitySession session = new IdentitySession(
+ jbpmContext.getSession()
+ );
+
+ Group group = session.getGroupByName(groupName);
+ Set<User> users = group.getUsers();
+ for(User u : users)
+ {
+ userNames.add(u.getName());
+ }
+
+ return userNames;
+ }
+}
Property changes on: projects/gwt-console/trunk/server/src/main/java/org/jboss/bpm/console/server/integration/jbpm3/GetUsersForGroupCommand.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Copied: projects/gwt-console/trunk/server/src/main/java/org/jboss/bpm/console/server/integration/jbpm3/JBPM3CommandDelegate.java (from rev 3073, projects/gwt-console/trunk/server/src/main/java/org/jboss/bpm/console/server/integration/internal/JBPM3CommandDelegate.java)
===================================================================
--- projects/gwt-console/trunk/server/src/main/java/org/jboss/bpm/console/server/integration/jbpm3/JBPM3CommandDelegate.java (rev 0)
+++ projects/gwt-console/trunk/server/src/main/java/org/jboss/bpm/console/server/integration/jbpm3/JBPM3CommandDelegate.java 2008-11-25 11:05:53 UTC (rev 3074)
@@ -0,0 +1,242 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.bpm.console.server.integration.jbpm3;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import javax.ejb.CreateException;
+
+import org.jboss.bpm.console.server.util.ServiceLocator;
+import org.jbpm.command.CancelWorkOnTaskCommand;
+import org.jbpm.command.DeleteProcessDefinitionCommand;
+import org.jbpm.command.DeployProcessCommand;
+import org.jbpm.command.GetProcessDefinitionCommand;
+import org.jbpm.command.GetProcessDefinitionsCommand;
+import org.jbpm.command.GetProcessInstanceCommand;
+import org.jbpm.command.GetProcessInstancesCommand;
+import org.jbpm.command.GetTaskInstanceCommand;
+import org.jbpm.command.GetTaskListCommand;
+import org.jbpm.command.NewProcessInstanceCommand;
+import org.jbpm.command.SignalCommand;
+import org.jbpm.command.StartWorkOnTaskCommand;
+import org.jbpm.command.TaskInstanceEndCommand;
+import org.jbpm.ejb.LocalCommandService;
+import org.jbpm.ejb.LocalCommandServiceHome;
+import org.jbpm.graph.def.ProcessDefinition;
+import org.jbpm.graph.exe.ProcessInstance;
+import org.jbpm.taskmgmt.exe.TaskInstance;
+
+/**
+ * Adopts a business interface to the command facade.<br>
+ * Depends on the CommandServiceBean (<code>java:ejb/CommandServiceBean</code>).
+ * @author Heiko.Braun <heiko.braun(a)jboss.com>
+ */
+class JBPM3CommandDelegate
+{
+ private LocalCommandService facade;
+ private static final String DEFAULT_JNDI_NAME = "java:ejb/CommandServiceBean";
+
+ /**
+ * Lookup with particluar JNDI name.
+ * @param jndiName
+ */
+ public JBPM3CommandDelegate(String jndiName)
+ {
+ ejbLookup(jndiName);
+ }
+
+ /**
+ * Lookup using default JNDI name.
+ *
+ * @see #DEFAULT_JNDI_NAME
+ */
+
+ public JBPM3CommandDelegate()
+ {
+ ejbLookup(DEFAULT_JNDI_NAME);
+ }
+
+ private void ejbLookup(String jndiName)
+ {
+ try
+ {
+ LocalCommandServiceHome home = (LocalCommandServiceHome)
+ ServiceLocator.getEjbLocalHome(jndiName);
+ this.facade = home.create();
+ }
+ catch (CreateException e)
+ {
+ throw new RuntimeException("Failed to create LocalCommandService", e);
+ }
+ }
+
+ public List<ProcessDefinition> getActualDefinitions()
+ {
+ List<ProcessDefinition> defs = (List<ProcessDefinition>)
+ facade.execute( new GetProcessDefinitionsCommand(false) );
+ return defs;
+ }
+
+ public ProcessDefinition getActualDefinition(String name)
+ {
+ ProcessDefinition def = (ProcessDefinition)
+ facade.execute( new GetProcessDefinitionCommand(name) );
+ return def;
+ }
+
+ public ProcessDefinition getActualDefinition(long processId)
+ {
+ List<ProcessDefinition> defs = getActualDefinitions();
+
+ ProcessDefinition match = null;
+ for(ProcessDefinition p0 : defs)
+ {
+ if(processId == p0.getId())
+ {
+ match = p0;
+ break;
+ }
+ }
+
+ if(null==match)
+ throw new IllegalArgumentException("No process definition with ID " + processId);
+
+ return match;
+ }
+
+ public void removeActualDefinition(long processId)
+ {
+ ProcessDefinition def = getActualDefinition(processId);
+ facade.execute( new DeleteProcessDefinitionCommand(processId));
+ }
+
+ public org.jbpm.graph.exe.ProcessInstance getActualInstance(long instanceId)
+ {
+ ProcessInstance instance = (ProcessInstance)
+ facade.execute( new GetProcessInstanceCommand(instanceId));
+ return instance;
+ }
+
+ public List<ProcessInstance> getActualInstances(long processId)
+ {
+ ProcessDefinition p0 = getActualDefinition(processId);
+ GetProcessInstancesCommand command = new GetProcessInstancesCommand();
+ command.setProcessId(processId);
+
+ List<ProcessInstance> instances =
+ (List<ProcessInstance>) facade.execute(command);
+
+ return instances;
+ }
+
+ public ProcessInstance startNewInstance(long processId)
+ {
+ ProcessDefinition p0 = getActualDefinition(processId);
+ ProcessInstance instance = (ProcessInstance)
+ facade.execute(new NewProcessInstanceCommand(p0.getName()));
+
+ return instance;
+ }
+
+ public ProcessDefinition deploy(byte[] data)
+ {
+ ProcessDefinition p0 = (ProcessDefinition)
+ facade.execute(
+ new DeployProcessCommand(data)
+ );
+ return p0;
+ }
+
+ public List<TaskInstance> getActualTasksForActor(String actorName)
+ {
+
+ List<String> groupNames = getGroupsForActor(actorName);
+
+ String[] actors = new String[groupNames.size()+1];
+ int i=0;
+ for(String s : groupNames)
+ {
+ actors[i] = s;
+ i++;
+ }
+
+ actors[i] = actorName; // all groups & the username
+
+ List<TaskInstance> tasks = new ArrayList<TaskInstance>();
+ GetTaskListCommand command = new GetTaskListCommand(actors);
+ tasks.addAll( (List<TaskInstance>) facade.execute(command));
+ return tasks;
+ }
+
+ public List<String> getGroupsForActor(String actorName)
+ {
+ List<String> groupNames = (List<String>)facade.execute(
+ new GetGroupMembershipCommand(actorName)
+ );
+ return groupNames;
+ }
+
+ public List<String> getActorsForGroup(String groupName)
+ {
+ List<String> actorIds = (List<String>)facade.execute(
+ new GetUsersForGroupCommand(groupName)
+ );
+ return actorIds;
+ }
+
+ public TaskInstance getTaskById(long taskId)
+ {
+ // include variables, but no logs
+ return (TaskInstance) facade.execute( new GetTaskInstanceCommand(taskId, true, false));
+ }
+
+ public void assignTask(long taskId, String actorId)
+ {
+ if(actorId!=null)
+ {
+ StartWorkOnTaskCommand command = new StartWorkOnTaskCommand(taskId, true);
+ command.setActorId(actorId);
+ facade.execute(command);
+ }
+ else
+ {
+ CancelWorkOnTaskCommand command = new CancelWorkOnTaskCommand(taskId);
+ facade.execute(command);
+ }
+ }
+
+ public void signalToken(long tokenId, String signalName)
+ {
+ SignalCommand command = new SignalCommand(tokenId, signalName);
+ facade.execute(command);
+ }
+
+ public void endTask(long taskId, String signalName)
+ {
+ TaskInstanceEndCommand command = new TaskInstanceEndCommand();
+ command.setTaskInstanceId(taskId);
+ command.setTransitionName(signalName);
+
+ facade.execute(command);
+ }
+}
Copied: projects/gwt-console/trunk/server/src/main/java/org/jboss/bpm/console/server/integration/jbpm3/JBPM3FormParser.java (from rev 3072, projects/gwt-console/trunk/server/src/main/java/org/jboss/bpm/console/server/integration/internal/JBPM3FormParser.java)
===================================================================
--- projects/gwt-console/trunk/server/src/main/java/org/jboss/bpm/console/server/integration/jbpm3/JBPM3FormParser.java (rev 0)
+++ projects/gwt-console/trunk/server/src/main/java/org/jboss/bpm/console/server/integration/jbpm3/JBPM3FormParser.java 2008-11-25 11:05:53 UTC (rev 3074)
@@ -0,0 +1,314 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.bpm.console.server.integration.jbpm3;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.jboss.bpm.console.client.model.forms.FieldDef;
+import org.jboss.bpm.console.server.util.DOMUtils;
+import org.w3c.dom.Element;
+
+import java.io.ByteArrayInputStream;
+import java.io.InputStream;
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+
+/**
+ * @author Heiko.Braun <heiko.braun(a)jboss.com>
+ */
+public class JBPM3FormParser
+{
+ private static final Log log = LogFactory.getLog(JBPM3FormParser.class);
+
+ private final String JSF_FACET_NAME = "facet";
+ private final static String[] JSF_TEXT_NAMES = {"outputText", "inputText"};
+ private final static String[] JSF_TEXTAREA_NAMES = { "outputTextarea","inputTextarea"};
+ private final static String[] JSF_BOOLEAN_NAMES = {"selectBooleanCheckbox"};
+ private final static String[] JSF_BUTTON_NAMES = {"saveButton", "transitionButton"};
+
+ private List<FieldDef> inputFields = new ArrayList<FieldDef>();
+ private List<InputButton> inputButtons = new ArrayList<InputButton>();
+
+ static String test = "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n" +
+ "\n" +
+ "<html xmlns=\"http://www.w3.org/1999/xhtml\"\n" +
+ "\txmlns:ui=\"http://java.sun.com/jsf/facelets\"\n" +
+ "\txmlns:c=\"http://java.sun.com/jstl/core\"\n" +
+ "\txmlns:h=\"http://java.sun.com/jsf/html\"\n" +
+ "\txmlns:f=\"http://java.sun.com/jsf/core\"\n" +
+ "\txmlns:tf=\"http://jbpm.org/jsf/tf\" xmlns:jbpm=\"http://jbpm.org/jsf\">\n" +
+ "<ui:component>\n" +
+ "\t<jbpm:dataform>\n" +
+ "\t\t<f:facet name=\"header\">\n" +
+ "\t\t\t<h:outputText value=\"#{taskName}\" />\n" +
+ "\t\t</f:facet>\n" +
+ "\t\t<jbpm:datacell>\n" +
+ "\t\t\t<f:facet name=\"header\">\n" +
+ "\t\t\t\t<h:outputText value=\"Purpose:\" />\n" +
+ "\t\t\t</f:facet>\n" +
+ "\t\t\t<h:outputText value=\"#{var['purpose']}\" />\n" +
+ "\t\t</jbpm:datacell>\n" +
+ "\t\t<jbpm:datacell>\n" +
+ "\t\t\t<f:facet name=\"header\">\n" +
+ "\t\t\t\t<h:outputText value=\"Description:\" />\n" +
+ "\t\t\t</f:facet>\n" +
+ "\t\t\t<h:outputText value=\"#{var['purpose']}\" />\n" +
+ "\t\t</jbpm:datacell>\n" +
+ "\t\t<jbpm:datacell>\n" +
+ "\t\t\t<f:facet name=\"header\">\n" +
+ "\t\t\t\t<h:outputText value=\"Self Paid\" />\n" +
+ "\t\t\t</f:facet>\n" +
+ "\t\t\t<h:selectBooleanCheckbox value=\"#{var['selfPaid']}\" disabled=\"true\" />\n" +
+ "\t\t</jbpm:datacell>\n" +
+ "\t\t<jbpm:datacell>\n" +
+ "\t\t\t<f:facet name=\"header\">\n" +
+ "\t\t\t\t<h:outputText value=\"Departure date\" />\n" +
+ "\t\t\t</f:facet>\n" +
+ "\t\t\t<h:outputText value=\"#{var['departureDate']}\" />\n" +
+ "\t\t</jbpm:datacell>\n" +
+ "\t\t<jbpm:datacell>\n" +
+ "\t\t\t<f:facet name=\"header\">\n" +
+ "\t\t\t\t<h:outputText value=\"Number of days\" />\n" +
+ "\t\t\t</f:facet>\n" +
+ "\t\t\t<h:outputText value=\"#{var['daysNum']}\" />\n" +
+ "\t\t</jbpm:datacell>\n" +
+ "\t\t<jbpm:datacell>\n" +
+ "\t\t\t<f:facet name=\"header\">\n" +
+ "\t\t\t\t<h:outputText value=\"Destination\" />\n" +
+ "\t\t\t</f:facet>\n" +
+ "\t\t\t<h:outputText value=\"#{var['country']}\" />\n" +
+ "\t\t</jbpm:datacell>\n" +
+ "\t\t<jbpm:datacell>\n" +
+ " <f:facet name=\"header\">\n" +
+ " <h:outputText value=\"City:\" />\n" +
+ " </f:facet>\n" +
+ " <h:outputText value=\"#{var['city']}\" />\n" +
+ " </jbpm:datacell>\n" +
+ "\t\t<jbpm:datacell>\n" +
+ "\t\t\t<f:facet name=\"header\">\n" +
+ "\t\t\t\t<h:outputText value=\"Actions:\" />\n" +
+ "\t\t\t</f:facet>\n" +
+ "\t\t\t<tf:saveButton value=\"Save\" />\n" +
+ "\t\t\t<tf:transitionButton value=\"Approve\" transition=\"approve\" />\n" +
+ "\t\t\t<tf:transitionButton value=\"Reject\" transition=\"reject\" />\n" +
+ "\t\t</jbpm:datacell>\n" +
+ "\t</jbpm:dataform>\n" +
+ "</ui:component>\n" +
+ "</html>";
+
+ public static void main(String[] args) throws Exception
+ {
+ JBPM3FormParser p = new JBPM3FormParser();
+ p.parse( new ByteArrayInputStream(test.getBytes()));
+ p.visitResults(
+ new ParseResultVisitor()
+ {
+ public void onInputField(FieldDef field)
+ {
+ log.debug(field);
+
+ }
+
+ public void onInputButton(InputButton btn)
+ {
+ log.debug(btn);
+ }
+ }
+ );
+ }
+
+ public void parse(InputStream in) throws Exception
+ {
+ Element root = DOMUtils.parse(in);
+ Element comp = DOMUtils.getFirstChildElement(root, "component");
+ Element dataForm = DOMUtils.getFirstChildElement(comp, "dataform");
+
+ Iterator<Element> it = DOMUtils.getChildElements(dataForm, "datacell");
+ while(it.hasNext())
+ {
+ parseDatacell(it.next());
+ }
+
+ }
+
+ private String lastFieldName = null; // TODO: cleanup
+ private void parseDatacell(Element datacell)
+ {
+
+ Iterator<Element> it = DOMUtils.getChildElements(datacell);
+ while(it.hasNext())
+ {
+ Element next = it.next();
+
+ // skip facet
+ String nodeName = next.getLocalName();
+
+ if(JSF_FACET_NAME.equals(nodeName))
+ {
+ lastFieldName = parseFieldName(next);
+ continue;
+ }
+
+ for(String textName : JSF_TEXT_NAMES)
+ {
+ if(textName.equals(nodeName))
+ {
+ parseTextInputField(next);
+ continue;
+ }
+
+ }
+
+ for(String textName : JSF_TEXTAREA_NAMES)
+ {
+ if(textName.equals(nodeName))
+ {
+ parseTextAreaField(next);
+ continue;
+ }
+
+ }
+
+ for(String textName : JSF_BUTTON_NAMES)
+ {
+ if(textName.equals(nodeName))
+ {
+ parseButtonInputField(next);
+ continue;
+ }
+ }
+
+ for(String textName : JSF_BOOLEAN_NAMES)
+ {
+ if(textName.equals(nodeName))
+ {
+ parseBooleanInputField(next);
+ continue;
+ }
+ }
+ }
+
+ }
+
+ public void visitResults(ParseResultVisitor visitor)
+ {
+ for(FieldDef field : inputFields)
+ visitor.onInputField(field);
+
+ for(InputButton btn : inputButtons)
+ visitor.onInputButton(btn);
+ }
+
+ public void reset()
+ {
+ this.inputButtons.clear();
+ this.inputFields.clear();
+ }
+
+
+ private void parseTextAreaField(Element next)
+ {
+ String varName = getTrimmedVarname(next);
+ inputFields.add( new FieldDef(lastFieldName,varName, FieldDef.InputType.TEXTAREA, String.class.getName(), true));
+ }
+
+ private String getTrimmedVarname(Element next)
+ {
+ String s = DOMUtils.getAttributeValue(next, "value");
+ return trimVarName(s);
+ }
+
+ private void parseBooleanInputField(Element next)
+ {
+ String varName = getTrimmedVarname(next);
+ inputFields.add( new FieldDef(lastFieldName,varName, FieldDef.InputType.BOOL, Boolean.class.getName(), false));
+ }
+
+ private void parseButtonInputField(Element next)
+ {
+ String name = getTrimmedVarname(next);
+ String transition = DOMUtils.getAttributeValue(next, "transition");
+ inputButtons.add( new InputButton(name, transition));
+ }
+
+ private void parseTextInputField(Element next)
+ {
+ String varName = getTrimmedVarname(next);
+ inputFields.add( new FieldDef(lastFieldName, varName, FieldDef.InputType.TEXT, String.class.getName(), true));
+ }
+
+ private String parseFieldName(Element facet)
+ {
+ String fieldName = "UNKOWN_FIELDNAME";
+ if("header".equals( facet.getAttribute("name")))
+ {
+ Element outputText = DOMUtils.getFirstChildElement(facet, "outputText");
+ if(outputText!=null)
+ {
+ fieldName = DOMUtils.getAttributeValue(outputText, "value");
+ }
+ }
+
+ return fieldName;
+ }
+
+
+ public final class InputButton
+ {
+ String name;
+ String transition;
+
+ public InputButton(String name, String transition)
+ {
+ this.name = name;
+ this.transition = transition;
+ }
+
+ public boolean hasTransition()
+ {
+ return transition!=null;
+ }
+
+ public String toString()
+ {
+ return "Button{"+name+": "+transition+"}";
+ }
+ }
+
+ public interface ParseResultVisitor
+ {
+ void onInputField(FieldDef field);
+ void onInputButton(InputButton btn);
+ }
+
+ private static String trimVarName(String name)
+ {
+ String result = name;
+ if(name.startsWith("#{var['"))
+ {
+ result = name.substring(7, name.length()-3);
+ }
+
+ return result;
+ }
+}
Copied: projects/gwt-console/trunk/server/src/main/java/org/jboss/bpm/console/server/integration/jbpm3/JBPM3ManagementExtension.java (from rev 3072, projects/gwt-console/trunk/server/src/main/java/org/jboss/bpm/console/server/integration/internal/JBPM3ManagementExtension.java)
===================================================================
--- projects/gwt-console/trunk/server/src/main/java/org/jboss/bpm/console/server/integration/jbpm3/JBPM3ManagementExtension.java (rev 0)
+++ projects/gwt-console/trunk/server/src/main/java/org/jboss/bpm/console/server/integration/jbpm3/JBPM3ManagementExtension.java 2008-11-25 11:05:53 UTC (rev 3074)
@@ -0,0 +1,165 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.bpm.console.server.integration.jbpm3;
+
+import org.jboss.bpm.console.client.model.ProcessInstanceRef;
+import org.jboss.bpm.console.client.model.jbpm3.ActiveNodeInfo;
+import org.jboss.bpm.console.client.model.jbpm3.DiagramInfo;
+import org.jboss.bpm.console.client.model.jbpm3.DiagramNodeInfo;
+import org.jboss.bpm.console.server.integration.JBPM3Extension;
+import org.jbpm.file.def.FileDefinition;
+import org.jbpm.graph.def.ProcessDefinition;
+import org.jbpm.graph.exe.ProcessInstance;
+import org.jbpm.util.XmlUtil;
+import org.jbpm.taskmgmt.exe.TaskInstance;
+import org.w3c.dom.Document;
+import org.w3c.dom.Element;
+import org.w3c.dom.NodeList;
+
+import java.io.InputStream;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * @author Heiko.Braun <heiko.braun(a)jboss.com>
+ */
+public class JBPM3ManagementExtension implements JBPM3Extension
+{
+ private JBPM3CommandDelegate delegate;
+
+ private static final String PROCESSIMAGE_FILENAME = "processimage.jpg";
+ private static final String GPD_XML_FILENAME = "gpd.xml";
+
+ public JBPM3ManagementExtension()
+ {
+ this.delegate = new JBPM3CommandDelegate();
+ }
+
+ public byte[] getProcessImage(long processId)
+ {
+ ProcessDefinition p0 = delegate.getActualDefinition(processId);
+ return p0.getFileDefinition().getBytes(PROCESSIMAGE_FILENAME);
+ }
+
+ public DiagramInfo getDiagramInfo(long processId)
+ {
+ ProcessDefinition p0 = delegate.getActualDefinition(processId);
+ InputStream in = p0.getFileDefinition().getInputStream(GPD_XML_FILENAME);
+ return DiagramInfoParser.parse(in);
+ }
+
+ public ActiveNodeInfo getActivNodeInfo(long instanceId)
+ {
+ ProcessInstance instance = delegate.getActualInstance(instanceId);
+ String currentNodeName = instance.getRootToken().getNode().getName();
+
+ DiagramInfo diagram = getDiagramInfo(instance.getProcessDefinition().getId());
+ List<DiagramNodeInfo> nodes = diagram.getNodeList();
+
+ DiagramNodeInfo activeNode = null;
+ int i = 0;
+ for(DiagramNodeInfo n : nodes)
+ {
+ if(currentNodeName.equals(n.getName()))
+ {
+ activeNode = n;
+ break;
+ }
+ }
+
+ if(null==activeNode)
+ throw new RuntimeException("Failed to retrieve activeNodeInfo for instance " + instanceId);
+
+ return new ActiveNodeInfo(diagram.getWidth(), diagram.getHeight(), activeNode);
+ }
+
+ public Map<String, String> getAvailableTaskForms(long processId)
+ {
+ ProcessDefinition processDefinition = delegate.getActualDefinition(processId);
+
+ return getTask2FileMapping(processDefinition);
+ }
+
+ private Map<String, String> getTask2FileMapping(ProcessDefinition processDefinition)
+ {
+ Map<String, String> result = new HashMap<String, String>();
+
+ final FileDefinition fileDefinition = processDefinition.getFileDefinition();
+ if (! fileDefinition.hasFile("forms.xml"))
+ {
+ // exit with empty list
+ // TODO: maybe an exception is better?
+ return result;
+ }
+
+ final InputStream inputStream = fileDefinition.getInputStream("forms.xml");
+ if (inputStream == null)
+ {
+ throw new RuntimeException("Failed to open stream on forms.xml");
+ }
+
+ final Document document = XmlUtil.parseXmlInputStream(inputStream);
+ final Element documentElement = document.getDocumentElement();
+ final NodeList nodeList = documentElement.getElementsByTagName("form");
+ final int length = nodeList.getLength();
+ for (int i = 0; i < length; i ++)
+ {
+ final Element element = (Element) nodeList.item(i);
+ final String itemTaskName = element.getAttribute("task");
+ final String itemFormName = element.getAttribute("form");
+ if (itemTaskName == null || itemFormName == null) {
+ continue;
+ }
+ result.put(itemTaskName, itemFormName);
+ }
+ return result;
+ }
+
+ public byte[] getTaskFormByTaskName(long processId, long taskId)
+ {
+ ProcessDefinition processDefinition = delegate.getActualDefinition(processId);
+ TaskInstance t0 = delegate.getTaskById(taskId);
+
+ Map<String,String> fileMapping = getTask2FileMapping(processDefinition);
+ String fileName = fileMapping.get(t0.getName());
+ if(fileName !=null)
+ return processDefinition.getFileDefinition().getBytes(fileName);
+ else
+ throw new RuntimeException("No form definition for taskId '"+taskId+"'");
+
+ }
+
+ public void changeInstanceState(long instanceId, ProcessInstanceRef.STATE nextState)
+ {
+ ProcessInstance p0 = delegate.getActualInstance(instanceId);
+ Transform.doTransition(p0, nextState); // modifies the actual PI
+
+ // TX commit will persist changes to the actual PI
+ }
+
+ public org.jboss.bpm.console.client.model.ProcessDefinitionRef deployNewDefinition(byte[] data)
+ {
+ ProcessDefinition p0 = delegate.deploy(data);
+ return Transform.processDefinition(p0);
+ }
+}
Copied: projects/gwt-console/trunk/server/src/main/java/org/jboss/bpm/console/server/integration/jbpm3/JBPM3ManagementFactory.java (from rev 3072, projects/gwt-console/trunk/server/src/main/java/org/jboss/bpm/console/server/integration/internal/JBPM3ManagementFactory.java)
===================================================================
--- projects/gwt-console/trunk/server/src/main/java/org/jboss/bpm/console/server/integration/jbpm3/JBPM3ManagementFactory.java (rev 0)
+++ projects/gwt-console/trunk/server/src/main/java/org/jboss/bpm/console/server/integration/jbpm3/JBPM3ManagementFactory.java 2008-11-25 11:05:53 UTC (rev 3074)
@@ -0,0 +1,54 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.bpm.console.server.integration.jbpm3;
+
+import org.jboss.bpm.console.server.integration.*;
+
+/**
+ * Wraps management instances in {@link org.jboss.bpm.console.server.integration.InvocationProxy}
+ * @author Heiko.Braun <heiko.braun(a)jboss.com>
+ */
+public class JBPM3ManagementFactory extends ManagementFactory
+{
+
+ public ProcessManagement createProcessManagement()
+ {
+ return (ProcessManagement) InvocationProxy.newInstance(new JBPM3ProcessManagement());
+ }
+
+ public JBPM3Extension createExtensionManagement()
+ {
+ return (JBPM3Extension) InvocationProxy.newInstance( new JBPM3ManagementExtension() );
+ }
+
+
+ public TaskManagement createTaskManagement()
+ {
+ return (TaskManagement) InvocationProxy.newInstance( new JBPM3TaskManagement() );
+ }
+
+
+ public UserManagement createUsermanagement()
+ {
+ return (UserManagement) InvocationProxy.newInstance( new JBPM3UserManagement() );
+ }
+}
Copied: projects/gwt-console/trunk/server/src/main/java/org/jboss/bpm/console/server/integration/jbpm3/JBPM3ProcessManagement.java (from rev 3072, projects/gwt-console/trunk/server/src/main/java/org/jboss/bpm/console/server/integration/internal/JBPM3ProcessManagement.java)
===================================================================
--- projects/gwt-console/trunk/server/src/main/java/org/jboss/bpm/console/server/integration/jbpm3/JBPM3ProcessManagement.java (rev 0)
+++ projects/gwt-console/trunk/server/src/main/java/org/jboss/bpm/console/server/integration/jbpm3/JBPM3ProcessManagement.java 2008-11-25 11:05:53 UTC (rev 3074)
@@ -0,0 +1,105 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.bpm.console.server.integration.jbpm3;
+
+import org.jboss.bpm.console.client.model.ProcessDefinitionRef;
+import org.jboss.bpm.console.client.model.ProcessInstanceRef;
+import org.jboss.bpm.console.server.integration.ProcessManagement;
+import org.jbpm.graph.def.ProcessDefinition;
+import org.jbpm.graph.exe.ProcessInstance;
+
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * @author Heiko.Braun <heiko.braun(a)jboss.com>
+ */
+public class JBPM3ProcessManagement implements ProcessManagement
+{
+ private JBPM3CommandDelegate delegate;
+
+ public JBPM3ProcessManagement()
+ {
+ this.delegate = new JBPM3CommandDelegate();
+ }
+
+ public List<ProcessDefinitionRef> getAllDefinitions()
+ {
+ List<ProcessDefinition> defs = delegate.getActualDefinitions();
+
+ List<ProcessDefinitionRef> results = new ArrayList<ProcessDefinitionRef>(defs.size());
+ for(ProcessDefinition p0 : defs)
+ {
+ results.add( Transform.processDefinition(p0) );
+ }
+ return results;
+ }
+
+ public ProcessDefinitionRef getDefinitionById(long processId)
+ {
+ ProcessDefinition p0 = delegate.getActualDefinition(processId);
+ return Transform.processDefinition(p0);
+ }
+
+
+ public ProcessDefinitionRef getDefinition(String name)
+ {
+ ProcessDefinition p0 = delegate.getActualDefinition(name);
+ return Transform.processDefinition(p0);
+ }
+
+ public List<ProcessDefinitionRef> removeDefinition(long processId)
+ {
+ delegate.removeActualDefinition(processId);
+ return getAllDefinitions();
+ }
+
+
+ public ProcessInstanceRef newInstance(long processId)
+ {
+ ProcessInstance instance = delegate.startNewInstance(processId);
+ return Transform.processInstance(instance);
+ }
+
+ public List<ProcessInstanceRef> getInstancesByDefinitionId(long processId)
+ {
+ List<ProcessInstance> instances = delegate.getActualInstances(processId);
+ List<ProcessInstanceRef> results = new ArrayList<ProcessInstanceRef>(instances.size());
+ for(org.jbpm.graph.exe.ProcessInstance i0 : instances)
+ {
+ results.add( Transform.processInstance(i0) );
+ }
+ return results;
+ }
+
+ public ProcessInstanceRef getInstanceById(long instanceId)
+ {
+ ProcessInstance instance = delegate.getActualInstance(instanceId);
+ return Transform.processInstance(instance);
+ }
+
+ public void signalToken(long tokenId, String signal)
+ {
+ delegate.signalToken(tokenId, signal);
+ }
+
+}
Copied: projects/gwt-console/trunk/server/src/main/java/org/jboss/bpm/console/server/integration/jbpm3/JBPM3TaskManagement.java (from rev 3072, projects/gwt-console/trunk/server/src/main/java/org/jboss/bpm/console/server/integration/internal/JBPM3TaskManagement.java)
===================================================================
--- projects/gwt-console/trunk/server/src/main/java/org/jboss/bpm/console/server/integration/jbpm3/JBPM3TaskManagement.java (rev 0)
+++ projects/gwt-console/trunk/server/src/main/java/org/jboss/bpm/console/server/integration/jbpm3/JBPM3TaskManagement.java 2008-11-25 11:05:53 UTC (rev 3074)
@@ -0,0 +1,78 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.bpm.console.server.integration.jbpm3;
+
+import org.jboss.bpm.console.client.model.TaskRef;
+import org.jboss.bpm.console.server.integration.TaskManagement;
+import org.jbpm.taskmgmt.exe.TaskInstance;
+
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * @author Heiko.Braun <heiko.braun(a)jboss.com>
+ */
+public class JBPM3TaskManagement implements TaskManagement
+{
+
+ private JBPM3CommandDelegate delegate;
+
+ public JBPM3TaskManagement()
+ {
+ this.delegate = new JBPM3CommandDelegate();
+ }
+
+ public List<TaskRef> getTasksByActor(String actorName)
+ {
+
+ List<TaskInstance> actualTasks =
+ delegate.getActualTasksForActor(actorName);
+
+ List<TaskRef> taskRefs = new ArrayList<TaskRef>();
+ for(TaskInstance t0 : actualTasks)
+ {
+ taskRefs.add( Transform.taskInstance(t0));
+ }
+
+ return taskRefs;
+ }
+
+ public TaskRef getTaskById(long taskId)
+ {
+ TaskInstance t0 = delegate.getTaskById(taskId);
+ TaskRef taskRef = Transform.taskInstance(t0);
+ return taskRef;
+ }
+
+
+ public void reassignTask(long taskId, String actorId)
+ {
+ // TODO: validation of actorId?
+ delegate.assignTask(taskId, actorId);
+ }
+
+
+ public void closeTask(long taskId, String signalName)
+ {
+ delegate.endTask(taskId, signalName);
+ }
+}
Copied: projects/gwt-console/trunk/server/src/main/java/org/jboss/bpm/console/server/integration/jbpm3/JBPM3UserManagement.java (from rev 3072, projects/gwt-console/trunk/server/src/main/java/org/jboss/bpm/console/server/integration/internal/JBPM3UserManagement.java)
===================================================================
--- projects/gwt-console/trunk/server/src/main/java/org/jboss/bpm/console/server/integration/jbpm3/JBPM3UserManagement.java (rev 0)
+++ projects/gwt-console/trunk/server/src/main/java/org/jboss/bpm/console/server/integration/jbpm3/JBPM3UserManagement.java 2008-11-25 11:05:53 UTC (rev 3074)
@@ -0,0 +1,50 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.bpm.console.server.integration.jbpm3;
+
+import org.jboss.bpm.console.server.integration.UserManagement;
+
+import java.util.List;
+
+/**
+ * @author Heiko.Braun <heiko.braun(a)jboss.com>
+ */
+public class JBPM3UserManagement implements UserManagement
+{
+
+ private JBPM3CommandDelegate delegate;
+
+ public JBPM3UserManagement()
+ {
+ this.delegate = new JBPM3CommandDelegate();
+ }
+
+ public List<String> getGroupsForActor(String actorId)
+ {
+ return delegate.getGroupsForActor(actorId);
+ }
+
+ public List<String> getActorsForGroup(String groupName)
+ {
+ return delegate.getActorsForGroup(groupName);
+ }
+}
Copied: projects/gwt-console/trunk/server/src/main/java/org/jboss/bpm/console/server/integration/jbpm3/Transform.java (from rev 3072, projects/gwt-console/trunk/server/src/main/java/org/jboss/bpm/console/server/integration/internal/Transform.java)
===================================================================
--- projects/gwt-console/trunk/server/src/main/java/org/jboss/bpm/console/server/integration/jbpm3/Transform.java (rev 0)
+++ projects/gwt-console/trunk/server/src/main/java/org/jboss/bpm/console/server/integration/jbpm3/Transform.java 2008-11-25 11:05:53 UTC (rev 3074)
@@ -0,0 +1,141 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.bpm.console.server.integration.jbpm3;
+
+import org.jboss.bpm.console.client.model.ProcessDefinitionRef;
+import org.jboss.bpm.console.client.model.ProcessInstanceRef;
+import org.jboss.bpm.console.client.model.TaskRef;
+import org.jboss.bpm.console.client.model.jbpm3.TokenReference;
+import org.jbpm.graph.def.Transition;
+import org.jbpm.graph.exe.Token;
+import org.jbpm.taskmgmt.exe.PooledActor;
+
+import java.util.Date;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+
+/**
+ * @author Heiko.Braun <heiko.braun(a)jboss.com>
+ */
+class Transform
+{
+ public static ProcessDefinitionRef processDefinition(org.jbpm.graph.def.ProcessDefinition p0)
+ {
+ return new ProcessDefinitionRef(p0.getId(), p0.getName(), String.valueOf(p0.getVersion()));
+ }
+
+ public static ProcessInstanceRef processInstance(org.jbpm.graph.exe.ProcessInstance i0)
+ {
+ Date start = i0.getStart();
+ Date end = i0.getEnd();
+ boolean suspended = i0.isSuspended();
+ long processId = i0.getProcessDefinition().getId();
+ long instanceId = i0.getId();
+ ProcessInstanceRef processInstance = new ProcessInstanceRef(instanceId, processId, start, end, suspended);
+
+ // token
+ Token t0 = i0.getRootToken();
+ processInstance.setRootToken(Transform.tokenReference(t0));
+ return processInstance;
+ }
+
+ private static TokenReference tokenReference(Token t0)
+ {
+ TokenReference token = new TokenReference(t0.getId(), t0.getName(), t0.getNode().getName());
+
+ if(t0.hasActiveChildren() || t0.isTerminatedImplicitly())
+ token.setCanBeSignaled(false);
+
+ Map children = t0.getChildren();
+ if(children!=null)
+ {
+ for(Object o : children.values())
+ {
+ Token t1 = (Token)o;
+ token.getChildren().add( Transform.tokenReference(t1) );
+ }
+ }
+
+ // signals
+ for(Object tr0 : t0.getNode().getLeavingTransitionsList())
+ {
+ Transition transition = (Transition)tr0;
+ token.getAvailableSignals().add(transition.getName());
+ }
+
+ return token;
+ }
+
+ public static void doTransition(org.jbpm.graph.exe.ProcessInstance p0, ProcessInstanceRef.STATE nextState)
+ {
+ ProcessInstanceRef instance = Transform.processInstance(p0);
+ instance.setState(nextState); // has lifecycle build in, hence the extra round
+
+ switch(instance.getState())
+ {
+ case ENDED:
+ p0.setEnd(instance.getEndDate());
+ p0.end();
+ break;
+ case SUSPENDED:
+ p0.suspend();
+ break;
+ case RUNNING:
+ if(p0.isSuspended())
+ p0.resume();
+ }
+
+ }
+
+ public static TaskRef taskInstance(org.jbpm.taskmgmt.exe.TaskInstance t0)
+ {
+ TaskRef taskRef = new TaskRef(
+ t0.getId(),
+ t0.getToken().getId(),
+ t0.getProcessInstance().getId(),
+ t0.getProcessInstance().getProcessDefinition().getId(),
+ t0.getName(), t0.getActorId(),
+ t0.isBlocking(), t0.isSignalling()
+ );
+
+ List<Transition> transitionList = (List<Transition>)
+ t0.getToken().getNode().getLeavingTransitionsList();
+
+ Set<PooledActor> pooledActors = (Set<PooledActor>)t0.getPooledActors();
+ for(PooledActor p : pooledActors)
+ {
+ taskRef.addPooledActor(p.getActorId());
+ }
+
+ for(Transition trs0 : transitionList)
+ {
+ taskRef.getTransitionNames().add(
+ trs0.getName()
+ );
+ }
+
+ return taskRef;
+ }
+
+
+}
Copied: projects/gwt-console/trunk/server/src/main/java/org/jboss/bpm/console/server/integration/jbpm3/cmd (from rev 3072, projects/gwt-console/trunk/server/src/main/java/org/jboss/bpm/console/server/integration/internal/cmd)
Deleted: projects/gwt-console/trunk/server/src/main/java/org/jboss/bpm/console/server/integration/jbpm3/cmd/GetGroupMembershipCommand.java
===================================================================
--- projects/gwt-console/trunk/server/src/main/java/org/jboss/bpm/console/server/integration/internal/cmd/GetGroupMembershipCommand.java 2008-11-25 10:19:51 UTC (rev 3072)
+++ projects/gwt-console/trunk/server/src/main/java/org/jboss/bpm/console/server/integration/jbpm3/cmd/GetGroupMembershipCommand.java 2008-11-25 11:05:53 UTC (rev 3074)
@@ -1,72 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.bpm.console.server.integration.internal.cmd;
-
-import org.jbpm.JbpmContext;
-import org.jbpm.command.AbstractGetObjectBaseCommand;
-import org.jbpm.command.Command;
-import org.jbpm.identity.Group;
-import org.jbpm.identity.User;
-import org.jbpm.identity.hibernate.IdentitySession;
-
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Set;
-
-/**
- * TODO: Group resolution should be pluggable
- *
- * @author Heiko.Braun <heiko.braun(a)jboss.com>
- */
-public class GetGroupMembershipCommand extends AbstractGetObjectBaseCommand implements Command
-{
- private static final long serialVersionUID = -1627380259541998349L;
-
- private String actorName;
-
- public GetGroupMembershipCommand(String actorName)
- {
- super();
- this.actorName = actorName;
- }
-
- public Object execute(JbpmContext jbpmContext) throws Exception
- {
- List<String> groupNames = new ArrayList<String>();
-
- setJbpmContext(jbpmContext);
-
- IdentitySession session = new IdentitySession(
- jbpmContext.getSession()
- );
-
- User user = session.getUserByName(actorName);
- Set<Group> groups = (Set<Group>)user.getGroupsForGroupType("organisation");
-
- for(Group g : groups)
- {
- groupNames.add(g.getName());
- }
-
- return groupNames;
- }
-}
Deleted: projects/gwt-console/trunk/server/src/main/java/org/jboss/bpm/console/server/integration/jbpm3/cmd/GetUsersForGroupCommand.java
===================================================================
--- projects/gwt-console/trunk/server/src/main/java/org/jboss/bpm/console/server/integration/internal/cmd/GetUsersForGroupCommand.java 2008-11-25 10:19:51 UTC (rev 3072)
+++ projects/gwt-console/trunk/server/src/main/java/org/jboss/bpm/console/server/integration/jbpm3/cmd/GetUsersForGroupCommand.java 2008-11-25 11:05:53 UTC (rev 3074)
@@ -1,71 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.bpm.console.server.integration.internal.cmd;
-
-import org.jbpm.JbpmContext;
-import org.jbpm.command.AbstractGetObjectBaseCommand;
-import org.jbpm.command.Command;
-import org.jbpm.identity.Group;
-import org.jbpm.identity.User;
-import org.jbpm.identity.hibernate.IdentitySession;
-
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Set;
-
-/**
- * TODO: Group resolution should be pluggable
- *
- * @author Heiko.Braun <heiko.braun(a)jboss.com>
- */
-public class GetUsersForGroupCommand extends AbstractGetObjectBaseCommand implements Command
-{
- private static final long serialVersionUID = -1627380259541998349L;
-
- private String groupName;
-
- public GetUsersForGroupCommand(String groupName)
- {
- super();
- this.groupName = groupName;
- }
-
- public Object execute(JbpmContext jbpmContext) throws Exception
- {
- List<String> userNames = new ArrayList<String>();
-
- setJbpmContext(jbpmContext);
-
- IdentitySession session = new IdentitySession(
- jbpmContext.getSession()
- );
-
- Group group = session.getGroupByName(groupName);
- Set<User> users = group.getUsers();
- for(User u : users)
- {
- userNames.add(u.getName());
- }
-
- return userNames;
- }
-}
Added: projects/gwt-console/trunk/server/src/main/java/org/jboss/bpm/console/server/integration/spec/ProcessManagementImpl.java
===================================================================
--- projects/gwt-console/trunk/server/src/main/java/org/jboss/bpm/console/server/integration/spec/ProcessManagementImpl.java (rev 0)
+++ projects/gwt-console/trunk/server/src/main/java/org/jboss/bpm/console/server/integration/spec/ProcessManagementImpl.java 2008-11-25 11:05:53 UTC (rev 3074)
@@ -0,0 +1,78 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.bpm.console.server.integration.spec;
+
+import java.util.List;
+
+import org.jboss.bpm.console.client.model.ProcessDefinitionRef;
+import org.jboss.bpm.console.client.model.ProcessInstanceRef;
+import org.jboss.bpm.console.server.integration.ProcessManagement;
+import org.jbpm.api.NotImplementedException;
+
+/**
+ * An implementation that delegates to the jBPM API
+ *
+ * @author Thomas.Diesler(a)jboss.com
+ * @since 25-Nov-2008
+ */
+public class ProcessManagementImpl implements ProcessManagement
+{
+ public List<ProcessDefinitionRef> getAllDefinitions()
+ {
+ throw new NotImplementedException();
+ }
+
+ public ProcessDefinitionRef getDefinitionById(long processId)
+ {
+ throw new NotImplementedException();
+ }
+
+ public ProcessDefinitionRef getDefinition(String name)
+ {
+ throw new NotImplementedException();
+ }
+
+ public List<ProcessDefinitionRef> removeDefinition(long processId)
+ {
+ throw new NotImplementedException();
+ }
+
+ public ProcessInstanceRef newInstance(long processId)
+ {
+ throw new NotImplementedException();
+ }
+
+ public List<ProcessInstanceRef> getInstancesByDefinitionId(long processId)
+ {
+ throw new NotImplementedException();
+ }
+
+ public ProcessInstanceRef getInstanceById(long instanceId)
+ {
+ throw new NotImplementedException();
+ }
+
+ public void signalToken(long tokenId, String signal)
+ {
+ throw new NotImplementedException();
+ }
+}
Property changes on: projects/gwt-console/trunk/server/src/main/java/org/jboss/bpm/console/server/integration/spec/ProcessManagementImpl.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
17 years, 5 months
JBoss JBPM SVN: r3073 - projects/gwt-console/trunk/server/src/main/java/org/jboss/bpm/console/server/integration/internal.
by do-not-reply@jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2008-11-25 05:29:55 -0500 (Tue, 25 Nov 2008)
New Revision: 3073
Modified:
projects/gwt-console/trunk/server/src/main/java/org/jboss/bpm/console/server/integration/internal/JBPM3CommandDelegate.java
Log:
Update command name
Modified: projects/gwt-console/trunk/server/src/main/java/org/jboss/bpm/console/server/integration/internal/JBPM3CommandDelegate.java
===================================================================
--- projects/gwt-console/trunk/server/src/main/java/org/jboss/bpm/console/server/integration/internal/JBPM3CommandDelegate.java 2008-11-25 10:19:51 UTC (rev 3072)
+++ projects/gwt-console/trunk/server/src/main/java/org/jboss/bpm/console/server/integration/internal/JBPM3CommandDelegate.java 2008-11-25 10:29:55 UTC (rev 3073)
@@ -116,7 +116,7 @@
public void removeActualDefinition(long processId)
{
ProcessDefinition def = getActualDefinition(processId);
- facade.execute( new DeleteProcessdefinitionCommand(processId));
+ facade.execute( new DeleteProcessDefinitionCommand(processId));
}
public org.jbpm.graph.exe.ProcessInstance getActualInstance(long instanceId)
17 years, 5 months
JBoss JBPM SVN: r3072 - jbpm3/trunk.
by do-not-reply@jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2008-11-25 05:19:51 -0500 (Tue, 25 Nov 2008)
New Revision: 3072
Modified:
jbpm3/trunk/pom.xml
Log:
Update to gwt-console-1.0.0-SNAPSHOT
Modified: jbpm3/trunk/pom.xml
===================================================================
--- jbpm3/trunk/pom.xml 2008-11-25 09:58:53 UTC (rev 3071)
+++ jbpm3/trunk/pom.xml 2008-11-25 10:19:51 UTC (rev 3072)
@@ -67,7 +67,7 @@
<jaxen.version>1.1.1</jaxen.version>
<jbpm.api.version>1.0.0-SNAPSHOT</jbpm.api.version>
<jbpm.designer.version>3.1.5</jbpm.designer.version>
- <jbpm.gwt-console.version>1.0.0-Beta1</jbpm.gwt-console.version>
+ <jbpm.gwt-console.version>1.0.0-SNAPSHOT</jbpm.gwt-console.version>
<jbpm.jsf-console.version>3.3.0.GA</jbpm.jsf-console.version>
<jboss.client.version>4.2.2.GA</jboss.client.version>
<jboss.gravel.version>1.0.0.GA</jboss.gravel.version>
17 years, 5 months
JBoss JBPM SVN: r3071 - in jbpm3/trunk: modules/distribution and 13 other directories.
by do-not-reply@jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2008-11-25 04:58:53 -0500 (Tue, 25 Nov 2008)
New Revision: 3071
Added:
jbpm3/trunk/modules/integration/api/deploy.sh
jbpm3/trunk/modules/integration/api/scripts/
jbpm3/trunk/modules/integration/api/scripts/assembly-config.xml
jbpm3/trunk/modules/integration/api/src/main/resources/hibernate.extra.hbm.xml
jbpm3/trunk/modules/integration/api/src/main/resources/jbpm-cfg-beans.xml
jbpm3/trunk/modules/integration/jboss42/src/main/etc/jboss-beans.xml
Removed:
jbpm3/trunk/modules/integration/api/src/main/resources/jbpm-cfg-beans.xml
Modified:
jbpm3/trunk/modules/distribution/pom.xml
jbpm3/trunk/modules/distribution/scripts/assembly-deploy-artifacts.xml
jbpm3/trunk/modules/distribution/src/main/resources/installer/install-definition.xml
jbpm3/trunk/modules/enterprise/jar/pom.xml
jbpm3/trunk/modules/integration/api/pom.xml
jbpm3/trunk/modules/integration/api/src/main/java/org/jbpm/integration/service/ProcessDefinitionServiceImpl.java
jbpm3/trunk/modules/integration/jboss42/pom.xml
jbpm3/trunk/modules/integration/jboss42/scripts/assembly-config.xml
jbpm3/trunk/modules/integration/jboss42/src/main/java/org/jbpm/integration/jboss42/PARSubDeployer.java
jbpm3/trunk/modules/integration/jboss42/src/test/java/org/jbpm/test/integration/deployment/SimpleDeploymentTest.java
jbpm3/trunk/modules/integration/jboss42/src/test/resources/jndi.properties
jbpm3/trunk/pom.xml
Log:
Enable SimpleDeploymentTest
Modified: jbpm3/trunk/modules/distribution/pom.xml
===================================================================
--- jbpm3/trunk/modules/distribution/pom.xml 2008-11-25 09:50:34 UTC (rev 3070)
+++ jbpm3/trunk/modules/distribution/pom.xml 2008-11-25 09:58:53 UTC (rev 3071)
@@ -87,6 +87,12 @@
</dependency>
<dependency>
<groupId>org.jbpm.jbpm3</groupId>
+ <artifactId>jbpm-integration-api</artifactId>
+ <classifier>config</classifier>
+ <version>${version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.jbpm.jbpm3</groupId>
<artifactId>jbpm-integration-jboss42</artifactId>
<classifier>config</classifier>
<version>${version}</version>
@@ -112,6 +118,10 @@
<groupId>org.jbpm.jbpm4</groupId>
<artifactId>jbpm-spec-api</artifactId>
</dependency>
+ <dependency>
+ <groupId>org.jbpm.jbpm4</groupId>
+ <artifactId>jbpm-spec-dialect-api10</artifactId>
+ </dependency>
<!-- jBPM Projects -->
<dependency>
Modified: jbpm3/trunk/modules/distribution/scripts/assembly-deploy-artifacts.xml
===================================================================
--- jbpm3/trunk/modules/distribution/scripts/assembly-deploy-artifacts.xml 2008-11-25 09:50:34 UTC (rev 3070)
+++ jbpm3/trunk/modules/distribution/scripts/assembly-deploy-artifacts.xml 2008-11-25 09:58:53 UTC (rev 3071)
@@ -54,6 +54,7 @@
<outputDirectory>resources/jbpm-integration-config</outputDirectory>
<useStrictFiltering>true</useStrictFiltering>
<includes>
+ <include>*:jbpm-integration-api:jar:config</include>
<include>*:jbpm-integration-jboss42:jar:config</include>
</includes>
<unpack>true</unpack>
Modified: jbpm3/trunk/modules/distribution/src/main/resources/installer/install-definition.xml
===================================================================
--- jbpm3/trunk/modules/distribution/src/main/resources/installer/install-definition.xml 2008-11-25 09:50:34 UTC (rev 3070)
+++ jbpm3/trunk/modules/distribution/src/main/resources/installer/install-definition.xml 2008-11-25 09:58:53 UTC (rev 3071)
@@ -177,6 +177,16 @@
<pack name="jBPM3 Server Components" required="yes" preselected="yes">
<description>The jBPM3 Server Components</description>
+ <!-- jbpm/jbpm-integration.beans -->
+ <fileset dir="@{deploy.artifacts.dir}/lib" targetdir="${installPath}/server/${jbossTargetServer}/deploy/jbpm/jbpm-integration.beans" override="true">
+ <include name="jbpm-integration-api.jar" />
+ <include name="jbpm-spec-api.jar" />
+ <include name="jbpm-spec-dialect-api10.jar" />
+ </fileset>
+ <fileset dir="@{deploy.artifacts.dir}/resources/jbpm-integration-config" targetdir="${installPath}/server/${jbossTargetServer}/deploy/jbpm/jbpm-integration.beans/META-INF" override="true">
+ <include name="jboss-beans.xml" />
+ </fileset>
+
<!-- jbpm/jbpm-service.sar -->
<fileset dir="@{deploy.artifacts.dir}/resources/jbpm-enterprise-config" targetdir="${installPath}/server/${jbossTargetServer}/deploy/jbpm/jbpm-service.sar" override="true">
<include name="jbpm.cfg.xml" />
@@ -188,9 +198,7 @@
<fileset dir="@{deploy.artifacts.dir}/lib" targetdir="${installPath}/server/${jbossTargetServer}/deploy/jbpm/jbpm-service.sar" override="true">
<include name="jbpm-jpdl.jar" />
<include name="jbpm-identity.jar" />
- <include name="jbpm-integration-api.jar" />
<include name="jbpm-integration-jboss42.jar" />
- <include name="jbpm-spec-api.jar" />
<include name="slf4j-api.jar" />
<include name="slf4j-log4j12.jar" />
</fileset>
Modified: jbpm3/trunk/modules/enterprise/jar/pom.xml
===================================================================
--- jbpm3/trunk/modules/enterprise/jar/pom.xml 2008-11-25 09:50:34 UTC (rev 3070)
+++ jbpm3/trunk/modules/enterprise/jar/pom.xml 2008-11-25 09:58:53 UTC (rev 3071)
@@ -82,8 +82,6 @@
<dependency>
<groupId>org.jboss.client</groupId>
<artifactId>jbossall-client</artifactId>
- <!-- verify that this version works for all target containers -->
- <version>4.2.2.GA</version>
<scope>test</scope>
</dependency>
<dependency>
Added: jbpm3/trunk/modules/integration/api/deploy.sh
===================================================================
--- jbpm3/trunk/modules/integration/api/deploy.sh (rev 0)
+++ jbpm3/trunk/modules/integration/api/deploy.sh 2008-11-25 09:58:53 UTC (rev 3071)
@@ -0,0 +1,3 @@
+#! /bin/bash
+
+cp target/jbpm-integration-api-3.3.1-SNAPSHOT.jar $JBOSS422/server/default/deploy/jbpm/jbpm-integration.beans
Property changes on: jbpm3/trunk/modules/integration/api/deploy.sh
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Modified: jbpm3/trunk/modules/integration/api/pom.xml
===================================================================
--- jbpm3/trunk/modules/integration/api/pom.xml 2008-11-25 09:50:34 UTC (rev 3070)
+++ jbpm3/trunk/modules/integration/api/pom.xml 2008-11-25 09:58:53 UTC (rev 3071)
@@ -51,6 +51,17 @@
<version>${version}</version>
</dependency>
<dependency>
+ <groupId>org.jbpm.jbpm3</groupId>
+ <artifactId>jbpm-identity</artifactId>
+ <version>${version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.jbpm.jbpm3</groupId>
+ <artifactId>jbpm-identity</artifactId>
+ <classifier>config</classifier>
+ <version>${version}</version>
+ </dependency>
+ <dependency>
<groupId>org.mvel</groupId>
<artifactId>mvel</artifactId>
<version>${mvel.version}</version>
@@ -103,6 +114,25 @@
</executions>
</plugin>
<plugin>
+ <artifactId>maven-assembly-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>assembly-config</id>
+ <phase>package</phase>
+ <goals>
+ <goal>single</goal>
+ </goals>
+ <configuration>
+ <finalName>${project.build.finalName}</finalName>
+ <appendAssemblyId>true</appendAssemblyId>
+ <descriptors>
+ <descriptor>scripts/assembly-config.xml</descriptor>
+ </descriptors>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
<artifactId>maven-clean-plugin</artifactId>
<configuration>
<filesets>
@@ -140,6 +170,14 @@
</executions>
</plugin>
<plugin>
+ <artifactId>maven-jar-plugin</artifactId>
+ <configuration>
+ <excludes>
+ <exclude>jbpm-cfg-beans.xml</exclude>
+ </excludes>
+ </configuration>
+ </plugin>
+ <plugin>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<excludes>
Added: jbpm3/trunk/modules/integration/api/scripts/assembly-config.xml
===================================================================
--- jbpm3/trunk/modules/integration/api/scripts/assembly-config.xml (rev 0)
+++ jbpm3/trunk/modules/integration/api/scripts/assembly-config.xml 2008-11-25 09:58:53 UTC (rev 3071)
@@ -0,0 +1,17 @@
+<assembly xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/assembly-1.1.0-SNAPSHOT.xsd">
+ <id>config</id>
+ <formats>
+ <format>jar</format>
+ </formats>
+ <includeBaseDirectory>false</includeBaseDirectory>
+ <fileSets>
+ <fileSet>
+ <directory>${basedir}/src/main/resources</directory>
+ <outputDirectory>/</outputDirectory>
+ <includes>
+ <include>jbpm-cfg-beans.xml</include>
+ </includes>
+ </fileSet>
+ </fileSets>
+</assembly>
\ No newline at end of file
Property changes on: jbpm3/trunk/modules/integration/api/scripts/assembly-config.xml
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Modified: jbpm3/trunk/modules/integration/api/src/main/java/org/jbpm/integration/service/ProcessDefinitionServiceImpl.java
===================================================================
--- jbpm3/trunk/modules/integration/api/src/main/java/org/jbpm/integration/service/ProcessDefinitionServiceImpl.java 2008-11-25 09:50:34 UTC (rev 3070)
+++ jbpm3/trunk/modules/integration/api/src/main/java/org/jbpm/integration/service/ProcessDefinitionServiceImpl.java 2008-11-25 09:58:53 UTC (rev 3071)
@@ -30,10 +30,13 @@
import javax.management.ObjectName;
+import org.jbpm.JbpmConfiguration;
+import org.jbpm.JbpmContext;
import org.jbpm.api.client.ProcessEngine;
import org.jbpm.api.model.ProcessDefinition;
import org.jbpm.api.service.ProcessDefinitionService;
import org.jbpm.api.service.ProcessService;
+import org.jbpm.integration.model.ProcessDefinitionImpl;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -50,6 +53,7 @@
// The set of registered ProcessDefinitions
private Map<ObjectName, ProcessDefinition> procDefs = new HashMap<ObjectName, ProcessDefinition>();
+ private JbpmConfiguration jbpmConfigCache;
@Override
public void setProcessEngine(ProcessEngine engine)
@@ -73,14 +77,40 @@
throw new IllegalStateException("Process definition already registered: " + procDef);
log.debug("registerProcessDefinition: " + procDef);
+
+ // Works with the default configuration
+ JbpmConfiguration jbpmConfig = getJbpmConfiguration();
+ JbpmContext jbpmContext = jbpmConfig.createJbpmContext();
- // Save the ProcessDefinition through the PersistenceService
- ObjectName procDefID = procDef.getKey();
- procDefs.put(procDefID, procDef);
-
+ ObjectName procDefID;
+ try
+ {
+ ProcessDefinitionImpl procDefImpl = (ProcessDefinitionImpl)procDef;
+ jbpmContext.deployProcessDefinition(procDefImpl.getOldProcessDefinition());
+
+ procDefID = procDef.getKey();
+ procDefs.put(procDefID, procDef);
+ }
+ catch (RuntimeException rte)
+ {
+ throw rte;
+ }
+ finally
+ {
+ jbpmContext.close();
+ }
return procDefID;
}
+ private JbpmConfiguration getJbpmConfiguration()
+ {
+ if (jbpmConfigCache == null)
+ {
+ jbpmConfigCache = JbpmConfiguration.getInstance();
+ }
+ return jbpmConfigCache;
+ }
+
public boolean unregisterProcessDefinition(ObjectName procDefID)
{
boolean removed = false;
@@ -96,8 +126,26 @@
for (ObjectName procID : procService.getProcesses(procDef.getName(), null))
procService.unregisterProcess(procID);
- procDefs.remove(procDefID);
- removed = true;
+ // Works with the default configuration
+ JbpmConfiguration jbpmConfig = getJbpmConfiguration();
+ JbpmContext jbpmContext = jbpmConfig.createJbpmContext();
+ try
+ {
+ ProcessDefinitionImpl procDefImpl = (ProcessDefinitionImpl)procDef;
+ long oldID = procDefImpl.getOldProcessDefinition().getId();
+ jbpmContext.getGraphSession().deleteProcessDefinition(oldID);
+
+ procDefs.remove(procDefID);
+ removed = true;
+ }
+ catch (RuntimeException rte)
+ {
+ throw rte;
+ }
+ finally
+ {
+ jbpmContext.close();
+ }
}
return removed;
}
Added: jbpm3/trunk/modules/integration/api/src/main/resources/hibernate.extra.hbm.xml
===================================================================
--- jbpm3/trunk/modules/integration/api/src/main/resources/hibernate.extra.hbm.xml (rev 0)
+++ jbpm3/trunk/modules/integration/api/src/main/resources/hibernate.extra.hbm.xml 2008-11-25 09:58:53 UTC (rev 3071)
@@ -0,0 +1,13 @@
+<?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>
+
+ <!-- ################################################## -->
+ <!-- # Additional mappings defined per module go here # -->
+ <!-- ################################################## -->
+
+</hibernate-mapping>
Property changes on: jbpm3/trunk/modules/integration/api/src/main/resources/hibernate.extra.hbm.xml
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Deleted: jbpm3/trunk/modules/integration/api/src/main/resources/jbpm-cfg-beans.xml
===================================================================
--- jbpm3/trunk/modules/integration/api/src/main/resources/jbpm-cfg-beans.xml 2008-11-25 09:50:34 UTC (rev 3070)
+++ jbpm3/trunk/modules/integration/api/src/main/resources/jbpm-cfg-beans.xml 2008-11-25 09:58:53 UTC (rev 3071)
@@ -1,48 +0,0 @@
-<deployment xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="urn:jboss:bean-deployer:2.0 bean-deployer_2_0.xsd" xmlns="urn:jboss:bean-deployer:2.0">
-
- <!-- Locate the single instance of the kernel -->
- <bean name="WSKernelLocator" class="org.jbpm.api.client.internal.KernelLocator">
- <property name="kernel"><inject bean="jboss.kernel:service=Kernel" /></property>
- </bean>
-
- <!-- The ProcessEngine -->
- <bean name="jBPMProcessEngine" class="org.jbpm.integration.client.ProcessEngineImpl">
- <property name="services">
- <set elementClass="org.jbpm.api.service.Service">
- <inject bean="jBPMDialectHandlerService"/>
- <inject bean="jBPMProcessBuilderService"/>
- <inject bean="jBPMProcessDefinitionService"/>
- <inject bean="jBPMProcessService"/>
- </set>
- </property>
- </bean>
-
- <!-- The PersistenceService -->
- <bean name="jBPMPersistenceService" class="org.jbpm.integration.service.NoopPersistenceServiceImpl" />
-
- <!-- The ProcessService -->
- <bean name="jBPMProcessService" class="org.jbpm.integration.service.ProcessServiceImpl">
- <property name="interceptors">
- <list elementClass="java.lang.String">
- <value>org.jbpm.integration.runtime.NodeExecuteInterceptor</value>
- </list>
- </property>
- </bean>
-
- <!-- The DialectHandlerService -->
- <bean name="jBPMDialectHandlerService" class="org.jbpm.integration.service.DialectHandlerServiceImpl">
- <property name="dialectHandlers">
- <map keyClass="java.net.URI" valueClass="org.jbpm.api.service.DialectHandler">
- <entry><key>urn:jbpm.jboss:api-0.1</key><value><inject bean="jBPMDialectHandlerAPI10"/></value></entry>
- <entry><key>urn:jbpm.org:jpdl-3.2</key><value><inject bean="jBPMDialectHandlerJPDL32"/></value></entry>
- </map>
- </property>
- </bean>
- <bean name="jBPMDialectHandlerAPI10" class="org.jbpm.dialect.api10.DialectHandlerImpl" />
- <bean name="jBPMDialectHandlerJPDL32" class="org.jbpm.integration.jpdl32.DialectHandlerImpl" />
-
- <!-- Other Services -->
- <bean name="jBPMProcessBuilderService" class="org.jbpm.integration.service.ProcessBuilderServiceImpl" />
- <bean name="jBPMProcessDefinitionService" class="org.jbpm.integration.service.ProcessDefinitionServiceImpl" />
-
-</deployment>
Added: jbpm3/trunk/modules/integration/api/src/main/resources/jbpm-cfg-beans.xml
===================================================================
--- jbpm3/trunk/modules/integration/api/src/main/resources/jbpm-cfg-beans.xml (rev 0)
+++ jbpm3/trunk/modules/integration/api/src/main/resources/jbpm-cfg-beans.xml 2008-11-25 09:58:53 UTC (rev 3071)
@@ -0,0 +1,52 @@
+<!--
+ Note, this uses the bean-deployer-2.0 schema
+ $Id$
+-->
+<deployment xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="urn:jboss:bean-deployer:2.0 bean-deployer_2_0.xsd" xmlns="urn:jboss:bean-deployer:2.0">
+
+ <!-- Locate the single instance of the kernel -->
+ <bean name="jBPMKernelLocator" class="org.jbpm.api.client.internal.KernelLocator">
+ <property name="kernel"><inject bean="jboss.kernel:service=Kernel" /></property>
+ </bean>
+
+ <!-- The ProcessEngine -->
+ <bean name="jBPMProcessEngine" class="org.jbpm.integration.client.ProcessEngineImpl">
+ <property name="services">
+ <set elementClass="org.jbpm.api.service.Service">
+ <inject bean="jBPMDialectHandlerService"/>
+ <inject bean="jBPMProcessBuilderService"/>
+ <inject bean="jBPMProcessDefinitionService"/>
+ <inject bean="jBPMProcessService"/>
+ </set>
+ </property>
+ </bean>
+
+ <!-- The PersistenceService -->
+ <bean name="jBPMPersistenceService" class="org.jbpm.integration.service.NoopPersistenceServiceImpl" />
+
+ <!-- The ProcessService -->
+ <bean name="jBPMProcessService" class="org.jbpm.integration.service.ProcessServiceImpl">
+ <property name="interceptors">
+ <list elementClass="java.lang.String">
+ <value>org.jbpm.integration.runtime.NodeExecuteInterceptor</value>
+ </list>
+ </property>
+ </bean>
+
+ <!-- The DialectHandlerService -->
+ <bean name="jBPMDialectHandlerService" class="org.jbpm.integration.service.DialectHandlerServiceImpl">
+ <property name="dialectHandlers">
+ <map keyClass="java.net.URI" valueClass="org.jbpm.api.service.DialectHandler">
+ <entry><key>urn:jbpm.jboss:api-0.1</key><value><inject bean="jBPMDialectHandlerAPI10"/></value></entry>
+ <entry><key>urn:jbpm.org:jpdl-3.2</key><value><inject bean="jBPMDialectHandlerJPDL32"/></value></entry>
+ </map>
+ </property>
+ </bean>
+ <bean name="jBPMDialectHandlerAPI10" class="org.jbpm.dialect.api10.DialectHandlerImpl" />
+ <bean name="jBPMDialectHandlerJPDL32" class="org.jbpm.integration.jpdl32.DialectHandlerImpl" />
+
+ <!-- Other Services -->
+ <bean name="jBPMProcessBuilderService" class="org.jbpm.integration.service.ProcessBuilderServiceImpl" />
+ <bean name="jBPMProcessDefinitionService" class="org.jbpm.integration.service.ProcessDefinitionServiceImpl" />
+
+</deployment>
Modified: jbpm3/trunk/modules/integration/jboss42/pom.xml
===================================================================
--- jbpm3/trunk/modules/integration/jboss42/pom.xml 2008-11-25 09:50:34 UTC (rev 3070)
+++ jbpm3/trunk/modules/integration/jboss42/pom.xml 2008-11-25 09:58:53 UTC (rev 3071)
@@ -72,8 +72,14 @@
<artifactId>jboss-common</artifactId>
<version>${jboss.common.version}</version>
</dependency>
-
+
+ <!-- Test Dependencies -->
<dependency>
+ <groupId>org.jboss.client</groupId>
+ <artifactId>jbossall-client</artifactId>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-log4j12</artifactId>
<scope>test</scope>
@@ -81,6 +87,12 @@
</dependencies>
<build>
+ <testResources>
+ <testResource>
+ <directory>src/test/resources</directory>
+ <filtering>true</filtering>
+ </testResource>
+ </testResources>
<plugins>
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
@@ -103,4 +115,31 @@
</plugin>
</plugins>
</build>
+
+ <profiles>
+
+ <!--
+ Name: no-jboss-bind-address
+ Descr: Skip tests if no jboss.bind address is given
+ -->
+ <profile>
+ <id>no-jboss-bind-address</id>
+ <activation>
+ <property>
+ <name>!jboss.bind.address</name>
+ </property>
+ </activation>
+ <build>
+ <plugins>
+ <plugin>
+ <artifactId>maven-surefire-plugin</artifactId>
+ <configuration>
+ <skipTests>true</skipTests>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+ </profile>
+ </profiles>
+
</project>
Modified: jbpm3/trunk/modules/integration/jboss42/scripts/assembly-config.xml
===================================================================
--- jbpm3/trunk/modules/integration/jboss42/scripts/assembly-config.xml 2008-11-25 09:50:34 UTC (rev 3070)
+++ jbpm3/trunk/modules/integration/jboss42/scripts/assembly-config.xml 2008-11-25 09:58:53 UTC (rev 3071)
@@ -10,6 +10,7 @@
<directory>${basedir}/src/main/etc</directory>
<outputDirectory>/</outputDirectory>
<includes>
+ <include>jboss-beans.xml</include>
<include>par-deployer.xml</include>
</includes>
</fileSet>
Added: jbpm3/trunk/modules/integration/jboss42/src/main/etc/jboss-beans.xml
===================================================================
--- jbpm3/trunk/modules/integration/jboss42/src/main/etc/jboss-beans.xml (rev 0)
+++ jbpm3/trunk/modules/integration/jboss42/src/main/etc/jboss-beans.xml 2008-11-25 09:58:53 UTC (rev 3071)
@@ -0,0 +1,52 @@
+<!--
+ Note, this uses the JBoss42 compatible bean-deployer-1.0 schema
+ $Id$
+-->
+<deployment xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="urn:jboss:bean-deployer bean-deployer_1_0.xsd" xmlns="urn:jboss:bean-deployer">
+
+ <!-- Locate the single instance of the kernel -->
+ <bean name="jBPMKernelLocator" class="org.jbpm.api.client.internal.KernelLocator">
+ <property name="kernel"><inject bean="jboss.kernel:service=Kernel" /></property>
+ </bean>
+
+ <!-- The ProcessEngine -->
+ <bean name="jBPMProcessEngine" class="org.jbpm.integration.client.ProcessEngineImpl">
+ <property name="services">
+ <set elementClass="org.jbpm.api.service.Service">
+ <inject bean="jBPMDialectHandlerService"/>
+ <inject bean="jBPMProcessBuilderService"/>
+ <inject bean="jBPMProcessDefinitionService"/>
+ <inject bean="jBPMProcessService"/>
+ </set>
+ </property>
+ </bean>
+
+ <!-- The PersistenceService -->
+ <bean name="jBPMPersistenceService" class="org.jbpm.integration.service.NoopPersistenceServiceImpl" />
+
+ <!-- The ProcessService -->
+ <bean name="jBPMProcessService" class="org.jbpm.integration.service.ProcessServiceImpl">
+ <property name="interceptors">
+ <list elementClass="java.lang.String">
+ <value>org.jbpm.integration.runtime.NodeExecuteInterceptor</value>
+ </list>
+ </property>
+ </bean>
+
+ <!-- The DialectHandlerService -->
+ <bean name="jBPMDialectHandlerService" class="org.jbpm.integration.service.DialectHandlerServiceImpl">
+ <property name="dialectHandlers">
+ <map keyClass="java.net.URI" valueClass="org.jbpm.api.service.DialectHandler">
+ <entry><key>urn:jbpm.jboss:api-0.1</key><value><inject bean="jBPMDialectHandlerAPI10"/></value></entry>
+ <entry><key>urn:jbpm.org:jpdl-3.2</key><value><inject bean="jBPMDialectHandlerJPDL32"/></value></entry>
+ </map>
+ </property>
+ </bean>
+ <bean name="jBPMDialectHandlerAPI10" class="org.jbpm.dialect.api10.DialectHandlerImpl" />
+ <bean name="jBPMDialectHandlerJPDL32" class="org.jbpm.integration.jpdl32.DialectHandlerImpl" />
+
+ <!-- Other Services -->
+ <bean name="jBPMProcessBuilderService" class="org.jbpm.integration.service.ProcessBuilderServiceImpl" />
+ <bean name="jBPMProcessDefinitionService" class="org.jbpm.integration.service.ProcessDefinitionServiceImpl" />
+
+</deployment>
Property changes on: jbpm3/trunk/modules/integration/jboss42/src/main/etc/jboss-beans.xml
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Modified: jbpm3/trunk/modules/integration/jboss42/src/main/java/org/jbpm/integration/jboss42/PARSubDeployer.java
===================================================================
--- jbpm3/trunk/modules/integration/jboss42/src/main/java/org/jbpm/integration/jboss42/PARSubDeployer.java 2008-11-25 09:50:34 UTC (rev 3070)
+++ jbpm3/trunk/modules/integration/jboss42/src/main/java/org/jbpm/integration/jboss42/PARSubDeployer.java 2008-11-25 09:58:53 UTC (rev 3071)
@@ -54,13 +54,6 @@
}
@Override
- protected void startService() throws Exception
- {
- super.startService();
-
- }
-
- @Override
@SuppressWarnings("unchecked")
public void create(DeploymentInfo di) throws DeploymentException
{
@@ -69,15 +62,12 @@
URL pdURL = getProcessDefinitionURL(di);
log.info("Deploy ProcessDefinition: " + pdURL);
- // Get get ProcessDefinitionService
- ProcessEngine engine = Configuration.getProcessEngine();
- procDefService = engine.getService(ProcessDefinitionService.class);
-
try
{
// Parese and register the procdef
- ProcessDefinition procDef = procDefService.parseProcessDefinition(pdURL);
- procDefService.registerProcessDefinition(procDef);
+ ProcessDefinitionService pdService = getProcessDefinitionService();
+ ProcessDefinition procDef = pdService.parseProcessDefinition(pdURL);
+ pdService.registerProcessDefinition(procDef);
// Remember the procDefID
di.context.put(ProcessDefinition.class.getName(), procDef.getKey());
@@ -103,7 +93,8 @@
{
try
{
- procDefService.unregisterProcessDefinition(procDefID);
+ ProcessDefinitionService pdService = getProcessDefinitionService();
+ pdService.unregisterProcessDefinition(procDefID);
}
catch (RuntimeException rte)
{
@@ -125,4 +116,15 @@
return pdURL;
}
+
+ private ProcessDefinitionService getProcessDefinitionService()
+ {
+ // This is done lazily because the deployers become available before MC beans
+ if (procDefService == null)
+ {
+ ProcessEngine engine = Configuration.getProcessEngine();
+ procDefService = engine.getService(ProcessDefinitionService.class);
+ }
+ return procDefService;
+ }
}
\ No newline at end of file
Modified: jbpm3/trunk/modules/integration/jboss42/src/test/java/org/jbpm/test/integration/deployment/SimpleDeploymentTest.java
===================================================================
--- jbpm3/trunk/modules/integration/jboss42/src/test/java/org/jbpm/test/integration/deployment/SimpleDeploymentTest.java 2008-11-25 09:50:34 UTC (rev 3070)
+++ jbpm3/trunk/modules/integration/jboss42/src/test/java/org/jbpm/test/integration/deployment/SimpleDeploymentTest.java 2008-11-25 09:58:53 UTC (rev 3071)
@@ -37,12 +37,12 @@
public void testSimpleDeploy() throws Exception
{
- //deploy(getResourceURL(PAR_ARCHIVE));
+ deploy(getResourceURL(PAR_ARCHIVE));
}
public void testSimpleUndeploy() throws Exception
{
- //undeploy(getResourceURL(PAR_ARCHIVE));
+ undeploy(getResourceURL(PAR_ARCHIVE));
}
}
Modified: jbpm3/trunk/modules/integration/jboss42/src/test/resources/jndi.properties
===================================================================
--- jbpm3/trunk/modules/integration/jboss42/src/test/resources/jndi.properties 2008-11-25 09:50:34 UTC (rev 3070)
+++ jbpm3/trunk/modules/integration/jboss42/src/test/resources/jndi.properties 2008-11-25 09:58:53 UTC (rev 3071)
@@ -1,3 +1,3 @@
-java.naming.provider.url=jnp://localhost:1099
+java.naming.provider.url=jnp://@jboss.bind.address@:1099
java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory
java.naming.factory.url.pkgs=org.jboss.naming.client
Modified: jbpm3/trunk/pom.xml
===================================================================
--- jbpm3/trunk/pom.xml 2008-11-25 09:50:34 UTC (rev 3070)
+++ jbpm3/trunk/pom.xml 2008-11-25 09:58:53 UTC (rev 3071)
@@ -69,6 +69,7 @@
<jbpm.designer.version>3.1.5</jbpm.designer.version>
<jbpm.gwt-console.version>1.0.0-Beta1</jbpm.gwt-console.version>
<jbpm.jsf-console.version>3.3.0.GA</jbpm.jsf-console.version>
+ <jboss.client.version>4.2.2.GA</jboss.client.version>
<jboss.gravel.version>1.0.0.GA</jboss.gravel.version>
<jboss.seam.version>2.0.2.GA</jboss.seam.version>
<junit.version>3.8.1</junit.version>
@@ -167,16 +168,6 @@
<version>${dom4j.version}</version>
</dependency>
<dependency>
- <groupId>org.drools</groupId>
- <artifactId>drools-compiler</artifactId>
- <version>${drools.version}</version>
- </dependency>
- <dependency>
- <groupId>org.drools</groupId>
- <artifactId>drools-core</artifactId>
- <version>${drools.version}</version>
- </dependency>
- <dependency>
<groupId>dumbster</groupId>
<artifactId>dumbster</artifactId>
<version>${dumbster.version}</version>
@@ -277,6 +268,16 @@
<version>${apache.jackrabbit.version}</version>
</dependency>
<dependency>
+ <groupId>org.drools</groupId>
+ <artifactId>drools-compiler</artifactId>
+ <version>${drools.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.drools</groupId>
+ <artifactId>drools-core</artifactId>
+ <version>${drools.version}</version>
+ </dependency>
+ <dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate</artifactId>
<version>${hibernate.version}</version>
@@ -292,6 +293,11 @@
<version>${hibernate.validator.version}</version>
</dependency>
<dependency>
+ <groupId>org.jboss.client</groupId>
+ <artifactId>jbossall-client</artifactId>
+ <version>${jboss.client.version}</version>
+ </dependency>
+ <dependency>
<groupId>org.jboss.gravel</groupId>
<artifactId>gravel</artifactId>
<version>${jboss.gravel.version}</version>
@@ -443,8 +449,10 @@
<id>distro</id>
<modules>
<module>modules/distribution</module>
+ <!--
<module>modules/db</module>
<module>modules/userguide</module>
+ -->
</modules>
<build>
<plugins>
17 years, 5 months
JBoss JBPM SVN: r3070 - projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/client/internal.
by do-not-reply@jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2008-11-25 04:50:34 -0500 (Tue, 25 Nov 2008)
New Revision: 3070
Modified:
projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/client/internal/MicrocontainerConfigurationProvider.java
Log:
Decouple from default jbpm-cfg-beans.xml
Modified: projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/client/internal/MicrocontainerConfigurationProvider.java
===================================================================
--- projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/client/internal/MicrocontainerConfigurationProvider.java 2008-11-25 09:27:22 UTC (rev 3069)
+++ projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/client/internal/MicrocontainerConfigurationProvider.java 2008-11-25 09:50:34 UTC (rev 3070)
@@ -51,8 +51,13 @@
{
if (engine == null)
{
- URL cfgURL = getDefaultConfigURL();
- engine = getProcessEngine(cfgURL);
+ Kernel kernel = KernelLocator.getKernel();
+ if (kernel == null)
+ {
+ EmbeddedBeansDeployer deployer = new EmbeddedBeansDeployer();
+ deployer.deploy(getDefaultConfigURL());
+ }
+ engine = getProcessEngineBean();
}
return engine;
}
@@ -60,13 +65,7 @@
@Override
public ProcessEngine getProcessEngine(URL cfgURL)
{
- Kernel kernel = KernelLocator.getKernel();
- if (kernel == null)
- {
- EmbeddedBeansDeployer deployer = new EmbeddedBeansDeployer();
- deployer.deploy(cfgURL);
- }
- return getProcessEngineBean();
+ throw new NotImplementedException();
}
@Override
17 years, 5 months
JBoss JBPM SVN: r3069 - jbpm4/trunk/hudson/hudson-home.
by do-not-reply@jboss.org
Author: tom.baeyens(a)jboss.com
Date: 2008-11-25 04:27:22 -0500 (Tue, 25 Nov 2008)
New Revision: 3069
Modified:
jbpm4/trunk/hudson/hudson-home/command.sh
Log:
removing -DskipTests
Modified: jbpm4/trunk/hudson/hudson-home/command.sh
===================================================================
--- jbpm4/trunk/hudson/hudson-home/command.sh 2008-11-25 07:05:06 UTC (rev 3068)
+++ jbpm4/trunk/hudson/hudson-home/command.sh 2008-11-25 09:27:22 UTC (rev 3069)
@@ -16,7 +16,7 @@
#
cd $JBPMDIR
cp profiles.xml.example profiles.xml
-MVN_CMD="mvn $ENVIRONMENT -Pskiptests clean install"
+MVN_CMD="mvn $ENVIRONMENT clean install"
echo $MVN_CMD; $MVN_CMD 2>&1; MVN_STATUS=$?
if [ $MVN_STATUS -ne 0 ]; then
echo maven exit status $MVN_STATUS
17 years, 5 months
JBoss JBPM SVN: r3068 - jbpm3/trunk/hudson/hudson-home.
by do-not-reply@jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2008-11-25 02:05:06 -0500 (Tue, 25 Nov 2008)
New Revision: 3068
Modified:
jbpm3/trunk/hudson/hudson-home/command.sh
Log:
[IZPACK-153] remove slf4j-api.jar on jboss500
Modified: jbpm3/trunk/hudson/hudson-home/command.sh
===================================================================
--- jbpm3/trunk/hudson/hudson-home/command.sh 2008-11-25 07:04:45 UTC (rev 3067)
+++ jbpm3/trunk/hudson/hudson-home/command.sh 2008-11-25 07:05:06 UTC (rev 3068)
@@ -67,7 +67,7 @@
rm $JBOSS_HOME/server/$JBOSS_SERVER/deploy/jbpm/jbpm-service.sar/hibernate.cfg.xml
cp $JBOSS_HOME/docs/examples/jbpm/jbpm-$DATABASE-ds.xml $JBOSS_HOME/server/$JBOSS_SERVER/deploy/jbpm/jbpm-$DATABASE-ds.xml
cp $JBOSS_HOME/docs/examples/jbpm/hibernate.cfg.$DATABASE.xml $JBOSS_HOME/server/$JBOSS_SERVER/deploy/jbpm/jbpm-service.sar/hibernate.cfg.xml
-if [ $CONTAINER = 'jboss500' ]; then
+if [ $CONTAINER = "jboss500" ]; then
rm $JBOSS_HOME/server/$JBOSS_SERVER/deploy/jbpm/jbpm-service.sar/slf4j-api.jar
fi
17 years, 5 months
JBoss JBPM SVN: r3067 - jbpm3/trunk/hudson/hudson-home.
by do-not-reply@jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2008-11-25 02:04:45 -0500 (Tue, 25 Nov 2008)
New Revision: 3067
Modified:
jbpm3/trunk/hudson/hudson-home/command.sh
Log:
[IZPACK-153] remove slf4j-api.jar on jboss500
Modified: jbpm3/trunk/hudson/hudson-home/command.sh
===================================================================
--- jbpm3/trunk/hudson/hudson-home/command.sh 2008-11-25 07:03:07 UTC (rev 3066)
+++ jbpm3/trunk/hudson/hudson-home/command.sh 2008-11-25 07:04:45 UTC (rev 3067)
@@ -67,7 +67,7 @@
rm $JBOSS_HOME/server/$JBOSS_SERVER/deploy/jbpm/jbpm-service.sar/hibernate.cfg.xml
cp $JBOSS_HOME/docs/examples/jbpm/jbpm-$DATABASE-ds.xml $JBOSS_HOME/server/$JBOSS_SERVER/deploy/jbpm/jbpm-$DATABASE-ds.xml
cp $JBOSS_HOME/docs/examples/jbpm/hibernate.cfg.$DATABASE.xml $JBOSS_HOME/server/$JBOSS_SERVER/deploy/jbpm/jbpm-service.sar/hibernate.cfg.xml
-if [ $CONTAINER -e 'jboss500' ]; then
+if [ $CONTAINER = 'jboss500' ]; then
rm $JBOSS_HOME/server/$JBOSS_SERVER/deploy/jbpm/jbpm-service.sar/slf4j-api.jar
fi
17 years, 5 months
JBoss JBPM SVN: r3066 - jbpm3/trunk/hudson/hudson-home.
by do-not-reply@jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2008-11-25 02:03:07 -0500 (Tue, 25 Nov 2008)
New Revision: 3066
Modified:
jbpm3/trunk/hudson/hudson-home/command.sh
Log:
[IZPACK-153] remove slf4j-api.jar on jboss500
Modified: jbpm3/trunk/hudson/hudson-home/command.sh
===================================================================
--- jbpm3/trunk/hudson/hudson-home/command.sh 2008-11-25 01:45:58 UTC (rev 3065)
+++ jbpm3/trunk/hudson/hudson-home/command.sh 2008-11-25 07:03:07 UTC (rev 3066)
@@ -67,6 +67,9 @@
rm $JBOSS_HOME/server/$JBOSS_SERVER/deploy/jbpm/jbpm-service.sar/hibernate.cfg.xml
cp $JBOSS_HOME/docs/examples/jbpm/jbpm-$DATABASE-ds.xml $JBOSS_HOME/server/$JBOSS_SERVER/deploy/jbpm/jbpm-$DATABASE-ds.xml
cp $JBOSS_HOME/docs/examples/jbpm/hibernate.cfg.$DATABASE.xml $JBOSS_HOME/server/$JBOSS_SERVER/deploy/jbpm/jbpm-service.sar/hibernate.cfg.xml
+if [ $CONTAINER -e 'jboss500' ]; then
+ rm $JBOSS_HOME/server/$JBOSS_SERVER/deploy/jbpm/jbpm-service.sar/slf4j-api.jar
+fi
#
# start jbossas
17 years, 5 months