JBoss JBPM SVN: r2691 - projects/gwt-console/trunk/server/src/main/java/org/jboss/bpm/console/server/dao/internal.
by do-not-reply@jboss.org
Author: heiko.braun(a)jboss.com
Date: 2008-10-31 05:10:33 -0400 (Fri, 31 Oct 2008)
New Revision: 2691
Added:
projects/gwt-console/trunk/server/src/main/java/org/jboss/bpm/console/server/dao/internal/JBPM3FormParser.java
Log:
Added a prelimenary parse for jbpm3 jsf forms
Added: projects/gwt-console/trunk/server/src/main/java/org/jboss/bpm/console/server/dao/internal/JBPM3FormParser.java
===================================================================
--- projects/gwt-console/trunk/server/src/main/java/org/jboss/bpm/console/server/dao/internal/JBPM3FormParser.java (rev 0)
+++ projects/gwt-console/trunk/server/src/main/java/org/jboss/bpm/console/server/dao/internal/JBPM3FormParser.java 2008-10-31 09:10:33 UTC (rev 2691)
@@ -0,0 +1,321 @@
+/*
+ * 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.dao.internal;
+
+import org.jboss.bpm.console.server.util.DOMUtils;
+import org.w3c.dom.Element;
+
+import java.io.ByteArrayInputStream;
+import java.io.InputStream;
+import java.util.Iterator;
+import java.util.List;
+import java.util.ArrayList;
+
+/**
+ * @author Heiko.Braun <heiko.braun(a)jboss.com>
+ */
+public class JBPM3FormParser
+{
+ 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<InputField> inputFields = new ArrayList<InputField>();
+ private List<InputButton> inputButtons = new ArrayList<InputButton>();
+
+ static ParseResultVisitor DUMPING_VISITOR = new ParseResultVisitor()
+ {
+
+ public void onInputField(InputField field)
+ {
+ System.out.println(field);
+
+ }
+
+ public void onInputButton(InputButton btn)
+ {
+ System.out.println(btn);
+ }
+ };
+
+ 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()));
+
+ }
+
+ 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());
+ }
+
+ visitResults(DUMPING_VISITOR);
+ }
+
+ 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))
+ {
+ 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(InputField 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 = DOMUtils.getAttributeValue(next, "value");
+ inputFields.add( new InputField(varName, FIELD_TYPE.TEXTAREA));
+ }
+
+ private void parseBooleanInputField(Element next)
+ {
+ String varName = DOMUtils.getAttributeValue(next, "value");
+ inputFields.add( new InputField(varName, FIELD_TYPE.BOOL));
+ }
+
+ private void parseButtonInputField(Element next)
+ {
+ String name = DOMUtils.getAttributeValue(next, "value");
+ String transition = DOMUtils.getAttributeValue(next, "transition");
+ inputButtons.add( new InputButton(name, transition));
+ }
+
+ private void parseTextInputField(Element next)
+ {
+ String varName = DOMUtils.getAttributeValue(next, "value");
+ inputFields.add( new InputField(varName, FIELD_TYPE.TEXT));
+ }
+
+ 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;
+ }
+
+ enum FIELD_TYPE {BOOL, TEXT, TEXTAREA};
+
+ final class InputField
+ {
+ String name;
+ FIELD_TYPE type;
+
+ public InputField(String name, FIELD_TYPE type)
+ {
+ this.name = trimVarName(name);
+ this.type = type;
+ }
+
+ private String trimVarName(String varname)
+ {
+ String result = varname;
+ if(varname.startsWith("#{var['"))
+ {
+ result = varname.substring( 7, varname.length()-3);
+ }
+
+ return result;
+ }
+
+
+ public String toString()
+ {
+ return "Field{"+type + ": " + name+"}";
+ }
+ }
+
+ 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(InputField field);
+ void onInputButton(InputButton btn);
+ }
+}
15 years, 6 months
JBoss JBPM SVN: r2690 - projects/gwt-console/trunk/server/src/main/java/org/jboss/bpm/console/server/util.
by do-not-reply@jboss.org
Author: heiko.braun(a)jboss.com
Date: 2008-10-31 05:09:52 -0400 (Fri, 31 Oct 2008)
New Revision: 2690
Added:
projects/gwt-console/trunk/server/src/main/java/org/jboss/bpm/console/server/util/DOMUtils.java
projects/gwt-console/trunk/server/src/main/java/org/jboss/bpm/console/server/util/ServiceLoader.java
Log:
Migrate DOMUtils and ServiceLoader fom JBossWS
Added: projects/gwt-console/trunk/server/src/main/java/org/jboss/bpm/console/server/util/DOMUtils.java
===================================================================
--- projects/gwt-console/trunk/server/src/main/java/org/jboss/bpm/console/server/util/DOMUtils.java (rev 0)
+++ projects/gwt-console/trunk/server/src/main/java/org/jboss/bpm/console/server/util/DOMUtils.java 2008-10-31 09:09:52 UTC (rev 2690)
@@ -0,0 +1,732 @@
+/*
+ * 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.util;
+
+import java.io.ByteArrayInputStream;
+import java.io.ByteArrayOutputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.Reader;
+import java.util.LinkedList;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+
+import javax.xml.namespace.QName;
+import javax.xml.parsers.DocumentBuilder;
+import javax.xml.parsers.DocumentBuilderFactory;
+import javax.xml.parsers.ParserConfigurationException;
+import javax.xml.transform.OutputKeys;
+import javax.xml.transform.Source;
+import javax.xml.transform.Transformer;
+import javax.xml.transform.TransformerException;
+import javax.xml.transform.TransformerFactory;
+import javax.xml.transform.dom.DOMSource;
+import javax.xml.transform.sax.SAXSource;
+import javax.xml.transform.stream.StreamResult;
+import javax.xml.transform.stream.StreamSource;
+
+import org.jboss.logging.Logger;
+import org.w3c.dom.Attr;
+import org.w3c.dom.Document;
+import org.w3c.dom.Element;
+import org.w3c.dom.NamedNodeMap;
+import org.w3c.dom.Node;
+import org.w3c.dom.NodeList;
+import org.w3c.dom.Text;
+import org.xml.sax.EntityResolver;
+import org.xml.sax.InputSource;
+import org.xml.sax.SAXException;
+
+/**
+ * DOM2 utilites
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @author alessio.soldano(a)jboss.com
+ */
+public final class DOMUtils
+{
+ private static Logger log = Logger.getLogger(DOMUtils.class);
+
+ // All elements created by the same thread are created by the same builder and belong to the same doc
+ private static ThreadLocal<Document> documentThreadLocal = new ThreadLocal<Document>();
+ private static ThreadLocal<DocumentBuilder> builderThreadLocal = new ThreadLocal<DocumentBuilder>()
+ {
+ protected DocumentBuilder initialValue()
+ {
+ try
+ {
+ DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
+ factory.setValidating(false);
+ factory.setNamespaceAware(true);
+ DocumentBuilder builder = factory.newDocumentBuilder();
+ setEntityResolver(builder);
+ return builder;
+ }
+ catch (ParserConfigurationException e)
+ {
+ throw new RuntimeException("Failed to create DocumentBuilder", e);
+ }
+ }
+
+ private void setEntityResolver(DocumentBuilder builder)
+ {
+ String[] resolvers = new String[] { "org.jboss.ws.core.utils.JBossWSEntityResolver", "org.jboss.util.xml.JBossEntityResolver" };
+
+ EntityResolver entityResolver = null;
+ ClassLoader loader = Thread.currentThread().getContextClassLoader();
+ for (String resolver : resolvers)
+ {
+ try
+ {
+ Class<?> resolverClass = loader.loadClass(resolver);
+ entityResolver = (EntityResolver)resolverClass.newInstance();
+ }
+ catch (Exception ex)
+ {
+ log.debug("Cannot load: " + resolver);
+ }
+ }
+
+ if (entityResolver != null)
+ builder.setEntityResolver(entityResolver);
+ }
+ };
+
+ public static void clearThreadLocals()
+ {
+ documentThreadLocal.remove();
+ builderThreadLocal.remove();
+ }
+
+ // Hide the constructor
+ private DOMUtils()
+ {
+ }
+
+ /** Initialize the DocumentBuilder
+ */
+ public static DocumentBuilder getDocumentBuilder()
+ {
+ return builderThreadLocal.get();
+ }
+
+ /** Parse the given XML string and return the root Element
+ */
+ public static Element parse(String xmlString) throws IOException
+ {
+ try
+ {
+ return parse(new ByteArrayInputStream(xmlString.getBytes("UTF-8")));
+ }
+ catch (IOException e)
+ {
+ log.error("Cannot parse: " + xmlString);
+ throw e;
+ }
+ }
+
+ /** Parse the given XML stream and return the root Element
+ */
+ public static Element parse(InputStream xmlStream) throws IOException
+ {
+ try
+ {
+ return getDocumentBuilder().parse(xmlStream).getDocumentElement();
+ }
+ catch (SAXException se)
+ {
+ throw new IOException(se.toString());
+ }
+ finally
+ {
+ xmlStream.close();
+ }
+ }
+
+ /** Parse the given input source and return the root Element
+ */
+ public static Element parse(InputSource source) throws IOException
+ {
+ try
+ {
+ return getDocumentBuilder().parse(source).getDocumentElement();
+ }
+ catch (SAXException se)
+ {
+ throw new IOException(se.toString());
+ }
+ finally
+ {
+ InputStream is = source.getByteStream();
+ if (is != null)
+ {
+ is.close();
+ }
+ Reader r = source.getCharacterStream();
+ if (r != null)
+ {
+ r.close();
+ }
+ }
+ }
+
+ /** Create an Element for a given name
+ */
+ public static Element createElement(String localPart)
+ {
+ Document doc = getOwnerDocument();
+ log.trace("createElement {}" + localPart);
+ return doc.createElement(localPart);
+ }
+
+ /** Create an Element for a given name and prefix
+ */
+ public static Element createElement(String localPart, String prefix)
+ {
+ Document doc = getOwnerDocument();
+ log.trace("createElement {}" + prefix + ":" + localPart);
+ return doc.createElement(prefix + ":" + localPart);
+ }
+
+ /** Create an Element for a given name, prefix and uri
+ */
+ public static Element createElement(String localPart, String prefix, String uri)
+ {
+ Document doc = getOwnerDocument();
+ if (prefix == null || prefix.length() == 0)
+ {
+ log.trace("createElement {" + uri + "}" + localPart);
+ return doc.createElementNS(uri, localPart);
+ }
+ else
+ {
+ log.trace("createElement {" + uri + "}" + prefix + ":" + localPart);
+ return doc.createElementNS(uri, prefix + ":" + localPart);
+ }
+ }
+
+ /** Create an Element for a given QName
+ */
+ public static Element createElement(QName qname)
+ {
+ return createElement(qname.getLocalPart(), qname.getPrefix(), qname.getNamespaceURI());
+ }
+
+ /** Create a org.w3c.dom.Text node
+ */
+ public static Text createTextNode(String value)
+ {
+ Document doc = getOwnerDocument();
+ return doc.createTextNode(value);
+ }
+
+ /** Get the qname of the given node.
+ */
+ public static QName getElementQName(Element el)
+ {
+ String qualifiedName = el.getNodeName();
+ return resolveQName(el, qualifiedName);
+ }
+
+ /** Transform the given qualified name into a QName
+ */
+ public static QName resolveQName(Element el, String qualifiedName)
+ {
+ QName qname;
+ String prefix = "";
+ String namespaceURI = "";
+ String localPart = qualifiedName;
+
+ int colIndex = qualifiedName.indexOf(":");
+ if (colIndex > 0)
+ {
+ prefix = qualifiedName.substring(0, colIndex);
+ localPart = qualifiedName.substring(colIndex + 1);
+
+ if ("xmlns".equals(prefix))
+ {
+ namespaceURI = "URI:XML_PREDEFINED_NAMESPACE";
+ }
+ else
+ {
+ Element nsElement = el;
+ while (namespaceURI.equals("") && nsElement != null)
+ {
+ namespaceURI = nsElement.getAttribute("xmlns:" + prefix);
+ if (namespaceURI.equals(""))
+ nsElement = getParentElement(nsElement);
+ }
+ }
+
+ if (namespaceURI.equals(""))
+ throw new IllegalArgumentException("Cannot find namespace uri for: " + qualifiedName);
+ }
+ else
+ {
+ Element nsElement = el;
+ while (namespaceURI.equals("") && nsElement != null)
+ {
+ namespaceURI = nsElement.getAttribute("xmlns");
+ if (namespaceURI.equals(""))
+ nsElement = getParentElement(nsElement);
+ }
+ }
+
+ qname = new QName(namespaceURI, localPart, prefix);
+ return qname;
+ }
+
+ /** Get the value from the given attribute
+ *
+ * @return null if the attribute value is empty or the attribute is not present
+ */
+ public static String getAttributeValue(Element el, String attrName)
+ {
+ return getAttributeValue(el, new QName(attrName));
+ }
+
+ /** Get the value from the given attribute
+ *
+ * @return null if the attribute value is empty or the attribute is not present
+ */
+ public static String getAttributeValue(Element el, QName attrName)
+ {
+ String attr = null;
+ if ("".equals(attrName.getNamespaceURI()))
+ attr = el.getAttribute(attrName.getLocalPart());
+ else attr = el.getAttributeNS(attrName.getNamespaceURI(), attrName.getLocalPart());
+
+ if ("".equals(attr))
+ attr = null;
+
+ return attr;
+ }
+
+ /** Get the qname value from the given attribute
+ */
+ public static QName getAttributeValueAsQName(Element el, String attrName)
+ {
+ return getAttributeValueAsQName(el, new QName(attrName));
+
+ }
+
+ /** Get the qname value from the given attribute
+ */
+ public static QName getAttributeValueAsQName(Element el, QName attrName)
+ {
+ QName qname = null;
+
+ String qualifiedName = getAttributeValue(el, attrName);
+ if (qualifiedName != null)
+ {
+ qname = resolveQName(el, qualifiedName);
+ }
+
+ return qname;
+ }
+
+ /** Get the boolean value from the given attribute
+ */
+ public static boolean getAttributeValueAsBoolean(Element el, String attrName)
+ {
+ return getAttributeValueAsBoolean(el, new QName(attrName));
+ }
+
+ /** Get the boolean value from the given attribute
+ */
+ public static boolean getAttributeValueAsBoolean(Element el, QName attrName)
+ {
+ String attrVal = getAttributeValue(el, attrName);
+ boolean ret = "true".equalsIgnoreCase(attrVal) || "1".equalsIgnoreCase(attrVal);
+ return ret;
+ }
+
+ /** Get the integer value from the given attribute
+ */
+ public static Integer getAttributeValueAsInteger(Element el, String attrName)
+ {
+ return getAttributeValueAsInteger(el, new QName(attrName));
+ }
+
+ /** Get the integer value from the given attribute
+ */
+ public static Integer getAttributeValueAsInteger(Element el, QName attrName)
+ {
+ String attrVal = getAttributeValue(el, attrName);
+ return (attrVal != null ? new Integer(attrVal) : null);
+ }
+
+ /** Get the attributes as Map<QName, String>
+ */
+ public static Map getAttributes(Element el)
+ {
+ Map attmap = new HashMap();
+ NamedNodeMap attribs = el.getAttributes();
+ for (int i = 0; i < attribs.getLength(); i++)
+ {
+ Attr attr = (Attr)attribs.item(i);
+ String name = attr.getName();
+ QName qname = resolveQName(el, name);
+ String value = attr.getNodeValue();
+ attmap.put(qname, value);
+ }
+ return attmap;
+ }
+
+ /** Copy attributes between elements
+ */
+ public static void copyAttributes(Element destElement, Element srcElement)
+ {
+ NamedNodeMap attribs = srcElement.getAttributes();
+ for (int i = 0; i < attribs.getLength(); i++)
+ {
+ Attr attr = (Attr)attribs.item(i);
+ String uri = attr.getNamespaceURI();
+ String qname = attr.getName();
+ String value = attr.getNodeValue();
+
+ // Prevent DOMException: NAMESPACE_ERR: An attempt is made to create or
+ // change an object in a way which is incorrect with regard to namespaces.
+ if (uri == null && qname.startsWith("xmlns"))
+ {
+ log.trace("Ignore attribute: [uri=" + uri + ",qname=" + qname + ",value=" + value + "]");
+ }
+ else
+ {
+ destElement.setAttributeNS(uri, qname, value);
+ }
+ }
+ }
+
+ /** True if the node has text child elements only
+ */
+ public static boolean hasTextChildNodesOnly(Node node)
+ {
+ NodeList nodeList = node.getChildNodes();
+ if (nodeList.getLength() == 0)
+ return false;
+
+ for (int i = 0; i < nodeList.getLength(); i++)
+ {
+ Node acksToChildNode = nodeList.item(i);
+ if (acksToChildNode.getNodeType() != Node.TEXT_NODE)
+ return false;
+ }
+
+ return true;
+ }
+
+ /** True if the node has child elements
+ */
+ public static boolean hasChildElements(Node node)
+ {
+ NodeList nlist = node.getChildNodes();
+ for (int i = 0; i < nlist.getLength(); i++)
+ {
+ Node child = nlist.item(i);
+ if (child.getNodeType() == Node.ELEMENT_NODE)
+ return true;
+ }
+ return false;
+ }
+
+ /** Gets child elements
+ */
+ public static Iterator<Element> getChildElements(Node node)
+ {
+ List<Element> list = new LinkedList<Element>();
+ NodeList nlist = node.getChildNodes();
+ for (int i = 0; i < nlist.getLength(); i++)
+ {
+ Node child = nlist.item(i);
+ if (child.getNodeType() == Node.ELEMENT_NODE)
+ list.add((Element)child);
+ }
+ return list.iterator();
+ }
+
+ /** Get the concatenated text content, or null.
+ */
+ public static String getTextContent(Node node)
+ {
+ boolean hasTextContent = false;
+ StringBuffer buffer = new StringBuffer();
+ NodeList nlist = node.getChildNodes();
+ for (int i = 0; i < nlist.getLength(); i++)
+ {
+ Node child = nlist.item(i);
+ if (child.getNodeType() == Node.TEXT_NODE)
+ {
+ buffer.append(child.getNodeValue());
+ hasTextContent = true;
+ }
+ }
+ return (hasTextContent ? buffer.toString() : null);
+ }
+
+ /** Gets the first child element
+ */
+ public static Element getFirstChildElement(Node node)
+ {
+ return getFirstChildElement(node, false);
+ }
+
+ /** Gets the first child element
+ */
+ public static Element getFirstChildElement(Node node, boolean recursive)
+ {
+ return getFirstChildElementIntern(node, null, recursive);
+ }
+
+ /** Gets the first child element for a given local name without namespace
+ */
+ public static Element getFirstChildElement(Node node, String nodeName)
+ {
+ return getFirstChildElement(node, nodeName, false);
+ }
+
+ /** Gets the first child element for a given local name without namespace
+ */
+ public static Element getFirstChildElement(Node node, String nodeName, boolean recursive)
+ {
+ return getFirstChildElementIntern(node, new QName(nodeName), recursive);
+ }
+
+ /** Gets the first child element for a given qname
+ */
+ public static Element getFirstChildElement(Node node, QName nodeName)
+ {
+ return getFirstChildElement(node, nodeName, false);
+ }
+
+ /** Gets the first child element for a given qname
+ */
+ public static Element getFirstChildElement(Node node, QName nodeName, boolean recursive)
+ {
+ return getFirstChildElementIntern(node, nodeName, recursive);
+ }
+
+ private static Element getFirstChildElementIntern(Node node, QName nodeName, boolean recursive)
+ {
+ Element childElement = null;
+ Iterator it = getChildElementsIntern(node, nodeName, recursive);
+ if (it.hasNext())
+ {
+ childElement = (Element)it.next();
+ }
+ return childElement;
+ }
+
+ /** Gets the child elements for a given local name without namespace
+ */
+ public static Iterator getChildElements(Node node, String nodeName)
+ {
+ return getChildElements(node, nodeName, false);
+ }
+
+ /** Gets the child elements for a given local name without namespace
+ */
+ public static Iterator getChildElements(Node node, String nodeName, boolean recursive)
+ {
+ return getChildElementsIntern(node, new QName(nodeName), recursive);
+ }
+
+ /** Gets the child element for a given qname
+ */
+ public static Iterator getChildElements(Node node, QName nodeName)
+ {
+ return getChildElements(node, nodeName, false);
+ }
+
+ /** Gets the child element for a given qname
+ */
+ public static Iterator getChildElements(Node node, QName nodeName, boolean recursive)
+ {
+ return getChildElementsIntern(node, nodeName, recursive);
+ }
+
+ public static List<Element> getChildElementsAsList(Node node, String nodeName)
+ {
+ return getChildElementsAsList(node, nodeName, false);
+ }
+
+ public static List<Element> getChildElementsAsList(Node node, String nodeName, boolean recursive)
+ {
+ return getChildElementsAsListIntern(node, new QName(nodeName), recursive);
+ }
+
+ public static List<Element> getChildElementsAsList(Node node, QName nodeName)
+ {
+ return getChildElementsAsList(node, nodeName, false);
+ }
+
+ public static List<Element> getChildElementsAsList(Node node, QName nodeName, boolean recursive)
+ {
+ return getChildElementsAsListIntern(node, nodeName, recursive);
+ }
+
+ private static List<Element> getChildElementsAsListIntern(Node node, QName nodeName, boolean recursive)
+ {
+ List<Element> list = new LinkedList<Element>();
+ NodeList nlist = node.getChildNodes();
+ for (int i = 0; i < nlist.getLength(); i++)
+ {
+ Node child = nlist.item(i);
+ if (child.getNodeType() == Node.ELEMENT_NODE)
+ {
+ search(list, (Element)child, nodeName, recursive);
+ }
+ }
+ return list;
+ }
+
+ private static void search(List<Element> list, Element baseElement, QName nodeName, boolean recursive)
+ {
+ if (nodeName == null)
+ {
+ list.add(baseElement);
+ }
+ else
+ {
+ QName qname;
+ if (nodeName.getNamespaceURI().length() > 0)
+ {
+ qname = new QName(baseElement.getNamespaceURI(), baseElement.getLocalName());
+ }
+ else
+ {
+ qname = new QName(baseElement.getLocalName());
+ }
+ if (qname.equals(nodeName))
+ {
+ list.add(baseElement);
+ }
+ }
+ if (recursive)
+ {
+ NodeList nlist = baseElement.getChildNodes();
+ for (int i = 0; i < nlist.getLength(); i++)
+ {
+ Node child = nlist.item(i);
+ if (child.getNodeType() == Node.ELEMENT_NODE)
+ {
+ search(list, (Element)child, nodeName, recursive);
+ }
+ }
+ }
+ }
+
+ private static Iterator getChildElementsIntern(Node node, QName nodeName, boolean recursive)
+ {
+ return getChildElementsAsListIntern(node, nodeName, recursive).iterator();
+ }
+
+ /** Gets parent element or null if there is none
+ */
+ public static Element getParentElement(Node node)
+ {
+ Node parent = node.getParentNode();
+ return (parent instanceof Element ? (Element)parent : null);
+ }
+
+ /** Get the owner document that is associated with the current thread */
+ public static Document getOwnerDocument()
+ {
+ Document doc = documentThreadLocal.get();
+ if (doc == null)
+ {
+ doc = getDocumentBuilder().newDocument();
+ documentThreadLocal.set(doc);
+ }
+ return doc;
+ }
+
+ public static Element sourceToElement(Source source) throws IOException
+ {
+ Element retElement = null;
+
+ try
+ {
+ if (source instanceof StreamSource)
+ {
+ StreamSource streamSource = (StreamSource)source;
+
+ InputStream ins = streamSource.getInputStream();
+ if (ins != null)
+ {
+ retElement = DOMUtils.parse(ins);
+ }
+ else
+ {
+ Reader reader = streamSource.getReader();
+ retElement = DOMUtils.parse(new InputSource(reader));
+ }
+ }
+ else if (source instanceof DOMSource)
+ {
+ DOMSource domSource = (DOMSource)source;
+ Node node = domSource.getNode();
+ if (node instanceof Element)
+ {
+ retElement = (Element)node;
+ }
+ else if (node instanceof Document)
+ {
+ retElement = ((Document)node).getDocumentElement();
+ }
+ else
+ {
+ throw new RuntimeException("Unsupported Node type: " + node.getClass().getName());
+ }
+ }
+ else if (source instanceof SAXSource)
+ {
+ // The fact that JAXBSource derives from SAXSource is an implementation detail.
+ // Thus in general applications are strongly discouraged from accessing methods defined on SAXSource.
+ // The XMLReader object obtained by the getXMLReader method shall be used only for parsing the InputSource object returned by the getInputSource method.
+
+ TransformerFactory tf = TransformerFactory.newInstance();
+ ByteArrayOutputStream baos = new ByteArrayOutputStream(1024);
+ Transformer transformer = tf.newTransformer();
+ transformer.setOutputProperty(OutputKeys.OMIT_XML_DECLARATION, "yes");
+ transformer.setOutputProperty(OutputKeys.METHOD, "xml");
+ transformer.transform(source, new StreamResult(baos));
+ retElement = DOMUtils.parse(new ByteArrayInputStream(baos.toByteArray()));
+ }
+ else
+ {
+ throw new RuntimeException("Source type not implemented: " + source.getClass().getName());
+ }
+
+ }
+ catch (TransformerException ex)
+ {
+ IOException ioex = new IOException();
+ ioex.initCause(ex);
+ throw ioex;
+ }
+
+ return retElement;
+ }
+}
\ No newline at end of file
Added: projects/gwt-console/trunk/server/src/main/java/org/jboss/bpm/console/server/util/ServiceLoader.java
===================================================================
--- projects/gwt-console/trunk/server/src/main/java/org/jboss/bpm/console/server/util/ServiceLoader.java (rev 0)
+++ projects/gwt-console/trunk/server/src/main/java/org/jboss/bpm/console/server/util/ServiceLoader.java 2008-10-31 09:09:52 UTC (rev 2690)
@@ -0,0 +1,249 @@
+/*
+ * 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.util;
+
+import java.io.BufferedReader;
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.security.AccessController;
+import java.security.PrivilegedAction;
+import java.util.Properties;
+
+/**
+ * Load a service class using this ordered lookup procedure
+ *
+ * @author Thomas.Diesler(a)jboss.com
+ * @since 14-Dec-2006
+ */
+public abstract class ServiceLoader
+{
+ /**
+ * This method uses the algorithm below using the JAXWS Provider as an example.
+ *
+ * 1. If a resource with the name of META-INF/services/javax.xml.ws.spi.Provider exists, then
+ * its first line, if present, is used as the UTF-8 encoded name of the implementation class.
+ *
+ * 2. If the ${java.home}/lib/jaxws.properties file exists and it is readable by the
+ * java.util.Properties.load(InputStream) method and it contains an entry whose key is
+ * javax.xml.ws.spi.Provider, then the value of that entry is used as the name of the implementation class.
+ *
+ * 3. If a system property with the name javax.xml.ws.spi.Provider is defined, then its value is used
+ * as the name of the implementation class.
+ *
+ * 4. Finally, a default implementation class name is used.
+ */
+ public static Object loadService(String propertyName, String defaultFactory)
+ {
+ Object factory = loadFromServices(propertyName, null);
+ if (factory == null)
+ {
+ factory = loadFromPropertiesFile(propertyName, null);
+ }
+ if (factory == null)
+ {
+ factory = loadFromSystemProperty(propertyName, defaultFactory);
+ }
+ return factory;
+ }
+
+ /** Use the Services API (as detailed in the JAR specification), if available, to determine the classname.
+ */
+ public static Object loadFromServices(String propertyName, String defaultFactory)
+ {
+ Object factory = null;
+ String factoryName = null;
+ ClassLoader loader = Thread.currentThread().getContextClassLoader();
+
+ // Use the Services API (as detailed in the JAR specification), if available, to determine the classname.
+ String filename = "META-INF/services/" + propertyName;
+ InputStream inStream = loader.getResourceAsStream(filename);
+ if (inStream != null)
+ {
+ try
+ {
+ BufferedReader br = new BufferedReader(new InputStreamReader(inStream, "UTF-8"));
+ factoryName = br.readLine();
+ br.close();
+ if (factoryName != null)
+ {
+ Class factoryClass = loader.loadClass(factoryName);
+ factory = factoryClass.newInstance();
+ }
+ }
+ catch (Throwable t)
+ {
+ throw new IllegalStateException("Failed to load " + propertyName + ": " + factoryName, t);
+ }
+ }
+
+ // Use the default factory implementation class.
+ if (factory == null && defaultFactory != null)
+ {
+ factory = loadDefault(defaultFactory);
+ }
+
+ return factory;
+ }
+
+ /** Use the system property
+ */
+ public static Object loadFromSystemProperty(String propertyName, String defaultFactory)
+ {
+ Object factory = null;
+ ClassLoader loader = Thread.currentThread().getContextClassLoader();
+
+ PrivilegedAction action = new PropertyAccessAction(propertyName);
+ String factoryName = (String)AccessController.doPrivileged(action);
+ if (factoryName != null)
+ {
+ try
+ {
+ //if(log.isDebugEnabled()) log.debug("Load from system property: " + factoryName);
+ Class factoryClass = loader.loadClass(factoryName);
+ factory = factoryClass.newInstance();
+ }
+ catch (Throwable t)
+ {
+ throw new IllegalStateException("Failed to load " + propertyName + ": " + factoryName, t);
+ }
+ }
+
+ // Use the default factory implementation class.
+ if (factory == null && defaultFactory != null)
+ {
+ factory = loadDefault(defaultFactory);
+ }
+
+ return factory;
+ }
+
+ /**
+ * Use the properties file "${java.home}/lib/jaxws.properties" in the JRE directory.
+ * This configuration file is in standard java.util.Properties format and contains the
+ * fully qualified name of the implementation class with the key being the system property defined above.
+ */
+ public static Object loadFromPropertiesFile(String propertyName, String defaultFactory)
+ {
+ Object factory = null;
+ String factoryName = null;
+ ClassLoader loader = Thread.currentThread().getContextClassLoader();
+
+ // Use the properties file "lib/jaxm.properties" in the JRE directory.
+ // This configuration file is in standard java.util.Properties format and contains the fully qualified name of the implementation class with the key being the system property defined above.
+ PrivilegedAction action = new PropertyAccessAction("java.home");
+ String javaHome = (String)AccessController.doPrivileged(action);
+ File jaxmFile = new File(javaHome + "/lib/jaxws.properties");
+ if (jaxmFile.exists())
+ {
+ try
+ {
+ action = new PropertyFileAccessAction(jaxmFile.getCanonicalPath());
+ Properties jaxmProperties = (Properties)AccessController.doPrivileged(action);
+ factoryName = jaxmProperties.getProperty(propertyName);
+ if (factoryName != null)
+ {
+ //if(log.isDebugEnabled()) log.debug("Load from " + jaxmFile + ": " + factoryName);
+ Class factoryClass = loader.loadClass(factoryName);
+ factory = factoryClass.newInstance();
+ }
+ }
+ catch (Throwable t)
+ {
+ throw new IllegalStateException("Failed to load " + propertyName + ": " + factoryName, t);
+ }
+ }
+
+ // Use the default factory implementation class.
+ if (factory == null && defaultFactory != null)
+ {
+ factory = loadDefault(defaultFactory);
+ }
+
+ return factory;
+ }
+
+ private static Object loadDefault(String defaultFactory)
+ {
+ Object factory = null;
+ ClassLoader loader = Thread.currentThread().getContextClassLoader();
+
+ // Use the default factory implementation class.
+ if (defaultFactory != null)
+ {
+ try
+ {
+ //if(log.isDebugEnabled()) log.debug("Load from default: " + factoryName);
+ Class factoryClass = loader.loadClass(defaultFactory);
+ factory = factoryClass.newInstance();
+ }
+ catch (Throwable t)
+ {
+ throw new IllegalStateException("Failed to load: " + defaultFactory, t);
+ }
+ }
+
+ return factory;
+ }
+
+ private static class PropertyAccessAction implements PrivilegedAction
+ {
+ private String name;
+
+ PropertyAccessAction(String name)
+ {
+ this.name = name;
+ }
+
+ public Object run()
+ {
+ return System.getProperty(name);
+ }
+ }
+
+ private static class PropertyFileAccessAction implements PrivilegedAction
+ {
+ private String filename;
+
+ PropertyFileAccessAction(String filename)
+ {
+ this.filename = filename;
+ }
+
+ public Object run()
+ {
+ try
+ {
+ InputStream inStream = new FileInputStream(filename);
+ Properties props = new Properties();
+ props.load(inStream);
+ return props;
+ }
+ catch (IOException ex)
+ {
+ throw new SecurityException("Cannot load properties: " + filename, ex);
+ }
+ }
+ }
+}
15 years, 6 months
JBoss JBPM SVN: r2689 - in projects/spec/trunk/modules: ri/src/main/java/org/jbpm/ri/model and 1 other directories.
by do-not-reply@jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2008-10-30 16:37:18 -0400 (Thu, 30 Oct 2008)
New Revision: 2689
Modified:
projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/runtime/Token.java
projects/spec/trunk/modules/ri/src/main/java/org/jbpm/ri/model/InclusiveGatewayImpl.java
projects/spec/trunk/modules/ri/src/main/java/org/jbpm/ri/model/ParallelGatewayImpl.java
projects/spec/trunk/modules/ri/src/main/java/org/jbpm/ri/model/TaskImpl.java
projects/spec/trunk/modules/ri/src/main/java/org/jbpm/ri/runtime/DelegatingToken.java
projects/spec/trunk/modules/ri/src/main/java/org/jbpm/ri/runtime/MutableToken.java
projects/spec/trunk/modules/ri/src/main/java/org/jbpm/ri/runtime/TokenImpl.java
Log:
cleanup token api
Modified: projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/runtime/Token.java
===================================================================
--- projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/runtime/Token.java 2008-10-30 19:10:02 UTC (rev 2688)
+++ projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/runtime/Token.java 2008-10-30 20:37:18 UTC (rev 2689)
@@ -23,18 +23,16 @@
// $Id$
-import org.jbpm.api.model.InputSet;
-import org.jbpm.api.model.OutputSet;
import org.jbpm.api.model.SequenceFlow;
/**
* A Token is a descriptive construct used to describe how the flow of a Process will proceed at runtime.
*
- * By tracking how the Token traverses the Flow Objects, gets diverted through alternative paths, and gets split into parallel paths, the normal Sequence Flow should be
- * completely definable.
+ * By tracking how the Token traverses the Flow Objects, gets diverted through alternative paths, and gets split into
+ * parallel paths, the normal Sequence Flow should be completely definable.
*
- * A Token will have a unique identity that can be used to separate multiple Tokens that may exist because of concurrent process instances or the splitting of the Token
- * for parallel processing within a single process instance.
+ * A Token will have a unique identity that can be used to separate multiple Tokens that may exist because of concurrent
+ * process instances or the splitting of the Token for parallel processing within a single process instance.
*
* @author Thomas.Diesler(a)jboss.com
* @since 20-Apr-2007
@@ -47,46 +45,22 @@
}
/**
- * Get the token status
- */
- TokenStatus getTokenStatus();
-
- /**
* Get the unique token identity
*/
String getTokenID();
/**
- * Get the associated {@link ExecutionContext}
+ * Get the token status
*/
- ExecutionContext getExecutionContext();
+ TokenStatus getTokenStatus();
/**
- * Get the current {@link SequenceFlow}
+ * Get the associated {@link ExecutionContext}
*/
- SequenceFlow getFlow();
-
- /**
- * Get the active {@link InputSet}
- * @return null if the Activity does not define one
- */
- InputSet getInputSet();
-
- /**
- * Get the active {@link OutputSet}
- * @return null if the Activity does not define one
- */
- OutputSet getOutputSet();
-
- /**
- * Create a schallow copy of this Token.
- * <p/>
- * The content in the ExecutionContext will be copied by reference.
- */
- Token copyToken();
+ ExecutionContext getExecutionContext();
/**
- * Merge this Token with another token.
+ * Get the current {@link SequenceFlow}
*/
- void mergeToken(Token token);
+ SequenceFlow getFlow();
}
\ No newline at end of file
Modified: projects/spec/trunk/modules/ri/src/main/java/org/jbpm/ri/model/InclusiveGatewayImpl.java
===================================================================
--- projects/spec/trunk/modules/ri/src/main/java/org/jbpm/ri/model/InclusiveGatewayImpl.java 2008-10-30 19:10:02 UTC (rev 2688)
+++ projects/spec/trunk/modules/ri/src/main/java/org/jbpm/ri/model/InclusiveGatewayImpl.java 2008-10-30 20:37:18 UTC (rev 2689)
@@ -42,6 +42,7 @@
import org.jbpm.api.runtime.Token;
import org.jbpm.api.runtime.TokenExecutor;
import org.jbpm.api.runtime.Attachments.Key;
+import org.jbpm.ri.runtime.MutableToken;
import org.mvel.MVEL;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -58,7 +59,7 @@
public class InclusiveGatewayImpl extends GatewayImpl implements InclusiveGateway
{
private static final long serialVersionUID = 1L;
-
+
// provide logging
final static Logger log = LoggerFactory.getLogger(InclusiveGatewayImpl.class);
@@ -66,12 +67,12 @@
{
super(procStruct, name, GatewayType.Inclusive);
}
-
+
// Persistence ctor
protected InclusiveGatewayImpl()
{
}
-
+
@Override
protected FlowHandler getDefaultFlowHandler()
{
@@ -82,6 +83,7 @@
public void execute(TokenExecutor tokenExecutor, Token token)
{
+ MutableToken mutableToken = (MutableToken)token;
Node sourceRef = token.getFlow().getSourceRef();
log.debug("Propagate token comming from: " + sourceRef);
@@ -100,7 +102,7 @@
for (SequenceFlow auxGate : applicableGates)
{
SequenceFlow outFlow = auxGate;
- Token outToken = token.copyToken();
+ Token outToken = mutableToken.copyToken();
tokenExecutor.create(outToken, outFlow);
outTokens.add(outToken);
}
Modified: projects/spec/trunk/modules/ri/src/main/java/org/jbpm/ri/model/ParallelGatewayImpl.java
===================================================================
--- projects/spec/trunk/modules/ri/src/main/java/org/jbpm/ri/model/ParallelGatewayImpl.java 2008-10-30 19:10:02 UTC (rev 2688)
+++ projects/spec/trunk/modules/ri/src/main/java/org/jbpm/ri/model/ParallelGatewayImpl.java 2008-10-30 20:37:18 UTC (rev 2689)
@@ -39,6 +39,7 @@
import org.jbpm.api.runtime.FlowHandler;
import org.jbpm.api.runtime.Token;
import org.jbpm.api.runtime.TokenExecutor;
+import org.jbpm.ri.runtime.MutableToken;
import org.jbpm.ri.runtime.TokenImpl;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -128,7 +129,7 @@
tokenExecutor.suspend(token);
// If the gateway has a single incomming flow the outgoing token is the incomming token
- Token outToken = (getInFlows().size() == 1 ? token : null);
+ MutableToken outToken = (getInFlows().size() == 1 ? (MutableToken)token : null);
// The outgoing token is the merge of all incomming tokens
if (outToken == null)
@@ -155,7 +156,7 @@
for(SequenceFlow auxGate : getGates())
{
SequenceFlow outFlow = auxGate;
- outToken = outToken.copyToken();
+ outToken = (MutableToken)outToken.copyToken();
tokenExecutor.create(outToken, outFlow);
outTokens.add(outToken);
}
@@ -196,7 +197,7 @@
mergeTokens = null;
}
- private Token getMergedTokens()
+ private TokenImpl getMergedTokens()
{
TokenImpl mergedToken = new TokenImpl(null);
for (Token auxToken : mergeTokens)
Modified: projects/spec/trunk/modules/ri/src/main/java/org/jbpm/ri/model/TaskImpl.java
===================================================================
--- projects/spec/trunk/modules/ri/src/main/java/org/jbpm/ri/model/TaskImpl.java 2008-10-30 19:10:02 UTC (rev 2688)
+++ projects/spec/trunk/modules/ri/src/main/java/org/jbpm/ri/model/TaskImpl.java 2008-10-30 20:37:18 UTC (rev 2689)
@@ -58,7 +58,6 @@
import org.jbpm.api.service.SignalService;
import org.jbpm.ri.model.builder.SingleInFlowSupport;
import org.jbpm.ri.model.builder.SingleOutFlowSupport;
-import org.jbpm.ri.runtime.MutableToken;
/**
* A Task is an Atomic Activity that is included within a Process.
@@ -191,12 +190,8 @@
public void execute(Token token)
{
- MutableToken mutableToken = (MutableToken)token;
- mutableToken.setOutputSet(getActiveOutputSet());
- mutableToken.setInputSet(getActiveInputSet(token));
superExecHandler.execute(token);
processOutputSet(token);
- postProcessInputSet(token);
}
@Override
@@ -291,8 +286,8 @@
ExecutionContext exContext = token.getExecutionContext();
// Add the outputSet properties to the Token
- OutputSet outputSet = token.getOutputSet();
- for (String propName : getActiveOutputSet().getPropertyNames())
+ OutputSet outputSet = getActiveOutputSet();
+ for (String propName : outputSet.getPropertyNames())
{
Property outProp = outputSet.getProperty(propName);
if (outProp == null)
@@ -304,20 +299,6 @@
}
}
- /**
- * Remove the inputSet properties
- */
- protected void postProcessInputSet(Token token)
- {
- // InputSet inputSet = token.getInputSet();
- // ExecutionContext exContext = token.getExecutionContext();
- // for (Property prop : inputSet.getProperties())
- // {
- // // TODO: define proper scope for token data
- // exContext.removeAttachment(prop.getName());
- // }
- }
-
@Override
protected SignalHandler getDefaultSignalHandler()
{
Modified: projects/spec/trunk/modules/ri/src/main/java/org/jbpm/ri/runtime/DelegatingToken.java
===================================================================
--- projects/spec/trunk/modules/ri/src/main/java/org/jbpm/ri/runtime/DelegatingToken.java 2008-10-30 19:10:02 UTC (rev 2688)
+++ projects/spec/trunk/modules/ri/src/main/java/org/jbpm/ri/runtime/DelegatingToken.java 2008-10-30 20:37:18 UTC (rev 2689)
@@ -23,9 +23,7 @@
//$Id$
-import org.jbpm.api.model.InputSet;
import org.jbpm.api.model.Node;
-import org.jbpm.api.model.OutputSet;
import org.jbpm.api.model.SequenceFlow;
import org.jbpm.api.runtime.ExecutionContext;
import org.jbpm.api.runtime.Token;
@@ -50,66 +48,54 @@
this.delegateContext = new DelegatingExecutionContext(targetRef, exContext);
}
+ @Override
public ExecutionContext getExecutionContext()
{
return delegateContext;
}
+ @Override
public Token copyToken()
{
return delegateToken.copyToken();
}
+ @Override
public SequenceFlow getFlow()
{
return delegateToken.getFlow();
}
+ @Override
public String getTokenID()
{
return delegateToken.getTokenID();
}
- public InputSet getInputSet()
- {
- return delegateToken.getInputSet();
- }
-
- public OutputSet getOutputSet()
- {
- return delegateToken.getOutputSet();
- }
-
+ @Override
public TokenStatus getTokenStatus()
{
return delegateToken.getTokenStatus();
}
+ @Override
public void mergeToken(Token token)
{
delegateToken.mergeToken(token);
}
+ @Override
public void setFlow(SequenceFlow flow)
{
delegateToken.setFlow(flow);
}
+ @Override
public void setTokenStatus(TokenStatus status)
{
delegateToken.setTokenStatus(status);
}
- public void setInputSet(InputSet inputSet)
- {
- delegateToken.setInputSet(inputSet);
- }
-
- public void setOutputSet(OutputSet outputSet)
- {
- delegateToken.setOutputSet(outputSet);
- }
-
public String toString()
{
Node node = getFlow().getTargetRef();
Modified: projects/spec/trunk/modules/ri/src/main/java/org/jbpm/ri/runtime/MutableToken.java
===================================================================
--- projects/spec/trunk/modules/ri/src/main/java/org/jbpm/ri/runtime/MutableToken.java 2008-10-30 19:10:02 UTC (rev 2688)
+++ projects/spec/trunk/modules/ri/src/main/java/org/jbpm/ri/runtime/MutableToken.java 2008-10-30 20:37:18 UTC (rev 2689)
@@ -23,8 +23,6 @@
//$Id$
-import org.jbpm.api.model.InputSet;
-import org.jbpm.api.model.OutputSet;
import org.jbpm.api.model.SequenceFlow;
import org.jbpm.api.runtime.Token;
@@ -40,7 +38,14 @@
void setFlow(SequenceFlow flow);
- void setOutputSet(OutputSet activeOutputSet);
+ /**
+ * Create a schallow copy of this Token.
+ * The content in the ExecutionContext will be copied by reference.
+ */
+ Token copyToken();
- void setInputSet(InputSet activeInputSet);
+ /**
+ * Merge this Token with another token.
+ */
+ void mergeToken(Token token);
}
\ No newline at end of file
Modified: projects/spec/trunk/modules/ri/src/main/java/org/jbpm/ri/runtime/TokenImpl.java
===================================================================
--- projects/spec/trunk/modules/ri/src/main/java/org/jbpm/ri/runtime/TokenImpl.java 2008-10-30 19:10:02 UTC (rev 2688)
+++ projects/spec/trunk/modules/ri/src/main/java/org/jbpm/ri/runtime/TokenImpl.java 2008-10-30 20:37:18 UTC (rev 2689)
@@ -24,8 +24,6 @@
//$Id$
import org.jboss.util.id.UID;
-import org.jbpm.api.model.InputSet;
-import org.jbpm.api.model.OutputSet;
import org.jbpm.api.model.SequenceFlow;
import org.jbpm.api.runtime.Attachments;
import org.jbpm.api.runtime.BasicExecutionContext;
@@ -50,8 +48,6 @@
private String id;
private SequenceFlow flow;
private ExecutionContext context;
- private InputSet inputSet;
- private OutputSet outputSet;
private TokenStatus status;
/**
@@ -69,28 +65,6 @@
return id;
}
- @Override
- public InputSet getInputSet()
- {
- return inputSet;
- }
-
- public void setInputSet(InputSet inputSet)
- {
- this.inputSet = inputSet;
- }
-
- @Override
- public OutputSet getOutputSet()
- {
- return outputSet;
- }
-
- public void setOutputSet(OutputSet outputSet)
- {
- this.outputSet = outputSet;
- }
-
public TokenStatus getTokenStatus()
{
return status;
15 years, 6 months
JBoss JBPM SVN: r2688 - in projects/spec/trunk/modules: cts/src/test/java/org/jbpm/test/cts/transaction and 2 other directories.
by do-not-reply@jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2008-10-30 15:10:02 -0400 (Thu, 30 Oct 2008)
New Revision: 2688
Added:
projects/spec/trunk/modules/dialects/api10/src/main/java/org/jbpm/dialect/api10/model/JAXBGroup.java
projects/spec/trunk/modules/dialects/api10/src/main/java/org/jbpm/dialect/api10/model/JAXBNode.java
Removed:
projects/spec/trunk/modules/dialects/api10/src/main/java/org/jbpm/dialect/api10/model/JAXBFlowObject.java
Modified:
projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/Constants.java
projects/spec/trunk/modules/cts/src/test/java/org/jbpm/test/cts/transaction/TxRequiredMarshallerTest.java
projects/spec/trunk/modules/cts/src/test/java/org/jbpm/test/cts/transaction/TxRequiredTest.java
projects/spec/trunk/modules/dialects/api10/src/main/java/org/jbpm/dialect/api10/ProcessMarshaller.java
projects/spec/trunk/modules/dialects/api10/src/main/java/org/jbpm/dialect/api10/ProcessUnmarshaller.java
projects/spec/trunk/modules/dialects/api10/src/main/java/org/jbpm/dialect/api10/model/JAXBActivity.java
projects/spec/trunk/modules/dialects/api10/src/main/java/org/jbpm/dialect/api10/model/JAXBEvent.java
projects/spec/trunk/modules/dialects/api10/src/main/java/org/jbpm/dialect/api10/model/JAXBGateway.java
projects/spec/trunk/modules/dialects/api10/src/main/java/org/jbpm/dialect/api10/model/JAXBProcess.java
Log:
marshall/unmarshall groups
Modified: projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/Constants.java
===================================================================
--- projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/Constants.java 2008-10-30 18:12:53 UTC (rev 2687)
+++ projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/Constants.java 2008-10-30 19:10:02 UTC (rev 2688)
@@ -35,8 +35,8 @@
/** The default objcet name domain */
String ID_DOMAIN = "jboss.jbpm";
- /** The key for the Tx attribute property in a TxGroup */
- String TX_ATTRIBUTE = "jbpm.tx.attribute";
+ /** The key for the Tx type property in a TxGroup */
+ String PROP_TX_TYPE = "TxType";
/** The enumeration of Tx types */
enum TxType { MANDATORY, NEVER, NOTSUPPORTED, REQUIRED, REQUIRESNEW, SUPPORTS }
Modified: projects/spec/trunk/modules/cts/src/test/java/org/jbpm/test/cts/transaction/TxRequiredMarshallerTest.java
===================================================================
--- projects/spec/trunk/modules/cts/src/test/java/org/jbpm/test/cts/transaction/TxRequiredMarshallerTest.java 2008-10-30 18:12:53 UTC (rev 2687)
+++ projects/spec/trunk/modules/cts/src/test/java/org/jbpm/test/cts/transaction/TxRequiredMarshallerTest.java 2008-10-30 19:10:02 UTC (rev 2688)
@@ -42,7 +42,7 @@
ProcessDefinition procDef = super.getProcessDefinition();
String procXML = marshallProcess(procDef);
- System.out.println(procXML);
+ // System.out.println(procXML);
// Recreate the ProcessDefinition from the marshalled ProcessDefinition
ProcessDefinitionService pdService = getProcessEngine().getService(ProcessDefinitionService.class);
Modified: projects/spec/trunk/modules/cts/src/test/java/org/jbpm/test/cts/transaction/TxRequiredTest.java
===================================================================
--- projects/spec/trunk/modules/cts/src/test/java/org/jbpm/test/cts/transaction/TxRequiredTest.java 2008-10-30 18:12:53 UTC (rev 2687)
+++ projects/spec/trunk/modules/cts/src/test/java/org/jbpm/test/cts/transaction/TxRequiredTest.java 2008-10-30 19:10:02 UTC (rev 2688)
@@ -71,7 +71,7 @@
procBuilder.addStartEvent("Start").addSequenceFlow("TaskA");
procBuilder.addTask("TaskA").addGroupRef("TxRequired").addSequenceFlow("TaskB");
procBuilder.addTask("TaskB").addGroupRef("TxRequired").addSequenceFlow("End").addEndEvent("End");
- procBuilder.addGroup(GroupType.Transaction, "TxRequired").addProperty(Constants.TX_ATTRIBUTE, TxType.REQUIRED);
+ procBuilder.addGroup(GroupType.Transaction, "TxRequired").addProperty(Constants.PROP_TX_TYPE, TxType.REQUIRED);
return procBuilder.getProcessDefinition();
}
}
Modified: projects/spec/trunk/modules/dialects/api10/src/main/java/org/jbpm/dialect/api10/ProcessMarshaller.java
===================================================================
--- projects/spec/trunk/modules/dialects/api10/src/main/java/org/jbpm/dialect/api10/ProcessMarshaller.java 2008-10-30 18:12:53 UTC (rev 2687)
+++ projects/spec/trunk/modules/dialects/api10/src/main/java/org/jbpm/dialect/api10/ProcessMarshaller.java 2008-10-30 19:10:02 UTC (rev 2688)
@@ -38,6 +38,7 @@
import org.jbpm.api.model.ExclusiveGateway;
import org.jbpm.api.model.Expression;
import org.jbpm.api.model.Gateway;
+import org.jbpm.api.model.Group;
import org.jbpm.api.model.InclusiveGateway;
import org.jbpm.api.model.InputSet;
import org.jbpm.api.model.Message;
@@ -67,8 +68,9 @@
import org.jbpm.dialect.api10.model.JAXBExpression;
import org.jbpm.dialect.api10.model.JAXBFlow;
import org.jbpm.dialect.api10.model.JAXBFlowHandler;
-import org.jbpm.dialect.api10.model.JAXBFlowObject;
+import org.jbpm.dialect.api10.model.JAXBNode;
import org.jbpm.dialect.api10.model.JAXBGateway;
+import org.jbpm.dialect.api10.model.JAXBGroup;
import org.jbpm.dialect.api10.model.JAXBInclusiveGateway;
import org.jbpm.dialect.api10.model.JAXBInputSet;
import org.jbpm.dialect.api10.model.JAXBMessage;
@@ -125,39 +127,48 @@
JAXBAssignment jaxbAss = getJaxbAssignment(ass);
jaxbProc.getAssignments().add(jaxbAss);
}
+ for (Group grp : procDef.getGroups())
+ {
+ JAXBGroup jaxbGrp = getJaxbGroup(grp);
+ jaxbProc.getGroups().add(jaxbGrp);
+ }
- for (Node flowObject : procDef.getNodes())
+ for (Node node : procDef.getNodes())
{
- JAXBFlowObject jaxbNode;
- if (flowObject instanceof Event)
+ JAXBNode jaxbNode;
+ if (node instanceof Event)
{
- jaxbNode = adaptEvent(jaxbProc, (Event)flowObject);
+ jaxbNode = adaptEvent(jaxbProc, (Event)node);
}
- else if (flowObject instanceof Task)
+ else if (node instanceof Task)
{
- jaxbNode = adaptTask(jaxbProc, (Task)flowObject);
+ jaxbNode = adaptTask(jaxbProc, (Task)node);
}
- else if (flowObject instanceof Gateway)
+ else if (node instanceof Gateway)
{
- jaxbNode = adaptGateway(jaxbProc, (Gateway)flowObject);
+ jaxbNode = adaptGateway(jaxbProc, (Gateway)node);
}
else
{
- throw new IllegalStateException("Unsupported flow object: " + flowObject);
+ throw new IllegalStateException("Unsupported flow object: " + node);
}
- for (Assignment ass : flowObject.getAssignments())
+ for (Assignment ass : node.getAssignments())
{
JAXBAssignment jaxbAss = getJaxbAssignment(ass);
jaxbNode.getAssignments().add(jaxbAss);
}
- jaxbProc.getFlowObjects().add(jaxbNode);
+ Group groupRef = node.getGroupRef();
+ if (groupRef != null)
+ jaxbNode.setGroupRef(groupRef.getName());
+
+ jaxbProc.getNodes().add(jaxbNode);
}
return jaxbProc;
}
- private JAXBFlowObject adaptEvent(JAXBProcess jaxbProc, Event event)
+ private JAXBNode adaptEvent(JAXBProcess jaxbProc, Event event)
{
JAXBEvent jaxbEvent;
if (event instanceof StartEvent)
@@ -260,7 +271,7 @@
return jaxbEvent;
}
- private JAXBFlowObject adaptTask(JAXBProcess jaxbProc, Task task)
+ private JAXBNode adaptTask(JAXBProcess jaxbProc, Task task)
{
JAXBTask jaxbTask = new JAXBTask();
jaxbTask.setTaskType(task.getTaskType());
@@ -317,7 +328,7 @@
return jaxbTask;
}
- private JAXBFlowObject adaptGateway(JAXBProcess jaxbProc, Gateway gateway)
+ private JAXBNode adaptGateway(JAXBProcess jaxbProc, Gateway gateway)
{
JAXBGateway jaxbGateway;
if (gateway instanceof ExclusiveGateway)
@@ -443,6 +454,19 @@
return jaxbAss;
}
+ private JAXBGroup getJaxbGroup(Group grp)
+ {
+ JAXBGroup jaxbGrp = new JAXBGroup();
+ jaxbGrp.setName(grp.getName());
+ jaxbGrp.setGroupType(grp.getGroupType());
+ for (Property prop : grp.getProperties())
+ {
+ JAXBProperty jaxbProp = getJaxbProperty(prop);
+ jaxbGrp.getProperties().add(jaxbProp);
+ }
+ return jaxbGrp;
+ }
+
private JAXBExecutionHandler getJAXBExecutionHandler(Node fo, ExecutionHandler handler)
{
JAXBExecutionHandler jaxb = null;
Modified: projects/spec/trunk/modules/dialects/api10/src/main/java/org/jbpm/dialect/api10/ProcessUnmarshaller.java
===================================================================
--- projects/spec/trunk/modules/dialects/api10/src/main/java/org/jbpm/dialect/api10/ProcessUnmarshaller.java 2008-10-30 18:12:53 UTC (rev 2687)
+++ projects/spec/trunk/modules/dialects/api10/src/main/java/org/jbpm/dialect/api10/ProcessUnmarshaller.java 2008-10-30 19:10:02 UTC (rev 2688)
@@ -38,6 +38,7 @@
import org.jbpm.api.model.Task.TaskType;
import org.jbpm.api.model.builder.EventBuilder;
import org.jbpm.api.model.builder.GatewayBuilder;
+import org.jbpm.api.model.builder.GroupBuilder;
import org.jbpm.api.model.builder.MessageBuilder;
import org.jbpm.api.model.builder.ObjectNameFactory;
import org.jbpm.api.model.builder.ProcessBuilder;
@@ -59,7 +60,8 @@
import org.jbpm.dialect.api10.model.JAXBExclusiveGateway;
import org.jbpm.dialect.api10.model.JAXBExpression;
import org.jbpm.dialect.api10.model.JAXBFlow;
-import org.jbpm.dialect.api10.model.JAXBFlowObject;
+import org.jbpm.dialect.api10.model.JAXBGroup;
+import org.jbpm.dialect.api10.model.JAXBNode;
import org.jbpm.dialect.api10.model.JAXBGateway;
import org.jbpm.dialect.api10.model.JAXBHandler;
import org.jbpm.dialect.api10.model.JAXBInclusiveGateway;
@@ -126,33 +128,46 @@
procBuilder.addProcessAssignment(jaxbAss.getAssignTime(), jaxbFrom.getLang(), jaxbFrom.getBody(), jaxbTo);
}
- // Process FlowObjects
- for (JAXBFlowObject jaxbFlowObject : jaxbProc.getFlowObjects())
+ // Process Groups
+ for (JAXBGroup jaxbGrp : jaxbProc.getGroups())
{
- if (jaxbFlowObject instanceof JAXBEvent)
+ GroupBuilder groupBuilder = procBuilder.addGroup(jaxbGrp.getGroupType(), jaxbGrp.getName());
+ for (JAXBProperty jaxbProp : jaxbGrp.getProperties())
+ groupBuilder.addProperty(jaxbProp.getName(), jaxbProp.getValue());
+ }
+
+ // Process Nodes
+ for (JAXBNode jaxbNode : jaxbProc.getNodes())
+ {
+ if (jaxbNode instanceof JAXBEvent)
{
- adaptJAXBEvent(procBuilder, jaxbProc, (JAXBEvent)jaxbFlowObject);
+ adaptJAXBEvent(procBuilder, jaxbProc, (JAXBEvent)jaxbNode);
}
- else if (jaxbFlowObject instanceof JAXBTask)
+ else if (jaxbNode instanceof JAXBTask)
{
- adaptTask(procBuilder, jaxbProc, (JAXBTask)jaxbFlowObject);
+ adaptTask(procBuilder, jaxbProc, (JAXBTask)jaxbNode);
}
- else if (jaxbFlowObject instanceof JAXBGateway)
+ else if (jaxbNode instanceof JAXBGateway)
{
- adaptJAXBGateway(procBuilder, jaxbProc, (JAXBGateway)jaxbFlowObject);
+ adaptJAXBGateway(procBuilder, jaxbProc, (JAXBGateway)jaxbNode);
}
else
{
- throw new IllegalStateException("Unsupported flow object: " + jaxbFlowObject);
+ throw new IllegalStateException("Unsupported flow object: " + jaxbNode);
}
- // FlowObject Assignments
- for (JAXBAssignment jaxbAss : jaxbFlowObject.getAssignments())
+ // Node Assignments
+ for (JAXBAssignment jaxbAss : jaxbNode.getAssignments())
{
JAXBExpression jaxbFrom = jaxbAss.getFrom();
String jaxbTo = jaxbAss.getTo();
procBuilder.addNodeAssignment(jaxbAss.getAssignTime(), jaxbFrom.getLang(), jaxbFrom.getBody(), jaxbTo);
}
+
+ // Group ref
+ String groupRef = jaxbNode.getGroupRef();
+ if (groupRef != null)
+ procBuilder.addGroupRef(groupRef);
}
ProcessDefinition procDef = procBuilder.getProcessDefinition();
Modified: projects/spec/trunk/modules/dialects/api10/src/main/java/org/jbpm/dialect/api10/model/JAXBActivity.java
===================================================================
--- projects/spec/trunk/modules/dialects/api10/src/main/java/org/jbpm/dialect/api10/model/JAXBActivity.java 2008-10-30 18:12:53 UTC (rev 2687)
+++ projects/spec/trunk/modules/dialects/api10/src/main/java/org/jbpm/dialect/api10/model/JAXBActivity.java 2008-10-30 19:10:02 UTC (rev 2688)
@@ -40,7 +40,7 @@
* @since 08-Jul-2008
*/
@XmlType(name="Activity")
-public class JAXBActivity extends JAXBFlowObject
+public class JAXBActivity extends JAXBNode
{
private String name;
private List<JAXBProperty> properties = new ArrayList<JAXBProperty>();
Modified: projects/spec/trunk/modules/dialects/api10/src/main/java/org/jbpm/dialect/api10/model/JAXBEvent.java
===================================================================
--- projects/spec/trunk/modules/dialects/api10/src/main/java/org/jbpm/dialect/api10/model/JAXBEvent.java 2008-10-30 18:12:53 UTC (rev 2687)
+++ projects/spec/trunk/modules/dialects/api10/src/main/java/org/jbpm/dialect/api10/model/JAXBEvent.java 2008-10-30 19:10:02 UTC (rev 2688)
@@ -33,7 +33,7 @@
* @since 08-Jul-2008
*/
@XmlType(name = "AbstractEvent")
-public class JAXBEvent extends JAXBFlowObject
+public class JAXBEvent extends JAXBNode
{
private JAXBExecutionHandler executionHandler;
private JAXBFlowHandler flowHandler;
Deleted: projects/spec/trunk/modules/dialects/api10/src/main/java/org/jbpm/dialect/api10/model/JAXBFlowObject.java
===================================================================
--- projects/spec/trunk/modules/dialects/api10/src/main/java/org/jbpm/dialect/api10/model/JAXBFlowObject.java 2008-10-30 18:12:53 UTC (rev 2687)
+++ projects/spec/trunk/modules/dialects/api10/src/main/java/org/jbpm/dialect/api10/model/JAXBFlowObject.java 2008-10-30 19:10:02 UTC (rev 2688)
@@ -1,49 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt 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.jbpm.dialect.api10.model;
-
-//$Id: $
-
-import java.util.ArrayList;
-import java.util.List;
-
-import javax.xml.bind.annotation.XmlElement;
-import javax.xml.bind.annotation.XmlType;
-
-
-/**
- * A Flow Object is one of the set of following graphical objects: Event, Activity, and Gateway.
- *
- * @author thomas.diesler(a)jboss.com
- * @since 08-Jul-2008
- */
-@XmlType(name = "FlowObject")
-public class JAXBFlowObject extends JAXBGraphicalElement
-{
- private List<JAXBAssignment> assignments = new ArrayList<JAXBAssignment>();
-
- @XmlElement(name = "assignment")
- public List<JAXBAssignment> getAssignments()
- {
- return assignments;
- }
-}
\ No newline at end of file
Modified: projects/spec/trunk/modules/dialects/api10/src/main/java/org/jbpm/dialect/api10/model/JAXBGateway.java
===================================================================
--- projects/spec/trunk/modules/dialects/api10/src/main/java/org/jbpm/dialect/api10/model/JAXBGateway.java 2008-10-30 18:12:53 UTC (rev 2687)
+++ projects/spec/trunk/modules/dialects/api10/src/main/java/org/jbpm/dialect/api10/model/JAXBGateway.java 2008-10-30 19:10:02 UTC (rev 2688)
@@ -39,7 +39,7 @@
* @since 08-Jul-2008
*/
@XmlType(name = "Gateway")
-public class JAXBGateway extends JAXBFlowObject
+public class JAXBGateway extends JAXBNode
{
private String name;
private JAXBExecutionHandler executionHandler;
Added: projects/spec/trunk/modules/dialects/api10/src/main/java/org/jbpm/dialect/api10/model/JAXBGroup.java
===================================================================
--- projects/spec/trunk/modules/dialects/api10/src/main/java/org/jbpm/dialect/api10/model/JAXBGroup.java (rev 0)
+++ projects/spec/trunk/modules/dialects/api10/src/main/java/org/jbpm/dialect/api10/model/JAXBGroup.java 2008-10-30 19:10:02 UTC (rev 2688)
@@ -0,0 +1,76 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt 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.jbpm.dialect.api10.model;
+
+//$Id$
+
+import java.util.ArrayList;
+import java.util.List;
+
+import javax.xml.bind.annotation.XmlAttribute;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlType;
+
+import org.jbpm.api.model.Group.GroupType;
+
+/**
+ * An Assignment, which is used in the definition of attributes for Process,
+ * Activity, Event, Gateway, and Gate.
+ *
+ * @author thomas.diesler(a)jboss.com
+ * @since 30-Oct-2008
+ */
+@XmlType(name = "Group")
+public class JAXBGroup
+{
+ private String name;
+ private List<JAXBProperty> properties = new ArrayList<JAXBProperty>();
+ private GroupType type;
+
+ public String getName()
+ {
+ return name;
+ }
+
+ @XmlAttribute
+ public void setName(String name)
+ {
+ this.name = name;
+ }
+
+ public GroupType getGroupType()
+ {
+ return type;
+ }
+
+ @XmlAttribute(name = "type")
+ public void setGroupType(GroupType type)
+ {
+ this.type = type;
+ }
+
+ @XmlElement(name = "property")
+ public List<JAXBProperty> getProperties()
+ {
+ return properties;
+ }
+}
\ No newline at end of file
Property changes on: projects/spec/trunk/modules/dialects/api10/src/main/java/org/jbpm/dialect/api10/model/JAXBGroup.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Copied: projects/spec/trunk/modules/dialects/api10/src/main/java/org/jbpm/dialect/api10/model/JAXBNode.java (from rev 2685, projects/spec/trunk/modules/dialects/api10/src/main/java/org/jbpm/dialect/api10/model/JAXBFlowObject.java)
===================================================================
--- projects/spec/trunk/modules/dialects/api10/src/main/java/org/jbpm/dialect/api10/model/JAXBNode.java (rev 0)
+++ projects/spec/trunk/modules/dialects/api10/src/main/java/org/jbpm/dialect/api10/model/JAXBNode.java 2008-10-30 19:10:02 UTC (rev 2688)
@@ -0,0 +1,62 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt 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.jbpm.dialect.api10.model;
+
+//$Id: $
+
+import java.util.ArrayList;
+import java.util.List;
+
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlType;
+
+
+/**
+ * A Node is one of the set of following graphical objects: Event, Activity, and Gateway.
+ *
+ * @author thomas.diesler(a)jboss.com
+ * @since 08-Jul-2008
+ */
+@XmlType(name = "Node")
+public class JAXBNode extends JAXBGraphicalElement
+{
+ private List<JAXBAssignment> assignments = new ArrayList<JAXBAssignment>();
+ private String groupRef;
+
+ @XmlElement(name = "assignment")
+ public List<JAXBAssignment> getAssignments()
+ {
+ return assignments;
+ }
+
+ public String getGroupRef()
+ {
+ return groupRef;
+ }
+
+ @XmlElement
+ public void setGroupRef(String groupRef)
+ {
+ this.groupRef = groupRef;
+ }
+
+}
\ No newline at end of file
Modified: projects/spec/trunk/modules/dialects/api10/src/main/java/org/jbpm/dialect/api10/model/JAXBProcess.java
===================================================================
--- projects/spec/trunk/modules/dialects/api10/src/main/java/org/jbpm/dialect/api10/model/JAXBProcess.java 2008-10-30 18:12:53 UTC (rev 2687)
+++ projects/spec/trunk/modules/dialects/api10/src/main/java/org/jbpm/dialect/api10/model/JAXBProcess.java 2008-10-30 19:10:02 UTC (rev 2688)
@@ -55,10 +55,11 @@
@XmlElement(name = "parallel-gateway", type = JAXBParallelGateway.class),
@XmlElement(name = "sub-process", type = JAXBSubProcess.class),
@XmlElement(name = "end", type = JAXBEndEvent.class) })
- private List<JAXBFlowObject> flowObjects = new ArrayList<JAXBFlowObject>();
+ private List<JAXBNode> nodes = new ArrayList<JAXBNode>();
private List<JAXBProperty> properties = new ArrayList<JAXBProperty>();
private List<JAXBAssignment> assignments = new ArrayList<JAXBAssignment>();
+ private List<JAXBGroup> groups = new ArrayList<JAXBGroup>();
public String getName()
{
@@ -71,9 +72,9 @@
this.name = name;
}
- public List<JAXBFlowObject> getFlowObjects()
+ public List<JAXBNode> getNodes()
{
- return flowObjects;
+ return nodes;
}
public List<JAXBMessage> getMessages()
@@ -119,4 +120,10 @@
{
return assignments;
}
+
+ @XmlElement(name = "group")
+ public List<JAXBGroup> getGroups()
+ {
+ return groups;
+ }
}
\ No newline at end of file
15 years, 6 months
JBoss JBPM SVN: r2686 - in projects/spec/trunk/modules: api/src/main/java/org/jbpm/api/model/builder and 5 other directories.
by do-not-reply@jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2008-10-30 13:07:47 -0400 (Thu, 30 Oct 2008)
New Revision: 2686
Added:
projects/spec/trunk/modules/cts/src/test/java/org/jbpm/test/cts/transaction/TxRequiredMarshallerTest.java
projects/spec/trunk/modules/cts/src/test/java/org/jbpm/test/cts/transaction/TxRequiredTest.java
projects/spec/trunk/modules/ri/src/main/java/org/jbpm/ri/model/GroupImpl.java
projects/spec/trunk/modules/ri/src/main/java/org/jbpm/ri/model/builder/GroupBuilderImpl.java
Removed:
projects/spec/trunk/modules/cts/src/test/java/org/jbpm/test/cts/transaction/RequiresTxMarshallerTest.java
projects/spec/trunk/modules/cts/src/test/java/org/jbpm/test/cts/transaction/RequiresTxTest.java
Modified:
projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/model/Group.java
projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/model/Node.java
projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/model/builder/GroupBuilder.java
projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/model/internal/ProcessStructure.java
projects/spec/trunk/modules/ri/src/main/java/org/jbpm/ri/model/AssignmentImpl.java
projects/spec/trunk/modules/ri/src/main/java/org/jbpm/ri/model/ComplexGatewayImpl.java
projects/spec/trunk/modules/ri/src/main/java/org/jbpm/ri/model/EndEventImpl.java
projects/spec/trunk/modules/ri/src/main/java/org/jbpm/ri/model/ExclusiveGatewayImpl.java
projects/spec/trunk/modules/ri/src/main/java/org/jbpm/ri/model/ExpressionImpl.java
projects/spec/trunk/modules/ri/src/main/java/org/jbpm/ri/model/GateImpl.java
projects/spec/trunk/modules/ri/src/main/java/org/jbpm/ri/model/InclusiveGatewayImpl.java
projects/spec/trunk/modules/ri/src/main/java/org/jbpm/ri/model/InputSetImpl.java
projects/spec/trunk/modules/ri/src/main/java/org/jbpm/ri/model/MessageImpl.java
projects/spec/trunk/modules/ri/src/main/java/org/jbpm/ri/model/NodeImpl.java
projects/spec/trunk/modules/ri/src/main/java/org/jbpm/ri/model/OutputSetImpl.java
projects/spec/trunk/modules/ri/src/main/java/org/jbpm/ri/model/ParallelGatewayImpl.java
projects/spec/trunk/modules/ri/src/main/java/org/jbpm/ri/model/ParticipantImpl.java
projects/spec/trunk/modules/ri/src/main/java/org/jbpm/ri/model/ProcessDefinitionImpl.java
projects/spec/trunk/modules/ri/src/main/java/org/jbpm/ri/model/ProcessImpl.java
projects/spec/trunk/modules/ri/src/main/java/org/jbpm/ri/model/ProcessStructureImpl.java
projects/spec/trunk/modules/ri/src/main/java/org/jbpm/ri/model/PropertyImpl.java
projects/spec/trunk/modules/ri/src/main/java/org/jbpm/ri/model/PropertySupportImpl.java
projects/spec/trunk/modules/ri/src/main/java/org/jbpm/ri/model/ReceiveTaskImpl.java
projects/spec/trunk/modules/ri/src/main/java/org/jbpm/ri/model/SendTaskImpl.java
projects/spec/trunk/modules/ri/src/main/java/org/jbpm/ri/model/SequenceFlowImpl.java
projects/spec/trunk/modules/ri/src/main/java/org/jbpm/ri/model/SignalImpl.java
projects/spec/trunk/modules/ri/src/main/java/org/jbpm/ri/model/StartEventImpl.java
projects/spec/trunk/modules/ri/src/main/java/org/jbpm/ri/model/TaskImpl.java
projects/spec/trunk/modules/ri/src/main/java/org/jbpm/ri/model/UserTaskImpl.java
projects/spec/trunk/modules/ri/src/main/java/org/jbpm/ri/model/builder/ProcessBuilderImpl.java
projects/spec/trunk/modules/ri/src/main/resources/jbpm-cfg-beans.xml
Log:
Add group support in model
Modified: projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/model/Group.java
===================================================================
--- projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/model/Group.java 2008-10-30 15:15:36 UTC (rev 2685)
+++ projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/model/Group.java 2008-10-30 17:07:47 UTC (rev 2686)
@@ -41,7 +41,7 @@
/**
* The supported group types
*/
- enum GroupType { Transaction };
+ enum GroupType { None, Transaction };
/**
* Name is an attribute that is text description of the Group.
Modified: projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/model/Node.java
===================================================================
--- projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/model/Node.java 2008-10-30 15:15:36 UTC (rev 2685)
+++ projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/model/Node.java 2008-10-30 17:07:47 UTC (rev 2686)
@@ -60,6 +60,9 @@
*/
List<Assignment> getAssignments();
+ /** Get the associated Group */
+ Group getGroupRef();
+
/**
* Get the associated ExecutionHandler
*/
@@ -74,5 +77,4 @@
* Get the associated FlowHandler
*/
FlowHandler getFlowHandler();
-
}
\ No newline at end of file
Modified: projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/model/builder/GroupBuilder.java
===================================================================
--- projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/model/builder/GroupBuilder.java 2008-10-30 15:15:36 UTC (rev 2685)
+++ projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/model/builder/GroupBuilder.java 2008-10-30 17:07:47 UTC (rev 2686)
@@ -24,6 +24,7 @@
//$Id$
import org.jbpm.api.model.Group;
+import org.jbpm.api.model.Group.GroupType;
/**
@@ -34,6 +35,9 @@
*/
public interface GroupBuilder
{
+ /** Add a new Group*/
+ GroupBuilder newGroup(GroupType type, String name);
+
/**
* Add a message property
*/
Modified: projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/model/internal/ProcessStructure.java
===================================================================
--- projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/model/internal/ProcessStructure.java 2008-10-30 15:15:36 UTC (rev 2685)
+++ projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/model/internal/ProcessStructure.java 2008-10-30 17:07:47 UTC (rev 2686)
@@ -26,6 +26,7 @@
import java.util.List;
import org.jbpm.api.model.Assignment;
+import org.jbpm.api.model.Group;
import org.jbpm.api.model.Message;
import org.jbpm.api.model.Node;
@@ -59,7 +60,6 @@
/**
* Get a node by name.
- *
* @return null if not found
*/
Node getNode(String name);
@@ -72,15 +72,25 @@
/**
* Get the list of associated {@link Message} objects.
- *
* @return An empty list if there are none
*/
List<Message> getMessages();
/**
* Get an associated {@link Message} by name.
- *
* @return null if not found
*/
Message getMessage(String msgName);
+
+ /**
+ * Get the list of associated {@link Group} objects.
+ * @return An empty list if there are none
+ */
+ List<Group> getGroups();
+
+ /**
+ * Get an associated {@link Group} by name.
+ * @return null if not found
+ */
+ Group getGroup(String grpName);
}
\ No newline at end of file
Deleted: projects/spec/trunk/modules/cts/src/test/java/org/jbpm/test/cts/transaction/RequiresTxMarshallerTest.java
===================================================================
--- projects/spec/trunk/modules/cts/src/test/java/org/jbpm/test/cts/transaction/RequiresTxMarshallerTest.java 2008-10-30 15:15:36 UTC (rev 2685)
+++ projects/spec/trunk/modules/cts/src/test/java/org/jbpm/test/cts/transaction/RequiresTxMarshallerTest.java 2008-10-30 17:07:47 UTC (rev 2686)
@@ -1,51 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt 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.jbpm.test.cts.transaction;
-
-// $Id$
-
-import java.io.IOException;
-
-import org.jbpm.api.model.ProcessDefinition;
-import org.jbpm.api.service.ProcessDefinitionService;
-
-/**
- * Test two tasks with Tx attribute REQUIRES
- *
- * @author thomas.diesler(a)jboss.com
- * @since 30-Oct-2008
- */
-public class RequiresTxMarshallerTest extends RequiresTxTest
-{
- protected ProcessDefinition getProcessDefinition() throws IOException
- {
- // Marshall the process to a string
- ProcessDefinition procDef = super.getProcessDefinition();
- String procXML = marshallProcess(procDef);
-
- // System.out.println(procXML);
-
- // Recreate the ProcessDefinition from the marshalled ProcessDefinition
- ProcessDefinitionService pdService = getProcessEngine().getService(ProcessDefinitionService.class);
- return pdService.createProcessDefinition(procXML);
- }
-}
Deleted: projects/spec/trunk/modules/cts/src/test/java/org/jbpm/test/cts/transaction/RequiresTxTest.java
===================================================================
--- projects/spec/trunk/modules/cts/src/test/java/org/jbpm/test/cts/transaction/RequiresTxTest.java 2008-10-30 15:15:36 UTC (rev 2685)
+++ projects/spec/trunk/modules/cts/src/test/java/org/jbpm/test/cts/transaction/RequiresTxTest.java 2008-10-30 17:07:47 UTC (rev 2686)
@@ -1,64 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt 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.jbpm.test.cts.transaction;
-
-// $Id$
-
-import java.io.IOException;
-
-import org.jbpm.api.Constants;
-import org.jbpm.api.Constants.TxType;
-import org.jbpm.api.model.Process;
-import org.jbpm.api.model.ProcessDefinition;
-import org.jbpm.api.model.Group.GroupType;
-import org.jbpm.api.model.builder.ProcessBuilder;
-import org.jbpm.api.service.ProcessBuilderService;
-import org.jbpm.api.test.CTSTestCase;
-
-/**
- * Test two tasks with Tx attribute REQUIRES
- *
- * @author thomas.diesler(a)jboss.com
- * @since 30-Oct-2008
- */
-public class RequiresTxTest extends CTSTestCase
-{
- public void testUserTask() throws Exception
- {
- ProcessDefinition procDef = unregisterOnTearDown(getProcessDefinition());
- Process proc = procDef.newInstance();
-
- proc.startProcess();
- proc.waitForEnd(1000);
- }
-
- protected ProcessDefinition getProcessDefinition() throws IOException
- {
- ProcessBuilder procBuilder = ProcessBuilderService.locateProcessBuilder();
- procBuilder.addProcess("RequiresTxTest");
- procBuilder.addStartEvent("Start").addSequenceFlow("TaskA");
- procBuilder.addTask("TaskA").addSequenceFlow("TaskB");
- procBuilder.addTask("TaskB").addSequenceFlow("End").addEndEvent("End");
- procBuilder.addGroup(GroupType.Transaction, "TxRequired").addProperty(Constants.TX_ATTRIBUTE, TxType.REQUIRED);
- return procBuilder.getProcessDefinition();
- }
-}
Copied: projects/spec/trunk/modules/cts/src/test/java/org/jbpm/test/cts/transaction/TxRequiredMarshallerTest.java (from rev 2685, projects/spec/trunk/modules/cts/src/test/java/org/jbpm/test/cts/transaction/RequiresTxMarshallerTest.java)
===================================================================
--- projects/spec/trunk/modules/cts/src/test/java/org/jbpm/test/cts/transaction/TxRequiredMarshallerTest.java (rev 0)
+++ projects/spec/trunk/modules/cts/src/test/java/org/jbpm/test/cts/transaction/TxRequiredMarshallerTest.java 2008-10-30 17:07:47 UTC (rev 2686)
@@ -0,0 +1,51 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt 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.jbpm.test.cts.transaction;
+
+// $Id$
+
+import java.io.IOException;
+
+import org.jbpm.api.model.ProcessDefinition;
+import org.jbpm.api.service.ProcessDefinitionService;
+
+/**
+ * Test two tasks with Tx attribute REQUIRED
+ *
+ * @author thomas.diesler(a)jboss.com
+ * @since 30-Oct-2008
+ */
+public class TxRequiredMarshallerTest extends TxRequiredTest
+{
+ protected ProcessDefinition getProcessDefinition() throws IOException
+ {
+ // Marshall the process to a string
+ ProcessDefinition procDef = super.getProcessDefinition();
+ String procXML = marshallProcess(procDef);
+
+ System.out.println(procXML);
+
+ // Recreate the ProcessDefinition from the marshalled ProcessDefinition
+ ProcessDefinitionService pdService = getProcessEngine().getService(ProcessDefinitionService.class);
+ return pdService.createProcessDefinition(procXML);
+ }
+}
Copied: projects/spec/trunk/modules/cts/src/test/java/org/jbpm/test/cts/transaction/TxRequiredTest.java (from rev 2685, projects/spec/trunk/modules/cts/src/test/java/org/jbpm/test/cts/transaction/RequiresTxTest.java)
===================================================================
--- projects/spec/trunk/modules/cts/src/test/java/org/jbpm/test/cts/transaction/TxRequiredTest.java (rev 0)
+++ projects/spec/trunk/modules/cts/src/test/java/org/jbpm/test/cts/transaction/TxRequiredTest.java 2008-10-30 17:07:47 UTC (rev 2686)
@@ -0,0 +1,77 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt 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.jbpm.test.cts.transaction;
+
+// $Id$
+
+import java.io.IOException;
+
+import org.jbpm.api.Constants;
+import org.jbpm.api.Constants.TxType;
+import org.jbpm.api.model.Group;
+import org.jbpm.api.model.Node;
+import org.jbpm.api.model.Process;
+import org.jbpm.api.model.ProcessDefinition;
+import org.jbpm.api.model.Group.GroupType;
+import org.jbpm.api.model.builder.ProcessBuilder;
+import org.jbpm.api.service.ProcessBuilderService;
+import org.jbpm.api.test.CTSTestCase;
+
+/**
+ * Test two tasks with Tx attribute REQUIRED
+ *
+ * @author thomas.diesler(a)jboss.com
+ * @since 30-Oct-2008
+ */
+public class TxRequiredTest extends CTSTestCase
+{
+ public void testUserTask() throws Exception
+ {
+ ProcessDefinition procDef = unregisterOnTearDown(getProcessDefinition());
+
+ Node taskA = procDef.getNode("TaskA");
+ Node taskB = procDef.getNode("TaskB");
+ Group group = procDef.getGroup("TxRequired");
+ Group groupA = taskA.getGroupRef();
+ Group groupB = taskB.getGroupRef();
+
+ assertNotNull("Group not null", group);
+ assertSame("Group same", group, groupA);
+ assertSame("Group same", group, groupB);
+
+ Process proc = procDef.newInstance();
+
+ proc.startProcess();
+ proc.waitForEnd(1000);
+ }
+
+ protected ProcessDefinition getProcessDefinition() throws IOException
+ {
+ ProcessBuilder procBuilder = ProcessBuilderService.locateProcessBuilder();
+ procBuilder.addProcess("RequiresTxTest");
+ procBuilder.addStartEvent("Start").addSequenceFlow("TaskA");
+ procBuilder.addTask("TaskA").addGroupRef("TxRequired").addSequenceFlow("TaskB");
+ procBuilder.addTask("TaskB").addGroupRef("TxRequired").addSequenceFlow("End").addEndEvent("End");
+ procBuilder.addGroup(GroupType.Transaction, "TxRequired").addProperty(Constants.TX_ATTRIBUTE, TxType.REQUIRED);
+ return procBuilder.getProcessDefinition();
+ }
+}
Modified: projects/spec/trunk/modules/ri/src/main/java/org/jbpm/ri/model/AssignmentImpl.java
===================================================================
--- projects/spec/trunk/modules/ri/src/main/java/org/jbpm/ri/model/AssignmentImpl.java 2008-10-30 15:15:36 UTC (rev 2685)
+++ projects/spec/trunk/modules/ri/src/main/java/org/jbpm/ri/model/AssignmentImpl.java 2008-10-30 17:07:47 UTC (rev 2686)
@@ -41,7 +41,7 @@
* @author thomas.diesler(a)jboss.com
* @since 08-Jul-2008
*/
-@Entity(name = "Assignment")
+@Entity(name = "BPMAssignment")
public class AssignmentImpl implements Assignment
{
private static final long serialVersionUID = 1L;
Modified: projects/spec/trunk/modules/ri/src/main/java/org/jbpm/ri/model/ComplexGatewayImpl.java
===================================================================
--- projects/spec/trunk/modules/ri/src/main/java/org/jbpm/ri/model/ComplexGatewayImpl.java 2008-10-30 15:15:36 UTC (rev 2685)
+++ projects/spec/trunk/modules/ri/src/main/java/org/jbpm/ri/model/ComplexGatewayImpl.java 2008-10-30 17:07:47 UTC (rev 2686)
@@ -38,7 +38,7 @@
* @author thomas.diesler(a)jboss.com
* @since 08-Jul-2008
*/
-@Entity(name = "ComplexGateway")
+@Entity(name = "BPMComplexGateway")
public class ComplexGatewayImpl extends GatewayImpl implements ComplexGateway
{
private static final long serialVersionUID = 1L;
Modified: projects/spec/trunk/modules/ri/src/main/java/org/jbpm/ri/model/EndEventImpl.java
===================================================================
--- projects/spec/trunk/modules/ri/src/main/java/org/jbpm/ri/model/EndEventImpl.java 2008-10-30 15:15:36 UTC (rev 2685)
+++ projects/spec/trunk/modules/ri/src/main/java/org/jbpm/ri/model/EndEventImpl.java 2008-10-30 17:07:47 UTC (rev 2686)
@@ -55,7 +55,7 @@
* @author thomas.diesler(a)jboss.com
* @since 08-Jul-2008
*/
-@Entity(name = "EndEvent")
+@Entity(name = "BPMEndEvent")
public class EndEventImpl extends EventImpl implements EndEvent, SingleInFlowSupport
{
private static final long serialVersionUID = 1L;
Modified: projects/spec/trunk/modules/ri/src/main/java/org/jbpm/ri/model/ExclusiveGatewayImpl.java
===================================================================
--- projects/spec/trunk/modules/ri/src/main/java/org/jbpm/ri/model/ExclusiveGatewayImpl.java 2008-10-30 15:15:36 UTC (rev 2685)
+++ projects/spec/trunk/modules/ri/src/main/java/org/jbpm/ri/model/ExclusiveGatewayImpl.java 2008-10-30 17:07:47 UTC (rev 2686)
@@ -51,7 +51,7 @@
* @author thomas.diesler(a)jboss.com
* @since 08-Jul-2008
*/
-@Entity(name = "ExclusiveGateway")
+@Entity(name = "BPMExclusiveGateway")
public class ExclusiveGatewayImpl extends GatewayImpl implements ExclusiveGateway
{
private static final long serialVersionUID = 1L;
Modified: projects/spec/trunk/modules/ri/src/main/java/org/jbpm/ri/model/ExpressionImpl.java
===================================================================
--- projects/spec/trunk/modules/ri/src/main/java/org/jbpm/ri/model/ExpressionImpl.java 2008-10-30 15:15:36 UTC (rev 2685)
+++ projects/spec/trunk/modules/ri/src/main/java/org/jbpm/ri/model/ExpressionImpl.java 2008-10-30 17:07:47 UTC (rev 2686)
@@ -38,7 +38,7 @@
* @author thomas.diesler(a)jboss.com
* @since 08-Jul-2008
*/
-@Entity(name = "Expression")
+@Entity(name = "BPMExpression")
public class ExpressionImpl implements Expression
{
// provide serial version UID
Modified: projects/spec/trunk/modules/ri/src/main/java/org/jbpm/ri/model/GateImpl.java
===================================================================
--- projects/spec/trunk/modules/ri/src/main/java/org/jbpm/ri/model/GateImpl.java 2008-10-30 15:15:36 UTC (rev 2685)
+++ projects/spec/trunk/modules/ri/src/main/java/org/jbpm/ri/model/GateImpl.java 2008-10-30 17:07:47 UTC (rev 2686)
@@ -55,7 +55,7 @@
* @author thomas.diesler(a)jboss.com
* @since 10-Oct-2008
*/
-@Entity(name = "Gate")
+@Entity(name = "BPMGate")
public class GateImpl implements Gate
{
// provide serial version UID
Added: projects/spec/trunk/modules/ri/src/main/java/org/jbpm/ri/model/GroupImpl.java
===================================================================
--- projects/spec/trunk/modules/ri/src/main/java/org/jbpm/ri/model/GroupImpl.java (rev 0)
+++ projects/spec/trunk/modules/ri/src/main/java/org/jbpm/ri/model/GroupImpl.java 2008-10-30 17:07:47 UTC (rev 2686)
@@ -0,0 +1,142 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt 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.jbpm.ri.model;
+
+//$Id$
+
+import java.util.Set;
+
+import javax.persistence.Basic;
+import javax.persistence.CascadeType;
+import javax.persistence.Entity;
+import javax.persistence.EnumType;
+import javax.persistence.Enumerated;
+import javax.persistence.FetchType;
+import javax.persistence.GeneratedValue;
+import javax.persistence.Id;
+import javax.persistence.OneToOne;
+
+import org.jbpm.api.model.Group;
+import org.jbpm.api.model.Property;
+import org.jbpm.api.model.internal.PropertySupport;
+
+/**
+ * A Flow Object is one of the set of following graphical objects: Event, Activity, and
+ *
+ * @author thomas.diesler(a)jboss.com
+ * @since 08-Jul-2008
+ */
+@Entity(name = "BPMGroup")
+public class GroupImpl implements Group
+{
+ private static final long serialVersionUID = 1L;
+
+ @Id @GeneratedValue
+ protected int id;
+
+ @OneToOne(cascade = { CascadeType.ALL }, fetch = FetchType.EAGER, targetEntity = PropertySupportImpl.class)
+ private PropertySupport propSupport = new PropertySupportImpl();
+
+ @Enumerated(EnumType.STRING)
+ private GroupType groupType;
+
+ @Basic
+ private String name;
+
+ @Basic
+ private int groupIndex;
+
+ public GroupImpl(GroupType groupType, String name)
+ {
+ this.groupType = groupType;
+ this.name = name;
+ }
+
+ // Persistence ctor
+ protected GroupImpl()
+ {
+ }
+
+ @Override
+ public GroupType getGroupType()
+ {
+ return groupType;
+ }
+
+ @Override
+ public String getName()
+ {
+ return name;
+ }
+
+ public int getGroupIndex()
+ {
+ return groupIndex;
+ }
+
+ public void setGroupIndex(int groupIndex)
+ {
+ this.groupIndex = groupIndex;
+ }
+
+ @Override
+ public Property getProperty(String name)
+ {
+ return propSupport.getProperty(name);
+ }
+
+ @Override
+ public Set<Property> getProperties()
+ {
+ return propSupport.getProperties();
+ }
+
+ @Override
+ public Set<String> getPropertyNames()
+ {
+ return propSupport.getPropertyNames();
+ }
+
+ @Override
+ public void addProperty(Property prop)
+ {
+ propSupport.addProperty(prop);
+ }
+
+ @Override
+ public void addProperty(String name, Object value)
+ {
+ propSupport.addProperty(name, value);
+ }
+
+ @Override
+ public Property removeProperty(String name)
+ {
+ return propSupport.removeProperty(name);
+ }
+
+ @Override
+ public String toString()
+ {
+ return "Group[" + name + "," + groupType + "]";
+ }
+}
\ No newline at end of file
Property changes on: projects/spec/trunk/modules/ri/src/main/java/org/jbpm/ri/model/GroupImpl.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Modified: projects/spec/trunk/modules/ri/src/main/java/org/jbpm/ri/model/InclusiveGatewayImpl.java
===================================================================
--- projects/spec/trunk/modules/ri/src/main/java/org/jbpm/ri/model/InclusiveGatewayImpl.java 2008-10-30 15:15:36 UTC (rev 2685)
+++ projects/spec/trunk/modules/ri/src/main/java/org/jbpm/ri/model/InclusiveGatewayImpl.java 2008-10-30 17:07:47 UTC (rev 2686)
@@ -54,7 +54,7 @@
* @author thomas.diesler(a)jboss.com
* @since 08-Jul-2008
*/
-@Entity(name = "InclusiveGateway")
+@Entity(name = "BPMInclusiveGateway")
public class InclusiveGatewayImpl extends GatewayImpl implements InclusiveGateway
{
private static final long serialVersionUID = 1L;
Modified: projects/spec/trunk/modules/ri/src/main/java/org/jbpm/ri/model/InputSetImpl.java
===================================================================
--- projects/spec/trunk/modules/ri/src/main/java/org/jbpm/ri/model/InputSetImpl.java 2008-10-30 15:15:36 UTC (rev 2685)
+++ projects/spec/trunk/modules/ri/src/main/java/org/jbpm/ri/model/InputSetImpl.java 2008-10-30 17:07:47 UTC (rev 2686)
@@ -37,24 +37,23 @@
import org.jbpm.api.model.Property;
import org.jbpm.api.model.internal.PropertySupport;
-
/**
* An InputSet, which is used in the definition of common attributes for Activities and for attributes of a Process
*
* @author thomas.diesler(a)jboss.com
* @since 08-Jul-2008
*/
-@Entity (name = "InputSet")
+@Entity(name = "BPMInputSet")
public class InputSetImpl implements InputSet
{
private static final long serialVersionUID = 1L;
-
+
@Id @GeneratedValue
protected Integer id;
@Basic
private int setIndex;
-
+
@OneToOne(cascade = { CascadeType.ALL }, fetch = FetchType.EAGER, targetEntity = PropertySupportImpl.class)
protected PropertySupport propSupport = new PropertySupportImpl();
@@ -103,7 +102,7 @@
{
return propSupport.removeProperty(name);
}
-
+
@Override
public String toString()
{
Modified: projects/spec/trunk/modules/ri/src/main/java/org/jbpm/ri/model/MessageImpl.java
===================================================================
--- projects/spec/trunk/modules/ri/src/main/java/org/jbpm/ri/model/MessageImpl.java 2008-10-30 15:15:36 UTC (rev 2685)
+++ projects/spec/trunk/modules/ri/src/main/java/org/jbpm/ri/model/MessageImpl.java 2008-10-30 17:07:47 UTC (rev 2686)
@@ -46,7 +46,7 @@
* @author thomas.diesler(a)jboss.com
* @since 21-Jul-2008
*/
-@Entity(name = "Message")
+@Entity(name = "BPMMessage")
public class MessageImpl implements Message
{
private static final long serialVersionUID = 1L;
Modified: projects/spec/trunk/modules/ri/src/main/java/org/jbpm/ri/model/NodeImpl.java
===================================================================
--- projects/spec/trunk/modules/ri/src/main/java/org/jbpm/ri/model/NodeImpl.java 2008-10-30 15:15:36 UTC (rev 2685)
+++ projects/spec/trunk/modules/ri/src/main/java/org/jbpm/ri/model/NodeImpl.java 2008-10-30 17:07:47 UTC (rev 2686)
@@ -43,6 +43,7 @@
import org.jbpm.api.NameNotUniqueException;
import org.jbpm.api.model.Assignment;
import org.jbpm.api.model.EndEvent;
+import org.jbpm.api.model.Group;
import org.jbpm.api.model.Node;
import org.jbpm.api.model.Process;
import org.jbpm.api.model.ProcessDefinition;
@@ -72,7 +73,7 @@
* @author thomas.diesler(a)jboss.com
* @since 08-Jul-2008
*/
-@Entity(name = "Node")
+@Entity(name = "BPMNode")
@Inheritance(strategy = InheritanceType.JOINED)
public abstract class NodeImpl extends AbstractElementImpl implements Node
{
@@ -125,6 +126,9 @@
@ManyToOne(targetEntity = ProcessImpl.class)
private Process proc;
+ @ManyToOne(targetEntity = GroupImpl.class)
+ private Group groupRef;
+
public NodeImpl(ProcessStructure procStruct, String name)
{
this.procStruct = procStruct;
@@ -169,6 +173,17 @@
}
@Override
+ public Group getGroupRef()
+ {
+ return groupRef;
+ }
+
+ public void setGroupRef(Group groupRef)
+ {
+ this.groupRef = groupRef;
+ }
+
+ @Override
public Property getProperty(String name)
{
return propSupport.getProperty(name);
@@ -397,6 +412,17 @@
throw new NameNotUniqueException(toString());
}
+ // Initialize the groupRef
+ if (groupRef != null)
+ {
+ String grpName = groupRef.getName();
+ Group procGroup = procStruct.getGroup(grpName);
+ if (procGroup == null)
+ throw new InvalidProcessException("Cannot obtain group for name: " + grpName);
+
+ this.groupRef = procGroup;
+ }
+
// Initialize in/out flows
SequenceFlow outFlow = null;
if (this instanceof SingleOutFlowSupport)
Modified: projects/spec/trunk/modules/ri/src/main/java/org/jbpm/ri/model/OutputSetImpl.java
===================================================================
--- projects/spec/trunk/modules/ri/src/main/java/org/jbpm/ri/model/OutputSetImpl.java 2008-10-30 15:15:36 UTC (rev 2685)
+++ projects/spec/trunk/modules/ri/src/main/java/org/jbpm/ri/model/OutputSetImpl.java 2008-10-30 17:07:47 UTC (rev 2686)
@@ -37,24 +37,23 @@
import org.jbpm.api.model.Property;
import org.jbpm.api.model.internal.PropertySupport;
-
/**
* An OutputSet, which is used in the definition of common attributes for Activities and for attributes of a Process
*
* @author thomas.diesler(a)jboss.com
* @since 08-Jul-2008
*/
-@Entity (name = "OutputSet")
+@Entity(name = "BPMOutputSet")
public class OutputSetImpl implements OutputSet
{
private static final long serialVersionUID = 1L;
-
+
@Id @GeneratedValue
protected Integer id;
@Basic
private int setIndex;
-
+
@OneToOne(cascade = { CascadeType.ALL }, fetch = FetchType.EAGER, targetEntity = PropertySupportImpl.class)
protected PropertySupport propSupport = new PropertySupportImpl();
@@ -103,7 +102,7 @@
{
return propSupport.removeProperty(name);
}
-
+
@Override
public String toString()
{
Modified: projects/spec/trunk/modules/ri/src/main/java/org/jbpm/ri/model/ParallelGatewayImpl.java
===================================================================
--- projects/spec/trunk/modules/ri/src/main/java/org/jbpm/ri/model/ParallelGatewayImpl.java 2008-10-30 15:15:36 UTC (rev 2685)
+++ projects/spec/trunk/modules/ri/src/main/java/org/jbpm/ri/model/ParallelGatewayImpl.java 2008-10-30 17:07:47 UTC (rev 2686)
@@ -50,7 +50,7 @@
* @author thomas.diesler(a)jboss.com
* @since 08-Jul-2008
*/
-@Entity(name = "ParallelGateway")
+@Entity(name = "BPMParallelGateway")
public class ParallelGatewayImpl extends GatewayImpl implements ParallelGateway
{
private static final long serialVersionUID = 1L;
Modified: projects/spec/trunk/modules/ri/src/main/java/org/jbpm/ri/model/ParticipantImpl.java
===================================================================
--- projects/spec/trunk/modules/ri/src/main/java/org/jbpm/ri/model/ParticipantImpl.java 2008-10-30 15:15:36 UTC (rev 2685)
+++ projects/spec/trunk/modules/ri/src/main/java/org/jbpm/ri/model/ParticipantImpl.java 2008-10-30 17:07:47 UTC (rev 2686)
@@ -39,7 +39,7 @@
* @author thomas.diesler(a)jboss.com
* @since 21-Jul-2008
*/
-@Entity(name = "Participant")
+@Entity(name = "BPMParticipant")
public class ParticipantImpl implements Participant
{
private static final long serialVersionUID = 1L;
Modified: projects/spec/trunk/modules/ri/src/main/java/org/jbpm/ri/model/ProcessDefinitionImpl.java
===================================================================
--- projects/spec/trunk/modules/ri/src/main/java/org/jbpm/ri/model/ProcessDefinitionImpl.java 2008-10-30 15:15:36 UTC (rev 2685)
+++ projects/spec/trunk/modules/ri/src/main/java/org/jbpm/ri/model/ProcessDefinitionImpl.java 2008-10-30 17:07:47 UTC (rev 2686)
@@ -42,6 +42,7 @@
import org.jbpm.api.Constants;
import org.jbpm.api.client.ProcessEngine;
import org.jbpm.api.model.Assignment;
+import org.jbpm.api.model.Group;
import org.jbpm.api.model.Message;
import org.jbpm.api.model.Node;
import org.jbpm.api.model.Process;
@@ -58,7 +59,7 @@
* @author thomas.diesler(a)jboss.com
* @since 08-Jul-2008
*/
-@Entity(name = "ProcessDefinition")
+@Entity(name = "BPMProcessDefinition")
public class ProcessDefinitionImpl extends AbstractElementImpl implements ProcessDefinition
{
private static final long serialVersionUID = 1L;
@@ -163,6 +164,18 @@
}
@Override
+ public Group getGroup(String grpName)
+ {
+ return procStruct.getGroup(grpName);
+ }
+
+ @Override
+ public List<Group> getGroups()
+ {
+ return procStruct.getGroups();
+ }
+
+ @Override
public Property getProperty(String name)
{
return procStruct.getProperty(name);
Modified: projects/spec/trunk/modules/ri/src/main/java/org/jbpm/ri/model/ProcessImpl.java
===================================================================
--- projects/spec/trunk/modules/ri/src/main/java/org/jbpm/ri/model/ProcessImpl.java 2008-10-30 15:15:36 UTC (rev 2685)
+++ projects/spec/trunk/modules/ri/src/main/java/org/jbpm/ri/model/ProcessImpl.java 2008-10-30 17:07:47 UTC (rev 2686)
@@ -39,6 +39,7 @@
import org.jbpm.api.Constants;
import org.jbpm.api.client.ProcessEngine;
import org.jbpm.api.model.Assignment;
+import org.jbpm.api.model.Group;
import org.jbpm.api.model.Message;
import org.jbpm.api.model.Node;
import org.jbpm.api.model.Process;
@@ -58,7 +59,7 @@
* @author thomas.diesler(a)jboss.com
* @since 08-Jul-2008
*/
-@Entity(name = "Process")
+@Entity(name = "BPMProcess")
public class ProcessImpl extends AbstractElementImpl implements Process
{
private static final long serialVersionUID = 1L;
@@ -166,6 +167,18 @@
}
@Override
+ public Group getGroup(String grpName)
+ {
+ return procStruct.getGroup(grpName);
+ }
+
+ @Override
+ public List<Group> getGroups()
+ {
+ return procStruct.getGroups();
+ }
+
+ @Override
public Property getProperty(String name)
{
return procStruct.getProperty(name);
Modified: projects/spec/trunk/modules/ri/src/main/java/org/jbpm/ri/model/ProcessStructureImpl.java
===================================================================
--- projects/spec/trunk/modules/ri/src/main/java/org/jbpm/ri/model/ProcessStructureImpl.java 2008-10-30 15:15:36 UTC (rev 2685)
+++ projects/spec/trunk/modules/ri/src/main/java/org/jbpm/ri/model/ProcessStructureImpl.java 2008-10-30 17:07:47 UTC (rev 2686)
@@ -43,6 +43,7 @@
import org.jbpm.api.client.ProcessEngine;
import org.jbpm.api.model.Assignment;
import org.jbpm.api.model.EndEvent;
+import org.jbpm.api.model.Group;
import org.jbpm.api.model.Message;
import org.jbpm.api.model.Node;
import org.jbpm.api.model.Process;
@@ -61,7 +62,7 @@
* @author thomas.diesler(a)jboss.com
* @since 08-Jul-2008
*/
-@Entity(name = "ProcessStructure")
+@Entity(name = "BPMProcessStructure")
public class ProcessStructureImpl extends AbstractElementImpl implements ProcessStructure
{
private static final long serialVersionUID = 1L;
@@ -87,6 +88,10 @@
@OneToMany(cascade = { CascadeType.ALL }, fetch = FetchType.EAGER, targetEntity = AssignmentImpl.class)
private List<Assignment> assignments = new ArrayList<Assignment>();
+ @IndexColumn(name = "groupIndex")
+ @OneToMany(cascade = { CascadeType.ALL }, fetch = FetchType.EAGER, targetEntity = GroupImpl.class)
+ private List<Group> groups = new ArrayList<Group>();
+
public ProcessStructureImpl(ProcessEngine engine, String name)
{
super(engine);
@@ -253,7 +258,34 @@
return propSupport.removeProperty(name);
}
+ public void addGroup(GroupImpl groupImpl)
+ {
+ groupImpl.setGroupIndex(groups.size());
+ groups.add(groupImpl);
+ }
+
@Override
+ public Group getGroup(String grpName)
+ {
+ Group retGroup = null;
+ for (Group auxGroup : groups)
+ {
+ if (auxGroup.getName().equals(grpName))
+ {
+ retGroup = auxGroup;
+ break;
+ }
+ }
+ return retGroup;
+ }
+
+ @Override
+ public List<Group> getGroups()
+ {
+ return Collections.unmodifiableList(groups);
+ }
+
+ @Override
public void create(ProcessDefinition procDef)
{
super.create(procDef);
@@ -268,6 +300,7 @@
if (getNodes(EndEvent.class).size() == 0)
throw new InvalidProcessException("Process does not have end events");
+ // Initialize the nodes
for (Node node : getNodes())
{
NodeImpl nodeImpl = (NodeImpl)node;
Modified: projects/spec/trunk/modules/ri/src/main/java/org/jbpm/ri/model/PropertyImpl.java
===================================================================
--- projects/spec/trunk/modules/ri/src/main/java/org/jbpm/ri/model/PropertyImpl.java 2008-10-30 15:15:36 UTC (rev 2685)
+++ projects/spec/trunk/modules/ri/src/main/java/org/jbpm/ri/model/PropertyImpl.java 2008-10-30 17:07:47 UTC (rev 2686)
@@ -36,7 +36,7 @@
* @author thomas.diesler(a)jboss.com
* @since 08-Jul-2008
*/
-@Entity (name = "Property")
+@Entity(name = "BPMProperty")
public class PropertyImpl implements Property
{
private static final long serialVersionUID = 1L;
Modified: projects/spec/trunk/modules/ri/src/main/java/org/jbpm/ri/model/PropertySupportImpl.java
===================================================================
--- projects/spec/trunk/modules/ri/src/main/java/org/jbpm/ri/model/PropertySupportImpl.java 2008-10-30 15:15:36 UTC (rev 2685)
+++ projects/spec/trunk/modules/ri/src/main/java/org/jbpm/ri/model/PropertySupportImpl.java 2008-10-30 17:07:47 UTC (rev 2686)
@@ -46,7 +46,7 @@
* @author thomas.diesler(a)jboss.com
* @since 08-Jul-2008
*/
-@Entity(name = "PropertySupport")
+@Entity(name = "BPMPropertySupport")
public class PropertySupportImpl implements PropertySupport
{
private static final long serialVersionUID = 1L;
Modified: projects/spec/trunk/modules/ri/src/main/java/org/jbpm/ri/model/ReceiveTaskImpl.java
===================================================================
--- projects/spec/trunk/modules/ri/src/main/java/org/jbpm/ri/model/ReceiveTaskImpl.java 2008-10-30 15:15:36 UTC (rev 2685)
+++ projects/spec/trunk/modules/ri/src/main/java/org/jbpm/ri/model/ReceiveTaskImpl.java 2008-10-30 17:07:47 UTC (rev 2686)
@@ -50,7 +50,7 @@
* @author thomas.diesler(a)jboss.com
* @since 08-Jul-2008
*/
-@Entity(name = "ReceiveTask")
+@Entity(name = "BPMReceiveTask")
public class ReceiveTaskImpl extends TaskImpl implements ReceiveTask, MessageListener
{
private static final long serialVersionUID = 1L;
Modified: projects/spec/trunk/modules/ri/src/main/java/org/jbpm/ri/model/SendTaskImpl.java
===================================================================
--- projects/spec/trunk/modules/ri/src/main/java/org/jbpm/ri/model/SendTaskImpl.java 2008-10-30 15:15:36 UTC (rev 2685)
+++ projects/spec/trunk/modules/ri/src/main/java/org/jbpm/ri/model/SendTaskImpl.java 2008-10-30 17:07:47 UTC (rev 2686)
@@ -45,7 +45,7 @@
* @author thomas.diesler(a)jboss.com
* @since 08-Jul-2008
*/
-@Entity(name = "SendTask")
+@Entity(name = "BPMSendTask")
public class SendTaskImpl extends TaskImpl implements SendTask
{
private static final long serialVersionUID = 1L;
Modified: projects/spec/trunk/modules/ri/src/main/java/org/jbpm/ri/model/SequenceFlowImpl.java
===================================================================
--- projects/spec/trunk/modules/ri/src/main/java/org/jbpm/ri/model/SequenceFlowImpl.java 2008-10-30 15:15:36 UTC (rev 2685)
+++ projects/spec/trunk/modules/ri/src/main/java/org/jbpm/ri/model/SequenceFlowImpl.java 2008-10-30 17:07:47 UTC (rev 2686)
@@ -45,7 +45,7 @@
* @author thomas.diesler(a)jboss.com
* @since 08-Jul-2008
*/
-@Entity(name = "SequenceFlow")
+@Entity(name = "BPMSequenceFlow")
public class SequenceFlowImpl implements SequenceFlow
{
// provide serial version UID
Modified: projects/spec/trunk/modules/ri/src/main/java/org/jbpm/ri/model/SignalImpl.java
===================================================================
--- projects/spec/trunk/modules/ri/src/main/java/org/jbpm/ri/model/SignalImpl.java 2008-10-30 15:15:36 UTC (rev 2685)
+++ projects/spec/trunk/modules/ri/src/main/java/org/jbpm/ri/model/SignalImpl.java 2008-10-30 17:07:47 UTC (rev 2686)
@@ -40,7 +40,7 @@
* @author Thomas.Diesler(a)jboss.com
* @since 08-Jul-2008
*/
-@Entity(name = "Signal")
+@Entity(name = "BPMSignal")
public final class SignalImpl implements Signal
{
private static final long serialVersionUID = 1L;
Modified: projects/spec/trunk/modules/ri/src/main/java/org/jbpm/ri/model/StartEventImpl.java
===================================================================
--- projects/spec/trunk/modules/ri/src/main/java/org/jbpm/ri/model/StartEventImpl.java 2008-10-30 15:15:36 UTC (rev 2685)
+++ projects/spec/trunk/modules/ri/src/main/java/org/jbpm/ri/model/StartEventImpl.java 2008-10-30 17:07:47 UTC (rev 2686)
@@ -56,7 +56,7 @@
* @author thomas.diesler(a)jboss.com
* @since 08-Jul-2008
*/
-@Entity(name = "StartEvent")
+@Entity(name = "BPMStartEvent")
public class StartEventImpl extends EventImpl implements StartEvent, SingleOutFlowSupport
{
private static final long serialVersionUID = 1L;
Modified: projects/spec/trunk/modules/ri/src/main/java/org/jbpm/ri/model/TaskImpl.java
===================================================================
--- projects/spec/trunk/modules/ri/src/main/java/org/jbpm/ri/model/TaskImpl.java 2008-10-30 15:15:36 UTC (rev 2685)
+++ projects/spec/trunk/modules/ri/src/main/java/org/jbpm/ri/model/TaskImpl.java 2008-10-30 17:07:47 UTC (rev 2686)
@@ -69,7 +69,7 @@
* @author thomas.diesler(a)jboss.com
* @since 08-Jul-2008
*/
-@Entity(name = "Task")
+@Entity(name = "BPMTask")
public class TaskImpl extends NodeImpl implements Task, SingleOutFlowSupport, SingleInFlowSupport
{
// provide serial version UID
Modified: projects/spec/trunk/modules/ri/src/main/java/org/jbpm/ri/model/UserTaskImpl.java
===================================================================
--- projects/spec/trunk/modules/ri/src/main/java/org/jbpm/ri/model/UserTaskImpl.java 2008-10-30 15:15:36 UTC (rev 2685)
+++ projects/spec/trunk/modules/ri/src/main/java/org/jbpm/ri/model/UserTaskImpl.java 2008-10-30 17:07:47 UTC (rev 2686)
@@ -55,7 +55,7 @@
* @author thomas.diesler(a)jboss.com
* @since 08-Jul-2008
*/
-@Entity(name = "UserTask")
+@Entity(name = "BPMUserTask")
public class UserTaskImpl extends TaskImpl implements UserTask, MessageListener
{
private static final long serialVersionUID = 1L;
Added: projects/spec/trunk/modules/ri/src/main/java/org/jbpm/ri/model/builder/GroupBuilderImpl.java
===================================================================
--- projects/spec/trunk/modules/ri/src/main/java/org/jbpm/ri/model/builder/GroupBuilderImpl.java (rev 0)
+++ projects/spec/trunk/modules/ri/src/main/java/org/jbpm/ri/model/builder/GroupBuilderImpl.java 2008-10-30 17:07:47 UTC (rev 2686)
@@ -0,0 +1,61 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt 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.jbpm.ri.model.builder;
+
+//$Id$
+
+import org.jbpm.api.model.Group;
+import org.jbpm.api.model.Group.GroupType;
+import org.jbpm.api.model.builder.GroupBuilder;
+import org.jbpm.ri.model.GroupImpl;
+
+
+/**
+ * A GroupBuilder can be used to build a {@link Group} dynamically.
+ *
+ * @author thomas.diesler(a)jboss.com
+ * @since 30-Oct-2008
+ */
+public class GroupBuilderImpl implements GroupBuilder
+{
+ private Group group;
+
+ @Override
+ public GroupBuilder newGroup(GroupType type, String name)
+ {
+ group = new GroupImpl(type, name);
+ return this;
+ }
+
+ @Override
+ public GroupBuilder addProperty(String name, Object value)
+ {
+ group.addProperty(name, value);
+ return this;
+ }
+
+ @Override
+ public Group getGroup()
+ {
+ return group;
+ }
+}
\ No newline at end of file
Property changes on: projects/spec/trunk/modules/ri/src/main/java/org/jbpm/ri/model/builder/GroupBuilderImpl.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Modified: projects/spec/trunk/modules/ri/src/main/java/org/jbpm/ri/model/builder/ProcessBuilderImpl.java
===================================================================
--- projects/spec/trunk/modules/ri/src/main/java/org/jbpm/ri/model/builder/ProcessBuilderImpl.java 2008-10-30 15:15:36 UTC (rev 2685)
+++ projects/spec/trunk/modules/ri/src/main/java/org/jbpm/ri/model/builder/ProcessBuilderImpl.java 2008-10-30 17:07:47 UTC (rev 2686)
@@ -31,9 +31,11 @@
import org.jbpm.api.model.Event.EventDetailType;
import org.jbpm.api.model.Expression.ExpressionLanguage;
import org.jbpm.api.model.Gateway.GatewayType;
+import org.jbpm.api.model.Group.GroupType;
import org.jbpm.api.model.Task.TaskType;
import org.jbpm.api.model.builder.EventBuilder;
import org.jbpm.api.model.builder.GatewayBuilder;
+import org.jbpm.api.model.builder.GroupBuilder;
import org.jbpm.api.model.builder.MessageBuilder;
import org.jbpm.api.model.builder.ProcessBuilder;
import org.jbpm.api.model.builder.TaskBuilder;
@@ -46,6 +48,7 @@
import org.jbpm.ri.model.EventImpl;
import org.jbpm.ri.model.ExclusiveGatewayImpl;
import org.jbpm.ri.model.ExpressionImpl;
+import org.jbpm.ri.model.GroupImpl;
import org.jbpm.ri.model.InclusiveGatewayImpl;
import org.jbpm.ri.model.NodeImpl;
import org.jbpm.ri.model.ParallelGatewayImpl;
@@ -127,7 +130,7 @@
addNode(node = startImpl);
return new EventBuilderImpl(this);
}
-
+
public EventBuilder addEvent(String name)
{
addNode(node = new EventImpl(procStruct, name));
@@ -224,7 +227,7 @@
getProcessStructure().addAssignment(assignment);
return this;
}
-
+
public ProcessBuilder addNodeAssignment(AssignTime time, ExpressionLanguage lang, String fromExpr, String toProp)
{
AssignmentImpl assignment = getAssignment(time, lang, fromExpr, toProp);
@@ -239,7 +242,7 @@
AssignmentImpl assignment = new AssignmentImpl(time, from, to);
return assignment;
}
-
+
public <T extends ExecutionHandler> ProcessBuilder addExecutionHandler(Class<T> clazz)
{
getNodeInternal().setExecutionHandler(clazz);
@@ -279,6 +282,21 @@
return this;
}
+ @Override
+ public GroupBuilder addGroup(GroupType type, String name)
+ {
+ GroupBuilder groupBuilder = new GroupBuilderImpl().newGroup(type, name);
+ getProcessStructure().addGroup((GroupImpl)groupBuilder.getGroup());
+ return groupBuilder;
+ }
+
+ @Override
+ public ProcessBuilder addGroupRef(String grpName)
+ {
+ getNodeInternal().setGroupRef(new GroupImpl(GroupType.None, grpName));
+ return this;
+ }
+
private ProcessBuilder addNode(NodeImpl nodeImpl)
{
getProcessStructure().addNode(nodeImpl);
Modified: projects/spec/trunk/modules/ri/src/main/resources/jbpm-cfg-beans.xml
===================================================================
--- projects/spec/trunk/modules/ri/src/main/resources/jbpm-cfg-beans.xml 2008-10-30 15:15:36 UTC (rev 2685)
+++ projects/spec/trunk/modules/ri/src/main/resources/jbpm-cfg-beans.xml 2008-10-30 17:07:47 UTC (rev 2686)
@@ -33,6 +33,7 @@
<value>org.jbpm.ri.model.ExclusiveGatewayImpl</value>
<value>org.jbpm.ri.model.ExpressionImpl</value>
<value>org.jbpm.ri.model.GatewayImpl</value>
+ <value>org.jbpm.ri.model.GroupImpl</value>
<value>org.jbpm.ri.model.InclusiveGatewayImpl</value>
<value>org.jbpm.ri.model.InputSetImpl</value>
<value>org.jbpm.ri.model.MessageImpl</value>
15 years, 6 months
JBoss JBPM SVN: r2685 - in jbpm4/trunk/modules/pvm/src: main/java/org/jbpm/pvm/model and 3 other directories.
by do-not-reply@jboss.org
Author: tom.baeyens(a)jboss.com
Date: 2008-10-30 11:15:36 -0400 (Thu, 30 Oct 2008)
New Revision: 2685
Removed:
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/job/
Modified:
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/model/OpenExecution.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/session/PvmDbSession.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/session/TimerSession.java
jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/api/timer/TestTimerSession.java
jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/api/timer/TimerIntegrationTest.java
jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/internal/jobexecutor/JobExecutorIsolationDbTest.java
jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/internal/jobexecutor/JobExecutorTest.java
Log:
unification api proposals
Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/model/OpenExecution.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/model/OpenExecution.java 2008-10-30 15:15:11 UTC (rev 2684)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/model/OpenExecution.java 2008-10-30 15:15:36 UTC (rev 2685)
@@ -27,7 +27,7 @@
import org.jbpm.Execution;
import org.jbpm.PvmException;
-import org.jbpm.pvm.job.Timer;
+import org.jbpm.job.Timer;
/** execution that opens up access to the related
Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/session/PvmDbSession.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/session/PvmDbSession.java 2008-10-30 15:15:11 UTC (rev 2684)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/session/PvmDbSession.java 2008-10-30 15:15:36 UTC (rev 2685)
@@ -24,11 +24,11 @@
import java.util.List;
import org.jbpm.Execution;
+import org.jbpm.job.Job;
+import org.jbpm.job.Message;
+import org.jbpm.job.Timer;
import org.jbpm.pvm.client.ClientExecution;
import org.jbpm.pvm.client.ClientProcessDefinition;
-import org.jbpm.pvm.job.Job;
-import org.jbpm.pvm.job.Message;
-import org.jbpm.pvm.job.Timer;
/**
* @author Tom Baeyens, Pascal Verdage
Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/session/TimerSession.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/session/TimerSession.java 2008-10-30 15:15:11 UTC (rev 2684)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/session/TimerSession.java 2008-10-30 15:15:36 UTC (rev 2685)
@@ -21,7 +21,7 @@
*/
package org.jbpm.pvm.session;
-import org.jbpm.pvm.job.Timer;
+import org.jbpm.job.Timer;
/**
* @author Tom Baeyens, Pascal Verdage
Modified: jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/api/timer/TestTimerSession.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/api/timer/TestTimerSession.java 2008-10-30 15:15:11 UTC (rev 2684)
+++ jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/api/timer/TestTimerSession.java 2008-10-30 15:15:36 UTC (rev 2685)
@@ -25,9 +25,9 @@
import java.util.Date;
import java.util.List;
+import org.jbpm.job.Timer;
import org.jbpm.pvm.env.Environment;
import org.jbpm.pvm.internal.job.TimerImpl;
-import org.jbpm.pvm.job.Timer;
import org.jbpm.pvm.session.TimerSession;
/**
Modified: jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/api/timer/TimerIntegrationTest.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/api/timer/TimerIntegrationTest.java 2008-10-30 15:15:11 UTC (rev 2684)
+++ jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/api/timer/TimerIntegrationTest.java 2008-10-30 15:15:36 UTC (rev 2685)
@@ -21,6 +21,8 @@
import org.jbpm.Execution;
import org.jbpm.ExecutionService;
import org.jbpm.ProcessService;
+import org.jbpm.job.JobTestHelper;
+import org.jbpm.job.Timer;
import org.jbpm.pvm.DeploymentImpl;
import org.jbpm.pvm.activity.ActivityExecution;
import org.jbpm.pvm.activity.ExternalActivity;
@@ -28,8 +30,6 @@
import org.jbpm.pvm.internal.model.ExecutionImpl;
import org.jbpm.pvm.internal.model.NodeImpl;
import org.jbpm.pvm.internal.util.Clock;
-import org.jbpm.pvm.job.JobTestHelper;
-import org.jbpm.pvm.job.Timer;
import org.jbpm.pvm.model.OpenExecution;
import org.jbpm.pvm.model.OpenProcessDefinition;
import org.jbpm.pvm.model.ProcessFactory;
Modified: jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/internal/jobexecutor/JobExecutorIsolationDbTest.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/internal/jobexecutor/JobExecutorIsolationDbTest.java 2008-10-30 15:15:11 UTC (rev 2684)
+++ jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/internal/jobexecutor/JobExecutorIsolationDbTest.java 2008-10-30 15:15:36 UTC (rev 2685)
@@ -16,12 +16,12 @@
import java.util.ArrayList;
import java.util.List;
+import org.jbpm.job.Message;
import org.jbpm.pvm.env.Environment;
import org.jbpm.pvm.internal.cmd.Command;
import org.jbpm.pvm.internal.job.CommandMessage;
import org.jbpm.pvm.internal.log.Log;
import org.jbpm.pvm.internal.wire.descriptor.ObjectDescriptor;
-import org.jbpm.pvm.job.Message;
import org.jbpm.pvm.session.MessageSession;
import org.jbpm.pvm.session.PvmDbSession;
import org.jbpm.pvm.test.base.DbTestCase;
Modified: jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/internal/jobexecutor/JobExecutorTest.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/internal/jobexecutor/JobExecutorTest.java 2008-10-30 15:15:11 UTC (rev 2684)
+++ jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/internal/jobexecutor/JobExecutorTest.java 2008-10-30 15:15:36 UTC (rev 2685)
@@ -33,6 +33,7 @@
import org.hibernate.Session;
import org.jbpm.ProcessService;
+import org.jbpm.job.Job;
import org.jbpm.pvm.DeploymentImpl;
import org.jbpm.pvm.activity.ActivityExecution;
import org.jbpm.pvm.activity.ExternalActivity;
@@ -45,7 +46,6 @@
import org.jbpm.pvm.internal.job.JobImpl;
import org.jbpm.pvm.internal.log.Log;
import org.jbpm.pvm.internal.model.ProcessDefinitionImpl;
-import org.jbpm.pvm.job.Job;
import org.jbpm.pvm.model.Comment;
import org.jbpm.pvm.model.ProcessFactory;
import org.jbpm.pvm.session.MessageSession;
15 years, 6 months
JBoss JBPM SVN: r2684 - in jbpm4/trunk/modules/pvm/src/main/java/org/jbpm: job and 7 other directories.
by do-not-reply@jboss.org
Author: tom.baeyens(a)jboss.com
Date: 2008-10-30 11:15:11 -0400 (Thu, 30 Oct 2008)
New Revision: 2684
Added:
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/job/
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/job/JobTestHelper.java
Removed:
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/Configuration.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/Deployment.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/Execution.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/ExecutionService.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/ManagementService.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/ProcessDefinition.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/ProcessEngine.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/ProcessService.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/PvmException.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/ResourceManager.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/TaskService.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/job/Job.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/job/JobTestHelper.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/job/Message.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/job/Timer.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/job/package.html
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/package.html
Modified:
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/cmd/GetMessagesCmd.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/cmd/GetTimersCmd.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/hibernate/HibernatePvmDbSession.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/job/JobImpl.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/job/MessageImpl.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/job/TimerImpl.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/jobexecutor/ExecuteJobCmd.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/jobexecutor/JobExecutorTimerSession.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/model/ExecutionImpl.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/svc/CommandManagementService.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/svc/CommandProcessService.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/wire/binding/JobTestHelperBinding.java
Log:
unification api proposals
Deleted: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/Configuration.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/Configuration.java 2008-10-30 15:14:38 UTC (rev 2683)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/Configuration.java 2008-10-30 15:15:11 UTC (rev 2684)
@@ -1,7 +0,0 @@
-package org.jbpm;
-
-
-public abstract class Configuration {
-
- public abstract ProcessEngine buildProcessEngine();
-}
Deleted: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/Deployment.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/Deployment.java 2008-10-30 15:14:38 UTC (rev 2683)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/Deployment.java 2008-10-30 15:15:11 UTC (rev 2684)
@@ -1,56 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt 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.jbpm;
-
-import java.io.File;
-import java.io.InputStream;
-import java.io.Serializable;
-import java.net.URL;
-import java.util.zip.ZipInputStream;
-
-
-/** a deployment unit, containing all information to create a process
- * definition that will be deployed in the persistent store of the
- * Process Virtual Machine.
- *
- * @author Tom Baeyens
- */
-public interface Deployment extends Serializable {
-
- void setName(String name);
- void setLanguage(String language);
-
- void addObject(String name, Object object);
- void addResource(String resource);
- void addFile(File file);
- void addUrl(URL url);
- void addInputStream(String name, InputStream inputStream);
- void addArchiveResource(String resource);
- void addArchiveFile(File file);
- void addArchiveUrl(URL url);
- void addArchive(ZipInputStream zipInputStream);
- void addDirectory(String directory);
- void addDirectoryCanonical(String directory);
- void addDirectory(File directory);
- void addDirectoryCanonical(File directory);
-
-}
Deleted: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/Execution.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/Execution.java 2008-10-30 15:14:38 UTC (rev 2683)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/Execution.java 2008-10-30 15:15:11 UTC (rev 2684)
@@ -1,167 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt 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.jbpm;
-
-import java.io.Serializable;
-
-import org.jbpm.pvm.client.ClientExecution;
-import org.jbpm.pvm.client.ClientProcessDefinition;
-import org.jbpm.pvm.model.ObservableElement;
-
-/** a runtime path of execution.
- *
- * <h3 id="state">State of an execution</h3>
- *
- * <p>The state of an execution is either active or locked. An active execution is either
- * executing or waiting for an external trigger. If an execution is not in {@link #STATE_ACTIVE},
- * then it is locked. A locked execution is read only.
- * </p>
- *
- * <p>When a new execution is created, it is in {@link #STATE_ACTIVE}. To change
- * the state to a locked state, use {@link #lock(String)}.
- * {@link #STATE_ACTIVE Some STATE_* constants} are provided that represent the
- * most commonly used locked states. But the state '...' in the picture indicates
- * that any string can be provided as the state in the lock method.
- * </p>
- *
- * <p>If an execution is locked, methods that change the execution will throw
- * a {@link PvmException} and the message will reference the actual locking state.
- * {@link #fire(String, ObservableElement) Firing events},
- * {@link #setVariable(String, Object) updating variables},
- * {@link #setPriority(int) updating priority} and
- * {@link #createComment(String) adding comments} are not considered to change an
- * execution. Also {@link #createProcessInstance(String) creation} and
- * {@link #removeExecution(Execution) removal} of child executions are unchecked,
- * which means that those methods can be invoked by external API clients and
- * node behaviour methods, even while the execution is in a locked state.
- * </p>
- *
- * <p>Make sure that comparisons between {@link #getState()} and the
- * {@link #STATE_ACTIVE STATE_* constants} are
- * done with .equals and not with '==' because if executions are
- * loaded from persistent storage, a new string is created instead
- * of the constants.
- * </p>
- *
- * <h3>Comments</h3>
- *
- * @author Tom Baeyens
- */
-public interface Execution extends Serializable {
-
- /** between {@link ClientProcessDefinition#createProcessInstance() creation of
- * a new process instance} and the {@link ClientExecution#start() start} of that
- * process instance. The motivation of this state is that variables can be
- * set programmatically on the process instance so that they can be used during
- * initializations of variables and timers */
- String STATE_CREATED = "created";
-
- /** either executing or in a wait state waiting for a signal.
- * This is the normal state of an execution and the initial state
- * when creating a new execution. Make sure that comparisons are
- * done with .equals and not with '==' because if executions are
- * loaded from persistent storage, a new string is created instead
- * of the constants. */
- String STATE_ACTIVE = "active";
-
- /** parents with concurrent child executions are inactive.
- * When an execution has concurrent child executions, it implies that
- * this execution can't be active. For example, at a fork, the parent
- * execution can wait inactively in the fork being till all the
- * child executions are joined. Only leaves of the
- * execution tree can be active. Make sure that comparisons are
- * done with .equals and not with '==' because if executions are
- * loaded from persistent storage, a new string is created instead
- * of the constants. */
- String STATE_INACTIVE = "inactive";
-
- /** this execution has ended normally. Make sure that comparisons are
- * done with .equals and not with '==' because if executions are
- * loaded from persistent storage, a new string is created instead
- * of the constants. */
- String STATE_ENDED = "ended";
-
- /** this execution was cancelled with the {@link #cancel()}
- * method before normal execution ended. Make sure that comparisons are
- * done with .equals and not with '==' because if executions are
- * loaded from persistent storage, a new string is created instead
- * of the constants. */
- String STATE_CANCELLED = "cancelled";
-
- /** indicates that this execution is temporary suspended with the
- * {@link #suspend()} method. Human tasks of a suspended execution
- * shouldn't show up in people's task list and timers of suspended
- * executions shouldn't fire and the execution is locked. Make sure that comparisons are
- * done with .equals and not with '==' because if executions are
- * loaded from persistent storage, a new string is created instead
- * of the constants. */
- String STATE_SUSPENDED = "suspended";
-
- /** indicates that this execution is doing an asynchronous continuation. */
- String STATE_ASYNC = "async";
-
-
- long getDbid();
- /** the externally given name or id of this execution. The id of a main
- * path of execution is null. Can be used to differentiate concurrent
- * paths of execution e.g. the shipping and billing paths. */
- String getName();
-
- /** the optional user provided business key that is unique within one
- * process definition. This could be for instance the order number.
- * It's a user defined identifier for one execution within the scope of
- * a single process definition. */
- String getKey();
-
- /** a globally unique identifier for this execution. */
- String getId();
-
- /** represents the current position in the process by indicating the
- * name of the current node. */
- String getNodeName();
-
- /** the <a href="#state">state</a> of this execution. */
- String getState();
-
- /** is this execution active ? This is the inverse of {@link #isLocked()}. */
- boolean isActive();
-
- /** is this execution {@link #lock(String) locked} ? This is the inverse of {@link #isActive()}. */
- boolean isLocked();
-
- /** is this execution ended or cancelled ? */
- boolean isFinished();
-
- /** is this execution ended normally ? */
- boolean isEnded();
-
- /** is this execution suspended ? */
- boolean isSuspended();
-
- /** indicates low priorities with negative values and high priorities
- * with positive values. The default priority is 0, which means
- * NORMAL. Other recognized named priorities are HIGHEST (2), HIGH (1),
- * LOW (-1) and LOWEST (-2). For the rest, the user can set any other
- * priority integer value, but then, the UI will have to display it as
- * an integer and not the named value.*/
- int getPriority();
-}
Deleted: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/ExecutionService.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/ExecutionService.java 2008-10-30 15:14:38 UTC (rev 2683)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/ExecutionService.java 2008-10-30 15:15:11 UTC (rev 2684)
@@ -1,126 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt 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.jbpm;
-
-import java.util.List;
-import java.util.Map;
-
-
-/** manages runtime process executions.
- *
- * @author Tom Baeyens
- */
-public interface ExecutionService {
-
- /** starts a new execution for the ProcessDefinition with the given processDefinitionDbid.
- * @param processDefinitionId the {@link ProcessDefinition#getId() unique id} of the process definition. */
- Execution startExecution(String processDefinitionId);
-
- /** starts a new execution for the ProcessDefinition with the given processDefinitionDbid.
- * @param processDefinitionId the {@link ProcessDefinition#getId() unique id} of the process definition.
- * @param executionKey is a user provided reference for the new execution that must be unique over all
- * process versions with the same name. */
- Execution startExecution(String processDefinitionId, String executionKey);
-
- /** starts a new execution for the ProcessDefinition with the given processDefinitionDbid.
- * @param processDefinitionId the {@link ProcessDefinition#getId() unique id} of the process definition.
- * @param variables are the initial values of the process variables that will be set before the execution starts. */
- Execution startExecution(String processDefinitionId, Map<String, Object> variables);
-
- /** starts a new execution for the ProcessDefinition with the given processDefinitionDbid.
- * @param processDefinitionId the {@link ProcessDefinition#getId() unique id} of the process definition.
- * @param variables are the initial values of the process variables that will be set before the execution starts.
- * @param executionKey is a user provided reference for the new execution that must be unique over all
- * process versions with the same name. */
- Execution startExecution(String processDefinitionId, Map<String, Object> variables, String executionKey);
-
- /** starts a new execution in the latest version of the given process definition.
- * @param processDefinitionName is the name of the process definition for which the latest version will be taken. */
- Execution startExecutionInLatest(String processDefinitionName);
-
- /** starts a new execution in the latest version of the given processDefinitionName.
- * @param processDefinitionName is the name of the process definition
- * for which the latest version will be taken.
- * @param executionKey is a user provided reference for the new execution
- * that must be unique over all process versions with the same name. */
- Execution startExecutionInLatest(String processDefinitionName, String executionKey);
-
- /** starts a new execution in the latest version of the given processDefinitionName.
- * @param processDefinitionName is the name of the process definition
- * for which the latest version will be taken.
- * @param variables are the initial values of the process variables that
- * will be set before the execution starts (read: before the initial
- * node is executed). */
- Execution startExecutionInLatest(String processDefinitionName, Map<String, Object> variables);
-
- /** starts a new execution in the latest version of the given processDefinitionName.
- * @param processDefinitionName is the name of the process definition for which the latest version will be taken.
- * @param variables are the initial values of the process variables that will be set before the execution starts.
- * @param executionKey is a user provided reference for the new execution that must be unique over all
- * process versions with the same name. */
- Execution startExecutionInLatest(String processDefinitionName, Map<String, Object> variables, String executionKey);
-
- /** the execution that is uniquely defined by the process definition and the business key. */
- Execution findExecution(String processDefinitionName, String executionKey);
-
- /** the execution that is uniquely defined by the process definition and the business key. */
- Execution findExecution(String executionId);
-
-
- /** provides an external trigger to an execution. */
- Execution signalExecution(String executionId);
-
- /** provides a named external trigger to an execution. */
- Execution signalExecution(String executionId, String signalName);
-
- /** provides a named external trigger to an execution with parameters. */
- Execution signalExecution(String executionId, String signalName, Map<String, Object> parameters);
-
- /** provides a external trigger to an execution with parameters. */
- Execution signalExecution(String executionId, Map<String, Object> parameters);
-
-
- /** provides a named external trigger to an execution. */
- Execution signalExecutionByKey(String processDefinitionName, String executionKey);
-
- /** provides a named external trigger to an execution. */
- Execution signalExecutionByKey(String processDefinitionName, String executionKey, String signalName);
-
- /** provides a named external trigger to an execution with parameters. */
- Execution signalExecutionByKey(String processDefinitionName, String executionKey, Map<String, Object> parameters);
-
- /** provides a named external trigger to an execution with parameters. */
- Execution signalExecutionByKey(String processDefinitionName, String executionKey, String signalName, Map<String, Object> parameters);
-
-
- /** creates or overwrites a variable value on the referenced execution */
- Execution setVariable(String executionId, String name, Object value);
-
- /** creates or overwrites the variable values on the referenced execution */
- Execution setVariables(String executionId, Map<String, Object> variables);
-
- /** retrieves a variable */
- Object getVariable(String executionId, String variableName);
-
- /** retrieves a map of variables */
- Map<String, Object> getVariables(String executionId, List<String> variableNames);
-}
Deleted: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/ManagementService.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/ManagementService.java 2008-10-30 15:14:38 UTC (rev 2683)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/ManagementService.java 2008-10-30 15:15:11 UTC (rev 2684)
@@ -1,57 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt 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.jbpm;
-
-import java.util.List;
-
-import org.jbpm.pvm.job.Job;
-import org.jbpm.pvm.job.Message;
-import org.jbpm.pvm.job.Timer;
-
-
-/** operations targeted to system operators that need to keep
- * the process engine up and running. This functionality is typically
- * exposed through a management web console.
- *
- * @author Tom Baeyens
- */
-public interface ManagementService {
-
- /** all the messages which are waiting to be executed.
- * Messages that are already acquired will not show up in the list. */
- List<Message> getMessages(int firstResult, int maxResults);
-
- /** all the timers which are waiting for their due date.
- * Timers that are already acquired will not show up in the list. */
- List<Timer> getTimers(int firstResult, int maxResults);
-
- /** all jobs for which all the retry attempts have failed and
- * which are parked, waiting for operator intervention */
- List<Job> getJobsWithException(int firstResult, int maxResults);
-
- /** resets the retry count, clears the exception and executes the job.
- * An exception is thrown out of this method in case the execution
- * of the job fails. In case the async command executor is configured
- * for this service, failing job execution will not result into an
- * exception coming out of this method. */
- void executeJob(String jobId);
-}
Deleted: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/ProcessDefinition.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/ProcessDefinition.java 2008-10-30 15:14:38 UTC (rev 2683)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/ProcessDefinition.java 2008-10-30 15:15:11 UTC (rev 2684)
@@ -1,63 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt 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.jbpm;
-
-import java.io.Serializable;
-
-import org.jbpm.pvm.model.ObservableElement;
-
-
-/** a graphical process which is deployed in the {@ ProcessService}.
- *
- * @author Tom Baeyens
- */
-public interface ProcessDefinition extends Serializable {
-
- /** the optional package name of this process. This can be used to create
- * hierarchy of process categories for easy lookup. This is a
- * similar way of grouping and creating a structure as in Java.
- * We recommend the same conventions as with Java package names. */
- String getPackageName();
-
- /** the short display name given to this process definition.
- * Multiple process definitions can have the same as long
- * as they are given a different {@link #version}. */
- String getName();
-
- /** the user defined short representation of the name. Just
- * like the name, multiple versions of a process definition
- * can have the same key. */
- String getKey();
-
- /** the unique id for this process definition. */
- String getId();
-
- /** automatically assigned during deployment of a process that
- * represents the sequence number for process definitions with
- * the same {@link ObservableElement#getName() name}. */
- int getVersion();
-
- /** the description name given to this process definition.
- * Multiple process definitions can have the same */
- String getDescription();
-
-}
Deleted: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/ProcessEngine.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/ProcessEngine.java 2008-10-30 15:14:38 UTC (rev 2683)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/ProcessEngine.java 2008-10-30 15:15:11 UTC (rev 2684)
@@ -1,12 +0,0 @@
-package org.jbpm;
-
-
-public interface ProcessEngine {
-
- ProcessService getProcessService();
- ExecutionService getExecutionService();
- TaskService getTaskService();
- ManagementService getManagementService();
-
- ResourceManager getResourceManager();
-}
Deleted: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/ProcessService.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/ProcessService.java 2008-10-30 15:14:38 UTC (rev 2683)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/ProcessService.java 2008-10-30 15:15:11 UTC (rev 2684)
@@ -1,52 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt 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.jbpm;
-
-import java.util.List;
-
-import org.jbpm.pvm.DeploymentImpl;
-
-
-/** a process definition repository.
- *
- * @author Tom Baeyens
- */
-public interface ProcessService {
-
- Deployment createDeployment();
-
- /** deploy a new process definition into the process repository. */
- ProcessDefinition deploy(DeploymentImpl deploymentImpl);
-
- /** all deployed process names. */
- List<String> findProcessDefinitionNames();
-
- /** all versions of the given process. */
- List<ProcessDefinition> findProcessDefinitions(String processDefinitionName);
-
- /** latest version of the processDefinition with the given name. */
- ProcessDefinition findLatestProcessDefinition(String processDefinitionName);
-
- /** specific version of a named processDefinition. */
- ProcessDefinition findProcessDefinition(String processDefinitionName, int processDefinitionVersion);
-
-}
Deleted: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/PvmException.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/PvmException.java 2008-10-30 15:14:38 UTC (rev 2683)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/PvmException.java 2008-10-30 15:15:11 UTC (rev 2684)
@@ -1,40 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt 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.jbpm;
-
-public class PvmException extends RuntimeException {
-
- private static final long serialVersionUID = 1L;
-
- public PvmException() {
- super();
- }
- public PvmException(String msg, Throwable cause) {
- super(msg, cause);
- }
- public PvmException(String msg) {
- super(msg);
- }
- public PvmException(Throwable cause) {
- super(cause);
- }
-}
Deleted: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/ResourceManager.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/ResourceManager.java 2008-10-30 15:14:38 UTC (rev 2683)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/ResourceManager.java 2008-10-30 15:15:11 UTC (rev 2684)
@@ -1,19 +0,0 @@
-package org.jbpm;
-
-/** can be used to provide transactional reasources
- * like JDBC connection or hibernate session to
- * the method invocations on a service.
- *
- * TODO what about subsequent service method invocations ?
- * will a provided resource only be used once in the next method invocation.
- * Or will the the resource be available for the remainder of the thread.
- * In other words: should interceptor that propagates these resources into the
- * environment clean them from the thread local or not ?
- *
- * @author Tom Baeyens
- */
-public interface ResourceManager {
-
- void addResource(Object object);
- void addResource(String name, Object object);
-}
Deleted: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/TaskService.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/TaskService.java 2008-10-30 15:14:38 UTC (rev 2683)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/TaskService.java 2008-10-30 15:15:11 UTC (rev 2684)
@@ -1,6 +0,0 @@
-package org.jbpm;
-
-
-public interface TaskService {
-
-}
Copied: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/job (from rev 2677, jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/job)
Property changes on: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/job
___________________________________________________________________
Name: svn:mergeinfo
+
Deleted: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/job/Job.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/job/Job.java 2008-10-30 13:20:37 UTC (rev 2677)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/job/Job.java 2008-10-30 15:15:11 UTC (rev 2684)
@@ -1,54 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt 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.jbpm.pvm.job;
-
-import java.util.Date;
-
-import org.jbpm.pvm.Execution;
-
-/** base class for timers and messages.
- *
- * @author Tom Baeyens
- */
-public interface Job {
-
- long getDbid();
-
- String getLockOwner();
-
- boolean isSuspended();
-
- Date getDueDate();
-
- String getException();
-
- int getRetries();
-
- boolean isExclusive();
-
- Execution getExecution();
-
- Execution getProcessInstance();
-
- Date getLockExpirationTime();
-
-}
\ No newline at end of file
Deleted: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/job/JobTestHelper.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/job/JobTestHelper.java 2008-10-30 13:20:37 UTC (rev 2677)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/job/JobTestHelper.java 2008-10-30 15:15:11 UTC (rev 2684)
@@ -1,84 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt 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.jbpm.pvm.job;
-
-import org.hibernate.Query;
-import org.hibernate.Session;
-import org.jbpm.pvm.Execution;
-import org.jbpm.pvm.env.Environment;
-import org.jbpm.pvm.internal.cmd.Command;
-import org.jbpm.pvm.internal.cmd.CommandService;
-import org.jbpm.pvm.internal.job.MessageImpl;
-import org.jbpm.pvm.internal.job.TimerImpl;
-import org.jbpm.pvm.internal.jobexecutor.ExecuteJobCmd;
-
-
-/** helper class for testing that executes messages and timers
- * in the test runner thread. This way, the test can simulate
- * timers and messages being executed. The dueDate is ignored.
- *
- * @author Tom Baeyens
- */
-public class JobTestHelper {
-
- CommandService commandService;
-
- public Execution executeMessage(final long executionDbid) {
- return commandService.execute(new Command<Execution>() {
- private static final long serialVersionUID = 1L;
- public Execution execute(Environment environment) throws Exception {
- Session session = environment.get(Session.class);
- Query query = session.createQuery(
- "select m.dbid " +
- "from "+MessageImpl.class.getName()+" as m " +
- "where m.execution.dbid = :executionDbid"
- );
- query.setLong("executionDbid", executionDbid);
- query.setMaxResults(1);
- Long messageDbid = (Long) query.uniqueResult();
- ExecuteJobCmd executeJobCommand = new ExecuteJobCmd(messageDbid);
- Job job = executeJobCommand.execute(environment);
- return job.getExecution();
- }
- });
- }
-
- public Execution executeTimer(final long timerDbid) {
- return commandService.execute(new Command<Execution>() {
- private static final long serialVersionUID = 1L;
- public Execution execute(Environment environment) throws Exception {
- Session session = environment.get(Session.class);
- Query query = session.createQuery(
- "select t.dbid " +
- "from "+TimerImpl.class.getName()+" as t " +
- "where t.dbid = :timerDbid"
- );
- query.setLong("timerDbid", timerDbid);
- query.setMaxResults(1);
- Long timerDbid = (Long) query.uniqueResult();
- ExecuteJobCmd executeJobCommand = new ExecuteJobCmd(timerDbid);
- Job job = executeJobCommand.execute(environment);
- return job.getExecution();
- }
- });
- }
-}
Copied: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/job/JobTestHelper.java (from rev 2682, jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/job/JobTestHelper.java)
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/job/JobTestHelper.java (rev 0)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/job/JobTestHelper.java 2008-10-30 15:15:11 UTC (rev 2684)
@@ -0,0 +1,84 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt 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.jbpm.job;
+
+import org.hibernate.Query;
+import org.hibernate.Session;
+import org.jbpm.Execution;
+import org.jbpm.pvm.env.Environment;
+import org.jbpm.pvm.internal.cmd.Command;
+import org.jbpm.pvm.internal.cmd.CommandService;
+import org.jbpm.pvm.internal.job.MessageImpl;
+import org.jbpm.pvm.internal.job.TimerImpl;
+import org.jbpm.pvm.internal.jobexecutor.ExecuteJobCmd;
+
+
+/** helper class for testing that executes messages and timers
+ * in the test runner thread. This way, the test can simulate
+ * timers and messages being executed. The dueDate is ignored.
+ *
+ * @author Tom Baeyens
+ */
+public class JobTestHelper {
+
+ CommandService commandService;
+
+ public Execution executeMessage(final long executionDbid) {
+ return commandService.execute(new Command<Execution>() {
+ private static final long serialVersionUID = 1L;
+ public Execution execute(Environment environment) throws Exception {
+ Session session = environment.get(Session.class);
+ Query query = session.createQuery(
+ "select m.dbid " +
+ "from "+MessageImpl.class.getName()+" as m " +
+ "where m.execution.dbid = :executionDbid"
+ );
+ query.setLong("executionDbid", executionDbid);
+ query.setMaxResults(1);
+ Long messageDbid = (Long) query.uniqueResult();
+ ExecuteJobCmd executeJobCommand = new ExecuteJobCmd(messageDbid);
+ Job job = executeJobCommand.execute(environment);
+ return job.getExecution();
+ }
+ });
+ }
+
+ public Execution executeTimer(final long timerDbid) {
+ return commandService.execute(new Command<Execution>() {
+ private static final long serialVersionUID = 1L;
+ public Execution execute(Environment environment) throws Exception {
+ Session session = environment.get(Session.class);
+ Query query = session.createQuery(
+ "select t.dbid " +
+ "from "+TimerImpl.class.getName()+" as t " +
+ "where t.dbid = :timerDbid"
+ );
+ query.setLong("timerDbid", timerDbid);
+ query.setMaxResults(1);
+ Long timerDbid = (Long) query.uniqueResult();
+ ExecuteJobCmd executeJobCommand = new ExecuteJobCmd(timerDbid);
+ Job job = executeJobCommand.execute(environment);
+ return job.getExecution();
+ }
+ });
+ }
+}
Deleted: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/job/Message.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/job/Message.java 2008-10-30 13:20:37 UTC (rev 2677)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/job/Message.java 2008-10-30 15:15:11 UTC (rev 2684)
@@ -1,30 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt 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.jbpm.pvm.job;
-
-/** an asynchronous message.
- *
- * @author Tom Baeyens
- */
-public interface Message extends Job {
-
-}
\ No newline at end of file
Deleted: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/job/Timer.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/job/Timer.java 2008-10-30 13:20:37 UTC (rev 2677)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/job/Timer.java 2008-10-30 15:15:11 UTC (rev 2684)
@@ -1,37 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt 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.jbpm.pvm.job;
-
-
-/** a timer.
- *
- * @author Tom Baeyens
- */
-public interface Timer extends Job {
-
- String getSignalName();
-
- String getEventName();
-
- String getRepeat();
-
-}
\ No newline at end of file
Deleted: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/job/package.html
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/job/package.html 2008-10-30 13:20:37 UTC (rev 2677)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/job/package.html 2008-10-30 15:15:11 UTC (rev 2684)
@@ -1 +0,0 @@
-<body>timers and asynchronous messages</body>
\ No newline at end of file
Deleted: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/package.html
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/package.html 2008-10-30 15:14:38 UTC (rev 2683)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/package.html 2008-10-30 15:15:11 UTC (rev 2684)
@@ -1,5 +0,0 @@
-<body>the primary facade interfaces to
-{@link org.jbpm.pvm.ProcessService the process repository},
-{@link org.jbpm.pvm.ExecutionService the execution repository}
-and {@link org.jbpm.pvm.ManagementService the management functionalities}.
-</body>
\ No newline at end of file
Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/cmd/GetMessagesCmd.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/cmd/GetMessagesCmd.java 2008-10-30 15:14:38 UTC (rev 2683)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/cmd/GetMessagesCmd.java 2008-10-30 15:15:11 UTC (rev 2684)
@@ -23,8 +23,8 @@
import java.util.List;
+import org.jbpm.job.Message;
import org.jbpm.pvm.env.Environment;
-import org.jbpm.pvm.job.Message;
import org.jbpm.pvm.session.PvmDbSession;
Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/cmd/GetTimersCmd.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/cmd/GetTimersCmd.java 2008-10-30 15:14:38 UTC (rev 2683)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/cmd/GetTimersCmd.java 2008-10-30 15:15:11 UTC (rev 2684)
@@ -23,8 +23,8 @@
import java.util.List;
+import org.jbpm.job.Timer;
import org.jbpm.pvm.env.Environment;
-import org.jbpm.pvm.job.Timer;
import org.jbpm.pvm.session.PvmDbSession;
/**
Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/hibernate/HibernatePvmDbSession.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/hibernate/HibernatePvmDbSession.java 2008-10-30 15:14:38 UTC (rev 2683)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/hibernate/HibernatePvmDbSession.java 2008-10-30 15:15:11 UTC (rev 2684)
@@ -25,11 +25,11 @@
import org.hibernate.Query;
import org.jbpm.Execution;
+import org.jbpm.job.Job;
+import org.jbpm.job.Message;
+import org.jbpm.job.Timer;
import org.jbpm.pvm.client.ClientExecution;
import org.jbpm.pvm.client.ClientProcessDefinition;
-import org.jbpm.pvm.job.Job;
-import org.jbpm.pvm.job.Message;
-import org.jbpm.pvm.job.Timer;
import org.jbpm.pvm.session.PvmDbSession;
/**
Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/job/JobImpl.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/job/JobImpl.java 2008-10-30 15:14:38 UTC (rev 2683)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/job/JobImpl.java 2008-10-30 15:15:11 UTC (rev 2684)
@@ -3,10 +3,10 @@
import java.io.Serializable;
import java.util.Date;
+import org.jbpm.job.Job;
import org.jbpm.pvm.internal.cmd.Command;
import org.jbpm.pvm.internal.model.ExecutionImpl;
import org.jbpm.pvm.internal.wire.Descriptor;
-import org.jbpm.pvm.job.Job;
public abstract class JobImpl<T> implements Command<T>, Serializable, Job {
Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/job/MessageImpl.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/job/MessageImpl.java 2008-10-30 15:14:38 UTC (rev 2683)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/job/MessageImpl.java 2008-10-30 15:15:11 UTC (rev 2684)
@@ -22,8 +22,8 @@
package org.jbpm.pvm.internal.job;
import org.jbpm.PvmException;
+import org.jbpm.job.Message;
import org.jbpm.pvm.internal.model.ExecutionImpl;
-import org.jbpm.pvm.job.Message;
/**
* @author Tom Baeyens
Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/job/TimerImpl.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/job/TimerImpl.java 2008-10-30 15:14:38 UTC (rev 2683)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/job/TimerImpl.java 2008-10-30 15:15:11 UTC (rev 2684)
@@ -25,6 +25,7 @@
import java.util.Date;
import org.jbpm.PvmException;
+import org.jbpm.job.Timer;
import org.jbpm.pvm.env.Environment;
import org.jbpm.pvm.env.Transaction;
import org.jbpm.pvm.internal.cal.BusinessCalendar;
@@ -35,7 +36,6 @@
import org.jbpm.pvm.internal.jobexecutor.JobExecutor;
import org.jbpm.pvm.internal.log.Log;
import org.jbpm.pvm.internal.util.Clock;
-import org.jbpm.pvm.job.Timer;
import org.jbpm.pvm.model.ObservableElement;
import org.jbpm.pvm.session.DbSession;
Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/jobexecutor/ExecuteJobCmd.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/jobexecutor/ExecuteJobCmd.java 2008-10-30 15:14:38 UTC (rev 2683)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/jobexecutor/ExecuteJobCmd.java 2008-10-30 15:15:11 UTC (rev 2684)
@@ -25,13 +25,13 @@
import org.hibernate.Session;
import org.jbpm.PvmException;
+import org.jbpm.job.Job;
import org.jbpm.pvm.env.Environment;
import org.jbpm.pvm.env.Transaction;
import org.jbpm.pvm.internal.cmd.Command;
import org.jbpm.pvm.internal.cmd.CommandService;
import org.jbpm.pvm.internal.job.JobImpl;
import org.jbpm.pvm.internal.log.Log;
-import org.jbpm.pvm.job.Job;
Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/jobexecutor/JobExecutorTimerSession.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/jobexecutor/JobExecutorTimerSession.java 2008-10-30 15:14:38 UTC (rev 2683)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/jobexecutor/JobExecutorTimerSession.java 2008-10-30 15:15:11 UTC (rev 2684)
@@ -14,10 +14,10 @@
package org.jbpm.pvm.internal.jobexecutor;
import org.jbpm.PvmException;
+import org.jbpm.job.Timer;
import org.jbpm.pvm.env.Transaction;
import org.jbpm.pvm.internal.job.TimerImpl;
import org.jbpm.pvm.internal.log.Log;
-import org.jbpm.pvm.job.Timer;
import org.jbpm.pvm.session.TimerSession;
/**
Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/model/ExecutionImpl.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/model/ExecutionImpl.java 2008-10-30 15:14:38 UTC (rev 2683)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/model/ExecutionImpl.java 2008-10-30 15:15:11 UTC (rev 2684)
@@ -37,6 +37,7 @@
import org.jbpm.Execution;
import org.jbpm.PvmException;
+import org.jbpm.job.Timer;
import org.jbpm.pvm.activity.ActivityExecution;
import org.jbpm.pvm.client.ClientProcessDefinition;
import org.jbpm.pvm.client.ClientProcessInstance;
@@ -60,7 +61,6 @@
import org.jbpm.pvm.internal.util.Clock;
import org.jbpm.pvm.internal.util.EqualsUtil;
import org.jbpm.pvm.internal.util.Priority;
-import org.jbpm.pvm.job.Timer;
import org.jbpm.pvm.listener.EventListener;
import org.jbpm.pvm.listener.EventListenerExecution;
import org.jbpm.pvm.model.Comment;
Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/svc/CommandManagementService.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/svc/CommandManagementService.java 2008-10-30 15:14:38 UTC (rev 2683)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/svc/CommandManagementService.java 2008-10-30 15:15:11 UTC (rev 2684)
@@ -24,12 +24,12 @@
import java.util.List;
import org.jbpm.ManagementService;
+import org.jbpm.job.Job;
+import org.jbpm.job.Message;
+import org.jbpm.job.Timer;
import org.jbpm.pvm.internal.cmd.CommandService;
import org.jbpm.pvm.internal.cmd.GetMessagesCmd;
import org.jbpm.pvm.internal.cmd.GetTimersCmd;
-import org.jbpm.pvm.job.Job;
-import org.jbpm.pvm.job.Message;
-import org.jbpm.pvm.job.Timer;
/**
Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/svc/CommandProcessService.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/svc/CommandProcessService.java 2008-10-30 15:14:38 UTC (rev 2683)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/svc/CommandProcessService.java 2008-10-30 15:15:11 UTC (rev 2684)
@@ -49,10 +49,14 @@
return commandService.execute(new DeployCmd(deploymentImpl));
}
- public ProcessDefinition deploy(DeploymentImpl deploymentImpl) {
- return commandService.execute(new DeployCmd(deploymentImpl));
+ public Deployment createDeployment() {
+ return new DeploymentImpl();
}
+ public ProcessDefinition deploy(Deployment deployment) {
+ return commandService.execute(new DeployCmd((DeploymentImpl)deployment));
+ }
+
public ProcessDefinition findLatestProcessDefinition(String processDefinitionName) {
return commandService.execute(new FindLatestProcessDefinitionCmd(processDefinitionName));
}
@@ -75,8 +79,4 @@
public void setCommandService(CommandService commandService) {
this.commandService = commandService;
}
-
- public Deployment createDeployment() {
- return new DeploymentImpl();
- }
}
Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/wire/binding/JobTestHelperBinding.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/wire/binding/JobTestHelperBinding.java 2008-10-30 15:14:38 UTC (rev 2683)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/wire/binding/JobTestHelperBinding.java 2008-10-30 15:15:11 UTC (rev 2684)
@@ -21,11 +21,11 @@
*/
package org.jbpm.pvm.internal.wire.binding;
+import org.jbpm.job.JobTestHelper;
import org.jbpm.pvm.internal.cmd.CommandService;
import org.jbpm.pvm.internal.wire.descriptor.ObjectDescriptor;
import org.jbpm.pvm.internal.xml.Parse;
import org.jbpm.pvm.internal.xml.Parser;
-import org.jbpm.pvm.job.JobTestHelper;
import org.w3c.dom.Element;
15 years, 6 months
JBoss JBPM SVN: r2683 - in jbpm4/trunk/modules: api/src/main/java/org and 3 other directories.
by do-not-reply@jboss.org
Author: tom.baeyens(a)jboss.com
Date: 2008-10-30 11:14:38 -0400 (Thu, 30 Oct 2008)
New Revision: 2683
Added:
jbpm4/trunk/modules/api/src/main/java/org/
jbpm4/trunk/modules/api/src/main/java/org/jbpm/
jbpm4/trunk/modules/api/src/main/java/org/jbpm/Configuration.java
jbpm4/trunk/modules/api/src/main/java/org/jbpm/Deployment.java
jbpm4/trunk/modules/api/src/main/java/org/jbpm/Execution.java
jbpm4/trunk/modules/api/src/main/java/org/jbpm/ExecutionService.java
jbpm4/trunk/modules/api/src/main/java/org/jbpm/ManagementService.java
jbpm4/trunk/modules/api/src/main/java/org/jbpm/ProcessDefinition.java
jbpm4/trunk/modules/api/src/main/java/org/jbpm/ProcessEngine.java
jbpm4/trunk/modules/api/src/main/java/org/jbpm/ProcessService.java
jbpm4/trunk/modules/api/src/main/java/org/jbpm/PvmException.java
jbpm4/trunk/modules/api/src/main/java/org/jbpm/ResourceManager.java
jbpm4/trunk/modules/api/src/main/java/org/jbpm/TaskService.java
jbpm4/trunk/modules/api/src/main/java/org/jbpm/job/
jbpm4/trunk/modules/api/src/main/java/org/jbpm/job/Job.java
jbpm4/trunk/modules/api/src/main/java/org/jbpm/job/Message.java
jbpm4/trunk/modules/api/src/main/java/org/jbpm/job/Timer.java
jbpm4/trunk/modules/api/src/main/java/org/jbpm/job/package.html
jbpm4/trunk/modules/api/src/main/java/org/jbpm/package.html
Modified:
jbpm4/trunk/modules/enterprise/src/main/java/org/jbpm/enterprise/internal/ejb/EnterpriseTimerSession.java
Log:
unification api proposals
Copied: jbpm4/trunk/modules/api/src/main/java/org/jbpm/Configuration.java (from rev 2682, jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/Configuration.java)
===================================================================
--- jbpm4/trunk/modules/api/src/main/java/org/jbpm/Configuration.java (rev 0)
+++ jbpm4/trunk/modules/api/src/main/java/org/jbpm/Configuration.java 2008-10-30 15:14:38 UTC (rev 2683)
@@ -0,0 +1,7 @@
+package org.jbpm;
+
+
+public abstract class Configuration {
+
+ public abstract ProcessEngine buildProcessEngine();
+}
Property changes on: jbpm4/trunk/modules/api/src/main/java/org/jbpm/Configuration.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:mergeinfo
+
Name: svn:eol-style
+ LF
Copied: jbpm4/trunk/modules/api/src/main/java/org/jbpm/Deployment.java (from rev 2682, jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/Deployment.java)
===================================================================
--- jbpm4/trunk/modules/api/src/main/java/org/jbpm/Deployment.java (rev 0)
+++ jbpm4/trunk/modules/api/src/main/java/org/jbpm/Deployment.java 2008-10-30 15:14:38 UTC (rev 2683)
@@ -0,0 +1,56 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt 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.jbpm;
+
+import java.io.File;
+import java.io.InputStream;
+import java.io.Serializable;
+import java.net.URL;
+import java.util.zip.ZipInputStream;
+
+
+/** a deployment unit, containing all information to create a process
+ * definition that will be deployed in the persistent store of the
+ * Process Virtual Machine.
+ *
+ * @author Tom Baeyens
+ */
+public interface Deployment extends Serializable {
+
+ void setName(String name);
+ void setLanguage(String language);
+
+ void addObject(String name, Object object);
+ void addResource(String resource);
+ void addFile(File file);
+ void addUrl(URL url);
+ void addInputStream(String name, InputStream inputStream);
+ void addArchiveResource(String resource);
+ void addArchiveFile(File file);
+ void addArchiveUrl(URL url);
+ void addArchive(ZipInputStream zipInputStream);
+ void addDirectory(String directory);
+ void addDirectoryCanonical(String directory);
+ void addDirectory(File directory);
+ void addDirectoryCanonical(File directory);
+
+}
Property changes on: jbpm4/trunk/modules/api/src/main/java/org/jbpm/Deployment.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:mergeinfo
+
Name: svn:eol-style
+ LF
Copied: jbpm4/trunk/modules/api/src/main/java/org/jbpm/Execution.java (from rev 2682, jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/Execution.java)
===================================================================
--- jbpm4/trunk/modules/api/src/main/java/org/jbpm/Execution.java (rev 0)
+++ jbpm4/trunk/modules/api/src/main/java/org/jbpm/Execution.java 2008-10-30 15:14:38 UTC (rev 2683)
@@ -0,0 +1,163 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt 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.jbpm;
+
+import java.io.Serializable;
+
+/** a runtime path of execution.
+ *
+ * <h3 id="state">State of an execution</h3>
+ *
+ * <p>The state of an execution is either active or locked. An active execution is either
+ * executing or waiting for an external trigger. If an execution is not in {@link #STATE_ACTIVE},
+ * then it is locked. A locked execution is read only.
+ * </p>
+ *
+ * <p>When a new execution is created, it is in {@link #STATE_ACTIVE}. To change
+ * the state to a locked state, use {@link #lock(String)}.
+ * {@link #STATE_ACTIVE Some STATE_* constants} are provided that represent the
+ * most commonly used locked states. But the state '...' in the picture indicates
+ * that any string can be provided as the state in the lock method.
+ * </p>
+ *
+ * <p>If an execution is locked, methods that change the execution will throw
+ * a {@link PvmException} and the message will reference the actual locking state.
+ * {@link #fire(String, ObservableElement) Firing events},
+ * {@link #setVariable(String, Object) updating variables},
+ * {@link #setPriority(int) updating priority} and
+ * {@link #createComment(String) adding comments} are not considered to change an
+ * execution. Also {@link #createProcessInstance(String) creation} and
+ * {@link #removeExecution(Execution) removal} of child executions are unchecked,
+ * which means that those methods can be invoked by external API clients and
+ * node behaviour methods, even while the execution is in a locked state.
+ * </p>
+ *
+ * <p>Make sure that comparisons between {@link #getState()} and the
+ * {@link #STATE_ACTIVE STATE_* constants} are
+ * done with .equals and not with '==' because if executions are
+ * loaded from persistent storage, a new string is created instead
+ * of the constants.
+ * </p>
+ *
+ * <h3>Comments</h3>
+ *
+ * @author Tom Baeyens
+ */
+public interface Execution extends Serializable {
+
+ /** between {@link ClientProcessDefinition#createProcessInstance() creation of
+ * a new process instance} and the {@link ClientExecution#start() start} of that
+ * process instance. The motivation of this state is that variables can be
+ * set programmatically on the process instance so that they can be used during
+ * initializations of variables and timers */
+ String STATE_CREATED = "created";
+
+ /** either executing or in a wait state waiting for a signal.
+ * This is the normal state of an execution and the initial state
+ * when creating a new execution. Make sure that comparisons are
+ * done with .equals and not with '==' because if executions are
+ * loaded from persistent storage, a new string is created instead
+ * of the constants. */
+ String STATE_ACTIVE = "active";
+
+ /** parents with concurrent child executions are inactive.
+ * When an execution has concurrent child executions, it implies that
+ * this execution can't be active. For example, at a fork, the parent
+ * execution can wait inactively in the fork being till all the
+ * child executions are joined. Only leaves of the
+ * execution tree can be active. Make sure that comparisons are
+ * done with .equals and not with '==' because if executions are
+ * loaded from persistent storage, a new string is created instead
+ * of the constants. */
+ String STATE_INACTIVE = "inactive";
+
+ /** this execution has ended normally. Make sure that comparisons are
+ * done with .equals and not with '==' because if executions are
+ * loaded from persistent storage, a new string is created instead
+ * of the constants. */
+ String STATE_ENDED = "ended";
+
+ /** this execution was cancelled with the {@link #cancel()}
+ * method before normal execution ended. Make sure that comparisons are
+ * done with .equals and not with '==' because if executions are
+ * loaded from persistent storage, a new string is created instead
+ * of the constants. */
+ String STATE_CANCELLED = "cancelled";
+
+ /** indicates that this execution is temporary suspended with the
+ * {@link #suspend()} method. Human tasks of a suspended execution
+ * shouldn't show up in people's task list and timers of suspended
+ * executions shouldn't fire and the execution is locked. Make sure that comparisons are
+ * done with .equals and not with '==' because if executions are
+ * loaded from persistent storage, a new string is created instead
+ * of the constants. */
+ String STATE_SUSPENDED = "suspended";
+
+ /** indicates that this execution is doing an asynchronous continuation. */
+ String STATE_ASYNC = "async";
+
+
+ long getDbid();
+ /** the externally given name or id of this execution. The id of a main
+ * path of execution is null. Can be used to differentiate concurrent
+ * paths of execution e.g. the shipping and billing paths. */
+ String getName();
+
+ /** the optional user provided business key that is unique within one
+ * process definition. This could be for instance the order number.
+ * It's a user defined identifier for one execution within the scope of
+ * a single process definition. */
+ String getKey();
+
+ /** a globally unique identifier for this execution. */
+ String getId();
+
+ /** represents the current position in the process by indicating the
+ * name of the current node. */
+ String getNodeName();
+
+ /** the <a href="#state">state</a> of this execution. */
+ String getState();
+
+ /** is this execution active ? This is the inverse of {@link #isLocked()}. */
+ boolean isActive();
+
+ /** is this execution {@link #lock(String) locked} ? This is the inverse of {@link #isActive()}. */
+ boolean isLocked();
+
+ /** is this execution ended or cancelled ? */
+ boolean isFinished();
+
+ /** is this execution ended normally ? */
+ boolean isEnded();
+
+ /** is this execution suspended ? */
+ boolean isSuspended();
+
+ /** indicates low priorities with negative values and high priorities
+ * with positive values. The default priority is 0, which means
+ * NORMAL. Other recognized named priorities are HIGHEST (2), HIGH (1),
+ * LOW (-1) and LOWEST (-2). For the rest, the user can set any other
+ * priority integer value, but then, the UI will have to display it as
+ * an integer and not the named value.*/
+ int getPriority();
+}
Copied: jbpm4/trunk/modules/api/src/main/java/org/jbpm/ExecutionService.java (from rev 2682, jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/ExecutionService.java)
===================================================================
--- jbpm4/trunk/modules/api/src/main/java/org/jbpm/ExecutionService.java (rev 0)
+++ jbpm4/trunk/modules/api/src/main/java/org/jbpm/ExecutionService.java 2008-10-30 15:14:38 UTC (rev 2683)
@@ -0,0 +1,126 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt 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.jbpm;
+
+import java.util.List;
+import java.util.Map;
+
+
+/** manages runtime process executions.
+ *
+ * @author Tom Baeyens
+ */
+public interface ExecutionService {
+
+ /** starts a new execution for the ProcessDefinition with the given processDefinitionDbid.
+ * @param processDefinitionId the {@link ProcessDefinition#getId() unique id} of the process definition. */
+ Execution startExecution(String processDefinitionId);
+
+ /** starts a new execution for the ProcessDefinition with the given processDefinitionDbid.
+ * @param processDefinitionId the {@link ProcessDefinition#getId() unique id} of the process definition.
+ * @param executionKey is a user provided reference for the new execution that must be unique over all
+ * process versions with the same name. */
+ Execution startExecution(String processDefinitionId, String executionKey);
+
+ /** starts a new execution for the ProcessDefinition with the given processDefinitionDbid.
+ * @param processDefinitionId the {@link ProcessDefinition#getId() unique id} of the process definition.
+ * @param variables are the initial values of the process variables that will be set before the execution starts. */
+ Execution startExecution(String processDefinitionId, Map<String, Object> variables);
+
+ /** starts a new execution for the ProcessDefinition with the given processDefinitionDbid.
+ * @param processDefinitionId the {@link ProcessDefinition#getId() unique id} of the process definition.
+ * @param variables are the initial values of the process variables that will be set before the execution starts.
+ * @param executionKey is a user provided reference for the new execution that must be unique over all
+ * process versions with the same name. */
+ Execution startExecution(String processDefinitionId, Map<String, Object> variables, String executionKey);
+
+ /** starts a new execution in the latest version of the given process definition.
+ * @param processDefinitionName is the name of the process definition for which the latest version will be taken. */
+ Execution startExecutionInLatest(String processDefinitionName);
+
+ /** starts a new execution in the latest version of the given processDefinitionName.
+ * @param processDefinitionName is the name of the process definition
+ * for which the latest version will be taken.
+ * @param executionKey is a user provided reference for the new execution
+ * that must be unique over all process versions with the same name. */
+ Execution startExecutionInLatest(String processDefinitionName, String executionKey);
+
+ /** starts a new execution in the latest version of the given processDefinitionName.
+ * @param processDefinitionName is the name of the process definition
+ * for which the latest version will be taken.
+ * @param variables are the initial values of the process variables that
+ * will be set before the execution starts (read: before the initial
+ * node is executed). */
+ Execution startExecutionInLatest(String processDefinitionName, Map<String, Object> variables);
+
+ /** starts a new execution in the latest version of the given processDefinitionName.
+ * @param processDefinitionName is the name of the process definition for which the latest version will be taken.
+ * @param variables are the initial values of the process variables that will be set before the execution starts.
+ * @param executionKey is a user provided reference for the new execution that must be unique over all
+ * process versions with the same name. */
+ Execution startExecutionInLatest(String processDefinitionName, Map<String, Object> variables, String executionKey);
+
+ /** the execution that is uniquely defined by the process definition and the business key. */
+ Execution findExecution(String processDefinitionName, String executionKey);
+
+ /** the execution that is uniquely defined by the process definition and the business key. */
+ Execution findExecution(String executionId);
+
+
+ /** provides an external trigger to an execution. */
+ Execution signalExecution(String executionId);
+
+ /** provides a named external trigger to an execution. */
+ Execution signalExecution(String executionId, String signalName);
+
+ /** provides a named external trigger to an execution with parameters. */
+ Execution signalExecution(String executionId, String signalName, Map<String, Object> parameters);
+
+ /** provides a external trigger to an execution with parameters. */
+ Execution signalExecution(String executionId, Map<String, Object> parameters);
+
+
+ /** provides a named external trigger to an execution. */
+ Execution signalExecutionByKey(String processDefinitionName, String executionKey);
+
+ /** provides a named external trigger to an execution. */
+ Execution signalExecutionByKey(String processDefinitionName, String executionKey, String signalName);
+
+ /** provides a named external trigger to an execution with parameters. */
+ Execution signalExecutionByKey(String processDefinitionName, String executionKey, Map<String, Object> parameters);
+
+ /** provides a named external trigger to an execution with parameters. */
+ Execution signalExecutionByKey(String processDefinitionName, String executionKey, String signalName, Map<String, Object> parameters);
+
+
+ /** creates or overwrites a variable value on the referenced execution */
+ Execution setVariable(String executionId, String name, Object value);
+
+ /** creates or overwrites the variable values on the referenced execution */
+ Execution setVariables(String executionId, Map<String, Object> variables);
+
+ /** retrieves a variable */
+ Object getVariable(String executionId, String variableName);
+
+ /** retrieves a map of variables */
+ Map<String, Object> getVariables(String executionId, List<String> variableNames);
+}
Copied: jbpm4/trunk/modules/api/src/main/java/org/jbpm/ManagementService.java (from rev 2682, jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/ManagementService.java)
===================================================================
--- jbpm4/trunk/modules/api/src/main/java/org/jbpm/ManagementService.java (rev 0)
+++ jbpm4/trunk/modules/api/src/main/java/org/jbpm/ManagementService.java 2008-10-30 15:14:38 UTC (rev 2683)
@@ -0,0 +1,57 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt 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.jbpm;
+
+import java.util.List;
+
+import org.jbpm.job.Job;
+import org.jbpm.job.Message;
+import org.jbpm.job.Timer;
+
+
+/** operations targeted to system operators that need to keep
+ * the process engine up and running. This functionality is typically
+ * exposed through a management web console.
+ *
+ * @author Tom Baeyens
+ */
+public interface ManagementService {
+
+ /** all the messages which are waiting to be executed.
+ * Messages that are already acquired will not show up in the list. */
+ List<Message> getMessages(int firstResult, int maxResults);
+
+ /** all the timers which are waiting for their due date.
+ * Timers that are already acquired will not show up in the list. */
+ List<Timer> getTimers(int firstResult, int maxResults);
+
+ /** all jobs for which all the retry attempts have failed and
+ * which are parked, waiting for operator intervention */
+ List<Job> getJobsWithException(int firstResult, int maxResults);
+
+ /** resets the retry count, clears the exception and executes the job.
+ * An exception is thrown out of this method in case the execution
+ * of the job fails. In case the async command executor is configured
+ * for this service, failing job execution will not result into an
+ * exception coming out of this method. */
+ void executeJob(String jobId);
+}
Copied: jbpm4/trunk/modules/api/src/main/java/org/jbpm/ProcessDefinition.java (from rev 2682, jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/ProcessDefinition.java)
===================================================================
--- jbpm4/trunk/modules/api/src/main/java/org/jbpm/ProcessDefinition.java (rev 0)
+++ jbpm4/trunk/modules/api/src/main/java/org/jbpm/ProcessDefinition.java 2008-10-30 15:14:38 UTC (rev 2683)
@@ -0,0 +1,61 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt 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.jbpm;
+
+import java.io.Serializable;
+
+
+/** a graphical process which is deployed in the {@ ProcessService}.
+ *
+ * @author Tom Baeyens
+ */
+public interface ProcessDefinition extends Serializable {
+
+ /** the optional package name of this process. This can be used to create
+ * hierarchy of process categories for easy lookup. This is a
+ * similar way of grouping and creating a structure as in Java.
+ * We recommend the same conventions as with Java package names. */
+ String getPackageName();
+
+ /** the short display name given to this process definition.
+ * Multiple process definitions can have the same as long
+ * as they are given a different {@link #version}. */
+ String getName();
+
+ /** the user defined short representation of the name. Just
+ * like the name, multiple versions of a process definition
+ * can have the same key. */
+ String getKey();
+
+ /** the unique id for this process definition. */
+ String getId();
+
+ /** automatically assigned during deployment of a process that
+ * represents the sequence number for process definitions with
+ * the same {@link ObservableElement#getName() name}. */
+ int getVersion();
+
+ /** the description name given to this process definition.
+ * Multiple process definitions can have the same */
+ String getDescription();
+
+}
Copied: jbpm4/trunk/modules/api/src/main/java/org/jbpm/ProcessEngine.java (from rev 2682, jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/ProcessEngine.java)
===================================================================
--- jbpm4/trunk/modules/api/src/main/java/org/jbpm/ProcessEngine.java (rev 0)
+++ jbpm4/trunk/modules/api/src/main/java/org/jbpm/ProcessEngine.java 2008-10-30 15:14:38 UTC (rev 2683)
@@ -0,0 +1,12 @@
+package org.jbpm;
+
+
+public interface ProcessEngine {
+
+ ProcessService getProcessService();
+ ExecutionService getExecutionService();
+ TaskService getTaskService();
+ ManagementService getManagementService();
+
+ ResourceManager getResourceManager();
+}
Property changes on: jbpm4/trunk/modules/api/src/main/java/org/jbpm/ProcessEngine.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:mergeinfo
+
Name: svn:eol-style
+ LF
Copied: jbpm4/trunk/modules/api/src/main/java/org/jbpm/ProcessService.java (from rev 2682, jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/ProcessService.java)
===================================================================
--- jbpm4/trunk/modules/api/src/main/java/org/jbpm/ProcessService.java (rev 0)
+++ jbpm4/trunk/modules/api/src/main/java/org/jbpm/ProcessService.java 2008-10-30 15:14:38 UTC (rev 2683)
@@ -0,0 +1,50 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt 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.jbpm;
+
+import java.util.List;
+
+
+/** a process definition repository.
+ *
+ * @author Tom Baeyens
+ */
+public interface ProcessService {
+
+ Deployment createDeployment();
+
+ /** deploy a new process definition into the process repository. */
+ ProcessDefinition deploy(Deployment deployment);
+
+ /** all deployed process names. */
+ List<String> findProcessDefinitionNames();
+
+ /** all versions of the given process. */
+ List<ProcessDefinition> findProcessDefinitions(String processDefinitionName);
+
+ /** latest version of the processDefinition with the given name. */
+ ProcessDefinition findLatestProcessDefinition(String processDefinitionName);
+
+ /** specific version of a named processDefinition. */
+ ProcessDefinition findProcessDefinition(String processDefinitionName, int processDefinitionVersion);
+
+}
Copied: jbpm4/trunk/modules/api/src/main/java/org/jbpm/PvmException.java (from rev 2682, jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/PvmException.java)
===================================================================
--- jbpm4/trunk/modules/api/src/main/java/org/jbpm/PvmException.java (rev 0)
+++ jbpm4/trunk/modules/api/src/main/java/org/jbpm/PvmException.java 2008-10-30 15:14:38 UTC (rev 2683)
@@ -0,0 +1,40 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt 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.jbpm;
+
+public class PvmException extends RuntimeException {
+
+ private static final long serialVersionUID = 1L;
+
+ public PvmException() {
+ super();
+ }
+ public PvmException(String msg, Throwable cause) {
+ super(msg, cause);
+ }
+ public PvmException(String msg) {
+ super(msg);
+ }
+ public PvmException(Throwable cause) {
+ super(cause);
+ }
+}
Copied: jbpm4/trunk/modules/api/src/main/java/org/jbpm/ResourceManager.java (from rev 2682, jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/ResourceManager.java)
===================================================================
--- jbpm4/trunk/modules/api/src/main/java/org/jbpm/ResourceManager.java (rev 0)
+++ jbpm4/trunk/modules/api/src/main/java/org/jbpm/ResourceManager.java 2008-10-30 15:14:38 UTC (rev 2683)
@@ -0,0 +1,19 @@
+package org.jbpm;
+
+/** can be used to provide transactional reasources
+ * like JDBC connection or hibernate session to
+ * the method invocations on a service.
+ *
+ * TODO what about subsequent service method invocations ?
+ * will a provided resource only be used once in the next method invocation.
+ * Or will the the resource be available for the remainder of the thread.
+ * In other words: should interceptor that propagates these resources into the
+ * environment clean them from the thread local or not ?
+ *
+ * @author Tom Baeyens
+ */
+public interface ResourceManager {
+
+ void addResource(Object object);
+ void addResource(String name, Object object);
+}
Property changes on: jbpm4/trunk/modules/api/src/main/java/org/jbpm/ResourceManager.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:mergeinfo
+
Name: svn:eol-style
+ LF
Copied: jbpm4/trunk/modules/api/src/main/java/org/jbpm/TaskService.java (from rev 2682, jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/TaskService.java)
===================================================================
--- jbpm4/trunk/modules/api/src/main/java/org/jbpm/TaskService.java (rev 0)
+++ jbpm4/trunk/modules/api/src/main/java/org/jbpm/TaskService.java 2008-10-30 15:14:38 UTC (rev 2683)
@@ -0,0 +1,6 @@
+package org.jbpm;
+
+
+public interface TaskService {
+
+}
Property changes on: jbpm4/trunk/modules/api/src/main/java/org/jbpm/TaskService.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:mergeinfo
+
Name: svn:eol-style
+ LF
Copied: jbpm4/trunk/modules/api/src/main/java/org/jbpm/job/Job.java (from rev 2677, jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/job/Job.java)
===================================================================
--- jbpm4/trunk/modules/api/src/main/java/org/jbpm/job/Job.java (rev 0)
+++ jbpm4/trunk/modules/api/src/main/java/org/jbpm/job/Job.java 2008-10-30 15:14:38 UTC (rev 2683)
@@ -0,0 +1,54 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt 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.jbpm.job;
+
+import java.util.Date;
+
+import org.jbpm.Execution;
+
+/** base class for timers and messages.
+ *
+ * @author Tom Baeyens
+ */
+public interface Job {
+
+ long getDbid();
+
+ String getLockOwner();
+
+ boolean isSuspended();
+
+ Date getDueDate();
+
+ String getException();
+
+ int getRetries();
+
+ boolean isExclusive();
+
+ Execution getExecution();
+
+ Execution getProcessInstance();
+
+ Date getLockExpirationTime();
+
+}
\ No newline at end of file
Property changes on: jbpm4/trunk/modules/api/src/main/java/org/jbpm/job/Job.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:mergeinfo
+
Name: svn:eol-style
+ LF
Copied: jbpm4/trunk/modules/api/src/main/java/org/jbpm/job/Message.java (from rev 2677, jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/job/Message.java)
===================================================================
--- jbpm4/trunk/modules/api/src/main/java/org/jbpm/job/Message.java (rev 0)
+++ jbpm4/trunk/modules/api/src/main/java/org/jbpm/job/Message.java 2008-10-30 15:14:38 UTC (rev 2683)
@@ -0,0 +1,30 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt 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.jbpm.job;
+
+/** an asynchronous message.
+ *
+ * @author Tom Baeyens
+ */
+public interface Message extends Job {
+
+}
\ No newline at end of file
Property changes on: jbpm4/trunk/modules/api/src/main/java/org/jbpm/job/Message.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:mergeinfo
+
Name: svn:eol-style
+ LF
Copied: jbpm4/trunk/modules/api/src/main/java/org/jbpm/job/Timer.java (from rev 2677, jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/job/Timer.java)
===================================================================
--- jbpm4/trunk/modules/api/src/main/java/org/jbpm/job/Timer.java (rev 0)
+++ jbpm4/trunk/modules/api/src/main/java/org/jbpm/job/Timer.java 2008-10-30 15:14:38 UTC (rev 2683)
@@ -0,0 +1,37 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt 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.jbpm.job;
+
+
+/** a timer.
+ *
+ * @author Tom Baeyens
+ */
+public interface Timer extends Job {
+
+ String getSignalName();
+
+ String getEventName();
+
+ String getRepeat();
+
+}
\ No newline at end of file
Property changes on: jbpm4/trunk/modules/api/src/main/java/org/jbpm/job/Timer.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:mergeinfo
+
Name: svn:eol-style
+ LF
Copied: jbpm4/trunk/modules/api/src/main/java/org/jbpm/job/package.html (from rev 2677, jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/job/package.html)
===================================================================
--- jbpm4/trunk/modules/api/src/main/java/org/jbpm/job/package.html (rev 0)
+++ jbpm4/trunk/modules/api/src/main/java/org/jbpm/job/package.html 2008-10-30 15:14:38 UTC (rev 2683)
@@ -0,0 +1 @@
+<body>timers and asynchronous messages</body>
\ No newline at end of file
Property changes on: jbpm4/trunk/modules/api/src/main/java/org/jbpm/job/package.html
___________________________________________________________________
Name: svn:mergeinfo
+
Copied: jbpm4/trunk/modules/api/src/main/java/org/jbpm/package.html (from rev 2682, jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/package.html)
===================================================================
--- jbpm4/trunk/modules/api/src/main/java/org/jbpm/package.html (rev 0)
+++ jbpm4/trunk/modules/api/src/main/java/org/jbpm/package.html 2008-10-30 15:14:38 UTC (rev 2683)
@@ -0,0 +1,5 @@
+<body>the primary facade interfaces to
+{@link org.jbpm.pvm.ProcessService the process repository},
+{@link org.jbpm.pvm.ExecutionService the execution repository}
+and {@link org.jbpm.pvm.ManagementService the management functionalities}.
+</body>
\ No newline at end of file
Modified: jbpm4/trunk/modules/enterprise/src/main/java/org/jbpm/enterprise/internal/ejb/EnterpriseTimerSession.java
===================================================================
--- jbpm4/trunk/modules/enterprise/src/main/java/org/jbpm/enterprise/internal/ejb/EnterpriseTimerSession.java 2008-10-30 15:05:34 UTC (rev 2682)
+++ jbpm4/trunk/modules/enterprise/src/main/java/org/jbpm/enterprise/internal/ejb/EnterpriseTimerSession.java 2008-10-30 15:14:38 UTC (rev 2683)
@@ -25,9 +25,9 @@
import javax.ejb.RemoveException;
import org.jbpm.PvmException;
+import org.jbpm.job.Timer;
import org.jbpm.pvm.env.Environment;
import org.jbpm.pvm.internal.log.Log;
-import org.jbpm.pvm.job.Timer;
import org.jbpm.pvm.session.DbSession;
import org.jbpm.pvm.session.TimerSession;
15 years, 6 months
JBoss JBPM SVN: r2682 - in jbpm4/trunk/modules/pvm/src: main/java/org/jbpm/pvm and 47 other directories.
by do-not-reply@jboss.org
Author: tom.baeyens(a)jboss.com
Date: 2008-10-30 11:05:34 -0400 (Thu, 30 Oct 2008)
New Revision: 2682
Added:
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/Configuration.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/Deployment.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/Execution.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/ExecutionService.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/ManagementService.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/ProcessDefinition.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/ProcessEngine.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/ProcessService.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/PvmException.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/ResourceManager.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/TaskService.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/package.html
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/DeploymentImpl.java
Removed:
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/Deployment.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/Execution.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/ExecutionService.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/ManagementService.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/MockProcessEngineConfiguration.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/ProcessDefinition.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/ProcessEngineImpl.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/ProcessService.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/PvmException.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/package.html
Modified:
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/activity/ActivityExecution.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/activity/ExternalActivity.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/client/ClientExecution.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/env/Environment.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/env/EnvironmentHelper.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/cal/Duration.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/cmd/CommandException.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/cmd/CommandService.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/cmd/DeployCmd.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/cmd/FindExecutionCmd.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/cmd/FindProcessDefinitionCmd.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/cmd/GetVariablesCmd.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/cmd/SetVariablesCmd.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/cmd/SignalCmd.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/cmd/StartExecutionCmd.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/cmd/StartExecutionInLatestCmd.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/deploy/CheckVersion.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/deploy/CreateId.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/deploy/CreateProcess.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/deploy/Deployer.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/deploy/DeployerManager.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/deploy/SaveProcess.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/env/BasicEnvironment.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/env/ExecutionContext.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/env/ExecutionEnvironment.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/hibernate/ConverterType.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/hibernate/ExecutionType.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/hibernate/HibernateJobDbSession.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/hibernate/HibernatePvmDbSession.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/jms/JmsMessageSession.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/job/MessageImpl.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/job/TimerImpl.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/jobexecutor/ExecuteJobCmd.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/jobexecutor/JobDbSession.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/jobexecutor/JobExceptionHandler.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/jobexecutor/JobExecutor.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/jobexecutor/JobExecutorMessageSession.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/jobexecutor/JobExecutorServlet.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/jobexecutor/JobExecutorTimerSession.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/lob/BlobStrategyBlob.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/lob/ClobStrategyClob.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/log/Jdk14LogFactory.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/model/CommentImpl.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/model/DefaultIdGenerator.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/model/ExceptionHandlerImpl.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/model/ExceptionHandlerSynchronization.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/model/ExecutionImpl.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/model/NodeImpl.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/model/ProcessDefinitionImpl.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/model/op/Signal.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/script/EnvironmentBindings.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/script/ScriptManager.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/stream/ByteArrayStreamSource.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/stream/FileStreamSource.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/stream/InputStreamSource.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/stream/ResourceStreamSource.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/stream/UrlStreamSource.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/svc/AsyncCommandService.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/svc/AuthorizationInterceptor.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/svc/CommandExecutionService.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/svc/CommandManagementService.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/svc/CommandProcessService.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/svc/DefaultCommandService.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/svc/RetryInterceptor.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/tx/StandardTransactionInterceptor.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/tx/TransactionException.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/type/Variable.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/type/converter/DateToStringConverter.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/type/converter/SerializableToBytesConverter.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/util/DefaultObservable.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/util/FilterListener.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/util/IoUtil.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/util/Priority.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/util/ReflectUtil.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/util/StringUtil.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/util/TagBinding.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/util/UrlEntity.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/util/XmlUtil.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/wire/binding/AbstractCollectionBinding.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/wire/descriptor/ClassDescriptor.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/wire/descriptor/HibernateConfigurationDescriptor.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/wire/descriptor/JobExecutorDescriptor.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/wire/descriptor/ObjectDescriptor.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/xml/Parser.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/job/Job.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/job/JobTestHelper.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/listener/EventListenerExecution.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/model/Comment.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/model/ExecutionKeyGenerator.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/model/IdGenerator.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/model/Node.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/model/OpenExecution.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/model/OpenProcessDefinition.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/model/ProcessFactory.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/processlog/ProcessLog.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/processlog/ProcessLogImpl.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/processlog/ProcessLogXmlSerializer.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/session/PvmDbSession.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/test/base/DbTestCase.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/test/base/EnvironmentDbTestCase.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/test/base/EnvironmentFactoryTestCase.java
jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/api/basicfeatures/ExecutionStateTest.java
jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/api/basicfeatures/ScopeStateTest.java
jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/api/basicfeatures/ScopeVariableTest.java
jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/api/basicfeatures/TransitionBasedConcurrencyTest.java
jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/api/db/basicfeatures/AutomaticDecisionDbTest.java
jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/api/db/basicfeatures/BasicExecutionFlowDbTest.java
jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/api/db/svc/ExecutionServiceTest.java
jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/api/db/svc/ManagementServiceTest.java
jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/api/db/svc/ProcessServiceTest.java
jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/api/timer/TimerConfiguration.java
jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/api/timer/TimerIntegrationTest.java
jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/api/tx/BasicTransactionTest.java
jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/example02/PersistentExecutionModeTest.java
jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/example04/DisplayActivityTest.java
jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/internal/db/langext/LanguageExtensionsDbTest.java
jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/internal/jobexecutor/JobExecutorTest.java
jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/internal/wire/ObjectWireTest.java
jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/internal/xml/XmlParsingTest.java
jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/samples/ExamplesConfiguration.java
jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/samples/ex02/BasicProcessPersistenceTest.java
jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/samples/ex04/ExternalDecisionTest.java
jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/samples/ex05/InternalDecisionTest.java
jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/samples/ex06/Task.java
jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/samples/ex06/TaskService.java
Log:
unification api proposals
Added: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/Configuration.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/Configuration.java (rev 0)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/Configuration.java 2008-10-30 15:05:34 UTC (rev 2682)
@@ -0,0 +1,7 @@
+package org.jbpm;
+
+
+public abstract class Configuration {
+
+ public abstract ProcessEngine buildProcessEngine();
+}
Property changes on: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/Configuration.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/Deployment.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/Deployment.java (rev 0)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/Deployment.java 2008-10-30 15:05:34 UTC (rev 2682)
@@ -0,0 +1,56 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt 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.jbpm;
+
+import java.io.File;
+import java.io.InputStream;
+import java.io.Serializable;
+import java.net.URL;
+import java.util.zip.ZipInputStream;
+
+
+/** a deployment unit, containing all information to create a process
+ * definition that will be deployed in the persistent store of the
+ * Process Virtual Machine.
+ *
+ * @author Tom Baeyens
+ */
+public interface Deployment extends Serializable {
+
+ void setName(String name);
+ void setLanguage(String language);
+
+ void addObject(String name, Object object);
+ void addResource(String resource);
+ void addFile(File file);
+ void addUrl(URL url);
+ void addInputStream(String name, InputStream inputStream);
+ void addArchiveResource(String resource);
+ void addArchiveFile(File file);
+ void addArchiveUrl(URL url);
+ void addArchive(ZipInputStream zipInputStream);
+ void addDirectory(String directory);
+ void addDirectoryCanonical(String directory);
+ void addDirectory(File directory);
+ void addDirectoryCanonical(File directory);
+
+}
Property changes on: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/Deployment.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Copied: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/Execution.java (from rev 2558, jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/Execution.java)
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/Execution.java (rev 0)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/Execution.java 2008-10-30 15:05:34 UTC (rev 2682)
@@ -0,0 +1,167 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt 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.jbpm;
+
+import java.io.Serializable;
+
+import org.jbpm.pvm.client.ClientExecution;
+import org.jbpm.pvm.client.ClientProcessDefinition;
+import org.jbpm.pvm.model.ObservableElement;
+
+/** a runtime path of execution.
+ *
+ * <h3 id="state">State of an execution</h3>
+ *
+ * <p>The state of an execution is either active or locked. An active execution is either
+ * executing or waiting for an external trigger. If an execution is not in {@link #STATE_ACTIVE},
+ * then it is locked. A locked execution is read only.
+ * </p>
+ *
+ * <p>When a new execution is created, it is in {@link #STATE_ACTIVE}. To change
+ * the state to a locked state, use {@link #lock(String)}.
+ * {@link #STATE_ACTIVE Some STATE_* constants} are provided that represent the
+ * most commonly used locked states. But the state '...' in the picture indicates
+ * that any string can be provided as the state in the lock method.
+ * </p>
+ *
+ * <p>If an execution is locked, methods that change the execution will throw
+ * a {@link PvmException} and the message will reference the actual locking state.
+ * {@link #fire(String, ObservableElement) Firing events},
+ * {@link #setVariable(String, Object) updating variables},
+ * {@link #setPriority(int) updating priority} and
+ * {@link #createComment(String) adding comments} are not considered to change an
+ * execution. Also {@link #createProcessInstance(String) creation} and
+ * {@link #removeExecution(Execution) removal} of child executions are unchecked,
+ * which means that those methods can be invoked by external API clients and
+ * node behaviour methods, even while the execution is in a locked state.
+ * </p>
+ *
+ * <p>Make sure that comparisons between {@link #getState()} and the
+ * {@link #STATE_ACTIVE STATE_* constants} are
+ * done with .equals and not with '==' because if executions are
+ * loaded from persistent storage, a new string is created instead
+ * of the constants.
+ * </p>
+ *
+ * <h3>Comments</h3>
+ *
+ * @author Tom Baeyens
+ */
+public interface Execution extends Serializable {
+
+ /** between {@link ClientProcessDefinition#createProcessInstance() creation of
+ * a new process instance} and the {@link ClientExecution#start() start} of that
+ * process instance. The motivation of this state is that variables can be
+ * set programmatically on the process instance so that they can be used during
+ * initializations of variables and timers */
+ String STATE_CREATED = "created";
+
+ /** either executing or in a wait state waiting for a signal.
+ * This is the normal state of an execution and the initial state
+ * when creating a new execution. Make sure that comparisons are
+ * done with .equals and not with '==' because if executions are
+ * loaded from persistent storage, a new string is created instead
+ * of the constants. */
+ String STATE_ACTIVE = "active";
+
+ /** parents with concurrent child executions are inactive.
+ * When an execution has concurrent child executions, it implies that
+ * this execution can't be active. For example, at a fork, the parent
+ * execution can wait inactively in the fork being till all the
+ * child executions are joined. Only leaves of the
+ * execution tree can be active. Make sure that comparisons are
+ * done with .equals and not with '==' because if executions are
+ * loaded from persistent storage, a new string is created instead
+ * of the constants. */
+ String STATE_INACTIVE = "inactive";
+
+ /** this execution has ended normally. Make sure that comparisons are
+ * done with .equals and not with '==' because if executions are
+ * loaded from persistent storage, a new string is created instead
+ * of the constants. */
+ String STATE_ENDED = "ended";
+
+ /** this execution was cancelled with the {@link #cancel()}
+ * method before normal execution ended. Make sure that comparisons are
+ * done with .equals and not with '==' because if executions are
+ * loaded from persistent storage, a new string is created instead
+ * of the constants. */
+ String STATE_CANCELLED = "cancelled";
+
+ /** indicates that this execution is temporary suspended with the
+ * {@link #suspend()} method. Human tasks of a suspended execution
+ * shouldn't show up in people's task list and timers of suspended
+ * executions shouldn't fire and the execution is locked. Make sure that comparisons are
+ * done with .equals and not with '==' because if executions are
+ * loaded from persistent storage, a new string is created instead
+ * of the constants. */
+ String STATE_SUSPENDED = "suspended";
+
+ /** indicates that this execution is doing an asynchronous continuation. */
+ String STATE_ASYNC = "async";
+
+
+ long getDbid();
+ /** the externally given name or id of this execution. The id of a main
+ * path of execution is null. Can be used to differentiate concurrent
+ * paths of execution e.g. the shipping and billing paths. */
+ String getName();
+
+ /** the optional user provided business key that is unique within one
+ * process definition. This could be for instance the order number.
+ * It's a user defined identifier for one execution within the scope of
+ * a single process definition. */
+ String getKey();
+
+ /** a globally unique identifier for this execution. */
+ String getId();
+
+ /** represents the current position in the process by indicating the
+ * name of the current node. */
+ String getNodeName();
+
+ /** the <a href="#state">state</a> of this execution. */
+ String getState();
+
+ /** is this execution active ? This is the inverse of {@link #isLocked()}. */
+ boolean isActive();
+
+ /** is this execution {@link #lock(String) locked} ? This is the inverse of {@link #isActive()}. */
+ boolean isLocked();
+
+ /** is this execution ended or cancelled ? */
+ boolean isFinished();
+
+ /** is this execution ended normally ? */
+ boolean isEnded();
+
+ /** is this execution suspended ? */
+ boolean isSuspended();
+
+ /** indicates low priorities with negative values and high priorities
+ * with positive values. The default priority is 0, which means
+ * NORMAL. Other recognized named priorities are HIGHEST (2), HIGH (1),
+ * LOW (-1) and LOWEST (-2). For the rest, the user can set any other
+ * priority integer value, but then, the UI will have to display it as
+ * an integer and not the named value.*/
+ int getPriority();
+}
Property changes on: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/Execution.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:mergeinfo
+
Name: svn:eol-style
+ LF
Copied: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/ExecutionService.java (from rev 2558, jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/ExecutionService.java)
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/ExecutionService.java (rev 0)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/ExecutionService.java 2008-10-30 15:05:34 UTC (rev 2682)
@@ -0,0 +1,126 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt 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.jbpm;
+
+import java.util.List;
+import java.util.Map;
+
+
+/** manages runtime process executions.
+ *
+ * @author Tom Baeyens
+ */
+public interface ExecutionService {
+
+ /** starts a new execution for the ProcessDefinition with the given processDefinitionDbid.
+ * @param processDefinitionId the {@link ProcessDefinition#getId() unique id} of the process definition. */
+ Execution startExecution(String processDefinitionId);
+
+ /** starts a new execution for the ProcessDefinition with the given processDefinitionDbid.
+ * @param processDefinitionId the {@link ProcessDefinition#getId() unique id} of the process definition.
+ * @param executionKey is a user provided reference for the new execution that must be unique over all
+ * process versions with the same name. */
+ Execution startExecution(String processDefinitionId, String executionKey);
+
+ /** starts a new execution for the ProcessDefinition with the given processDefinitionDbid.
+ * @param processDefinitionId the {@link ProcessDefinition#getId() unique id} of the process definition.
+ * @param variables are the initial values of the process variables that will be set before the execution starts. */
+ Execution startExecution(String processDefinitionId, Map<String, Object> variables);
+
+ /** starts a new execution for the ProcessDefinition with the given processDefinitionDbid.
+ * @param processDefinitionId the {@link ProcessDefinition#getId() unique id} of the process definition.
+ * @param variables are the initial values of the process variables that will be set before the execution starts.
+ * @param executionKey is a user provided reference for the new execution that must be unique over all
+ * process versions with the same name. */
+ Execution startExecution(String processDefinitionId, Map<String, Object> variables, String executionKey);
+
+ /** starts a new execution in the latest version of the given process definition.
+ * @param processDefinitionName is the name of the process definition for which the latest version will be taken. */
+ Execution startExecutionInLatest(String processDefinitionName);
+
+ /** starts a new execution in the latest version of the given processDefinitionName.
+ * @param processDefinitionName is the name of the process definition
+ * for which the latest version will be taken.
+ * @param executionKey is a user provided reference for the new execution
+ * that must be unique over all process versions with the same name. */
+ Execution startExecutionInLatest(String processDefinitionName, String executionKey);
+
+ /** starts a new execution in the latest version of the given processDefinitionName.
+ * @param processDefinitionName is the name of the process definition
+ * for which the latest version will be taken.
+ * @param variables are the initial values of the process variables that
+ * will be set before the execution starts (read: before the initial
+ * node is executed). */
+ Execution startExecutionInLatest(String processDefinitionName, Map<String, Object> variables);
+
+ /** starts a new execution in the latest version of the given processDefinitionName.
+ * @param processDefinitionName is the name of the process definition for which the latest version will be taken.
+ * @param variables are the initial values of the process variables that will be set before the execution starts.
+ * @param executionKey is a user provided reference for the new execution that must be unique over all
+ * process versions with the same name. */
+ Execution startExecutionInLatest(String processDefinitionName, Map<String, Object> variables, String executionKey);
+
+ /** the execution that is uniquely defined by the process definition and the business key. */
+ Execution findExecution(String processDefinitionName, String executionKey);
+
+ /** the execution that is uniquely defined by the process definition and the business key. */
+ Execution findExecution(String executionId);
+
+
+ /** provides an external trigger to an execution. */
+ Execution signalExecution(String executionId);
+
+ /** provides a named external trigger to an execution. */
+ Execution signalExecution(String executionId, String signalName);
+
+ /** provides a named external trigger to an execution with parameters. */
+ Execution signalExecution(String executionId, String signalName, Map<String, Object> parameters);
+
+ /** provides a external trigger to an execution with parameters. */
+ Execution signalExecution(String executionId, Map<String, Object> parameters);
+
+
+ /** provides a named external trigger to an execution. */
+ Execution signalExecutionByKey(String processDefinitionName, String executionKey);
+
+ /** provides a named external trigger to an execution. */
+ Execution signalExecutionByKey(String processDefinitionName, String executionKey, String signalName);
+
+ /** provides a named external trigger to an execution with parameters. */
+ Execution signalExecutionByKey(String processDefinitionName, String executionKey, Map<String, Object> parameters);
+
+ /** provides a named external trigger to an execution with parameters. */
+ Execution signalExecutionByKey(String processDefinitionName, String executionKey, String signalName, Map<String, Object> parameters);
+
+
+ /** creates or overwrites a variable value on the referenced execution */
+ Execution setVariable(String executionId, String name, Object value);
+
+ /** creates or overwrites the variable values on the referenced execution */
+ Execution setVariables(String executionId, Map<String, Object> variables);
+
+ /** retrieves a variable */
+ Object getVariable(String executionId, String variableName);
+
+ /** retrieves a map of variables */
+ Map<String, Object> getVariables(String executionId, List<String> variableNames);
+}
Property changes on: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/ExecutionService.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:mergeinfo
+
Name: svn:eol-style
+ LF
Copied: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/ManagementService.java (from rev 2558, jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/ManagementService.java)
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/ManagementService.java (rev 0)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/ManagementService.java 2008-10-30 15:05:34 UTC (rev 2682)
@@ -0,0 +1,57 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt 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.jbpm;
+
+import java.util.List;
+
+import org.jbpm.pvm.job.Job;
+import org.jbpm.pvm.job.Message;
+import org.jbpm.pvm.job.Timer;
+
+
+/** operations targeted to system operators that need to keep
+ * the process engine up and running. This functionality is typically
+ * exposed through a management web console.
+ *
+ * @author Tom Baeyens
+ */
+public interface ManagementService {
+
+ /** all the messages which are waiting to be executed.
+ * Messages that are already acquired will not show up in the list. */
+ List<Message> getMessages(int firstResult, int maxResults);
+
+ /** all the timers which are waiting for their due date.
+ * Timers that are already acquired will not show up in the list. */
+ List<Timer> getTimers(int firstResult, int maxResults);
+
+ /** all jobs for which all the retry attempts have failed and
+ * which are parked, waiting for operator intervention */
+ List<Job> getJobsWithException(int firstResult, int maxResults);
+
+ /** resets the retry count, clears the exception and executes the job.
+ * An exception is thrown out of this method in case the execution
+ * of the job fails. In case the async command executor is configured
+ * for this service, failing job execution will not result into an
+ * exception coming out of this method. */
+ void executeJob(String jobId);
+}
Property changes on: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/ManagementService.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:mergeinfo
+
Name: svn:eol-style
+ LF
Copied: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/ProcessDefinition.java (from rev 2558, jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/ProcessDefinition.java)
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/ProcessDefinition.java (rev 0)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/ProcessDefinition.java 2008-10-30 15:05:34 UTC (rev 2682)
@@ -0,0 +1,63 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt 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.jbpm;
+
+import java.io.Serializable;
+
+import org.jbpm.pvm.model.ObservableElement;
+
+
+/** a graphical process which is deployed in the {@ ProcessService}.
+ *
+ * @author Tom Baeyens
+ */
+public interface ProcessDefinition extends Serializable {
+
+ /** the optional package name of this process. This can be used to create
+ * hierarchy of process categories for easy lookup. This is a
+ * similar way of grouping and creating a structure as in Java.
+ * We recommend the same conventions as with Java package names. */
+ String getPackageName();
+
+ /** the short display name given to this process definition.
+ * Multiple process definitions can have the same as long
+ * as they are given a different {@link #version}. */
+ String getName();
+
+ /** the user defined short representation of the name. Just
+ * like the name, multiple versions of a process definition
+ * can have the same key. */
+ String getKey();
+
+ /** the unique id for this process definition. */
+ String getId();
+
+ /** automatically assigned during deployment of a process that
+ * represents the sequence number for process definitions with
+ * the same {@link ObservableElement#getName() name}. */
+ int getVersion();
+
+ /** the description name given to this process definition.
+ * Multiple process definitions can have the same */
+ String getDescription();
+
+}
Property changes on: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/ProcessDefinition.java
___________________________________________________________________
Name: svn:mergeinfo
+
Added: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/ProcessEngine.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/ProcessEngine.java (rev 0)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/ProcessEngine.java 2008-10-30 15:05:34 UTC (rev 2682)
@@ -0,0 +1,12 @@
+package org.jbpm;
+
+
+public interface ProcessEngine {
+
+ ProcessService getProcessService();
+ ExecutionService getExecutionService();
+ TaskService getTaskService();
+ ManagementService getManagementService();
+
+ ResourceManager getResourceManager();
+}
Property changes on: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/ProcessEngine.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Copied: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/ProcessService.java (from rev 2558, jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/ProcessService.java)
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/ProcessService.java (rev 0)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/ProcessService.java 2008-10-30 15:05:34 UTC (rev 2682)
@@ -0,0 +1,52 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt 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.jbpm;
+
+import java.util.List;
+
+import org.jbpm.pvm.DeploymentImpl;
+
+
+/** a process definition repository.
+ *
+ * @author Tom Baeyens
+ */
+public interface ProcessService {
+
+ Deployment createDeployment();
+
+ /** deploy a new process definition into the process repository. */
+ ProcessDefinition deploy(DeploymentImpl deploymentImpl);
+
+ /** all deployed process names. */
+ List<String> findProcessDefinitionNames();
+
+ /** all versions of the given process. */
+ List<ProcessDefinition> findProcessDefinitions(String processDefinitionName);
+
+ /** latest version of the processDefinition with the given name. */
+ ProcessDefinition findLatestProcessDefinition(String processDefinitionName);
+
+ /** specific version of a named processDefinition. */
+ ProcessDefinition findProcessDefinition(String processDefinitionName, int processDefinitionVersion);
+
+}
Property changes on: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/ProcessService.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:mergeinfo
+
Name: svn:eol-style
+ LF
Copied: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/PvmException.java (from rev 2558, jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/PvmException.java)
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/PvmException.java (rev 0)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/PvmException.java 2008-10-30 15:05:34 UTC (rev 2682)
@@ -0,0 +1,40 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt 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.jbpm;
+
+public class PvmException extends RuntimeException {
+
+ private static final long serialVersionUID = 1L;
+
+ public PvmException() {
+ super();
+ }
+ public PvmException(String msg, Throwable cause) {
+ super(msg, cause);
+ }
+ public PvmException(String msg) {
+ super(msg);
+ }
+ public PvmException(Throwable cause) {
+ super(cause);
+ }
+}
Property changes on: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/PvmException.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:mergeinfo
+
Name: svn:eol-style
+ LF
Added: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/ResourceManager.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/ResourceManager.java (rev 0)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/ResourceManager.java 2008-10-30 15:05:34 UTC (rev 2682)
@@ -0,0 +1,19 @@
+package org.jbpm;
+
+/** can be used to provide transactional reasources
+ * like JDBC connection or hibernate session to
+ * the method invocations on a service.
+ *
+ * TODO what about subsequent service method invocations ?
+ * will a provided resource only be used once in the next method invocation.
+ * Or will the the resource be available for the remainder of the thread.
+ * In other words: should interceptor that propagates these resources into the
+ * environment clean them from the thread local or not ?
+ *
+ * @author Tom Baeyens
+ */
+public interface ResourceManager {
+
+ void addResource(Object object);
+ void addResource(String name, Object object);
+}
Property changes on: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/ResourceManager.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/TaskService.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/TaskService.java (rev 0)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/TaskService.java 2008-10-30 15:05:34 UTC (rev 2682)
@@ -0,0 +1,6 @@
+package org.jbpm;
+
+
+public interface TaskService {
+
+}
Property changes on: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/TaskService.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Copied: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/package.html (from rev 2558, jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/package.html)
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/package.html (rev 0)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/package.html 2008-10-30 15:05:34 UTC (rev 2682)
@@ -0,0 +1,5 @@
+<body>the primary facade interfaces to
+{@link org.jbpm.pvm.ProcessService the process repository},
+{@link org.jbpm.pvm.ExecutionService the execution repository}
+and {@link org.jbpm.pvm.ManagementService the management functionalities}.
+</body>
\ No newline at end of file
Property changes on: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/package.html
___________________________________________________________________
Name: svn:mergeinfo
+
Deleted: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/Deployment.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/Deployment.java 2008-10-30 15:04:08 UTC (rev 2681)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/Deployment.java 2008-10-30 15:05:34 UTC (rev 2682)
@@ -1,245 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt 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.jbpm.pvm;
-
-import java.io.File;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.Serializable;
-import java.net.URL;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.Map;
-import java.util.Set;
-import java.util.zip.ZipEntry;
-import java.util.zip.ZipInputStream;
-
-import org.jbpm.pvm.internal.stream.ByteArrayStreamSource;
-import org.jbpm.pvm.internal.stream.FileStreamSource;
-import org.jbpm.pvm.internal.stream.InputStreamSource;
-import org.jbpm.pvm.internal.stream.ResourceStreamSource;
-import org.jbpm.pvm.internal.stream.StreamSource;
-import org.jbpm.pvm.internal.stream.UrlStreamSource;
-import org.jbpm.pvm.internal.util.IoUtil;
-import org.jbpm.pvm.internal.xml.Parser;
-import org.w3c.dom.Document;
-
-
-/** a deployment unit, containing all information to create a process
- * definition that will be deployed in the persistent store of the
- * Process Virtual Machine.
- *
- * @author Tom Baeyens
- */
-public class Deployment implements Serializable {
-
- private static final long serialVersionUID = 1L;
-
- private static final Parser parser = new Parser();
-
- protected String name;
- protected String language;
-
- protected Map<String, StreamSource> files;
- protected Map<String, Document> documents;
-
- protected ProcessDefinition processDefinition;
-
- public Deployment() {
- }
-
- public Deployment(ProcessDefinition processDefinition) {
- setProcessDefinition(processDefinition);
- }
-
-
- public String getLanguage() {
- return language;
- }
-
- public void setLanguage(String language) {
- this.language = language;
- }
-
- public void addResource(String resource) {
- addStreamSource(resource, new ResourceStreamSource(resource));
- }
-
- public void addFile(File file) {
- addStreamSource(file.getAbsolutePath(), new FileStreamSource(file));
- }
-
- public void addUrl(URL url) {
- addStreamSource(url.toString(), new UrlStreamSource(url));
- }
-
- public void addInputStream(String name, InputStream inputStream) {
- addStreamSource(name, new InputStreamSource(inputStream));
- }
-
- public void addArchiveResource(String resource) {
- this.name = resource;
- ResourceStreamSource streamSource = new ResourceStreamSource(resource);
- addStreamSource(resource, streamSource);
- }
-
- public void addArchiveFile(File file) {
- addStreamSource(file.getAbsolutePath(), new FileStreamSource(file));
- }
-
- public void addArchiveUrl(URL url) {
- addStreamSource(url.toString(), new UrlStreamSource(url));
- }
-
- public void addArchive(ZipInputStream zipInputStream) {
- try {
- ZipEntry zipEntry = zipInputStream.getNextEntry();
- while(zipEntry!=null) {
- String entryName = zipEntry.getName();
- byte[] bytes = IoUtil.readBytes(zipInputStream);
- if (bytes!=null) {
- addStreamSource(entryName, new ByteArrayStreamSource(bytes));
- }
- zipEntry = zipInputStream.getNextEntry();
- }
- } catch (Exception e) {
- throw new PvmException("couldn't read zip archive", e);
- }
- }
-
- /** recursively adds all files in a directory using the relative file names */
- public void addDirectory(String directory) {
- if (directory==null) {
- throw new PvmException("directory is null");
- }
- addDirectory(new File(directory), "", false);
- }
-
- /** recursively adds all files in a directory using the canonical file names */
- public void addDirectoryCanonical(String directory) {
- if (directory==null) {
- throw new PvmException("directory is null");
- }
- addDirectory(new File(directory), "", true);
- }
-
- /** recursively adds all files in a directory using the relative file names */
- public void addDirectory(File directory) {
- addDirectory(directory, "", false);
- }
-
- /** recursively adds all files in a directory using the canonical file names */
- public void addDirectoryCanonical(File directory) {
- addDirectory(directory, "", true);
- }
-
- protected void addDirectory(File directory, String relativeDirectoryName, boolean canonicalPathNames) {
- if (directory==null) {
- throw new PvmException("directory is null");
- }
- if (!directory.isDirectory()) {
- throw new PvmException(directory.getAbsolutePath()+" is not a directory");
- }
-
- File[] files = directory.listFiles();
- if (files!=null) {
- for (File file: files) {
- String relativeFileName = (canonicalPathNames ? null : relativeDirectoryName+"/"+file.getName());
- if (file.isFile()) {
- if (canonicalPathNames) {
- try {
- addStreamSource(file.getCanonicalPath(), new FileStreamSource(file));
- } catch (IOException e) {
- throw new PvmException("can't get canonical path name for "+file);
- }
- } else {
- addStreamSource(relativeFileName, new FileStreamSource(file));
- }
- } else if (file.isDirectory()) {
- addDirectory(file, relativeFileName, canonicalPathNames);
- }
- }
- }
- }
-
- protected void addStreamSource(String name, StreamSource streamSource) {
- if (this.name==null) {
- this.name = name;
- }
- if (files==null) {
- files = new HashMap<String, StreamSource>();
- }
- files.put(name, streamSource);
- }
-
- public InputStream getFile(String name) {
- if (files==null) {
- return null;
- }
- StreamSource streamSource = files.get(name);
- return (streamSource!=null ? streamSource.openStream() : null);
- }
-
- public Set<String> getFileNames() {
- if (files==null) {
- return Collections.EMPTY_SET;
- }
- return files.keySet();
- }
-
- public Document getDocument(String name) {
- if ( (documents!=null)
- && (documents.containsKey(name))
- ) {
- return documents.get(name);
- }
- if ( (files!=null)
- && (files.containsKey(name))
- ) {
- InputStream fileStream = getFile(name);
- return parser.createParse()
- .setInputStream(fileStream)
- .execute()
- .checkProblems("deployment file "+name)
- .getDocument();
- }
- return null;
- }
-
- public ProcessDefinition getProcessDefinition() {
- return processDefinition;
- }
-
- public void setProcessDefinition(ProcessDefinition processDefinition) {
- if (language==null) {
- language = "api";
- }
- this.processDefinition = processDefinition;
- }
-
- public String getName() {
- return name;
- }
- public void setName(String name) {
- this.name = name;
- }
-}
Copied: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/DeploymentImpl.java (from rev 2558, jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/Deployment.java)
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/DeploymentImpl.java (rev 0)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/DeploymentImpl.java 2008-10-30 15:05:34 UTC (rev 2682)
@@ -0,0 +1,256 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt 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.jbpm.pvm;
+
+import java.io.File;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.Serializable;
+import java.net.URL;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Set;
+import java.util.zip.ZipEntry;
+import java.util.zip.ZipInputStream;
+
+import org.jbpm.Deployment;
+import org.jbpm.ProcessDefinition;
+import org.jbpm.PvmException;
+import org.jbpm.pvm.internal.stream.ByteArrayStreamSource;
+import org.jbpm.pvm.internal.stream.FileStreamSource;
+import org.jbpm.pvm.internal.stream.InputStreamSource;
+import org.jbpm.pvm.internal.stream.ResourceStreamSource;
+import org.jbpm.pvm.internal.stream.StreamSource;
+import org.jbpm.pvm.internal.stream.UrlStreamSource;
+import org.jbpm.pvm.internal.util.IoUtil;
+import org.jbpm.pvm.internal.xml.Parser;
+import org.w3c.dom.Document;
+
+
+/** a deployment unit, containing all information to create a process
+ * definition that will be deployed in the persistent store of the
+ * Process Virtual Machine.
+ *
+ * @author Tom Baeyens
+ */
+public class DeploymentImpl implements Deployment, Serializable {
+
+ private static final long serialVersionUID = 1L;
+
+ private static final Parser parser = new Parser();
+
+ protected String name;
+ protected String language;
+
+ protected Map<String, StreamSource> files;
+ protected Map<String, Document> documents;
+
+ protected ProcessDefinition processDefinition;
+ protected Map<String, Object> objects;
+
+ public DeploymentImpl() {
+ }
+
+ public DeploymentImpl(ProcessDefinition processDefinition) {
+ setProcessDefinition(processDefinition);
+ }
+
+
+ public String getLanguage() {
+ return language;
+ }
+
+ public void setLanguage(String language) {
+ this.language = language;
+ }
+
+ public void addResource(String resource) {
+ addStreamSource(resource, new ResourceStreamSource(resource));
+ }
+
+ public void addFile(File file) {
+ addStreamSource(file.getAbsolutePath(), new FileStreamSource(file));
+ }
+
+ public void addUrl(URL url) {
+ addStreamSource(url.toString(), new UrlStreamSource(url));
+ }
+
+ public void addInputStream(String name, InputStream inputStream) {
+ addStreamSource(name, new InputStreamSource(inputStream));
+ }
+
+ public void addArchiveResource(String resource) {
+ this.name = resource;
+ ResourceStreamSource streamSource = new ResourceStreamSource(resource);
+ addStreamSource(resource, streamSource);
+ }
+
+ public void addArchiveFile(File file) {
+ addStreamSource(file.getAbsolutePath(), new FileStreamSource(file));
+ }
+
+ public void addArchiveUrl(URL url) {
+ addStreamSource(url.toString(), new UrlStreamSource(url));
+ }
+
+ public void addArchive(ZipInputStream zipInputStream) {
+ try {
+ ZipEntry zipEntry = zipInputStream.getNextEntry();
+ while(zipEntry!=null) {
+ String entryName = zipEntry.getName();
+ byte[] bytes = IoUtil.readBytes(zipInputStream);
+ if (bytes!=null) {
+ addStreamSource(entryName, new ByteArrayStreamSource(bytes));
+ }
+ zipEntry = zipInputStream.getNextEntry();
+ }
+ } catch (Exception e) {
+ throw new PvmException("couldn't read zip archive", e);
+ }
+ }
+
+ /** recursively adds all files in a directory using the relative file names */
+ public void addDirectory(String directory) {
+ if (directory==null) {
+ throw new PvmException("directory is null");
+ }
+ addDirectory(new File(directory), "", false);
+ }
+
+ /** recursively adds all files in a directory using the canonical file names */
+ public void addDirectoryCanonical(String directory) {
+ if (directory==null) {
+ throw new PvmException("directory is null");
+ }
+ addDirectory(new File(directory), "", true);
+ }
+
+ /** recursively adds all files in a directory using the relative file names */
+ public void addDirectory(File directory) {
+ addDirectory(directory, "", false);
+ }
+
+ /** recursively adds all files in a directory using the canonical file names */
+ public void addDirectoryCanonical(File directory) {
+ addDirectory(directory, "", true);
+ }
+
+ protected void addDirectory(File directory, String relativeDirectoryName, boolean canonicalPathNames) {
+ if (directory==null) {
+ throw new PvmException("directory is null");
+ }
+ if (!directory.isDirectory()) {
+ throw new PvmException(directory.getAbsolutePath()+" is not a directory");
+ }
+
+ File[] files = directory.listFiles();
+ if (files!=null) {
+ for (File file: files) {
+ String relativeFileName = (canonicalPathNames ? null : relativeDirectoryName+"/"+file.getName());
+ if (file.isFile()) {
+ if (canonicalPathNames) {
+ try {
+ addStreamSource(file.getCanonicalPath(), new FileStreamSource(file));
+ } catch (IOException e) {
+ throw new PvmException("can't get canonical path name for "+file);
+ }
+ } else {
+ addStreamSource(relativeFileName, new FileStreamSource(file));
+ }
+ } else if (file.isDirectory()) {
+ addDirectory(file, relativeFileName, canonicalPathNames);
+ }
+ }
+ }
+ }
+
+ protected void addStreamSource(String name, StreamSource streamSource) {
+ if (this.name==null) {
+ this.name = name;
+ }
+ if (files==null) {
+ files = new HashMap<String, StreamSource>();
+ }
+ files.put(name, streamSource);
+ }
+
+ public InputStream getFile(String name) {
+ if (files==null) {
+ return null;
+ }
+ StreamSource streamSource = files.get(name);
+ return (streamSource!=null ? streamSource.openStream() : null);
+ }
+
+ public Set<String> getFileNames() {
+ if (files==null) {
+ return Collections.EMPTY_SET;
+ }
+ return files.keySet();
+ }
+
+ public Document getDocument(String name) {
+ if ( (documents!=null)
+ && (documents.containsKey(name))
+ ) {
+ return documents.get(name);
+ }
+ if ( (files!=null)
+ && (files.containsKey(name))
+ ) {
+ InputStream fileStream = getFile(name);
+ return parser.createParse()
+ .setInputStream(fileStream)
+ .execute()
+ .checkProblems("deployment file "+name)
+ .getDocument();
+ }
+ return null;
+ }
+
+ public ProcessDefinition getProcessDefinition() {
+ return processDefinition;
+ }
+
+ public void setProcessDefinition(ProcessDefinition processDefinition) {
+ if (language==null) {
+ language = "api";
+ }
+ this.processDefinition = processDefinition;
+ }
+
+ public String getName() {
+ return name;
+ }
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ public void addObject(String name, Object object) {
+ if (objects!=null) {
+ objects = new HashMap<String, Object>();
+ }
+ objects.put(name, object);
+ }
+}
Property changes on: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/DeploymentImpl.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:mergeinfo
+
Name: svn:eol-style
+ LF
Deleted: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/Execution.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/Execution.java 2008-10-30 15:04:08 UTC (rev 2681)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/Execution.java 2008-10-30 15:05:34 UTC (rev 2682)
@@ -1,167 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt 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.jbpm.pvm;
-
-import java.io.Serializable;
-
-import org.jbpm.pvm.client.ClientExecution;
-import org.jbpm.pvm.client.ClientProcessDefinition;
-import org.jbpm.pvm.model.ObservableElement;
-
-/** a runtime path of execution.
- *
- * <h3 id="state">State of an execution</h3>
- *
- * <p>The state of an execution is either active or locked. An active execution is either
- * executing or waiting for an external trigger. If an execution is not in {@link #STATE_ACTIVE},
- * then it is locked. A locked execution is read only.
- * </p>
- *
- * <p>When a new execution is created, it is in {@link #STATE_ACTIVE}. To change
- * the state to a locked state, use {@link #lock(String)}.
- * {@link #STATE_ACTIVE Some STATE_* constants} are provided that represent the
- * most commonly used locked states. But the state '...' in the picture indicates
- * that any string can be provided as the state in the lock method.
- * </p>
- *
- * <p>If an execution is locked, methods that change the execution will throw
- * a {@link PvmException} and the message will reference the actual locking state.
- * {@link #fire(String, ObservableElement) Firing events},
- * {@link #setVariable(String, Object) updating variables},
- * {@link #setPriority(int) updating priority} and
- * {@link #createComment(String) adding comments} are not considered to change an
- * execution. Also {@link #createProcessInstance(String) creation} and
- * {@link #removeExecution(Execution) removal} of child executions are unchecked,
- * which means that those methods can be invoked by external API clients and
- * node behaviour methods, even while the execution is in a locked state.
- * </p>
- *
- * <p>Make sure that comparisons between {@link #getState()} and the
- * {@link #STATE_ACTIVE STATE_* constants} are
- * done with .equals and not with '==' because if executions are
- * loaded from persistent storage, a new string is created instead
- * of the constants.
- * </p>
- *
- * <h3>Comments</h3>
- *
- * @author Tom Baeyens
- */
-public interface Execution extends Serializable {
-
- /** between {@link ClientProcessDefinition#createProcessInstance() creation of
- * a new process instance} and the {@link ClientExecution#start() start} of that
- * process instance. The motivation of this state is that variables can be
- * set programmatically on the process instance so that they can be used during
- * initializations of variables and timers */
- String STATE_CREATED = "created";
-
- /** either executing or in a wait state waiting for a signal.
- * This is the normal state of an execution and the initial state
- * when creating a new execution. Make sure that comparisons are
- * done with .equals and not with '==' because if executions are
- * loaded from persistent storage, a new string is created instead
- * of the constants. */
- String STATE_ACTIVE = "active";
-
- /** parents with concurrent child executions are inactive.
- * When an execution has concurrent child executions, it implies that
- * this execution can't be active. For example, at a fork, the parent
- * execution can wait inactively in the fork being till all the
- * child executions are joined. Only leaves of the
- * execution tree can be active. Make sure that comparisons are
- * done with .equals and not with '==' because if executions are
- * loaded from persistent storage, a new string is created instead
- * of the constants. */
- String STATE_INACTIVE = "inactive";
-
- /** this execution has ended normally. Make sure that comparisons are
- * done with .equals and not with '==' because if executions are
- * loaded from persistent storage, a new string is created instead
- * of the constants. */
- String STATE_ENDED = "ended";
-
- /** this execution was cancelled with the {@link #cancel()}
- * method before normal execution ended. Make sure that comparisons are
- * done with .equals and not with '==' because if executions are
- * loaded from persistent storage, a new string is created instead
- * of the constants. */
- String STATE_CANCELLED = "cancelled";
-
- /** indicates that this execution is temporary suspended with the
- * {@link #suspend()} method. Human tasks of a suspended execution
- * shouldn't show up in people's task list and timers of suspended
- * executions shouldn't fire and the execution is locked. Make sure that comparisons are
- * done with .equals and not with '==' because if executions are
- * loaded from persistent storage, a new string is created instead
- * of the constants. */
- String STATE_SUSPENDED = "suspended";
-
- /** indicates that this execution is doing an asynchronous continuation. */
- String STATE_ASYNC = "async";
-
-
- long getDbid();
- /** the externally given name or id of this execution. The id of a main
- * path of execution is null. Can be used to differentiate concurrent
- * paths of execution e.g. the shipping and billing paths. */
- String getName();
-
- /** the optional user provided business key that is unique within one
- * process definition. This could be for instance the order number.
- * It's a user defined identifier for one execution within the scope of
- * a single process definition. */
- String getKey();
-
- /** a globally unique identifier for this execution. */
- String getId();
-
- /** represents the current position in the process by indicating the
- * name of the current node. */
- String getNodeName();
-
- /** the <a href="#state">state</a> of this execution. */
- String getState();
-
- /** is this execution active ? This is the inverse of {@link #isLocked()}. */
- boolean isActive();
-
- /** is this execution {@link #lock(String) locked} ? This is the inverse of {@link #isActive()}. */
- boolean isLocked();
-
- /** is this execution ended or cancelled ? */
- boolean isFinished();
-
- /** is this execution ended normally ? */
- boolean isEnded();
-
- /** is this execution suspended ? */
- boolean isSuspended();
-
- /** indicates low priorities with negative values and high priorities
- * with positive values. The default priority is 0, which means
- * NORMAL. Other recognized named priorities are HIGHEST (2), HIGH (1),
- * LOW (-1) and LOWEST (-2). For the rest, the user can set any other
- * priority integer value, but then, the UI will have to display it as
- * an integer and not the named value.*/
- int getPriority();
-}
Deleted: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/ExecutionService.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/ExecutionService.java 2008-10-30 15:04:08 UTC (rev 2681)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/ExecutionService.java 2008-10-30 15:05:34 UTC (rev 2682)
@@ -1,126 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt 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.jbpm.pvm;
-
-import java.util.List;
-import java.util.Map;
-
-
-/** manages runtime process executions.
- *
- * @author Tom Baeyens
- */
-public interface ExecutionService {
-
- /** starts a new execution for the ProcessDefinition with the given processDefinitionDbid.
- * @param processDefinitionId the {@link ProcessDefinition#getId() unique id} of the process definition. */
- Execution startExecution(String processDefinitionId);
-
- /** starts a new execution for the ProcessDefinition with the given processDefinitionDbid.
- * @param processDefinitionId the {@link ProcessDefinition#getId() unique id} of the process definition.
- * @param executionKey is a user provided reference for the new execution that must be unique over all
- * process versions with the same name. */
- Execution startExecution(String processDefinitionId, String executionKey);
-
- /** starts a new execution for the ProcessDefinition with the given processDefinitionDbid.
- * @param processDefinitionId the {@link ProcessDefinition#getId() unique id} of the process definition.
- * @param variables are the initial values of the process variables that will be set before the execution starts. */
- Execution startExecution(String processDefinitionId, Map<String, Object> variables);
-
- /** starts a new execution for the ProcessDefinition with the given processDefinitionDbid.
- * @param processDefinitionId the {@link ProcessDefinition#getId() unique id} of the process definition.
- * @param variables are the initial values of the process variables that will be set before the execution starts.
- * @param executionKey is a user provided reference for the new execution that must be unique over all
- * process versions with the same name. */
- Execution startExecution(String processDefinitionId, Map<String, Object> variables, String executionKey);
-
- /** starts a new execution in the latest version of the given process definition.
- * @param processDefinitionName is the name of the process definition for which the latest version will be taken. */
- Execution startExecutionInLatest(String processDefinitionName);
-
- /** starts a new execution in the latest version of the given processDefinitionName.
- * @param processDefinitionName is the name of the process definition
- * for which the latest version will be taken.
- * @param executionKey is a user provided reference for the new execution
- * that must be unique over all process versions with the same name. */
- Execution startExecutionInLatest(String processDefinitionName, String executionKey);
-
- /** starts a new execution in the latest version of the given processDefinitionName.
- * @param processDefinitionName is the name of the process definition
- * for which the latest version will be taken.
- * @param variables are the initial values of the process variables that
- * will be set before the execution starts (read: before the initial
- * node is executed). */
- Execution startExecutionInLatest(String processDefinitionName, Map<String, Object> variables);
-
- /** starts a new execution in the latest version of the given processDefinitionName.
- * @param processDefinitionName is the name of the process definition for which the latest version will be taken.
- * @param variables are the initial values of the process variables that will be set before the execution starts.
- * @param executionKey is a user provided reference for the new execution that must be unique over all
- * process versions with the same name. */
- Execution startExecutionInLatest(String processDefinitionName, Map<String, Object> variables, String executionKey);
-
- /** the execution that is uniquely defined by the process definition and the business key. */
- Execution findExecution(String processDefinitionName, String executionKey);
-
- /** the execution that is uniquely defined by the process definition and the business key. */
- Execution findExecution(String executionId);
-
-
- /** provides an external trigger to an execution. */
- Execution signalExecution(String executionId);
-
- /** provides a named external trigger to an execution. */
- Execution signalExecution(String executionId, String signalName);
-
- /** provides a named external trigger to an execution with parameters. */
- Execution signalExecution(String executionId, String signalName, Map<String, Object> parameters);
-
- /** provides a external trigger to an execution with parameters. */
- Execution signalExecution(String executionId, Map<String, Object> parameters);
-
-
- /** provides a named external trigger to an execution. */
- Execution signalExecutionByKey(String processDefinitionName, String executionKey);
-
- /** provides a named external trigger to an execution. */
- Execution signalExecutionByKey(String processDefinitionName, String executionKey, String signalName);
-
- /** provides a named external trigger to an execution with parameters. */
- Execution signalExecutionByKey(String processDefinitionName, String executionKey, Map<String, Object> parameters);
-
- /** provides a named external trigger to an execution with parameters. */
- Execution signalExecutionByKey(String processDefinitionName, String executionKey, String signalName, Map<String, Object> parameters);
-
-
- /** creates or overwrites a variable value on the referenced execution */
- Execution setVariable(String executionId, String name, Object value);
-
- /** creates or overwrites the variable values on the referenced execution */
- Execution setVariables(String executionId, Map<String, Object> variables);
-
- /** retrieves a variable */
- Object getVariable(String executionId, String variableName);
-
- /** retrieves a map of variables */
- Map<String, Object> getVariables(String executionId, List<String> variableNames);
-}
Deleted: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/ManagementService.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/ManagementService.java 2008-10-30 15:04:08 UTC (rev 2681)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/ManagementService.java 2008-10-30 15:05:34 UTC (rev 2682)
@@ -1,57 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt 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.jbpm.pvm;
-
-import java.util.List;
-
-import org.jbpm.pvm.job.Job;
-import org.jbpm.pvm.job.Message;
-import org.jbpm.pvm.job.Timer;
-
-
-/** operations targeted to system operators that need to keep
- * the process engine up and running. This functionality is typically
- * exposed through a management web console.
- *
- * @author Tom Baeyens
- */
-public interface ManagementService {
-
- /** all the messages which are waiting to be executed.
- * Messages that are already acquired will not show up in the list. */
- List<Message> getMessages(int firstResult, int maxResults);
-
- /** all the timers which are waiting for their due date.
- * Timers that are already acquired will not show up in the list. */
- List<Timer> getTimers(int firstResult, int maxResults);
-
- /** all jobs for which all the retry attempts have failed and
- * which are parked, waiting for operator intervention */
- List<Job> getJobsWithException(int firstResult, int maxResults);
-
- /** resets the retry count, clears the exception and executes the job.
- * An exception is thrown out of this method in case the execution
- * of the job fails. In case the async command executor is configured
- * for this service, failing job execution will not result into an
- * exception coming out of this method. */
- void executeJob(String jobId);
-}
Deleted: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/MockProcessEngineConfiguration.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/MockProcessEngineConfiguration.java 2008-10-30 15:04:08 UTC (rev 2681)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/MockProcessEngineConfiguration.java 2008-10-30 15:05:34 UTC (rev 2682)
@@ -1,41 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt 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.jbpm.pvm;
-
-//$Id$
-
-import org.jbpm.api.client.ProcessEngine;
-import org.jbpm.api.client.Configuration;
-
-/**
- * A mock process engine configuration
- *
- * @author thomas.diesler(a)jboss.com
- * @since 24-Sep-2008
- */
-public class MockProcessEngineConfiguration implements Configuration
-{
- public ProcessEngine getProcessEngine()
- {
- return new ProcessEngineImpl();
- }
-}
Deleted: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/ProcessDefinition.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/ProcessDefinition.java 2008-10-30 15:04:08 UTC (rev 2681)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/ProcessDefinition.java 2008-10-30 15:05:34 UTC (rev 2682)
@@ -1,63 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt 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.jbpm.pvm;
-
-import java.io.Serializable;
-
-import org.jbpm.pvm.model.ObservableElement;
-
-
-/** a graphical process which is deployed in the {@ ProcessService}.
- *
- * @author Tom Baeyens
- */
-public interface ProcessDefinition extends Serializable {
-
- /** the optional package name of this process. This can be used to create
- * hierarchy of process categories for easy lookup. This is a
- * similar way of grouping and creating a structure as in Java.
- * We recommend the same conventions as with Java package names. */
- String getPackageName();
-
- /** the short display name given to this process definition.
- * Multiple process definitions can have the same as long
- * as they are given a different {@link #version}. */
- String getName();
-
- /** the user defined short representation of the name. Just
- * like the name, multiple versions of a process definition
- * can have the same key. */
- String getKey();
-
- /** the unique id for this process definition. */
- String getId();
-
- /** automatically assigned during deployment of a process that
- * represents the sequence number for process definitions with
- * the same {@link ObservableElement#getName() name}. */
- int getVersion();
-
- /** the description name given to this process definition.
- * Multiple process definitions can have the same */
- String getDescription();
-
-}
Deleted: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/ProcessEngineImpl.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/ProcessEngineImpl.java 2008-10-30 15:04:08 UTC (rev 2681)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/ProcessEngineImpl.java 2008-10-30 15:05:34 UTC (rev 2682)
@@ -1,37 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt 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.jbpm.pvm;
-
-//$Id$
-
-import org.jbpm.api.client.ProcessEngine;
-
-/**
- * A process engine
- *
- * @author thomas.diesler(a)jboss.com
- * @since 24-Sep-2008
- */
-public class ProcessEngineImpl extends ProcessEngine
-{
-
-}
Deleted: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/ProcessService.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/ProcessService.java 2008-10-30 15:04:08 UTC (rev 2681)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/ProcessService.java 2008-10-30 15:05:34 UTC (rev 2682)
@@ -1,48 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt 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.jbpm.pvm;
-
-import java.util.List;
-
-
-/** a process definition repository.
- *
- * @author Tom Baeyens
- */
-public interface ProcessService {
-
- /** deploy a new process definition into the process repository. */
- ProcessDefinition deploy(Deployment deployment);
-
- /** all deployed process names. */
- List<String> findProcessDefinitionNames();
-
- /** all versions of the given process. */
- List<ProcessDefinition> findProcessDefinitions(String processDefinitionName);
-
- /** latest version of the processDefinition with the given name. */
- ProcessDefinition findLatestProcessDefinition(String processDefinitionName);
-
- /** specific version of a named processDefinition. */
- ProcessDefinition findProcessDefinition(String processDefinitionName, int processDefinitionVersion);
-
-}
Deleted: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/PvmException.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/PvmException.java 2008-10-30 15:04:08 UTC (rev 2681)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/PvmException.java 2008-10-30 15:05:34 UTC (rev 2682)
@@ -1,40 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt 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.jbpm.pvm;
-
-public class PvmException extends RuntimeException {
-
- private static final long serialVersionUID = 1L;
-
- public PvmException() {
- super();
- }
- public PvmException(String msg, Throwable cause) {
- super(msg, cause);
- }
- public PvmException(String msg) {
- super(msg);
- }
- public PvmException(Throwable cause) {
- super(cause);
- }
-}
Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/activity/ActivityExecution.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/activity/ActivityExecution.java 2008-10-30 15:04:08 UTC (rev 2681)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/activity/ActivityExecution.java 2008-10-30 15:05:34 UTC (rev 2682)
@@ -21,8 +21,8 @@
*/
package org.jbpm.pvm.activity;
-import org.jbpm.pvm.Execution;
-import org.jbpm.pvm.PvmException;
+import org.jbpm.Execution;
+import org.jbpm.PvmException;
import org.jbpm.pvm.client.ClientProcessDefinition;
import org.jbpm.pvm.client.ClientProcessInstance;
import org.jbpm.pvm.env.Environment;
Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/activity/ExternalActivity.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/activity/ExternalActivity.java 2008-10-30 15:04:08 UTC (rev 2681)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/activity/ExternalActivity.java 2008-10-30 15:05:34 UTC (rev 2682)
@@ -23,7 +23,7 @@
import java.util.Map;
-import org.jbpm.pvm.Execution;
+import org.jbpm.Execution;
/** extends {@link Activity} for handling external triggers after a wait state.
Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/client/ClientExecution.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/client/ClientExecution.java 2008-10-30 15:04:08 UTC (rev 2681)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/client/ClientExecution.java 2008-10-30 15:05:34 UTC (rev 2682)
@@ -23,8 +23,8 @@
import java.util.Map;
-import org.jbpm.pvm.Execution;
-import org.jbpm.pvm.PvmException;
+import org.jbpm.Execution;
+import org.jbpm.PvmException;
import org.jbpm.pvm.activity.Activity;
import org.jbpm.pvm.activity.ExternalActivity;
import org.jbpm.pvm.model.OpenExecution;
Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/env/Environment.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/env/Environment.java 2008-10-30 15:04:08 UTC (rev 2681)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/env/Environment.java 2008-10-30 15:05:34 UTC (rev 2682)
@@ -24,7 +24,7 @@
import java.io.Serializable;
import java.util.Stack;
-import org.jbpm.pvm.PvmException;
+import org.jbpm.PvmException;
/**
Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/env/EnvironmentHelper.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/env/EnvironmentHelper.java 2008-10-30 15:04:08 UTC (rev 2681)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/env/EnvironmentHelper.java 2008-10-30 15:05:34 UTC (rev 2682)
@@ -25,7 +25,7 @@
import java.util.HashMap;
import java.util.Map;
-import org.jbpm.pvm.PvmException;
+import org.jbpm.PvmException;
/**
* @author Tom Baeyens
Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/cal/Duration.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/cal/Duration.java 2008-10-30 15:04:08 UTC (rev 2681)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/cal/Duration.java 2008-10-30 15:05:34 UTC (rev 2682)
@@ -27,7 +27,7 @@
import java.util.List;
import java.util.Map;
-import org.jbpm.pvm.PvmException;
+import org.jbpm.PvmException;
/**
* represents a time duration.
Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/cmd/CommandException.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/cmd/CommandException.java 2008-10-30 15:04:08 UTC (rev 2681)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/cmd/CommandException.java 2008-10-30 15:05:34 UTC (rev 2682)
@@ -21,7 +21,7 @@
*/
package org.jbpm.pvm.internal.cmd;
-import org.jbpm.pvm.PvmException;
+import org.jbpm.PvmException;
/**
* @author Tom Baeyens
Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/cmd/CommandService.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/cmd/CommandService.java 2008-10-30 15:04:08 UTC (rev 2681)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/cmd/CommandService.java 2008-10-30 15:05:34 UTC (rev 2682)
@@ -1,6 +1,6 @@
package org.jbpm.pvm.internal.cmd;
-import org.jbpm.pvm.PvmException;
+import org.jbpm.PvmException;
/**
* abstract extensible session facade. Developers can use this directly or
Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/cmd/DeployCmd.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/cmd/DeployCmd.java 2008-10-30 15:04:08 UTC (rev 2681)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/cmd/DeployCmd.java 2008-10-30 15:05:34 UTC (rev 2682)
@@ -21,9 +21,9 @@
*/
package org.jbpm.pvm.internal.cmd;
-import org.jbpm.pvm.Deployment;
-import org.jbpm.pvm.ProcessDefinition;
-import org.jbpm.pvm.PvmException;
+import org.jbpm.ProcessDefinition;
+import org.jbpm.PvmException;
+import org.jbpm.pvm.DeploymentImpl;
import org.jbpm.pvm.env.Environment;
import org.jbpm.pvm.internal.deploy.DeployerManager;
@@ -34,14 +34,14 @@
private static final long serialVersionUID = 1L;
- protected Deployment deployment;
+ protected DeploymentImpl deploymentImpl;
- public DeployCmd(Deployment deployment) {
- this.deployment = deployment;
+ public DeployCmd(DeploymentImpl deploymentImpl) {
+ this.deploymentImpl = deploymentImpl;
}
public ProcessDefinition execute(Environment environment) throws Exception {
- ProcessDefinition processDefinition = deployment.getProcessDefinition();
+ ProcessDefinition processDefinition = deploymentImpl.getProcessDefinition();
if (processDefinition!=null) {
DeployerManager deployerManager = environment.get(DeployerManager.class);
@@ -51,7 +51,7 @@
// let the process parser managemer determine the process language
// and handle the deployment
- deployerManager.deploy(deployment);
+ deployerManager.deploy(deploymentImpl);
}
return processDefinition;
Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/cmd/FindExecutionCmd.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/cmd/FindExecutionCmd.java 2008-10-30 15:04:08 UTC (rev 2681)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/cmd/FindExecutionCmd.java 2008-10-30 15:05:34 UTC (rev 2682)
@@ -21,8 +21,8 @@
*/
package org.jbpm.pvm.internal.cmd;
-import org.jbpm.pvm.Execution;
-import org.jbpm.pvm.PvmException;
+import org.jbpm.Execution;
+import org.jbpm.PvmException;
import org.jbpm.pvm.env.Environment;
import org.jbpm.pvm.internal.model.ExecutionImpl;
import org.jbpm.pvm.session.PvmDbSession;
Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/cmd/FindProcessDefinitionCmd.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/cmd/FindProcessDefinitionCmd.java 2008-10-30 15:04:08 UTC (rev 2681)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/cmd/FindProcessDefinitionCmd.java 2008-10-30 15:05:34 UTC (rev 2682)
@@ -21,7 +21,7 @@
*/
package org.jbpm.pvm.internal.cmd;
-import org.jbpm.pvm.PvmException;
+import org.jbpm.PvmException;
import org.jbpm.pvm.env.Environment;
import org.jbpm.pvm.internal.model.ProcessDefinitionImpl;
import org.jbpm.pvm.model.OpenProcessDefinition;
Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/cmd/GetVariablesCmd.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/cmd/GetVariablesCmd.java 2008-10-30 15:04:08 UTC (rev 2681)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/cmd/GetVariablesCmd.java 2008-10-30 15:05:34 UTC (rev 2682)
@@ -25,7 +25,7 @@
import java.util.List;
import java.util.Map;
-import org.jbpm.pvm.PvmException;
+import org.jbpm.PvmException;
import org.jbpm.pvm.client.ClientExecution;
import org.jbpm.pvm.env.Environment;
import org.jbpm.pvm.session.PvmDbSession;
Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/cmd/SetVariablesCmd.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/cmd/SetVariablesCmd.java 2008-10-30 15:04:08 UTC (rev 2681)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/cmd/SetVariablesCmd.java 2008-10-30 15:05:34 UTC (rev 2682)
@@ -21,8 +21,8 @@
*/
package org.jbpm.pvm.internal.cmd;
-import org.jbpm.pvm.Execution;
-import org.jbpm.pvm.PvmException;
+import org.jbpm.Execution;
+import org.jbpm.PvmException;
import org.jbpm.pvm.client.ClientExecution;
import org.jbpm.pvm.env.Environment;
Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/cmd/SignalCmd.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/cmd/SignalCmd.java 2008-10-30 15:04:08 UTC (rev 2681)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/cmd/SignalCmd.java 2008-10-30 15:05:34 UTC (rev 2682)
@@ -23,8 +23,8 @@
import java.util.Map;
-import org.jbpm.pvm.Execution;
-import org.jbpm.pvm.PvmException;
+import org.jbpm.Execution;
+import org.jbpm.PvmException;
import org.jbpm.pvm.client.ClientExecution;
import org.jbpm.pvm.env.Environment;
import org.jbpm.pvm.internal.model.ExecutionImpl;
Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/cmd/StartExecutionCmd.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/cmd/StartExecutionCmd.java 2008-10-30 15:04:08 UTC (rev 2681)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/cmd/StartExecutionCmd.java 2008-10-30 15:05:34 UTC (rev 2682)
@@ -23,8 +23,8 @@
import java.util.Map;
-import org.jbpm.pvm.Execution;
-import org.jbpm.pvm.PvmException;
+import org.jbpm.Execution;
+import org.jbpm.PvmException;
import org.jbpm.pvm.client.ClientProcessDefinition;
import org.jbpm.pvm.client.ClientProcessInstance;
import org.jbpm.pvm.env.Environment;
Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/cmd/StartExecutionInLatestCmd.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/cmd/StartExecutionInLatestCmd.java 2008-10-30 15:04:08 UTC (rev 2681)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/cmd/StartExecutionInLatestCmd.java 2008-10-30 15:05:34 UTC (rev 2682)
@@ -23,8 +23,8 @@
import java.util.Map;
-import org.jbpm.pvm.Execution;
-import org.jbpm.pvm.PvmException;
+import org.jbpm.Execution;
+import org.jbpm.PvmException;
import org.jbpm.pvm.client.ClientProcessDefinition;
import org.jbpm.pvm.client.ClientProcessInstance;
import org.jbpm.pvm.env.Environment;
Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/deploy/CheckVersion.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/deploy/CheckVersion.java 2008-10-30 15:04:08 UTC (rev 2681)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/deploy/CheckVersion.java 2008-10-30 15:05:34 UTC (rev 2682)
@@ -21,8 +21,8 @@
*/
package org.jbpm.pvm.internal.deploy;
-import org.jbpm.pvm.Deployment;
-import org.jbpm.pvm.PvmException;
+import org.jbpm.PvmException;
+import org.jbpm.pvm.DeploymentImpl;
import org.jbpm.pvm.client.ClientProcessDefinition;
import org.jbpm.pvm.env.Environment;
import org.jbpm.pvm.internal.log.Log;
@@ -38,8 +38,8 @@
protected boolean assign = true;
- public void deploy(Deployment deployment) {
- ProcessDefinitionImpl processDefinition = (ProcessDefinitionImpl) deployment.getProcessDefinition();
+ public void deploy(DeploymentImpl deploymentImpl) {
+ ProcessDefinitionImpl processDefinition = (ProcessDefinitionImpl) deploymentImpl.getProcessDefinition();
String name = processDefinition.getName();
if (name == null) {
Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/deploy/CreateId.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/deploy/CreateId.java 2008-10-30 15:04:08 UTC (rev 2681)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/deploy/CreateId.java 2008-10-30 15:05:34 UTC (rev 2682)
@@ -21,8 +21,8 @@
*/
package org.jbpm.pvm.internal.deploy;
-import org.jbpm.pvm.Deployment;
-import org.jbpm.pvm.PvmException;
+import org.jbpm.PvmException;
+import org.jbpm.pvm.DeploymentImpl;
import org.jbpm.pvm.internal.log.Log;
import org.jbpm.pvm.internal.model.ProcessDefinitionImpl;
@@ -34,8 +34,8 @@
private static final Log log = Log.getLog(CreateId.class.getName());
- public void deploy(Deployment deployment) {
- ProcessDefinitionImpl processDefinition = (ProcessDefinitionImpl) deployment.getProcessDefinition();
+ public void deploy(DeploymentImpl deploymentImpl) {
+ ProcessDefinitionImpl processDefinition = (ProcessDefinitionImpl) deploymentImpl.getProcessDefinition();
if (processDefinition.getId()==null) {
String key = processDefinition.getKey();
Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/deploy/CreateProcess.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/deploy/CreateProcess.java 2008-10-30 15:04:08 UTC (rev 2681)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/deploy/CreateProcess.java 2008-10-30 15:05:34 UTC (rev 2682)
@@ -22,9 +22,9 @@
package org.jbpm.pvm.internal.deploy;
-import org.jbpm.pvm.Deployment;
-import org.jbpm.pvm.ProcessDefinition;
-import org.jbpm.pvm.PvmException;
+import org.jbpm.ProcessDefinition;
+import org.jbpm.PvmException;
+import org.jbpm.pvm.DeploymentImpl;
import org.jbpm.pvm.internal.log.Log;
@@ -37,8 +37,8 @@
protected Class<?> processDefinitionClass;
- public void deploy(Deployment deployment) {
- ProcessDefinition processDefinition = deployment.getProcessDefinition();
+ public void deploy(DeploymentImpl deploymentImpl) {
+ ProcessDefinition processDefinition = deploymentImpl.getProcessDefinition();
if (processDefinition==null) {
if (processDefinitionClass==null) {
@@ -54,7 +54,7 @@
}
// make the process definition available in the deployment
- deployment.setProcessDefinition(processDefinition);
+ deploymentImpl.setProcessDefinition(processDefinition);
} else {
log.trace("using process definition provided in deployment");
Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/deploy/Deployer.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/deploy/Deployer.java 2008-10-30 15:04:08 UTC (rev 2681)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/deploy/Deployer.java 2008-10-30 15:05:34 UTC (rev 2682)
@@ -21,7 +21,7 @@
*/
package org.jbpm.pvm.internal.deploy;
-import org.jbpm.pvm.Deployment;
+import org.jbpm.pvm.DeploymentImpl;
@@ -30,6 +30,6 @@
*/
public interface Deployer {
- void deploy(Deployment deployment);
+ void deploy(DeploymentImpl deploymentImpl);
}
Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/deploy/DeployerManager.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/deploy/DeployerManager.java 2008-10-30 15:04:08 UTC (rev 2681)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/deploy/DeployerManager.java 2008-10-30 15:05:34 UTC (rev 2682)
@@ -26,8 +26,9 @@
import java.util.List;
import java.util.Map;
import java.util.Map.Entry;
-import org.jbpm.pvm.Deployment;
-import org.jbpm.pvm.PvmException;
+
+import org.jbpm.PvmException;
+import org.jbpm.pvm.DeploymentImpl;
import org.jbpm.pvm.internal.log.Log;
@@ -56,15 +57,15 @@
/** maps language-ids to a sequence of process deployers */
protected Map<String, List<Deployer>> deployers = new HashMap<String, List<Deployer>>();
- public void deploy(Deployment deployment) {
- if (deployment==null) {
+ public void deploy(DeploymentImpl deploymentImpl) {
+ if (deploymentImpl==null) {
throw new PvmException("deployment is null");
}
// find the language based on the extension
- String language = deployment.getLanguage();
+ String language = deploymentImpl.getLanguage();
if (language==null) {
- String deploymentName = deployment.getName();
+ String deploymentName = deploymentImpl.getName();
log.trace("no language specified in deployment, looking for extension in "+deploymentName);
if (deploymentName==null) {
throw new PvmException("no name nor language specified in deployment");
@@ -80,7 +81,7 @@
}
if (language==null) {
- throw new PvmException("couldn't find process language matching extension of "+deploymentName+ " for deploying "+deployment);
+ throw new PvmException("couldn't find process language matching extension of "+deploymentName+ " for deploying "+deploymentImpl);
}
}
@@ -88,14 +89,14 @@
log.trace("looking up process deployer sequence for language "+language);
List<Deployer> deployerSequence = deployers.get(language);
if (deployerSequence==null) {
- throw new PvmException("couldn't find deployer sequence for language "+language+ " for deploying "+deployment);
+ throw new PvmException("couldn't find deployer sequence for language "+language+ " for deploying "+deploymentImpl);
}
- log.debug("deploying deployment "+deployment+" with "+language+"-parser");
+ log.debug("deploying deployment "+deploymentImpl+" with "+language+"-parser");
for (Deployer deployer: deployerSequence) {
- log.trace("deploying "+deployment+" to "+deployer);
- deployer.deploy(deployment);
+ log.trace("deploying "+deploymentImpl+" to "+deployer);
+ deployer.deploy(deploymentImpl);
}
}
Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/deploy/SaveProcess.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/deploy/SaveProcess.java 2008-10-30 15:04:08 UTC (rev 2681)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/deploy/SaveProcess.java 2008-10-30 15:05:34 UTC (rev 2682)
@@ -21,9 +21,9 @@
*/
package org.jbpm.pvm.internal.deploy;
-import org.jbpm.pvm.Deployment;
-import org.jbpm.pvm.ProcessDefinition;
-import org.jbpm.pvm.PvmException;
+import org.jbpm.ProcessDefinition;
+import org.jbpm.PvmException;
+import org.jbpm.pvm.DeploymentImpl;
import org.jbpm.pvm.env.Environment;
import org.jbpm.pvm.session.PvmDbSession;
@@ -33,7 +33,7 @@
*/
public class SaveProcess implements Deployer {
- public void deploy(Deployment deployment) {
+ public void deploy(DeploymentImpl deploymentImpl) {
Environment environment = Environment.getCurrent();
if (environment==null) {
throw new PvmException("environment is required by "+getClass().getName());
@@ -44,7 +44,7 @@
throw new PvmException(PvmDbSession.class.getName()+" is required in the environment by "+getClass().getName());
}
- ProcessDefinition processDefinition = deployment.getProcessDefinition();
+ ProcessDefinition processDefinition = deploymentImpl.getProcessDefinition();
if (processDefinition==null) {
throw new PvmException("a process definition in the deployment is required by "+getClass().getName());
}
Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/env/BasicEnvironment.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/env/BasicEnvironment.java 2008-10-30 15:04:08 UTC (rev 2681)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/env/BasicEnvironment.java 2008-10-30 15:05:34 UTC (rev 2682)
@@ -25,7 +25,7 @@
import java.util.HashMap;
import java.util.Map;
-import org.jbpm.pvm.PvmException;
+import org.jbpm.PvmException;
import org.jbpm.pvm.env.Context;
import org.jbpm.pvm.env.Environment;
import org.jbpm.pvm.internal.log.Log;
Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/env/ExecutionContext.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/env/ExecutionContext.java 2008-10-30 15:04:08 UTC (rev 2681)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/env/ExecutionContext.java 2008-10-30 15:05:34 UTC (rev 2682)
@@ -23,7 +23,7 @@
import java.util.Set;
-import org.jbpm.pvm.Execution;
+import org.jbpm.Execution;
import org.jbpm.pvm.env.Context;
import org.jbpm.pvm.internal.model.ExecutionImpl;
Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/env/ExecutionEnvironment.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/env/ExecutionEnvironment.java 2008-10-30 15:04:08 UTC (rev 2681)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/env/ExecutionEnvironment.java 2008-10-30 15:05:34 UTC (rev 2682)
@@ -21,7 +21,7 @@
*/
package org.jbpm.pvm.internal.env;
-import org.jbpm.pvm.Execution;
+import org.jbpm.Execution;
/**
* @author Tom Baeyens
Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/hibernate/ConverterType.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/hibernate/ConverterType.java 2008-10-30 15:04:08 UTC (rev 2681)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/hibernate/ConverterType.java 2008-10-30 15:05:34 UTC (rev 2682)
@@ -32,7 +32,7 @@
import org.hibernate.HibernateException;
import org.hibernate.type.ImmutableType;
import org.hibernate.usertype.ParameterizedType;
-import org.jbpm.pvm.PvmException;
+import org.jbpm.PvmException;
import org.jbpm.pvm.internal.type.Converter;
import org.jbpm.pvm.internal.util.ReflectUtil;
Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/hibernate/ExecutionType.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/hibernate/ExecutionType.java 2008-10-30 15:04:08 UTC (rev 2681)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/hibernate/ExecutionType.java 2008-10-30 15:05:34 UTC (rev 2682)
@@ -11,7 +11,7 @@
import org.hibernate.HibernateException;
import org.hibernate.usertype.ParameterizedType;
import org.hibernate.usertype.UserType;
-import org.jbpm.pvm.Execution;
+import org.jbpm.Execution;
import org.jbpm.pvm.internal.log.Log;
import org.jbpm.pvm.internal.model.ExecutionImpl;
import org.jbpm.pvm.internal.model.NodeImpl;
Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/hibernate/HibernateJobDbSession.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/hibernate/HibernateJobDbSession.java 2008-10-30 15:04:08 UTC (rev 2681)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/hibernate/HibernateJobDbSession.java 2008-10-30 15:05:34 UTC (rev 2682)
@@ -24,7 +24,7 @@
import java.util.List;
import org.hibernate.Query;
-import org.jbpm.pvm.Execution;
+import org.jbpm.Execution;
import org.jbpm.pvm.internal.job.JobImpl;
import org.jbpm.pvm.internal.jobexecutor.JobDbSession;
import org.jbpm.pvm.internal.util.Clock;
Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/hibernate/HibernatePvmDbSession.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/hibernate/HibernatePvmDbSession.java 2008-10-30 15:04:08 UTC (rev 2681)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/hibernate/HibernatePvmDbSession.java 2008-10-30 15:05:34 UTC (rev 2682)
@@ -24,7 +24,7 @@
import java.util.List;
import org.hibernate.Query;
-import org.jbpm.pvm.Execution;
+import org.jbpm.Execution;
import org.jbpm.pvm.client.ClientExecution;
import org.jbpm.pvm.client.ClientProcessDefinition;
import org.jbpm.pvm.job.Job;
Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/jms/JmsMessageSession.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/jms/JmsMessageSession.java 2008-10-30 15:04:08 UTC (rev 2681)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/jms/JmsMessageSession.java 2008-10-30 15:05:34 UTC (rev 2682)
@@ -26,7 +26,7 @@
import javax.jms.MessageProducer;
import javax.jms.Session;
-import org.jbpm.pvm.PvmException;
+import org.jbpm.PvmException;
import org.jbpm.pvm.internal.job.MessageImpl;
import org.jbpm.pvm.session.DbSession;
import org.jbpm.pvm.session.MessageSession;
Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/job/MessageImpl.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/job/MessageImpl.java 2008-10-30 15:04:08 UTC (rev 2681)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/job/MessageImpl.java 2008-10-30 15:05:34 UTC (rev 2682)
@@ -21,7 +21,7 @@
*/
package org.jbpm.pvm.internal.job;
-import org.jbpm.pvm.PvmException;
+import org.jbpm.PvmException;
import org.jbpm.pvm.internal.model.ExecutionImpl;
import org.jbpm.pvm.job.Message;
Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/job/TimerImpl.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/job/TimerImpl.java 2008-10-30 15:04:08 UTC (rev 2681)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/job/TimerImpl.java 2008-10-30 15:05:34 UTC (rev 2682)
@@ -24,7 +24,7 @@
import java.text.SimpleDateFormat;
import java.util.Date;
-import org.jbpm.pvm.PvmException;
+import org.jbpm.PvmException;
import org.jbpm.pvm.env.Environment;
import org.jbpm.pvm.env.Transaction;
import org.jbpm.pvm.internal.cal.BusinessCalendar;
Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/jobexecutor/ExecuteJobCmd.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/jobexecutor/ExecuteJobCmd.java 2008-10-30 15:04:08 UTC (rev 2681)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/jobexecutor/ExecuteJobCmd.java 2008-10-30 15:05:34 UTC (rev 2682)
@@ -24,7 +24,7 @@
import java.util.Date;
import org.hibernate.Session;
-import org.jbpm.pvm.PvmException;
+import org.jbpm.PvmException;
import org.jbpm.pvm.env.Environment;
import org.jbpm.pvm.env.Transaction;
import org.jbpm.pvm.internal.cmd.Command;
Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/jobexecutor/JobDbSession.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/jobexecutor/JobDbSession.java 2008-10-30 15:04:08 UTC (rev 2681)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/jobexecutor/JobDbSession.java 2008-10-30 15:05:34 UTC (rev 2682)
@@ -2,7 +2,7 @@
import java.util.List;
-import org.jbpm.pvm.Execution;
+import org.jbpm.Execution;
import org.jbpm.pvm.internal.job.JobImpl;
import org.jbpm.pvm.session.DbSession;
import org.jbpm.pvm.session.MessageSession;
Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/jobexecutor/JobExceptionHandler.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/jobexecutor/JobExceptionHandler.java 2008-10-30 15:04:08 UTC (rev 2681)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/jobexecutor/JobExceptionHandler.java 2008-10-30 15:05:34 UTC (rev 2682)
@@ -27,7 +27,7 @@
import javax.transaction.Synchronization;
import org.hibernate.Session;
-import org.jbpm.pvm.PvmException;
+import org.jbpm.PvmException;
import org.jbpm.pvm.env.Environment;
import org.jbpm.pvm.env.Transaction;
import org.jbpm.pvm.internal.cmd.Command;
Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/jobexecutor/JobExecutor.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/jobexecutor/JobExecutor.java 2008-10-30 15:04:08 UTC (rev 2681)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/jobexecutor/JobExecutor.java 2008-10-30 15:05:34 UTC (rev 2682)
@@ -29,7 +29,8 @@
import java.util.List;
import java.util.concurrent.ArrayBlockingQueue;
import java.util.concurrent.BlockingQueue;
-import org.jbpm.pvm.PvmException;
+
+import org.jbpm.PvmException;
import org.jbpm.pvm.internal.cmd.Command;
import org.jbpm.pvm.internal.cmd.CommandService;
import org.jbpm.pvm.internal.log.Log;
Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/jobexecutor/JobExecutorMessageSession.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/jobexecutor/JobExecutorMessageSession.java 2008-10-30 15:04:08 UTC (rev 2681)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/jobexecutor/JobExecutorMessageSession.java 2008-10-30 15:05:34 UTC (rev 2682)
@@ -21,7 +21,7 @@
*/
package org.jbpm.pvm.internal.jobexecutor;
-import org.jbpm.pvm.PvmException;
+import org.jbpm.PvmException;
import org.jbpm.pvm.env.Environment;
import org.jbpm.pvm.env.Transaction;
import org.jbpm.pvm.internal.job.MessageImpl;
Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/jobexecutor/JobExecutorServlet.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/jobexecutor/JobExecutorServlet.java 2008-10-30 15:04:08 UTC (rev 2681)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/jobexecutor/JobExecutorServlet.java 2008-10-30 15:05:34 UTC (rev 2682)
@@ -29,7 +29,7 @@
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
-import org.jbpm.pvm.PvmException;
+import org.jbpm.PvmException;
import org.jbpm.pvm.env.EnvironmentFactory;
import org.jbpm.pvm.env.PvmEnvironmentFactory;
Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/jobexecutor/JobExecutorTimerSession.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/jobexecutor/JobExecutorTimerSession.java 2008-10-30 15:04:08 UTC (rev 2681)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/jobexecutor/JobExecutorTimerSession.java 2008-10-30 15:05:34 UTC (rev 2682)
@@ -13,7 +13,7 @@
**/
package org.jbpm.pvm.internal.jobexecutor;
-import org.jbpm.pvm.PvmException;
+import org.jbpm.PvmException;
import org.jbpm.pvm.env.Transaction;
import org.jbpm.pvm.internal.job.TimerImpl;
import org.jbpm.pvm.internal.log.Log;
Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/lob/BlobStrategyBlob.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/lob/BlobStrategyBlob.java 2008-10-30 15:04:08 UTC (rev 2681)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/lob/BlobStrategyBlob.java 2008-10-30 15:05:34 UTC (rev 2682)
@@ -3,7 +3,7 @@
import java.sql.SQLException;
import org.hibernate.Hibernate;
-import org.jbpm.pvm.PvmException;
+import org.jbpm.PvmException;
public class BlobStrategyBlob implements BlobStrategy {
Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/lob/ClobStrategyClob.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/lob/ClobStrategyClob.java 2008-10-30 15:04:08 UTC (rev 2681)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/lob/ClobStrategyClob.java 2008-10-30 15:05:34 UTC (rev 2682)
@@ -3,7 +3,7 @@
import java.sql.SQLException;
import org.hibernate.Hibernate;
-import org.jbpm.pvm.PvmException;
+import org.jbpm.PvmException;
public class ClobStrategyClob implements ClobStrategy {
Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/log/Jdk14LogFactory.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/log/Jdk14LogFactory.java 2008-10-30 15:04:08 UTC (rev 2681)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/log/Jdk14LogFactory.java 2008-10-30 15:05:34 UTC (rev 2682)
@@ -26,7 +26,7 @@
import java.util.logging.LogManager;
import java.util.logging.Logger;
-import org.jbpm.pvm.PvmException;
+import org.jbpm.PvmException;
/**
Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/model/CommentImpl.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/model/CommentImpl.java 2008-10-30 15:04:08 UTC (rev 2681)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/model/CommentImpl.java 2008-10-30 15:05:34 UTC (rev 2682)
@@ -27,7 +27,7 @@
import java.util.Date;
import java.util.List;
-import org.jbpm.pvm.PvmException;
+import org.jbpm.PvmException;
import org.jbpm.pvm.env.Environment;
import org.jbpm.pvm.internal.util.Clock;
import org.jbpm.pvm.internal.util.EqualsUtil;
Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/model/DefaultIdGenerator.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/model/DefaultIdGenerator.java 2008-10-30 15:04:08 UTC (rev 2681)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/model/DefaultIdGenerator.java 2008-10-30 15:05:34 UTC (rev 2682)
@@ -22,8 +22,8 @@
package org.jbpm.pvm.internal.model;
import org.hibernate.Session;
-import org.jbpm.pvm.Execution;
-import org.jbpm.pvm.ProcessDefinition;
+import org.jbpm.Execution;
+import org.jbpm.ProcessDefinition;
import org.jbpm.pvm.env.Environment;
import org.jbpm.pvm.model.IdGenerator;
Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/model/ExceptionHandlerImpl.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/model/ExceptionHandlerImpl.java 2008-10-30 15:04:08 UTC (rev 2681)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/model/ExceptionHandlerImpl.java 2008-10-30 15:05:34 UTC (rev 2682)
@@ -26,7 +26,7 @@
import java.util.List;
-import org.jbpm.pvm.PvmException;
+import org.jbpm.PvmException;
import org.jbpm.pvm.env.Environment;
import org.jbpm.pvm.env.Transaction;
import org.jbpm.pvm.internal.cmd.CommandService;
Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/model/ExceptionHandlerSynchronization.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/model/ExceptionHandlerSynchronization.java 2008-10-30 15:04:08 UTC (rev 2681)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/model/ExceptionHandlerSynchronization.java 2008-10-30 15:05:34 UTC (rev 2682)
@@ -24,7 +24,7 @@
import javax.transaction.Status;
import javax.transaction.Synchronization;
-import org.jbpm.pvm.PvmException;
+import org.jbpm.PvmException;
import org.jbpm.pvm.env.Environment;
import org.jbpm.pvm.env.EnvironmentFactory;
import org.jbpm.pvm.env.Transaction;
Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/model/ExecutionImpl.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/model/ExecutionImpl.java 2008-10-30 15:04:08 UTC (rev 2681)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/model/ExecutionImpl.java 2008-10-30 15:05:34 UTC (rev 2682)
@@ -35,8 +35,8 @@
import java.util.Queue;
import java.util.Set;
-import org.jbpm.pvm.Execution;
-import org.jbpm.pvm.PvmException;
+import org.jbpm.Execution;
+import org.jbpm.PvmException;
import org.jbpm.pvm.activity.ActivityExecution;
import org.jbpm.pvm.client.ClientProcessDefinition;
import org.jbpm.pvm.client.ClientProcessInstance;
Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/model/NodeImpl.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/model/NodeImpl.java 2008-10-30 15:04:08 UTC (rev 2681)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/model/NodeImpl.java 2008-10-30 15:05:34 UTC (rev 2682)
@@ -26,7 +26,7 @@
import java.util.List;
import java.util.Map;
-import org.jbpm.pvm.PvmException;
+import org.jbpm.PvmException;
import org.jbpm.pvm.activity.Activity;
import org.jbpm.pvm.internal.wire.Descriptor;
import org.jbpm.pvm.model.Node;
Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/model/ProcessDefinitionImpl.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/model/ProcessDefinitionImpl.java 2008-10-30 15:04:08 UTC (rev 2681)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/model/ProcessDefinitionImpl.java 2008-10-30 15:05:34 UTC (rev 2682)
@@ -27,7 +27,7 @@
import java.util.HashMap;
import java.util.Map;
-import org.jbpm.pvm.Execution;
+import org.jbpm.Execution;
import org.jbpm.pvm.client.ClientProcessDefinition;
import org.jbpm.pvm.client.ClientProcessInstance;
import org.jbpm.pvm.internal.lob.Blob;
Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/model/op/Signal.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/model/op/Signal.java 2008-10-30 15:04:08 UTC (rev 2681)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/model/op/Signal.java 2008-10-30 15:05:34 UTC (rev 2682)
@@ -23,7 +23,7 @@
import java.util.Map;
-import org.jbpm.pvm.PvmException;
+import org.jbpm.PvmException;
import org.jbpm.pvm.activity.ExternalActivity;
import org.jbpm.pvm.internal.job.MessageImpl;
import org.jbpm.pvm.internal.log.Log;
Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/script/EnvironmentBindings.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/script/EnvironmentBindings.java 2008-10-30 15:04:08 UTC (rev 2681)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/script/EnvironmentBindings.java 2008-10-30 15:05:34 UTC (rev 2682)
@@ -28,7 +28,7 @@
import javax.script.Bindings;
-import org.jbpm.pvm.Execution;
+import org.jbpm.Execution;
import org.jbpm.pvm.env.Context;
import org.jbpm.pvm.env.Environment;
Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/script/ScriptManager.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/script/ScriptManager.java 2008-10-30 15:04:08 UTC (rev 2681)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/script/ScriptManager.java 2008-10-30 15:05:34 UTC (rev 2682)
@@ -27,8 +27,8 @@
import javax.script.ScriptEngineManager;
import javax.script.ScriptException;
-import org.jbpm.pvm.Execution;
-import org.jbpm.pvm.PvmException;
+import org.jbpm.Execution;
+import org.jbpm.PvmException;
import org.jbpm.pvm.env.Environment;
import org.jbpm.pvm.internal.env.ExecutionContext;
import org.jbpm.pvm.internal.env.ExecutionEnvironment;
Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/stream/ByteArrayStreamSource.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/stream/ByteArrayStreamSource.java 2008-10-30 15:04:08 UTC (rev 2681)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/stream/ByteArrayStreamSource.java 2008-10-30 15:05:34 UTC (rev 2682)
@@ -24,7 +24,7 @@
import java.io.ByteArrayInputStream;
import java.io.InputStream;
-import org.jbpm.pvm.PvmException;
+import org.jbpm.PvmException;
/**
* @author Tom Baeyens
Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/stream/FileStreamSource.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/stream/FileStreamSource.java 2008-10-30 15:04:08 UTC (rev 2681)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/stream/FileStreamSource.java 2008-10-30 15:05:34 UTC (rev 2682)
@@ -26,7 +26,7 @@
import java.io.InputStream;
import java.net.MalformedURLException;
-import org.jbpm.pvm.PvmException;
+import org.jbpm.PvmException;
/**
* @author Tom Baeyens
Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/stream/InputStreamSource.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/stream/InputStreamSource.java 2008-10-30 15:04:08 UTC (rev 2681)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/stream/InputStreamSource.java 2008-10-30 15:05:34 UTC (rev 2682)
@@ -23,7 +23,7 @@
import java.io.InputStream;
-import org.jbpm.pvm.PvmException;
+import org.jbpm.PvmException;
/**
* @author Tom Baeyens
Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/stream/ResourceStreamSource.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/stream/ResourceStreamSource.java 2008-10-30 15:04:08 UTC (rev 2681)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/stream/ResourceStreamSource.java 2008-10-30 15:05:34 UTC (rev 2682)
@@ -23,7 +23,7 @@
import java.io.InputStream;
-import org.jbpm.pvm.PvmException;
+import org.jbpm.PvmException;
import org.jbpm.pvm.internal.util.ReflectUtil;
/**
Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/stream/UrlStreamSource.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/stream/UrlStreamSource.java 2008-10-30 15:04:08 UTC (rev 2681)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/stream/UrlStreamSource.java 2008-10-30 15:05:34 UTC (rev 2682)
@@ -25,7 +25,7 @@
import java.io.InputStream;
import java.net.URL;
-import org.jbpm.pvm.PvmException;
+import org.jbpm.PvmException;
/**
* @author Tom Baeyens
Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/svc/AsyncCommandService.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/svc/AsyncCommandService.java 2008-10-30 15:04:08 UTC (rev 2681)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/svc/AsyncCommandService.java 2008-10-30 15:05:34 UTC (rev 2682)
@@ -21,7 +21,7 @@
*/
package org.jbpm.pvm.internal.svc;
-import org.jbpm.pvm.PvmException;
+import org.jbpm.PvmException;
import org.jbpm.pvm.env.Environment;
import org.jbpm.pvm.internal.cmd.Command;
import org.jbpm.pvm.internal.cmd.CommandService;
Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/svc/AuthorizationInterceptor.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/svc/AuthorizationInterceptor.java 2008-10-30 15:04:08 UTC (rev 2681)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/svc/AuthorizationInterceptor.java 2008-10-30 15:05:34 UTC (rev 2682)
@@ -21,7 +21,7 @@
*/
package org.jbpm.pvm.internal.svc;
-import org.jbpm.pvm.PvmException;
+import org.jbpm.PvmException;
import org.jbpm.pvm.env.Environment;
import org.jbpm.pvm.internal.cmd.Command;
Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/svc/CommandExecutionService.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/svc/CommandExecutionService.java 2008-10-30 15:04:08 UTC (rev 2681)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/svc/CommandExecutionService.java 2008-10-30 15:05:34 UTC (rev 2682)
@@ -25,8 +25,8 @@
import java.util.List;
import java.util.Map;
-import org.jbpm.pvm.Execution;
-import org.jbpm.pvm.ExecutionService;
+import org.jbpm.Execution;
+import org.jbpm.ExecutionService;
import org.jbpm.pvm.internal.cmd.CommandService;
import org.jbpm.pvm.internal.cmd.FindExecutionCmd;
import org.jbpm.pvm.internal.cmd.GetVariablesCmd;
Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/svc/CommandManagementService.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/svc/CommandManagementService.java 2008-10-30 15:04:08 UTC (rev 2681)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/svc/CommandManagementService.java 2008-10-30 15:05:34 UTC (rev 2682)
@@ -23,7 +23,7 @@
import java.util.List;
-import org.jbpm.pvm.ManagementService;
+import org.jbpm.ManagementService;
import org.jbpm.pvm.internal.cmd.CommandService;
import org.jbpm.pvm.internal.cmd.GetMessagesCmd;
import org.jbpm.pvm.internal.cmd.GetTimersCmd;
Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/svc/CommandProcessService.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/svc/CommandProcessService.java 2008-10-30 15:04:08 UTC (rev 2681)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/svc/CommandProcessService.java 2008-10-30 15:05:34 UTC (rev 2682)
@@ -23,9 +23,10 @@
import java.util.List;
-import org.jbpm.pvm.Deployment;
-import org.jbpm.pvm.ProcessDefinition;
-import org.jbpm.pvm.ProcessService;
+import org.jbpm.Deployment;
+import org.jbpm.ProcessDefinition;
+import org.jbpm.ProcessService;
+import org.jbpm.pvm.DeploymentImpl;
import org.jbpm.pvm.internal.cmd.CommandService;
import org.jbpm.pvm.internal.cmd.DeployCmd;
import org.jbpm.pvm.internal.cmd.FindLatestProcessDefinitionCmd;
@@ -44,12 +45,12 @@
protected CommandService commandService;
public ProcessDefinition deploy(OpenProcessDefinition processDefinition) {
- Deployment deployment = new Deployment(processDefinition);
- return commandService.execute(new DeployCmd(deployment));
+ DeploymentImpl deploymentImpl = new DeploymentImpl(processDefinition);
+ return commandService.execute(new DeployCmd(deploymentImpl));
}
- public ProcessDefinition deploy(Deployment deployment) {
- return commandService.execute(new DeployCmd(deployment));
+ public ProcessDefinition deploy(DeploymentImpl deploymentImpl) {
+ return commandService.execute(new DeployCmd(deploymentImpl));
}
public ProcessDefinition findLatestProcessDefinition(String processDefinitionName) {
@@ -74,4 +75,8 @@
public void setCommandService(CommandService commandService) {
this.commandService = commandService;
}
+
+ public Deployment createDeployment() {
+ return new DeploymentImpl();
+ }
}
Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/svc/DefaultCommandService.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/svc/DefaultCommandService.java 2008-10-30 15:04:08 UTC (rev 2681)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/svc/DefaultCommandService.java 2008-10-30 15:05:34 UTC (rev 2682)
@@ -21,7 +21,7 @@
*/
package org.jbpm.pvm.internal.svc;
-import org.jbpm.pvm.PvmException;
+import org.jbpm.PvmException;
import org.jbpm.pvm.env.Environment;
import org.jbpm.pvm.internal.cmd.Command;
import org.jbpm.pvm.internal.cmd.CommandService;
Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/svc/RetryInterceptor.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/svc/RetryInterceptor.java 2008-10-30 15:04:08 UTC (rev 2681)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/svc/RetryInterceptor.java 2008-10-30 15:05:34 UTC (rev 2682)
@@ -21,7 +21,7 @@
*/
package org.jbpm.pvm.internal.svc;
-import org.jbpm.pvm.PvmException;
+import org.jbpm.PvmException;
import org.jbpm.pvm.internal.cmd.Command;
import org.jbpm.pvm.internal.log.Log;
Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/tx/StandardTransactionInterceptor.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/tx/StandardTransactionInterceptor.java 2008-10-30 15:04:08 UTC (rev 2681)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/tx/StandardTransactionInterceptor.java 2008-10-30 15:05:34 UTC (rev 2682)
@@ -21,7 +21,7 @@
*/
package org.jbpm.pvm.internal.tx;
-import org.jbpm.pvm.PvmException;
+import org.jbpm.PvmException;
import org.jbpm.pvm.env.Environment;
import org.jbpm.pvm.internal.cmd.Command;
import org.jbpm.pvm.internal.log.Log;
Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/tx/TransactionException.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/tx/TransactionException.java 2008-10-30 15:04:08 UTC (rev 2681)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/tx/TransactionException.java 2008-10-30 15:05:34 UTC (rev 2682)
@@ -21,7 +21,7 @@
*/
package org.jbpm.pvm.internal.tx;
-import org.jbpm.pvm.PvmException;
+import org.jbpm.PvmException;
/**
* @author Tom Baeyens
Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/type/Variable.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/type/Variable.java 2008-10-30 15:04:08 UTC (rev 2681)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/type/Variable.java 2008-10-30 15:05:34 UTC (rev 2682)
@@ -23,7 +23,7 @@
import java.io.Serializable;
-import org.jbpm.pvm.PvmException;
+import org.jbpm.PvmException;
import org.jbpm.pvm.internal.model.ExecutionImpl;
/**
Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/type/converter/DateToStringConverter.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/type/converter/DateToStringConverter.java 2008-10-30 15:04:08 UTC (rev 2681)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/type/converter/DateToStringConverter.java 2008-10-30 15:05:34 UTC (rev 2682)
@@ -26,7 +26,7 @@
import java.text.SimpleDateFormat;
import java.util.Date;
-import org.jbpm.pvm.PvmException;
+import org.jbpm.PvmException;
import org.jbpm.pvm.internal.type.Converter;
/**
Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/type/converter/SerializableToBytesConverter.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/type/converter/SerializableToBytesConverter.java 2008-10-30 15:04:08 UTC (rev 2681)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/type/converter/SerializableToBytesConverter.java 2008-10-30 15:05:34 UTC (rev 2682)
@@ -28,7 +28,7 @@
import java.io.ObjectOutputStream;
import java.io.Serializable;
-import org.jbpm.pvm.PvmException;
+import org.jbpm.PvmException;
import org.jbpm.pvm.internal.type.Converter;
public class SerializableToBytesConverter implements Converter {
Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/util/DefaultObservable.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/util/DefaultObservable.java 2008-10-30 15:04:08 UTC (rev 2681)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/util/DefaultObservable.java 2008-10-30 15:05:34 UTC (rev 2682)
@@ -3,7 +3,7 @@
import java.util.ArrayList;
import java.util.List;
-import org.jbpm.pvm.PvmException;
+import org.jbpm.PvmException;
/** default implementation of the {@link Observable} interface.
*
Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/util/FilterListener.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/util/FilterListener.java 2008-10-30 15:04:08 UTC (rev 2681)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/util/FilterListener.java 2008-10-30 15:05:34 UTC (rev 2682)
@@ -3,7 +3,7 @@
import java.util.ArrayList;
import java.util.List;
-import org.jbpm.pvm.PvmException;
+import org.jbpm.PvmException;
/** listener that only delegates events to a given listener if
* they pass the filter based on event names. */
Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/util/IoUtil.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/util/IoUtil.java 2008-10-30 15:04:08 UTC (rev 2681)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/util/IoUtil.java 2008-10-30 15:05:34 UTC (rev 2682)
@@ -26,7 +26,7 @@
import java.io.InputStream;
import java.io.OutputStream;
-import org.jbpm.pvm.PvmException;
+import org.jbpm.PvmException;
public abstract class IoUtil {
Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/util/Priority.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/util/Priority.java 2008-10-30 15:04:08 UTC (rev 2681)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/util/Priority.java 2008-10-30 15:05:34 UTC (rev 2682)
@@ -21,7 +21,7 @@
*/
package org.jbpm.pvm.internal.util;
-import org.jbpm.pvm.PvmException;
+import org.jbpm.PvmException;
public abstract class Priority {
Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/util/ReflectUtil.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/util/ReflectUtil.java 2008-10-30 15:04:08 UTC (rev 2681)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/util/ReflectUtil.java 2008-10-30 15:05:34 UTC (rev 2682)
@@ -9,7 +9,7 @@
import java.util.Enumeration;
import java.util.List;
-import org.jbpm.pvm.PvmException;
+import org.jbpm.PvmException;
import org.jbpm.pvm.env.Environment;
import org.jbpm.pvm.internal.log.Log;
import org.jbpm.pvm.internal.wire.descriptor.ArgDescriptor;
Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/util/StringUtil.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/util/StringUtil.java 2008-10-30 15:04:08 UTC (rev 2681)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/util/StringUtil.java 2008-10-30 15:05:34 UTC (rev 2682)
@@ -25,7 +25,7 @@
import java.util.Collections;
import java.util.List;
-import org.jbpm.pvm.PvmException;
+import org.jbpm.PvmException;
/**
Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/util/TagBinding.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/util/TagBinding.java 2008-10-30 15:04:08 UTC (rev 2681)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/util/TagBinding.java 2008-10-30 15:05:34 UTC (rev 2682)
@@ -21,7 +21,7 @@
*/
package org.jbpm.pvm.internal.util;
-import org.jbpm.pvm.PvmException;
+import org.jbpm.PvmException;
import org.jbpm.pvm.internal.xml.Binding;
import org.jbpm.pvm.internal.xml.Bindings;
import org.w3c.dom.Element;
Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/util/UrlEntity.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/util/UrlEntity.java 2008-10-30 15:04:08 UTC (rev 2681)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/util/UrlEntity.java 2008-10-30 15:05:34 UTC (rev 2682)
@@ -25,7 +25,7 @@
import java.io.InputStream;
import java.net.URL;
-import org.jbpm.pvm.PvmException;
+import org.jbpm.PvmException;
import org.jbpm.pvm.internal.xml.Entity;
import org.jbpm.pvm.internal.xml.Parser;
import org.xml.sax.EntityResolver;
Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/util/XmlUtil.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/util/XmlUtil.java 2008-10-30 15:04:08 UTC (rev 2681)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/util/XmlUtil.java 2008-10-30 15:05:34 UTC (rev 2682)
@@ -27,7 +27,8 @@
import java.util.List;
import java.util.Set;
import java.util.StringTokenizer;
-import org.jbpm.pvm.PvmException;
+
+import org.jbpm.PvmException;
import org.jbpm.pvm.internal.log.Log;
import org.jbpm.pvm.internal.xml.Parse;
Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/wire/binding/AbstractCollectionBinding.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/wire/binding/AbstractCollectionBinding.java 2008-10-30 15:04:08 UTC (rev 2681)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/wire/binding/AbstractCollectionBinding.java 2008-10-30 15:05:34 UTC (rev 2682)
@@ -3,7 +3,7 @@
import java.util.ArrayList;
import java.util.List;
-import org.jbpm.pvm.PvmException;
+import org.jbpm.PvmException;
import org.jbpm.pvm.internal.util.ReflectUtil;
import org.jbpm.pvm.internal.util.XmlUtil;
import org.jbpm.pvm.internal.wire.Descriptor;
Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/wire/descriptor/ClassDescriptor.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/wire/descriptor/ClassDescriptor.java 2008-10-30 15:04:08 UTC (rev 2681)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/wire/descriptor/ClassDescriptor.java 2008-10-30 15:05:34 UTC (rev 2682)
@@ -1,6 +1,6 @@
package org.jbpm.pvm.internal.wire.descriptor;
-import org.jbpm.pvm.PvmException;
+import org.jbpm.PvmException;
import org.jbpm.pvm.internal.util.ReflectUtil;
import org.jbpm.pvm.internal.wire.WireContext;
import org.jbpm.pvm.internal.wire.WireException;
Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/wire/descriptor/HibernateConfigurationDescriptor.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/wire/descriptor/HibernateConfigurationDescriptor.java 2008-10-30 15:04:08 UTC (rev 2681)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/wire/descriptor/HibernateConfigurationDescriptor.java 2008-10-30 15:05:34 UTC (rev 2682)
@@ -29,7 +29,8 @@
import java.util.Collections;
import java.util.List;
import java.util.Properties;
-import org.jbpm.pvm.PvmException;
+
+import org.jbpm.PvmException;
import org.jbpm.pvm.internal.log.Log;
import org.jbpm.pvm.internal.util.ReflectUtil;
import org.jbpm.pvm.internal.wire.WireContext;
Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/wire/descriptor/JobExecutorDescriptor.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/wire/descriptor/JobExecutorDescriptor.java 2008-10-30 15:04:08 UTC (rev 2681)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/wire/descriptor/JobExecutorDescriptor.java 2008-10-30 15:05:34 UTC (rev 2682)
@@ -13,7 +13,7 @@
**/
package org.jbpm.pvm.internal.wire.descriptor;
-import org.jbpm.pvm.PvmException;
+import org.jbpm.PvmException;
import org.jbpm.pvm.internal.jobexecutor.JobExecutor;
import org.jbpm.pvm.internal.log.Log;
import org.jbpm.pvm.internal.util.Listener;
Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/wire/descriptor/ObjectDescriptor.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/wire/descriptor/ObjectDescriptor.java 2008-10-30 15:04:08 UTC (rev 2681)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/wire/descriptor/ObjectDescriptor.java 2008-10-30 15:05:34 UTC (rev 2682)
@@ -7,7 +7,7 @@
import java.util.ArrayList;
import java.util.List;
-import org.jbpm.pvm.PvmException;
+import org.jbpm.PvmException;
import org.jbpm.pvm.env.Environment;
import org.jbpm.pvm.internal.log.Log;
import org.jbpm.pvm.internal.util.ArrayUtil;
Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/xml/Parser.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/xml/Parser.java 2008-10-30 15:04:08 UTC (rev 2681)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/xml/Parser.java 2008-10-30 15:05:34 UTC (rev 2682)
@@ -27,7 +27,7 @@
import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.DocumentBuilderFactory;
-import org.jbpm.pvm.PvmException;
+import org.jbpm.PvmException;
import org.jbpm.pvm.internal.log.Log;
import org.jbpm.pvm.internal.stream.StreamSource;
import org.jbpm.pvm.internal.util.UrlEntity;
Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/job/Job.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/job/Job.java 2008-10-30 15:04:08 UTC (rev 2681)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/job/Job.java 2008-10-30 15:05:34 UTC (rev 2682)
@@ -23,7 +23,7 @@
import java.util.Date;
-import org.jbpm.pvm.Execution;
+import org.jbpm.Execution;
/** base class for timers and messages.
*
Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/job/JobTestHelper.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/job/JobTestHelper.java 2008-10-30 15:04:08 UTC (rev 2681)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/job/JobTestHelper.java 2008-10-30 15:05:34 UTC (rev 2682)
@@ -23,7 +23,7 @@
import org.hibernate.Query;
import org.hibernate.Session;
-import org.jbpm.pvm.Execution;
+import org.jbpm.Execution;
import org.jbpm.pvm.env.Environment;
import org.jbpm.pvm.internal.cmd.Command;
import org.jbpm.pvm.internal.cmd.CommandService;
Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/listener/EventListenerExecution.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/listener/EventListenerExecution.java 2008-10-30 15:04:08 UTC (rev 2681)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/listener/EventListenerExecution.java 2008-10-30 15:05:34 UTC (rev 2682)
@@ -21,7 +21,7 @@
*/
package org.jbpm.pvm.listener;
-import org.jbpm.pvm.Execution;
+import org.jbpm.Execution;
import org.jbpm.pvm.activity.Activity;
import org.jbpm.pvm.model.Event;
import org.jbpm.pvm.model.ObservableElement;
Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/model/Comment.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/model/Comment.java 2008-10-30 15:04:08 UTC (rev 2681)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/model/Comment.java 2008-10-30 15:05:34 UTC (rev 2682)
@@ -23,7 +23,7 @@
import java.util.Date;
-import org.jbpm.pvm.Execution;
+import org.jbpm.Execution;
/** a free text comment that can be made to an {@link Execution}
* or a task.
Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/model/ExecutionKeyGenerator.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/model/ExecutionKeyGenerator.java 2008-10-30 15:04:08 UTC (rev 2681)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/model/ExecutionKeyGenerator.java 2008-10-30 15:05:34 UTC (rev 2682)
@@ -21,8 +21,8 @@
*/
package org.jbpm.pvm.model;
-import org.jbpm.pvm.Execution;
-import org.jbpm.pvm.ProcessDefinition;
+import org.jbpm.Execution;
+import org.jbpm.ProcessDefinition;
/**
Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/model/IdGenerator.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/model/IdGenerator.java 2008-10-30 15:04:08 UTC (rev 2681)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/model/IdGenerator.java 2008-10-30 15:05:34 UTC (rev 2682)
@@ -21,8 +21,8 @@
*/
package org.jbpm.pvm.model;
-import org.jbpm.pvm.Execution;
-import org.jbpm.pvm.ProcessDefinition;
+import org.jbpm.Execution;
+import org.jbpm.ProcessDefinition;
/**
Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/model/Node.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/model/Node.java 2008-10-30 15:04:08 UTC (rev 2681)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/model/Node.java 2008-10-30 15:05:34 UTC (rev 2682)
@@ -24,7 +24,7 @@
import java.util.List;
import java.util.Map;
-import org.jbpm.pvm.Execution;
+import org.jbpm.Execution;
/**
Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/model/OpenExecution.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/model/OpenExecution.java 2008-10-30 15:04:08 UTC (rev 2681)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/model/OpenExecution.java 2008-10-30 15:05:34 UTC (rev 2682)
@@ -25,8 +25,8 @@
import java.util.Map;
import java.util.Set;
-import org.jbpm.pvm.Execution;
-import org.jbpm.pvm.PvmException;
+import org.jbpm.Execution;
+import org.jbpm.PvmException;
import org.jbpm.pvm.job.Timer;
Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/model/OpenProcessDefinition.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/model/OpenProcessDefinition.java 2008-10-30 15:04:08 UTC (rev 2681)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/model/OpenProcessDefinition.java 2008-10-30 15:05:34 UTC (rev 2682)
@@ -21,7 +21,7 @@
*/
package org.jbpm.pvm.model;
-import org.jbpm.pvm.ProcessDefinition;
+import org.jbpm.ProcessDefinition;
Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/model/ProcessFactory.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/model/ProcessFactory.java 2008-10-30 15:04:08 UTC (rev 2681)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/model/ProcessFactory.java 2008-10-30 15:05:34 UTC (rev 2682)
@@ -26,8 +26,8 @@
import java.util.List;
import java.util.Stack;
-import org.jbpm.pvm.ProcessDefinition;
-import org.jbpm.pvm.PvmException;
+import org.jbpm.ProcessDefinition;
+import org.jbpm.PvmException;
import org.jbpm.pvm.activity.Activity;
import org.jbpm.pvm.client.ClientProcessDefinition;
import org.jbpm.pvm.internal.model.CompositeElementImpl;
Deleted: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/package.html
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/package.html 2008-10-30 15:04:08 UTC (rev 2681)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/package.html 2008-10-30 15:05:34 UTC (rev 2682)
@@ -1,5 +0,0 @@
-<body>the primary facade interfaces to
-{@link org.jbpm.pvm.ProcessService the process repository},
-{@link org.jbpm.pvm.ExecutionService the execution repository}
-and {@link org.jbpm.pvm.ManagementService the management functionalities}.
-</body>
\ No newline at end of file
Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/processlog/ProcessLog.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/processlog/ProcessLog.java 2008-10-30 15:04:08 UTC (rev 2681)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/processlog/ProcessLog.java 2008-10-30 15:05:34 UTC (rev 2682)
@@ -24,7 +24,7 @@
import java.util.Date;
import java.util.List;
-import org.jbpm.pvm.Execution;
+import org.jbpm.Execution;
/**
* @author Tom Baeyens
Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/processlog/ProcessLogImpl.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/processlog/ProcessLogImpl.java 2008-10-30 15:04:08 UTC (rev 2681)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/processlog/ProcessLogImpl.java 2008-10-30 15:05:34 UTC (rev 2682)
@@ -25,7 +25,7 @@
import java.util.Date;
import java.util.List;
-import org.jbpm.pvm.Execution;
+import org.jbpm.Execution;
import org.jbpm.pvm.internal.model.ExecutionImpl;
import org.jbpm.pvm.session.LogSession;
Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/processlog/ProcessLogXmlSerializer.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/processlog/ProcessLogXmlSerializer.java 2008-10-30 15:04:08 UTC (rev 2681)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/processlog/ProcessLogXmlSerializer.java 2008-10-30 15:05:34 UTC (rev 2682)
@@ -24,7 +24,7 @@
import java.text.SimpleDateFormat;
import java.util.List;
-import org.jbpm.pvm.Execution;
+import org.jbpm.Execution;
import org.w3c.dom.Document;
import org.w3c.dom.Element;
Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/session/PvmDbSession.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/session/PvmDbSession.java 2008-10-30 15:04:08 UTC (rev 2681)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/session/PvmDbSession.java 2008-10-30 15:05:34 UTC (rev 2682)
@@ -23,7 +23,7 @@
import java.util.List;
-import org.jbpm.pvm.Execution;
+import org.jbpm.Execution;
import org.jbpm.pvm.client.ClientExecution;
import org.jbpm.pvm.client.ClientProcessDefinition;
import org.jbpm.pvm.job.Job;
Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/test/base/DbTestCase.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/test/base/DbTestCase.java 2008-10-30 15:04:08 UTC (rev 2681)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/test/base/DbTestCase.java 2008-10-30 15:05:34 UTC (rev 2682)
@@ -21,9 +21,9 @@
*/
package org.jbpm.pvm.test.base;
-import org.jbpm.pvm.ExecutionService;
-import org.jbpm.pvm.ManagementService;
-import org.jbpm.pvm.ProcessService;
+import org.jbpm.ExecutionService;
+import org.jbpm.ManagementService;
+import org.jbpm.ProcessService;
import org.jbpm.pvm.internal.cmd.CommandService;
Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/test/base/EnvironmentDbTestCase.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/test/base/EnvironmentDbTestCase.java 2008-10-30 15:04:08 UTC (rev 2681)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/test/base/EnvironmentDbTestCase.java 2008-10-30 15:05:34 UTC (rev 2682)
@@ -26,7 +26,7 @@
import org.hibernate.Session;
import org.hibernate.SessionFactory;
import org.hibernate.Transaction;
-import org.jbpm.pvm.Execution;
+import org.jbpm.Execution;
import org.jbpm.pvm.internal.model.ExecutionImpl;
import org.jbpm.pvm.internal.model.ProcessDefinitionImpl;
import org.jbpm.pvm.internal.util.ReflectUtil;
Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/test/base/EnvironmentFactoryTestCase.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/test/base/EnvironmentFactoryTestCase.java 2008-10-30 15:04:08 UTC (rev 2681)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/test/base/EnvironmentFactoryTestCase.java 2008-10-30 15:05:34 UTC (rev 2682)
@@ -24,7 +24,7 @@
import java.util.HashMap;
import java.util.Map;
-import org.jbpm.pvm.PvmException;
+import org.jbpm.PvmException;
import org.jbpm.pvm.env.EnvironmentFactory;
import org.jbpm.pvm.env.PvmEnvironmentFactory;
Modified: jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/api/basicfeatures/ExecutionStateTest.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/api/basicfeatures/ExecutionStateTest.java 2008-10-30 15:04:08 UTC (rev 2681)
+++ jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/api/basicfeatures/ExecutionStateTest.java 2008-10-30 15:05:34 UTC (rev 2682)
@@ -23,9 +23,9 @@
import java.util.Map;
+import org.jbpm.Execution;
+import org.jbpm.PvmException;
import org.jbpm.pvm.test.base.JbpmTestCase;
-import org.jbpm.pvm.Execution;
-import org.jbpm.pvm.PvmException;
import org.jbpm.pvm.activity.Activity;
import org.jbpm.pvm.activity.ActivityExecution;
import org.jbpm.pvm.activity.ExternalActivity;
Modified: jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/api/basicfeatures/ScopeStateTest.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/api/basicfeatures/ScopeStateTest.java 2008-10-30 15:04:08 UTC (rev 2681)
+++ jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/api/basicfeatures/ScopeStateTest.java 2008-10-30 15:05:34 UTC (rev 2682)
@@ -23,7 +23,7 @@
import java.util.Map;
-import org.jbpm.pvm.Execution;
+import org.jbpm.Execution;
import org.jbpm.pvm.activity.Activity;
import org.jbpm.pvm.activity.ActivityExecution;
import org.jbpm.pvm.activity.ExternalActivity;
Modified: jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/api/basicfeatures/ScopeVariableTest.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/api/basicfeatures/ScopeVariableTest.java 2008-10-30 15:04:08 UTC (rev 2681)
+++ jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/api/basicfeatures/ScopeVariableTest.java 2008-10-30 15:05:34 UTC (rev 2682)
@@ -23,8 +23,8 @@
import java.util.Map;
+import org.jbpm.PvmException;
import org.jbpm.pvm.test.base.JbpmTestCase;
-import org.jbpm.pvm.PvmException;
import org.jbpm.pvm.activity.ActivityExecution;
import org.jbpm.pvm.activity.ExternalActivity;
import org.jbpm.pvm.client.ClientProcessDefinition;
Modified: jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/api/basicfeatures/TransitionBasedConcurrencyTest.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/api/basicfeatures/TransitionBasedConcurrencyTest.java 2008-10-30 15:04:08 UTC (rev 2681)
+++ jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/api/basicfeatures/TransitionBasedConcurrencyTest.java 2008-10-30 15:05:34 UTC (rev 2682)
@@ -5,8 +5,8 @@
import java.util.List;
import java.util.Map;
+import org.jbpm.Execution;
import org.jbpm.pvm.test.base.JbpmTestCase;
-import org.jbpm.pvm.Execution;
import org.jbpm.pvm.activity.Activity;
import org.jbpm.pvm.activity.ActivityExecution;
import org.jbpm.pvm.activity.ExternalActivity;
Modified: jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/api/db/basicfeatures/AutomaticDecisionDbTest.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/api/db/basicfeatures/AutomaticDecisionDbTest.java 2008-10-30 15:04:08 UTC (rev 2681)
+++ jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/api/db/basicfeatures/AutomaticDecisionDbTest.java 2008-10-30 15:05:34 UTC (rev 2682)
@@ -16,8 +16,8 @@
import java.util.HashMap;
import java.util.Map;
-import org.jbpm.pvm.Deployment;
-import org.jbpm.pvm.Execution;
+import org.jbpm.Execution;
+import org.jbpm.pvm.DeploymentImpl;
import org.jbpm.pvm.activity.Activity;
import org.jbpm.pvm.activity.ActivityExecution;
import org.jbpm.pvm.activity.ExternalActivity;
@@ -72,8 +72,8 @@
}
public void testGoodRating() {
- Deployment deployment = new Deployment(createCreditProcess());
- processService.deploy(deployment);
+ DeploymentImpl deploymentImpl = new DeploymentImpl(createCreditProcess());
+ processService.deploy(deploymentImpl);
Map<String, Object> variables = new HashMap<String, Object>();
variables.put("creditRate", 7);
@@ -84,8 +84,8 @@
}
public void testAverageRating() {
- Deployment deployment = new Deployment(createCreditProcess());
- processService.deploy(deployment);
+ DeploymentImpl deploymentImpl = new DeploymentImpl(createCreditProcess());
+ processService.deploy(deploymentImpl);
Map<String, Object> variables = new HashMap<String, Object>();
variables.put("creditRate", 2);
@@ -97,8 +97,8 @@
}
public void testBadRating() {
- Deployment deployment = new Deployment(createCreditProcess());
- processService.deploy(deployment);
+ DeploymentImpl deploymentImpl = new DeploymentImpl(createCreditProcess());
+ processService.deploy(deploymentImpl);
Map<String, Object> variables = new HashMap<String, Object>();
variables.put("creditRate", -7);
Modified: jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/api/db/basicfeatures/BasicExecutionFlowDbTest.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/api/db/basicfeatures/BasicExecutionFlowDbTest.java 2008-10-30 15:04:08 UTC (rev 2681)
+++ jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/api/db/basicfeatures/BasicExecutionFlowDbTest.java 2008-10-30 15:05:34 UTC (rev 2682)
@@ -17,8 +17,8 @@
import java.util.List;
import java.util.Map;
-import org.jbpm.pvm.Deployment;
-import org.jbpm.pvm.Execution;
+import org.jbpm.Execution;
+import org.jbpm.pvm.DeploymentImpl;
import org.jbpm.pvm.activity.Activity;
import org.jbpm.pvm.activity.ActivityExecution;
import org.jbpm.pvm.activity.ExternalActivity;
@@ -75,8 +75,8 @@
.node("f").behaviour(AutomaticActivity.class)
.done();
- Deployment deployment = new Deployment(processDefinition);
- processService.deploy(deployment);
+ DeploymentImpl deploymentImpl = new DeploymentImpl(processDefinition);
+ processService.deploy(deploymentImpl);
Execution processInstance = executionService.startExecution("myProcess:1", "one");
Modified: jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/api/db/svc/ExecutionServiceTest.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/api/db/svc/ExecutionServiceTest.java 2008-10-30 15:04:08 UTC (rev 2681)
+++ jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/api/db/svc/ExecutionServiceTest.java 2008-10-30 15:05:34 UTC (rev 2682)
@@ -28,11 +28,11 @@
import junit.framework.Test;
-import org.jbpm.pvm.Deployment;
-import org.jbpm.pvm.Execution;
-import org.jbpm.pvm.ExecutionService;
-import org.jbpm.pvm.ProcessDefinition;
-import org.jbpm.pvm.ProcessService;
+import org.jbpm.Execution;
+import org.jbpm.ExecutionService;
+import org.jbpm.ProcessDefinition;
+import org.jbpm.ProcessService;
+import org.jbpm.pvm.DeploymentImpl;
import org.jbpm.pvm.client.ClientProcessDefinition;
import org.jbpm.pvm.model.ProcessFactory;
import org.jbpm.pvm.test.base.DbTestCase;
@@ -58,8 +58,8 @@
ClientProcessDefinition processDefinition = ProcessFactory.build("nuclear fusion").version(1).key("NCLFU").node("initial").initial()
.behaviour(WaitState.class).done();
- Deployment deployment = new Deployment(processDefinition);
- processService.deploy(deployment);
+ DeploymentImpl deploymentImpl = new DeploymentImpl(processDefinition);
+ processService.deploy(deploymentImpl);
ExecutionService executionService = getEnvironmentFactory().get(ExecutionService.class);
@@ -88,8 +88,8 @@
ClientProcessDefinition processDefinition = ProcessFactory.build("nuclear fusion").version(1).key("NCLFU").node("initial").initial()
.behaviour(WaitState.class).done();
- Deployment deployment = new Deployment(processDefinition);
- processService.deploy(deployment);
+ DeploymentImpl deploymentImpl = new DeploymentImpl(processDefinition);
+ processService.deploy(deploymentImpl);
ExecutionService executionService = getEnvironmentFactory().get(ExecutionService.class);
@@ -114,7 +114,7 @@
ClientProcessDefinition processDefinition = ProcessFactory.build("nuclear fusion").version(1).key("NCLFU").node("initial").initial()
.behaviour(WaitState.class).done();
- processService.deploy(new Deployment(processDefinition));
+ processService.deploy(new DeploymentImpl(processDefinition));
// create the map with variables
Map<String, Object> variables = new HashMap<String, Object>();
@@ -280,28 +280,28 @@
ProcessDefinition processDefinition = ProcessFactory.build("nuclear fusion").key("NFU").node("initial").initial().behaviour(
WaitState.class).done();
- Deployment deployment = new Deployment(processDefinition);
- processService.deploy(deployment);
+ DeploymentImpl deploymentImpl = new DeploymentImpl(processDefinition);
+ processService.deploy(deploymentImpl);
processDefinition = ProcessFactory.build("ultimate seduction").key("USD").node("initial").initial().behaviour(WaitState.class).done();
- deployment = new Deployment(processDefinition);
- processService.deploy(deployment);
+ deploymentImpl = new DeploymentImpl(processDefinition);
+ processService.deploy(deploymentImpl);
processDefinition = ProcessFactory.build("ultimate seduction").key("USD").node("initial").initial().behaviour(WaitState.class).done();
- deployment = new Deployment(processDefinition);
- processService.deploy(deployment);
+ deploymentImpl = new DeploymentImpl(processDefinition);
+ processService.deploy(deploymentImpl);
processDefinition = ProcessFactory.build("nuclear fusion").key("NFU").node("initial").initial().behaviour(WaitState.class).done();
- deployment = new Deployment(processDefinition);
- processService.deploy(deployment);
+ deploymentImpl = new DeploymentImpl(processDefinition);
+ processService.deploy(deploymentImpl);
processDefinition = ProcessFactory.build("publish book").key("PBO").node("initial").initial().behaviour(WaitState.class).done();
- deployment = new Deployment(processDefinition);
- processService.deploy(deployment);
+ deploymentImpl = new DeploymentImpl(processDefinition);
+ processService.deploy(deploymentImpl);
processDefinition = ProcessFactory.build("nuclear fusion").key("NFU").node("initial").initial().behaviour(WaitState.class).done();
- deployment = new Deployment(processDefinition);
- processService.deploy(deployment);
+ deploymentImpl = new DeploymentImpl(processDefinition);
+ processService.deploy(deploymentImpl);
}
Execution startExecution()
@@ -310,8 +310,8 @@
ProcessDefinition processDefinition = ProcessFactory.build("nuclear fusion").node("initial").initial().behaviour(WaitState.class)
.done();
- Deployment deployment = new Deployment(processDefinition);
- processService.deploy(deployment);
+ DeploymentImpl deploymentImpl = new DeploymentImpl(processDefinition);
+ processService.deploy(deploymentImpl);
ExecutionService executionService = getEnvironmentFactory().get(ExecutionService.class);
Modified: jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/api/db/svc/ManagementServiceTest.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/api/db/svc/ManagementServiceTest.java 2008-10-30 15:04:08 UTC (rev 2681)
+++ jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/api/db/svc/ManagementServiceTest.java 2008-10-30 15:05:34 UTC (rev 2682)
@@ -23,7 +23,7 @@
import junit.framework.Test;
-import org.jbpm.pvm.ManagementService;
+import org.jbpm.ManagementService;
import org.jbpm.pvm.test.base.DbTestCase;
import org.jbpm.pvm.test.base.EnvironmentFactoryTestSetup;
Modified: jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/api/db/svc/ProcessServiceTest.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/api/db/svc/ProcessServiceTest.java 2008-10-30 15:04:08 UTC (rev 2681)
+++ jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/api/db/svc/ProcessServiceTest.java 2008-10-30 15:05:34 UTC (rev 2682)
@@ -26,10 +26,10 @@
import junit.framework.Test;
-import org.jbpm.pvm.Deployment;
-import org.jbpm.pvm.ProcessDefinition;
-import org.jbpm.pvm.ProcessService;
-import org.jbpm.pvm.PvmException;
+import org.jbpm.ProcessDefinition;
+import org.jbpm.ProcessService;
+import org.jbpm.PvmException;
+import org.jbpm.pvm.DeploymentImpl;
import org.jbpm.pvm.model.ProcessFactory;
import org.jbpm.pvm.test.base.DbTestCase;
import org.jbpm.pvm.test.base.EnvironmentFactoryTestSetup;
@@ -54,8 +54,8 @@
.done();
// deploy it
- Deployment deployment = new Deployment(processDefinition);
- processService.deploy(deployment);
+ DeploymentImpl deploymentImpl = new DeploymentImpl(processDefinition);
+ processService.deploy(deploymentImpl);
// fetch it back from the process service
List<ProcessDefinition> processDefinitions = processService.findProcessDefinitions("nuclear fusion");
@@ -78,8 +78,8 @@
.done();
// deploy it
- Deployment deployment = new Deployment(processDefinition);
- processService.deploy(deployment);
+ DeploymentImpl deploymentImpl = new DeploymentImpl(processDefinition);
+ processService.deploy(deploymentImpl);
// look it up again
List<ProcessDefinition> processDefinitions = processService.findProcessDefinitions("nuclear fusion");
@@ -95,8 +95,8 @@
processDefinition = ProcessFactory.build("nuclear fusion").node("initial").initial().behaviour(WaitState.class).done();
// deploy the second process
- deployment = new Deployment(processDefinition);
- processService.deploy(deployment);
+ deploymentImpl = new DeploymentImpl(processDefinition);
+ processService.deploy(deploymentImpl);
// verify that there now are 2 process definitions with that name
processDefinitions = processService.findProcessDefinitions("nuclear fusion");
@@ -119,8 +119,8 @@
WaitState.class).done();
// deploy it
- Deployment deployment = new Deployment(processDefinition);
- processService.deploy(deployment);
+ DeploymentImpl deploymentImpl = new DeploymentImpl(processDefinition);
+ processService.deploy(deploymentImpl);
// load it
List<ProcessDefinition> processDefinitions = processService.findProcessDefinitions("nuclear fusion");
@@ -141,8 +141,8 @@
ProcessDefinition processDefinition = ProcessFactory.build("nuclear fusion").node("initial").initial().behaviour(WaitState.class)
.done();
- Deployment deployment = new Deployment(processDefinition);
- processService.deploy(deployment);
+ DeploymentImpl deploymentImpl = new DeploymentImpl(processDefinition);
+ processService.deploy(deploymentImpl);
List<ProcessDefinition> processDefinitions = processService.findProcessDefinitions("nuclear fusion");
assertNotNull(processDefinitions);
@@ -164,8 +164,8 @@
ProcessDefinition processDefinition = ProcessFactory.build("nuclear fusion").key("NCF").node("initial").initial().behaviour(
WaitState.class).done();
- Deployment deployment = new Deployment(processDefinition);
- processService.deploy(deployment);
+ DeploymentImpl deploymentImpl = new DeploymentImpl(processDefinition);
+ processService.deploy(deploymentImpl);
List<ProcessDefinition> processDefinitions = processService.findProcessDefinitions("nuclear fusion");
assertNotNull(processDefinitions);
@@ -187,7 +187,7 @@
WaitState.class).done();
// deploy it
- processService.deploy(new Deployment(processDefinition));
+ processService.deploy(new DeploymentImpl(processDefinition));
// then we create a process definition with the same name and version
processDefinition = ProcessFactory.build("nuclear fusion").version(1).node("initial").initial().behaviour(WaitState.class).done();
@@ -195,7 +195,7 @@
try
{
// and then we verify that the deployment fails
- processService.deploy(new Deployment(processDefinition));
+ processService.deploy(new DeploymentImpl(processDefinition));
fail("expected exception");
}
catch (PvmException e)
@@ -213,8 +213,8 @@
WaitState.class).done();
// deploy it
- Deployment deployment = new Deployment(processDefinition);
- processService.deploy(deployment);
+ DeploymentImpl deploymentImpl = new DeploymentImpl(processDefinition);
+ processService.deploy(deploymentImpl);
// load it with by name and version
processDefinition = processService.findProcessDefinition("nuclear fusion", 35);
@@ -296,27 +296,27 @@
ProcessDefinition processDefinition = ProcessFactory.build("nuclear fusion").node("initial").initial().behaviour(WaitState.class)
.done();
- Deployment deployment = new Deployment(processDefinition);
- processService.deploy(deployment);
+ DeploymentImpl deploymentImpl = new DeploymentImpl(processDefinition);
+ processService.deploy(deploymentImpl);
processDefinition = ProcessFactory.build("ultimate seduction").node("initial").initial().behaviour(WaitState.class).done();
- deployment = new Deployment(processDefinition);
- processService.deploy(deployment);
+ deploymentImpl = new DeploymentImpl(processDefinition);
+ processService.deploy(deploymentImpl);
processDefinition = ProcessFactory.build("ultimate seduction").node("initial").initial().behaviour(WaitState.class).done();
- deployment = new Deployment(processDefinition);
- processService.deploy(deployment);
+ deploymentImpl = new DeploymentImpl(processDefinition);
+ processService.deploy(deploymentImpl);
processDefinition = ProcessFactory.build("nuclear fusion").node("initial").initial().behaviour(WaitState.class).done();
- deployment = new Deployment(processDefinition);
- processService.deploy(deployment);
+ deploymentImpl = new DeploymentImpl(processDefinition);
+ processService.deploy(deploymentImpl);
processDefinition = ProcessFactory.build("publish book").node("initial").initial().behaviour(WaitState.class).done();
- deployment = new Deployment(processDefinition);
- processService.deploy(deployment);
+ deploymentImpl = new DeploymentImpl(processDefinition);
+ processService.deploy(deploymentImpl);
processDefinition = ProcessFactory.build("nuclear fusion").node("initial").initial().behaviour(WaitState.class).done();
- deployment = new Deployment(processDefinition);
- processService.deploy(deployment);
+ deploymentImpl = new DeploymentImpl(processDefinition);
+ processService.deploy(deploymentImpl);
}
}
Modified: jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/api/timer/TimerConfiguration.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/api/timer/TimerConfiguration.java 2008-10-30 15:04:08 UTC (rev 2681)
+++ jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/api/timer/TimerConfiguration.java 2008-10-30 15:05:34 UTC (rev 2682)
@@ -1,8 +1,8 @@
package org.jbpm.pvm.api.timer;
-import org.jbpm.pvm.ExecutionService;
-import org.jbpm.pvm.ManagementService;
-import org.jbpm.pvm.ProcessService;
+import org.jbpm.ExecutionService;
+import org.jbpm.ManagementService;
+import org.jbpm.ProcessService;
import org.jbpm.pvm.env.EnvironmentFactory;
import org.jbpm.pvm.env.PvmEnvironmentFactory;
Modified: jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/api/timer/TimerIntegrationTest.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/api/timer/TimerIntegrationTest.java 2008-10-30 15:04:08 UTC (rev 2681)
+++ jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/api/timer/TimerIntegrationTest.java 2008-10-30 15:05:34 UTC (rev 2682)
@@ -18,10 +18,10 @@
import java.util.Map;
import java.util.Set;
-import org.jbpm.pvm.Deployment;
-import org.jbpm.pvm.Execution;
-import org.jbpm.pvm.ExecutionService;
-import org.jbpm.pvm.ProcessService;
+import org.jbpm.Execution;
+import org.jbpm.ExecutionService;
+import org.jbpm.ProcessService;
+import org.jbpm.pvm.DeploymentImpl;
import org.jbpm.pvm.activity.ActivityExecution;
import org.jbpm.pvm.activity.ExternalActivity;
import org.jbpm.pvm.env.Environment;
@@ -71,8 +71,8 @@
private static ExecutionImpl deployAndInstanciateProcess(OpenProcessDefinition definition) {
ProcessService processService = Environment.getCurrent().get(ProcessService.class);
- Deployment deployment = new Deployment(definition);
- processService.deploy(deployment);
+ DeploymentImpl deploymentImpl = new DeploymentImpl(definition);
+ processService.deploy(deploymentImpl);
Execution processInstance = getExecutionService().startExecutionInLatest(definition.getName());
Modified: jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/api/tx/BasicTransactionTest.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/api/tx/BasicTransactionTest.java 2008-10-30 15:04:08 UTC (rev 2681)
+++ jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/api/tx/BasicTransactionTest.java 2008-10-30 15:05:34 UTC (rev 2682)
@@ -28,7 +28,7 @@
import junit.framework.Test;
import org.hibernate.Session;
-import org.jbpm.pvm.PvmException;
+import org.jbpm.PvmException;
import org.jbpm.pvm.env.Environment;
import org.jbpm.pvm.env.Transaction;
import org.jbpm.pvm.internal.cmd.Command;
Modified: jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/example02/PersistentExecutionModeTest.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/example02/PersistentExecutionModeTest.java 2008-10-30 15:04:08 UTC (rev 2681)
+++ jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/example02/PersistentExecutionModeTest.java 2008-10-30 15:05:34 UTC (rev 2682)
@@ -21,11 +21,11 @@
*/
package org.jbpm.pvm.example02;
-import org.jbpm.pvm.Deployment;
-import org.jbpm.pvm.Execution;
-import org.jbpm.pvm.ExecutionService;
-import org.jbpm.pvm.ManagementService;
-import org.jbpm.pvm.ProcessService;
+import org.jbpm.Execution;
+import org.jbpm.ExecutionService;
+import org.jbpm.ManagementService;
+import org.jbpm.ProcessService;
+import org.jbpm.pvm.DeploymentImpl;
import org.jbpm.pvm.client.ClientProcessDefinition;
import org.jbpm.pvm.env.EnvironmentFactory;
import org.jbpm.pvm.example01.AutomaticActivity;
@@ -58,8 +58,8 @@
.node("end").behaviour(WaitState.class)
.done();
- Deployment deployment = new Deployment(processDefinition);
- processService.deploy(deployment);
+ DeploymentImpl deploymentImpl = new DeploymentImpl(processDefinition);
+ processService.deploy(deploymentImpl);
Execution execution = executionService.startExecution("loan:1", "request7836");
Modified: jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/example04/DisplayActivityTest.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/example04/DisplayActivityTest.java 2008-10-30 15:04:08 UTC (rev 2681)
+++ jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/example04/DisplayActivityTest.java 2008-10-30 15:05:34 UTC (rev 2682)
@@ -21,7 +21,7 @@
*/
package org.jbpm.pvm.example04;
-import org.jbpm.pvm.Execution;
+import org.jbpm.Execution;
import org.jbpm.pvm.client.ClientProcessDefinition;
import org.jbpm.pvm.model.ProcessFactory;
import org.jbpm.pvm.test.base.JbpmTestCase;
Modified: jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/internal/db/langext/LanguageExtensionsDbTest.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/internal/db/langext/LanguageExtensionsDbTest.java 2008-10-30 15:04:08 UTC (rev 2681)
+++ jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/internal/db/langext/LanguageExtensionsDbTest.java 2008-10-30 15:05:34 UTC (rev 2682)
@@ -27,7 +27,7 @@
import junit.framework.Test;
import junit.framework.TestSuite;
-import org.jbpm.pvm.Execution;
+import org.jbpm.Execution;
import org.jbpm.pvm.internal.db.type.VariableCustomTypeTest;
import org.jbpm.pvm.model.OpenProcessDefinition;
import org.jbpm.pvm.model.ProcessFactory;
Modified: jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/internal/jobexecutor/JobExecutorTest.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/internal/jobexecutor/JobExecutorTest.java 2008-10-30 15:04:08 UTC (rev 2681)
+++ jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/internal/jobexecutor/JobExecutorTest.java 2008-10-30 15:05:34 UTC (rev 2682)
@@ -32,8 +32,8 @@
import junit.framework.Test;
import org.hibernate.Session;
-import org.jbpm.pvm.Deployment;
-import org.jbpm.pvm.ProcessService;
+import org.jbpm.ProcessService;
+import org.jbpm.pvm.DeploymentImpl;
import org.jbpm.pvm.activity.ActivityExecution;
import org.jbpm.pvm.activity.ExternalActivity;
import org.jbpm.pvm.api.db.svc.ExecutionServiceTest;
@@ -287,9 +287,9 @@
ClientProcessDefinition processDefinition = ProcessFactory.build("excl")
.node("initial").initial().behaviour(WaitState.class)
.done();
- Deployment deployment = new Deployment(processDefinition);
+ DeploymentImpl deploymentImpl = new DeploymentImpl(processDefinition);
ProcessService processService = environment.get(ProcessService.class);
- processService.deploy(deployment);
+ processService.deploy(deploymentImpl);
PvmDbSession pvmDbSession = environment.get(PvmDbSession.class);
MessageSession messageSession = environment.get(MessageSession.class);
Modified: jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/internal/wire/ObjectWireTest.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/internal/wire/ObjectWireTest.java 2008-10-30 15:04:08 UTC (rev 2681)
+++ jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/internal/wire/ObjectWireTest.java 2008-10-30 15:05:34 UTC (rev 2682)
@@ -23,7 +23,7 @@
import java.util.List;
-import org.jbpm.pvm.PvmException;
+import org.jbpm.PvmException;
import org.jbpm.pvm.internal.wire.WireContext;
import org.jbpm.pvm.internal.wire.WireException;
import org.jbpm.pvm.internal.xml.Problem;
Modified: jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/internal/xml/XmlParsingTest.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/internal/xml/XmlParsingTest.java 2008-10-30 15:04:08 UTC (rev 2681)
+++ jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/internal/xml/XmlParsingTest.java 2008-10-30 15:05:34 UTC (rev 2682)
@@ -3,8 +3,8 @@
import java.util.ArrayList;
import java.util.List;
+import org.jbpm.PvmException;
import org.jbpm.pvm.test.base.JbpmTestCase;
-import org.jbpm.pvm.PvmException;
import org.jbpm.pvm.internal.util.TagBinding;
import org.jbpm.pvm.internal.util.XmlUtil;
import org.jbpm.pvm.internal.xml.Bindings;
Modified: jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/samples/ExamplesConfiguration.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/samples/ExamplesConfiguration.java 2008-10-30 15:04:08 UTC (rev 2681)
+++ jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/samples/ExamplesConfiguration.java 2008-10-30 15:05:34 UTC (rev 2682)
@@ -21,11 +21,11 @@
*/
package org.jbpm.pvm.samples;
+import org.jbpm.ExecutionService;
+import org.jbpm.ManagementService;
+import org.jbpm.ProcessService;
import org.jbpm.pvm.env.EnvironmentFactory;
import org.jbpm.pvm.env.PvmEnvironmentFactory;
-import org.jbpm.pvm.ExecutionService;
-import org.jbpm.pvm.ProcessService;
-import org.jbpm.pvm.ManagementService;
/**
Modified: jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/samples/ex02/BasicProcessPersistenceTest.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/samples/ex02/BasicProcessPersistenceTest.java 2008-10-30 15:04:08 UTC (rev 2681)
+++ jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/samples/ex02/BasicProcessPersistenceTest.java 2008-10-30 15:05:34 UTC (rev 2682)
@@ -23,10 +23,10 @@
import junit.framework.TestCase;
-import org.jbpm.pvm.Deployment;
-import org.jbpm.pvm.Execution;
-import org.jbpm.pvm.ExecutionService;
-import org.jbpm.pvm.ProcessService;
+import org.jbpm.Execution;
+import org.jbpm.ExecutionService;
+import org.jbpm.ProcessService;
+import org.jbpm.pvm.DeploymentImpl;
import org.jbpm.pvm.client.ClientProcessDefinition;
import org.jbpm.pvm.model.ProcessFactory;
import org.jbpm.pvm.samples.ExamplesConfiguration;
@@ -54,8 +54,8 @@
ProcessService processService = ExamplesConfiguration.getProcessService();
- Deployment deployment = new Deployment(processDefinition);
- processService.deploy(deployment);
+ DeploymentImpl deploymentImpl = new DeploymentImpl(processDefinition);
+ processService.deploy(deploymentImpl);
ExecutionService executionService = ExamplesConfiguration.getExecutionService();
Modified: jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/samples/ex04/ExternalDecisionTest.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/samples/ex04/ExternalDecisionTest.java 2008-10-30 15:04:08 UTC (rev 2681)
+++ jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/samples/ex04/ExternalDecisionTest.java 2008-10-30 15:05:34 UTC (rev 2682)
@@ -23,7 +23,7 @@
import junit.framework.TestCase;
-import org.jbpm.pvm.Execution;
+import org.jbpm.Execution;
import org.jbpm.pvm.samples.activities.AutomaticActivity;
import org.jbpm.pvm.samples.activities.WaitState;
import org.jbpm.pvm.client.ClientProcessDefinition;
Modified: jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/samples/ex05/InternalDecisionTest.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/samples/ex05/InternalDecisionTest.java 2008-10-30 15:04:08 UTC (rev 2681)
+++ jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/samples/ex05/InternalDecisionTest.java 2008-10-30 15:05:34 UTC (rev 2682)
@@ -23,7 +23,7 @@
import junit.framework.TestCase;
-import org.jbpm.pvm.Execution;
+import org.jbpm.Execution;
import org.jbpm.pvm.samples.activities.WaitState;
import org.jbpm.pvm.client.ClientProcessDefinition;
import org.jbpm.pvm.client.ClientExecution;
Modified: jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/samples/ex06/Task.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/samples/ex06/Task.java 2008-10-30 15:04:08 UTC (rev 2681)
+++ jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/samples/ex06/Task.java 2008-10-30 15:05:34 UTC (rev 2682)
@@ -21,7 +21,7 @@
*/
package org.jbpm.pvm.samples.ex06;
-import org.jbpm.pvm.Execution;
+import org.jbpm.Execution;
import org.jbpm.pvm.client.ClientExecution;
public class Task {
Modified: jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/samples/ex06/TaskService.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/samples/ex06/TaskService.java 2008-10-30 15:04:08 UTC (rev 2681)
+++ jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/samples/ex06/TaskService.java 2008-10-30 15:05:34 UTC (rev 2682)
@@ -24,7 +24,7 @@
import java.util.ArrayList;
import java.util.List;
-import org.jbpm.pvm.Execution;
+import org.jbpm.Execution;
public abstract class TaskService {
15 years, 6 months
JBoss JBPM SVN: r2681 - in jbpm4/trunk/modules/jpdl/src: main/java/org/jbpm/jpdl/activity and 1 other directories.
by do-not-reply@jboss.org
Author: tom.baeyens(a)jboss.com
Date: 2008-10-30 11:04:08 -0400 (Thu, 30 Oct 2008)
New Revision: 2681
Modified:
jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/JpdlException.java
jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/activity/DecisionExpressionActivity.java
jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/activity/DecisionHandlerActivity.java
jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/activity/JpdlExternalActivity.java
jbpm4/trunk/modules/jpdl/src/test/java/org/jbpm/jpdl/controlflow/DecisionExpressionTest.java
jbpm4/trunk/modules/jpdl/src/test/java/org/jbpm/jpdl/controlflow/StateTest.java
Log:
unification api proposals
Modified: jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/JpdlException.java
===================================================================
--- jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/JpdlException.java 2008-10-30 15:03:04 UTC (rev 2680)
+++ jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/JpdlException.java 2008-10-30 15:04:08 UTC (rev 2681)
@@ -21,7 +21,7 @@
*/
package org.jbpm.jpdl;
-import org.jbpm.pvm.PvmException;
+import org.jbpm.PvmException;
/**
* @author Tom Baeyens
Modified: jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/activity/DecisionExpressionActivity.java
===================================================================
--- jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/activity/DecisionExpressionActivity.java 2008-10-30 15:03:04 UTC (rev 2680)
+++ jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/activity/DecisionExpressionActivity.java 2008-10-30 15:04:08 UTC (rev 2681)
@@ -21,8 +21,8 @@
*/
package org.jbpm.jpdl.activity;
+import org.jbpm.PvmException;
import org.jbpm.jpdl.JpdlExecution;
-import org.jbpm.pvm.PvmException;
import org.jbpm.pvm.env.EnvironmentHelper;
import org.jbpm.pvm.internal.model.NodeImpl;
import org.jbpm.pvm.internal.script.ScriptManager;
Modified: jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/activity/DecisionHandlerActivity.java
===================================================================
--- jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/activity/DecisionHandlerActivity.java 2008-10-30 15:03:04 UTC (rev 2680)
+++ jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/activity/DecisionHandlerActivity.java 2008-10-30 15:04:08 UTC (rev 2681)
@@ -21,10 +21,10 @@
*/
package org.jbpm.jpdl.activity;
+import org.jbpm.PvmException;
import org.jbpm.jpdl.DecisionHandler;
import org.jbpm.jpdl.JpdlException;
import org.jbpm.jpdl.JpdlExecution;
-import org.jbpm.pvm.PvmException;
import org.jbpm.pvm.env.Environment;
import org.jbpm.pvm.env.EnvironmentHelper;
import org.jbpm.pvm.internal.model.NodeImpl;
Modified: jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/activity/JpdlExternalActivity.java
===================================================================
--- jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/activity/JpdlExternalActivity.java 2008-10-30 15:03:04 UTC (rev 2680)
+++ jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/activity/JpdlExternalActivity.java 2008-10-30 15:04:08 UTC (rev 2681)
@@ -23,8 +23,8 @@
import java.util.Map;
+import org.jbpm.Execution;
import org.jbpm.jpdl.JpdlExecution;
-import org.jbpm.pvm.Execution;
import org.jbpm.pvm.activity.ExternalActivity;
import org.jbpm.pvm.activity.ActivityExecution;
Modified: jbpm4/trunk/modules/jpdl/src/test/java/org/jbpm/jpdl/controlflow/DecisionExpressionTest.java
===================================================================
--- jbpm4/trunk/modules/jpdl/src/test/java/org/jbpm/jpdl/controlflow/DecisionExpressionTest.java 2008-10-30 15:03:04 UTC (rev 2680)
+++ jbpm4/trunk/modules/jpdl/src/test/java/org/jbpm/jpdl/controlflow/DecisionExpressionTest.java 2008-10-30 15:04:08 UTC (rev 2681)
@@ -21,8 +21,8 @@
*/
package org.jbpm.jpdl.controlflow;
+import org.jbpm.PvmException;
import org.jbpm.jpdl.JpdlTestCase;
-import org.jbpm.pvm.PvmException;
import org.jbpm.pvm.client.ClientExecution;
import org.jbpm.pvm.client.ClientProcessDefinition;
Modified: jbpm4/trunk/modules/jpdl/src/test/java/org/jbpm/jpdl/controlflow/StateTest.java
===================================================================
--- jbpm4/trunk/modules/jpdl/src/test/java/org/jbpm/jpdl/controlflow/StateTest.java 2008-10-30 15:03:04 UTC (rev 2680)
+++ jbpm4/trunk/modules/jpdl/src/test/java/org/jbpm/jpdl/controlflow/StateTest.java 2008-10-30 15:04:08 UTC (rev 2681)
@@ -21,8 +21,8 @@
*/
package org.jbpm.jpdl.controlflow;
+import org.jbpm.PvmException;
import org.jbpm.jpdl.JpdlTestCase;
-import org.jbpm.pvm.PvmException;
import org.jbpm.pvm.client.ClientExecution;
import org.jbpm.pvm.client.ClientProcessDefinition;
15 years, 6 months