JBoss JBPM SVN: r1705 - jbpm3/branches/tdiesler/modules/jpdl/core/src/main/java/org/jbpm.
by do-not-reply@jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2008-07-24 07:42:45 -0400 (Thu, 24 Jul 2008)
New Revision: 1705
Modified:
jbpm3/branches/tdiesler/modules/jpdl/core/src/main/java/org/jbpm/JbpmConfiguration.java
Log:
Merge -r1578:1580
Modified: jbpm3/branches/tdiesler/modules/jpdl/core/src/main/java/org/jbpm/JbpmConfiguration.java
===================================================================
--- jbpm3/branches/tdiesler/modules/jpdl/core/src/main/java/org/jbpm/JbpmConfiguration.java 2008-07-24 11:40:18 UTC (rev 1704)
+++ jbpm3/branches/tdiesler/modules/jpdl/core/src/main/java/org/jbpm/JbpmConfiguration.java 2008-07-24 11:42:45 UTC (rev 1705)
@@ -278,12 +278,13 @@
log.info("using jbpm configuration resource '"+resource+"'");
InputStream jbpmCfgXmlStream = ClassLoaderUtil.getStream(resource);
- // if a resource SHOULD BE used, but is not found in the classpath
- // throw exception (otherwise, the user wants to load own stuff
- // but is confused, if it is not found and not loaded, without
+ // if a custom resource is to be used, but is not found in the classpath
+ // log a warning (otherwise, users who want to load custom stuff
+ // will be confused if the resource is not found and not loaded, without
// any notice)
- if (jbpmCfgXmlStream==null)
- throw new JbpmException("jbpm configuration resource '"+resource+"' is not available");
+ if (jbpmCfgXmlStream==null && !"jbpm.cfg.xml".equals(resource)) {
+ log.warn("jbpm configuration resource '"+resource+"' is not available");
+ }
ObjectFactory objectFactory = parseObjectFactory(jbpmCfgXmlStream);
instance = createJbpmConfiguration(objectFactory);
15 years, 11 months
JBoss JBPM SVN: r1704 - in jbpm3/branches/tdiesler: modules/jpdl/ws/src/main/java/org/jbpm/command and 1 other directories.
by do-not-reply@jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2008-07-24 07:40:18 -0400 (Thu, 24 Jul 2008)
New Revision: 1704
Added:
jbpm3/branches/tdiesler/modules/jpdl/ws/src/main/java/org/jbpm/command/ws2/
jbpm3/branches/tdiesler/modules/jpdl/ws/src/main/java/org/jbpm/command/ws2/JPDLWebServiceFacade.java
jbpm3/branches/tdiesler/modules/jpdl/ws/src/main/java/org/jbpm/command/ws2/JPDLWebServiceImpl.java
jbpm3/branches/tdiesler/modules/jpdl/ws/src/main/java/org/jbpm/command/ws2/ProcessDefinitionRef.java
jbpm3/branches/tdiesler/modules/jpdl/ws/src/main/java/org/jbpm/command/ws2/ProcessInstanceRef.java
jbpm3/branches/tdiesler/modules/jpdl/ws/src/main/java/org/jbpm/command/ws2/ProcessRequest.java
jbpm3/branches/tdiesler/modules/jpdl/ws/src/main/java/org/jbpm/command/ws2/SignalRequest.java
jbpm3/branches/tdiesler/modules/jpdl/ws/src/main/java/org/jbpm/command/ws2/TokenRef.java
Removed:
jbpm3/branches/tdiesler/modules/jpdl/ws/src/main/java/org/jbpm/command/ws2/JPDLWebServiceFacade.java
jbpm3/branches/tdiesler/modules/jpdl/ws/src/main/java/org/jbpm/command/ws2/JPDLWebServiceImpl.java
jbpm3/branches/tdiesler/modules/jpdl/ws/src/main/java/org/jbpm/command/ws2/ProcessDefinitionRef.java
jbpm3/branches/tdiesler/modules/jpdl/ws/src/main/java/org/jbpm/command/ws2/ProcessInstanceRef.java
jbpm3/branches/tdiesler/modules/jpdl/ws/src/main/java/org/jbpm/command/ws2/ProcessRequest.java
jbpm3/branches/tdiesler/modules/jpdl/ws/src/main/java/org/jbpm/command/ws2/SignalRequest.java
jbpm3/branches/tdiesler/modules/jpdl/ws/src/main/java/org/jbpm/command/ws2/TokenRef.java
Modified:
jbpm3/branches/tdiesler/pom.xml
Log:
Merge -r1566:1570
Copied: jbpm3/branches/tdiesler/modules/jpdl/ws/src/main/java/org/jbpm/command/ws2 (from rev 1570, jbpm3/trunk/modules/jpdl/ws/src/main/java/org/jbpm/command/ws2)
Deleted: jbpm3/branches/tdiesler/modules/jpdl/ws/src/main/java/org/jbpm/command/ws2/JPDLWebServiceFacade.java
===================================================================
--- jbpm3/trunk/modules/jpdl/ws/src/main/java/org/jbpm/command/ws2/JPDLWebServiceFacade.java 2008-07-10 12:13:06 UTC (rev 1570)
+++ jbpm3/branches/tdiesler/modules/jpdl/ws/src/main/java/org/jbpm/command/ws2/JPDLWebServiceFacade.java 2008-07-24 11:40:18 UTC (rev 1704)
@@ -1,67 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jbpm.command.ws2;
-
-import java.util.List;
-
-/**
- * JPDL web service interface
- *
- * @author Heiko.Braun(a)jboss.com
- * @author Salaboy21 (mailto:salaboy@gmail.com)
- */
-
-
-public interface JPDLWebServiceFacade
-{
- /**
- * Creates a new process instance and return the initla token.
- * If it should be started the default transition is used.
- *
- * @param processRequest process reference info
- * @return a token reference
- */
- // TokenRef newProcessInstance(ProcessRequest processRequest);
-
- ProcessInstanceRef newProcessInstance(ProcessRequest processRequest);
-
- /**
- * Signals a token to proceed with (an optional) transition.
- *
- * @param signalRequest
- * @return a token reference
- */
- TokenRef signal(SignalRequest signalRequest);
-
- /**
- * Cancel a process .
- *
- * @param processRequest process reference info (name)
- * @return true if the operation success
- */
- public boolean cancelProcessInstance(ProcessInstanceRef processRef);
-
-
- public void setProcessVariable(ProcessInstanceRef processRef,String variableName,Object value);
-
- public List<ProcessDefinitionRef> getProcessDefinitions(boolean onlyLatest);
-}
Copied: jbpm3/branches/tdiesler/modules/jpdl/ws/src/main/java/org/jbpm/command/ws2/JPDLWebServiceFacade.java (from rev 1570, jbpm3/trunk/modules/jpdl/ws/src/main/java/org/jbpm/command/ws2/JPDLWebServiceFacade.java)
===================================================================
--- jbpm3/branches/tdiesler/modules/jpdl/ws/src/main/java/org/jbpm/command/ws2/JPDLWebServiceFacade.java (rev 0)
+++ jbpm3/branches/tdiesler/modules/jpdl/ws/src/main/java/org/jbpm/command/ws2/JPDLWebServiceFacade.java 2008-07-24 11:40:18 UTC (rev 1704)
@@ -0,0 +1,67 @@
+/*
+ * 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.jbpm.command.ws2;
+
+import java.util.List;
+
+/**
+ * JPDL web service interface
+ *
+ * @author Heiko.Braun(a)jboss.com
+ * @author Salaboy21 (mailto:salaboy@gmail.com)
+ */
+
+
+public interface JPDLWebServiceFacade
+{
+ /**
+ * Creates a new process instance and return the initla token.
+ * If it should be started the default transition is used.
+ *
+ * @param processRequest process reference info
+ * @return a token reference
+ */
+ // TokenRef newProcessInstance(ProcessRequest processRequest);
+
+ ProcessInstanceRef newProcessInstance(ProcessRequest processRequest);
+
+ /**
+ * Signals a token to proceed with (an optional) transition.
+ *
+ * @param signalRequest
+ * @return a token reference
+ */
+ TokenRef signal(SignalRequest signalRequest);
+
+ /**
+ * Cancel a process .
+ *
+ * @param processRequest process reference info (name)
+ * @return true if the operation success
+ */
+ public boolean cancelProcessInstance(ProcessInstanceRef processRef);
+
+
+ public void setProcessVariable(ProcessInstanceRef processRef,String variableName,Object value);
+
+ public List<ProcessDefinitionRef> getProcessDefinitions(boolean onlyLatest);
+}
Deleted: jbpm3/branches/tdiesler/modules/jpdl/ws/src/main/java/org/jbpm/command/ws2/JPDLWebServiceImpl.java
===================================================================
--- jbpm3/trunk/modules/jpdl/ws/src/main/java/org/jbpm/command/ws2/JPDLWebServiceImpl.java 2008-07-10 12:13:06 UTC (rev 1570)
+++ jbpm3/branches/tdiesler/modules/jpdl/ws/src/main/java/org/jbpm/command/ws2/JPDLWebServiceImpl.java 2008-07-24 11:40:18 UTC (rev 1704)
@@ -1,206 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jbpm.command.ws2;
-
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-import javax.jws.WebMethod;
-import javax.jws.WebService;
-import javax.jws.soap.SOAPBinding;
-
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.jbpm.JbpmConfiguration;
-import org.jbpm.JbpmContext;
-import org.jbpm.JbpmException;
-import org.jbpm.command.CancelProcessInstanceCommand;
-import org.jbpm.command.Command;
-import org.jbpm.command.GetProcessDefinitionsCommand;
-import org.jbpm.command.GetProcessInstancesCommand;
-import org.jbpm.command.NewProcessInstanceCommand;
-import org.jbpm.command.SignalCommand;
-import org.jbpm.command.StartProcessInstanceCommand;
-import org.jbpm.command.VariablesCommand;
-import org.jbpm.graph.def.ProcessDefinition;
-import org.jbpm.graph.exe.ProcessInstance;
-import org.jbpm.graph.exe.Token;
-import org.w3c.dom.Element;
-
-
-/**
- * Web service frontend to the command facade
- *
- * @author Heiko.Braun(a)jboss.com
- */
-@WebService()
-//@SOAPBinding(parameterStyle = SOAPBinding.ParameterStyle.BARE)
-public class JPDLWebServiceImpl implements JPDLWebServiceFacade
-{
- private static Log log = LogFactory.getLog(JPDLWebServiceImpl.class);
-
-
-
- @WebMethod()
- public ProcessInstanceRef newProcessInstance(ProcessRequest processRequest)
- {
- log.debug("New process " + processRequest.getProcessDefinitionName());
-
- // we either start it immediatley or just create the process instance
- NewProcessInstanceCommand cmd = processRequest.isStart() ?
- new StartProcessInstanceCommand() : new NewProcessInstanceCommand();
- cmd.setProcessName( processRequest.getProcessDefinitionName() );
- //I must be able to add the version of the process definition that i want... Salaboy
- Object result = executeCommand(cmd);
- ProcessInstanceRef processRef=new ProcessInstanceRef((ProcessInstance)result);
-
- return processRef;
- }
-
-
-
- @WebMethod()
- public TokenRef signal(SignalRequest signalRequest)
- {
- log.debug("Signal token " + signalRequest.getTokenId());
-
- SignalCommand cmd = new SignalCommand(
- signalRequest.getTokenId(),
- signalRequest.getTransitionName()
- );
-
- // Associate process variables
- addProcessVariables(cmd, signalRequest);
-
- Token token = (Token)executeCommand(cmd);
-
- return new TokenRef(token);
-
- }
- @SuppressWarnings("unchecked")
- @WebMethod()
- public List<ProcessDefinitionRef> getProcessDefinitions(boolean onlyLatest) {
- GetProcessDefinitionsCommand cmd=new GetProcessDefinitionsCommand();
- cmd.setOnlyLatest(onlyLatest);
-
- List<ProcessDefinition> processDefs=(List<ProcessDefinition>) executeCommand(cmd);
- List<ProcessDefinitionRef> result=new ArrayList<ProcessDefinitionRef>();
- for (ProcessDefinition processDefinition : processDefs) {
- result.add(new ProcessDefinitionRef(processDefinition.getName(),processDefinition.getVersion()));
- }
- return result;
-
- }
-
-
- @SuppressWarnings("unchecked")
- @WebMethod()
- public List<ProcessInstanceRef> getProcessInstances(ProcessDefinitionRef processDefinitionRef) {
- GetProcessInstancesCommand cmd=new GetProcessInstancesCommand();
- cmd.setProcessName(processDefinitionRef.getProcessDefinitionName());
-
-
- List<ProcessInstance> processInstances=(List<ProcessInstance>) executeCommand(cmd);
- List<ProcessInstanceRef> result=new ArrayList<ProcessInstanceRef>();
- for (ProcessInstance processInstance : processInstances) {
- result.add(new ProcessInstanceRef(processInstance.getId(),
- processInstance.getProcessDefinition().getName(),
- processInstance.getProcessDefinition().getVersion(),
- processInstance.getRootToken().getId(),
- processInstance.getRootToken().getNode().getName()));
- }
- return result;
-
- }
-
-
- @WebMethod()
- public boolean cancelProcessInstance(ProcessInstanceRef processInstanceRef){
- CancelProcessInstanceCommand cmd=new CancelProcessInstanceCommand();
- cmd.setProcessId(processInstanceRef.getProcessInstanceId());
-
- executeCommand(cmd);
-
- return true;
-
- }
-
- //REVIEW!!!!!! AND TEST!!!! NOT FINISHED!!!
- @WebMethod()
- public void setProcessVariable(ProcessInstanceRef processRef,String variableName,Object value){
- VariablesCommand cmd=new VariablesCommand();
- Map<String,Object> variables=new HashMap<String,Object>();
- variables.put(variableName, value);
- cmd.setVariables(variables);
- executeCommand(cmd);
- }
-
-
-
-
- private void addProcessVariables(SignalCommand cmd, SignalRequest signalRequest)
- {
- if(signalRequest.getAny()!=null && !signalRequest.getAny().isEmpty())
- {
- Map vars = new HashMap( signalRequest.getAny().size() );
- cmd.setVariables(vars);
-
- for(Element el : signalRequest.getAny() )
- {
- String name = el.getNodeName();
- String value = el.getTextContent(); // TODO: type conversion
-
- cmd.getVariables().put( name, value );
- }
- }
- }
-
- private Object executeCommand(Command command)
- {
- JbpmConfiguration jbpmConfiguration = JbpmConfiguration.getInstance();
- Object result = null;
- JbpmContext jbpmContext = jbpmConfiguration.createJbpmContext();
- try
- {
- log.debug("Executing " + command);
- result = command.execute(jbpmContext);
- }
- catch (Exception e)
- {
- throw new JbpmException(
- "Failed to execute '" + command + "': " + e.getMessage(), e
- );
- }
- finally
- {
- jbpmContext.close();
- }
-
- return result;
- }
-
-
-
-
-}
Copied: jbpm3/branches/tdiesler/modules/jpdl/ws/src/main/java/org/jbpm/command/ws2/JPDLWebServiceImpl.java (from rev 1570, jbpm3/trunk/modules/jpdl/ws/src/main/java/org/jbpm/command/ws2/JPDLWebServiceImpl.java)
===================================================================
--- jbpm3/branches/tdiesler/modules/jpdl/ws/src/main/java/org/jbpm/command/ws2/JPDLWebServiceImpl.java (rev 0)
+++ jbpm3/branches/tdiesler/modules/jpdl/ws/src/main/java/org/jbpm/command/ws2/JPDLWebServiceImpl.java 2008-07-24 11:40:18 UTC (rev 1704)
@@ -0,0 +1,206 @@
+/*
+ * 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.jbpm.command.ws2;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import javax.jws.WebMethod;
+import javax.jws.WebService;
+import javax.jws.soap.SOAPBinding;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.jbpm.JbpmConfiguration;
+import org.jbpm.JbpmContext;
+import org.jbpm.JbpmException;
+import org.jbpm.command.CancelProcessInstanceCommand;
+import org.jbpm.command.Command;
+import org.jbpm.command.GetProcessDefinitionsCommand;
+import org.jbpm.command.GetProcessInstancesCommand;
+import org.jbpm.command.NewProcessInstanceCommand;
+import org.jbpm.command.SignalCommand;
+import org.jbpm.command.StartProcessInstanceCommand;
+import org.jbpm.command.VariablesCommand;
+import org.jbpm.graph.def.ProcessDefinition;
+import org.jbpm.graph.exe.ProcessInstance;
+import org.jbpm.graph.exe.Token;
+import org.w3c.dom.Element;
+
+
+/**
+ * Web service frontend to the command facade
+ *
+ * @author Heiko.Braun(a)jboss.com
+ */
+@WebService()
+//@SOAPBinding(parameterStyle = SOAPBinding.ParameterStyle.BARE)
+public class JPDLWebServiceImpl implements JPDLWebServiceFacade
+{
+ private static Log log = LogFactory.getLog(JPDLWebServiceImpl.class);
+
+
+
+ @WebMethod()
+ public ProcessInstanceRef newProcessInstance(ProcessRequest processRequest)
+ {
+ log.debug("New process " + processRequest.getProcessDefinitionName());
+
+ // we either start it immediatley or just create the process instance
+ NewProcessInstanceCommand cmd = processRequest.isStart() ?
+ new StartProcessInstanceCommand() : new NewProcessInstanceCommand();
+ cmd.setProcessName( processRequest.getProcessDefinitionName() );
+ //I must be able to add the version of the process definition that i want... Salaboy
+ Object result = executeCommand(cmd);
+ ProcessInstanceRef processRef=new ProcessInstanceRef((ProcessInstance)result);
+
+ return processRef;
+ }
+
+
+
+ @WebMethod()
+ public TokenRef signal(SignalRequest signalRequest)
+ {
+ log.debug("Signal token " + signalRequest.getTokenId());
+
+ SignalCommand cmd = new SignalCommand(
+ signalRequest.getTokenId(),
+ signalRequest.getTransitionName()
+ );
+
+ // Associate process variables
+ addProcessVariables(cmd, signalRequest);
+
+ Token token = (Token)executeCommand(cmd);
+
+ return new TokenRef(token);
+
+ }
+ @SuppressWarnings("unchecked")
+ @WebMethod()
+ public List<ProcessDefinitionRef> getProcessDefinitions(boolean onlyLatest) {
+ GetProcessDefinitionsCommand cmd=new GetProcessDefinitionsCommand();
+ cmd.setOnlyLatest(onlyLatest);
+
+ List<ProcessDefinition> processDefs=(List<ProcessDefinition>) executeCommand(cmd);
+ List<ProcessDefinitionRef> result=new ArrayList<ProcessDefinitionRef>();
+ for (ProcessDefinition processDefinition : processDefs) {
+ result.add(new ProcessDefinitionRef(processDefinition.getName(),processDefinition.getVersion()));
+ }
+ return result;
+
+ }
+
+
+ @SuppressWarnings("unchecked")
+ @WebMethod()
+ public List<ProcessInstanceRef> getProcessInstances(ProcessDefinitionRef processDefinitionRef) {
+ GetProcessInstancesCommand cmd=new GetProcessInstancesCommand();
+ cmd.setProcessName(processDefinitionRef.getProcessDefinitionName());
+
+
+ List<ProcessInstance> processInstances=(List<ProcessInstance>) executeCommand(cmd);
+ List<ProcessInstanceRef> result=new ArrayList<ProcessInstanceRef>();
+ for (ProcessInstance processInstance : processInstances) {
+ result.add(new ProcessInstanceRef(processInstance.getId(),
+ processInstance.getProcessDefinition().getName(),
+ processInstance.getProcessDefinition().getVersion(),
+ processInstance.getRootToken().getId(),
+ processInstance.getRootToken().getNode().getName()));
+ }
+ return result;
+
+ }
+
+
+ @WebMethod()
+ public boolean cancelProcessInstance(ProcessInstanceRef processInstanceRef){
+ CancelProcessInstanceCommand cmd=new CancelProcessInstanceCommand();
+ cmd.setProcessId(processInstanceRef.getProcessInstanceId());
+
+ executeCommand(cmd);
+
+ return true;
+
+ }
+
+ //REVIEW!!!!!! AND TEST!!!! NOT FINISHED!!!
+ @WebMethod()
+ public void setProcessVariable(ProcessInstanceRef processRef,String variableName,Object value){
+ VariablesCommand cmd=new VariablesCommand();
+ Map<String,Object> variables=new HashMap<String,Object>();
+ variables.put(variableName, value);
+ cmd.setVariables(variables);
+ executeCommand(cmd);
+ }
+
+
+
+
+ private void addProcessVariables(SignalCommand cmd, SignalRequest signalRequest)
+ {
+ if(signalRequest.getAny()!=null && !signalRequest.getAny().isEmpty())
+ {
+ Map vars = new HashMap( signalRequest.getAny().size() );
+ cmd.setVariables(vars);
+
+ for(Element el : signalRequest.getAny() )
+ {
+ String name = el.getNodeName();
+ String value = el.getTextContent(); // TODO: type conversion
+
+ cmd.getVariables().put( name, value );
+ }
+ }
+ }
+
+ private Object executeCommand(Command command)
+ {
+ JbpmConfiguration jbpmConfiguration = JbpmConfiguration.getInstance();
+ Object result = null;
+ JbpmContext jbpmContext = jbpmConfiguration.createJbpmContext();
+ try
+ {
+ log.debug("Executing " + command);
+ result = command.execute(jbpmContext);
+ }
+ catch (Exception e)
+ {
+ throw new JbpmException(
+ "Failed to execute '" + command + "': " + e.getMessage(), e
+ );
+ }
+ finally
+ {
+ jbpmContext.close();
+ }
+
+ return result;
+ }
+
+
+
+
+}
Deleted: jbpm3/branches/tdiesler/modules/jpdl/ws/src/main/java/org/jbpm/command/ws2/ProcessDefinitionRef.java
===================================================================
--- jbpm3/trunk/modules/jpdl/ws/src/main/java/org/jbpm/command/ws2/ProcessDefinitionRef.java 2008-07-10 12:13:06 UTC (rev 1570)
+++ jbpm3/branches/tdiesler/modules/jpdl/ws/src/main/java/org/jbpm/command/ws2/ProcessDefinitionRef.java 2008-07-24 11:40:18 UTC (rev 1704)
@@ -1,87 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jbpm.command.ws2;
-
-import org.jbpm.graph.def.ProcessDefinition;
-import org.jbpm.graph.exe.Token;
-
-import javax.xml.bind.annotation.XmlType;
-
-/**
- * Reference info about a token
- *
- * @author Heiko.Braun(a)jboss.com
- * @author Salaboy21 (mailto:salaboy@gmail.com)
- *
- */
-
-@XmlType(
- name = "processDefinitionReference",
- namespace = "http://jbpm.org/jpdl/ws/01/2008/"
-)
-public class ProcessDefinitionRef
-{
- String processDefinitionName;
- long processVersion;
-
-
- public ProcessDefinitionRef()
- {
- }
-
- public ProcessDefinitionRef(String processDefinitionName, long processVersion)
- {
- this.processDefinitionName = processDefinitionName;
- this.processVersion = processVersion;
-
- }
-
- public ProcessDefinitionRef(ProcessDefinition processDefinition)
- {
- this(
- processDefinition.getName(),
- processDefinition.getId()
-
- );
- }
-
- public String getProcessDefinitionName() {
- return processDefinitionName;
- }
-
- public void setProcessDefinitionName(String processDefinitionName) {
- this.processDefinitionName = processDefinitionName;
- }
-
- public long getProcessVersion() {
- return processVersion;
- }
-
- public void setProcessVersion(long processVersion) {
- this.processVersion = processVersion;
- }
-
-
-
-
-
-}
Copied: jbpm3/branches/tdiesler/modules/jpdl/ws/src/main/java/org/jbpm/command/ws2/ProcessDefinitionRef.java (from rev 1570, jbpm3/trunk/modules/jpdl/ws/src/main/java/org/jbpm/command/ws2/ProcessDefinitionRef.java)
===================================================================
--- jbpm3/branches/tdiesler/modules/jpdl/ws/src/main/java/org/jbpm/command/ws2/ProcessDefinitionRef.java (rev 0)
+++ jbpm3/branches/tdiesler/modules/jpdl/ws/src/main/java/org/jbpm/command/ws2/ProcessDefinitionRef.java 2008-07-24 11:40:18 UTC (rev 1704)
@@ -0,0 +1,87 @@
+/*
+ * 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.jbpm.command.ws2;
+
+import org.jbpm.graph.def.ProcessDefinition;
+import org.jbpm.graph.exe.Token;
+
+import javax.xml.bind.annotation.XmlType;
+
+/**
+ * Reference info about a token
+ *
+ * @author Heiko.Braun(a)jboss.com
+ * @author Salaboy21 (mailto:salaboy@gmail.com)
+ *
+ */
+
+@XmlType(
+ name = "processDefinitionReference",
+ namespace = "http://jbpm.org/jpdl/ws/01/2008/"
+)
+public class ProcessDefinitionRef
+{
+ String processDefinitionName;
+ long processVersion;
+
+
+ public ProcessDefinitionRef()
+ {
+ }
+
+ public ProcessDefinitionRef(String processDefinitionName, long processVersion)
+ {
+ this.processDefinitionName = processDefinitionName;
+ this.processVersion = processVersion;
+
+ }
+
+ public ProcessDefinitionRef(ProcessDefinition processDefinition)
+ {
+ this(
+ processDefinition.getName(),
+ processDefinition.getId()
+
+ );
+ }
+
+ public String getProcessDefinitionName() {
+ return processDefinitionName;
+ }
+
+ public void setProcessDefinitionName(String processDefinitionName) {
+ this.processDefinitionName = processDefinitionName;
+ }
+
+ public long getProcessVersion() {
+ return processVersion;
+ }
+
+ public void setProcessVersion(long processVersion) {
+ this.processVersion = processVersion;
+ }
+
+
+
+
+
+}
Deleted: jbpm3/branches/tdiesler/modules/jpdl/ws/src/main/java/org/jbpm/command/ws2/ProcessInstanceRef.java
===================================================================
--- jbpm3/trunk/modules/jpdl/ws/src/main/java/org/jbpm/command/ws2/ProcessInstanceRef.java 2008-07-10 12:13:06 UTC (rev 1570)
+++ jbpm3/branches/tdiesler/modules/jpdl/ws/src/main/java/org/jbpm/command/ws2/ProcessInstanceRef.java 2008-07-24 11:40:18 UTC (rev 1704)
@@ -1,100 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jbpm.command.ws2;
-
-import org.jbpm.graph.exe.Token;
-
-import javax.xml.bind.annotation.XmlType;
-
-/**
- * Reference info about a token
- *
- * @author Heiko.Braun(a)jboss.com
- * @author Salaboy21 (mailto:salaboy@gmail.com)
- */
-@XmlType(
- name = "processInstanceReference",
- namespace = "http://jbpm.org/jpdl/ws/01/2008/"
-)
-public class ProcessInstanceRef
-{
-
- long processInstanceId;
-
- ProcessDefinitionRef processDefinition;
- TokenRef token;
-
- public ProcessInstanceRef()
- {
- }
-
- public ProcessInstanceRef(long processInstanceId, String processDefinitionName,long processVersion,long tokenId,String nodeName)
- {
-
- this.processInstanceId = processInstanceId;
- this.processDefinition = new ProcessDefinitionRef(processDefinitionName,processVersion);
- this.token = new TokenRef(tokenId,nodeName);
- }
-
- public ProcessInstanceRef(org.jbpm.graph.exe.ProcessInstance processInstance)
- {
- this(
- processInstance.getId(),
- processInstance.getProcessDefinition().getName(),
- processInstance.getVersion(),
- processInstance.getRootToken().getId(),
- processInstance.getRootToken().getNode().getName()
-
- );
- }
-
-
-
- public long getProcessInstanceId()
- {
- return processInstanceId;
- }
-
- public void setProcessInstanceId(long processInstanceId)
- {
- this.processInstanceId = processInstanceId;
- }
-
-
- public TokenRef getToken() {
- return token;
- }
-
- public void setToken(TokenRef token) {
- this.token = token;
- }
-
- public ProcessDefinitionRef getProcessDefinition() {
- return processDefinition;
- }
-
- public void setProcessDefinition(ProcessDefinitionRef processDefinition) {
- this.processDefinition = processDefinition;
- }
-
-
-}
Copied: jbpm3/branches/tdiesler/modules/jpdl/ws/src/main/java/org/jbpm/command/ws2/ProcessInstanceRef.java (from rev 1570, jbpm3/trunk/modules/jpdl/ws/src/main/java/org/jbpm/command/ws2/ProcessInstanceRef.java)
===================================================================
--- jbpm3/branches/tdiesler/modules/jpdl/ws/src/main/java/org/jbpm/command/ws2/ProcessInstanceRef.java (rev 0)
+++ jbpm3/branches/tdiesler/modules/jpdl/ws/src/main/java/org/jbpm/command/ws2/ProcessInstanceRef.java 2008-07-24 11:40:18 UTC (rev 1704)
@@ -0,0 +1,100 @@
+/*
+ * 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.jbpm.command.ws2;
+
+import org.jbpm.graph.exe.Token;
+
+import javax.xml.bind.annotation.XmlType;
+
+/**
+ * Reference info about a token
+ *
+ * @author Heiko.Braun(a)jboss.com
+ * @author Salaboy21 (mailto:salaboy@gmail.com)
+ */
+@XmlType(
+ name = "processInstanceReference",
+ namespace = "http://jbpm.org/jpdl/ws/01/2008/"
+)
+public class ProcessInstanceRef
+{
+
+ long processInstanceId;
+
+ ProcessDefinitionRef processDefinition;
+ TokenRef token;
+
+ public ProcessInstanceRef()
+ {
+ }
+
+ public ProcessInstanceRef(long processInstanceId, String processDefinitionName,long processVersion,long tokenId,String nodeName)
+ {
+
+ this.processInstanceId = processInstanceId;
+ this.processDefinition = new ProcessDefinitionRef(processDefinitionName,processVersion);
+ this.token = new TokenRef(tokenId,nodeName);
+ }
+
+ public ProcessInstanceRef(org.jbpm.graph.exe.ProcessInstance processInstance)
+ {
+ this(
+ processInstance.getId(),
+ processInstance.getProcessDefinition().getName(),
+ processInstance.getVersion(),
+ processInstance.getRootToken().getId(),
+ processInstance.getRootToken().getNode().getName()
+
+ );
+ }
+
+
+
+ public long getProcessInstanceId()
+ {
+ return processInstanceId;
+ }
+
+ public void setProcessInstanceId(long processInstanceId)
+ {
+ this.processInstanceId = processInstanceId;
+ }
+
+
+ public TokenRef getToken() {
+ return token;
+ }
+
+ public void setToken(TokenRef token) {
+ this.token = token;
+ }
+
+ public ProcessDefinitionRef getProcessDefinition() {
+ return processDefinition;
+ }
+
+ public void setProcessDefinition(ProcessDefinitionRef processDefinition) {
+ this.processDefinition = processDefinition;
+ }
+
+
+}
Deleted: jbpm3/branches/tdiesler/modules/jpdl/ws/src/main/java/org/jbpm/command/ws2/ProcessRequest.java
===================================================================
--- jbpm3/trunk/modules/jpdl/ws/src/main/java/org/jbpm/command/ws2/ProcessRequest.java 2008-07-10 12:13:06 UTC (rev 1570)
+++ jbpm3/branches/tdiesler/modules/jpdl/ws/src/main/java/org/jbpm/command/ws2/ProcessRequest.java 2008-07-24 11:40:18 UTC (rev 1704)
@@ -1,84 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jbpm.command.ws2;
-
-import javax.xml.bind.annotation.XmlAttribute;
-import javax.xml.bind.annotation.XmlElement;
-import javax.xml.bind.annotation.XmlType;
-
-/**
- * All that you need about a Process
- *
- * @author Salaboy21 (mailto:salaboy@gmail.com)
- *
- */
-
-@XmlType(
- name = "processRequest",
- namespace = "http://jbpm.org/jpdl/ws/01/2008/"
-)
-public class ProcessRequest
-{
- private String processDefinitionName;
- private long version;
- private boolean start;
-
- public ProcessRequest()
- {
- }
-
- public ProcessRequest(String processDefinitionName, boolean start)
- {
- this.processDefinitionName = processDefinitionName;
- this.start = start;
- }
-
- @XmlElement(required = true)
- public String getProcessDefinitionName()
- {
- return processDefinitionName;
- }
-
- public void setProcessDefinitionName(String processDefinitionName)
- {
- this.processDefinitionName = processDefinitionName;
- }
-
- @XmlAttribute(name = "start", required = false)
- public boolean isStart()
- {
- return start;
- }
-
- public void setStart(boolean start)
- {
- this.start = start;
- }
-
- public long getVersion() {
- return version;
- }
-
- public void setVersion(long version) {
- this.version = version;
- }
-}
Copied: jbpm3/branches/tdiesler/modules/jpdl/ws/src/main/java/org/jbpm/command/ws2/ProcessRequest.java (from rev 1570, jbpm3/trunk/modules/jpdl/ws/src/main/java/org/jbpm/command/ws2/ProcessRequest.java)
===================================================================
--- jbpm3/branches/tdiesler/modules/jpdl/ws/src/main/java/org/jbpm/command/ws2/ProcessRequest.java (rev 0)
+++ jbpm3/branches/tdiesler/modules/jpdl/ws/src/main/java/org/jbpm/command/ws2/ProcessRequest.java 2008-07-24 11:40:18 UTC (rev 1704)
@@ -0,0 +1,84 @@
+/*
+ * 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.jbpm.command.ws2;
+
+import javax.xml.bind.annotation.XmlAttribute;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlType;
+
+/**
+ * All that you need about a Process
+ *
+ * @author Salaboy21 (mailto:salaboy@gmail.com)
+ *
+ */
+
+@XmlType(
+ name = "processRequest",
+ namespace = "http://jbpm.org/jpdl/ws/01/2008/"
+)
+public class ProcessRequest
+{
+ private String processDefinitionName;
+ private long version;
+ private boolean start;
+
+ public ProcessRequest()
+ {
+ }
+
+ public ProcessRequest(String processDefinitionName, boolean start)
+ {
+ this.processDefinitionName = processDefinitionName;
+ this.start = start;
+ }
+
+ @XmlElement(required = true)
+ public String getProcessDefinitionName()
+ {
+ return processDefinitionName;
+ }
+
+ public void setProcessDefinitionName(String processDefinitionName)
+ {
+ this.processDefinitionName = processDefinitionName;
+ }
+
+ @XmlAttribute(name = "start", required = false)
+ public boolean isStart()
+ {
+ return start;
+ }
+
+ public void setStart(boolean start)
+ {
+ this.start = start;
+ }
+
+ public long getVersion() {
+ return version;
+ }
+
+ public void setVersion(long version) {
+ this.version = version;
+ }
+}
Deleted: jbpm3/branches/tdiesler/modules/jpdl/ws/src/main/java/org/jbpm/command/ws2/SignalRequest.java
===================================================================
--- jbpm3/trunk/modules/jpdl/ws/src/main/java/org/jbpm/command/ws2/SignalRequest.java 2008-07-10 12:13:06 UTC (rev 1570)
+++ jbpm3/branches/tdiesler/modules/jpdl/ws/src/main/java/org/jbpm/command/ws2/SignalRequest.java 2008-07-24 11:40:18 UTC (rev 1704)
@@ -1,92 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jbpm.command.ws2;
-
-/**
- * All that you need to make a signal
- *
- *
- * @author Salaboy21 (mailto:salaboy@gmail.com)
- *
- */
-import org.w3c.dom.Element;
-
-import javax.xml.bind.annotation.XmlAttribute;
-import javax.xml.bind.annotation.XmlElement;
-import javax.xml.bind.annotation.XmlType;
-import javax.xml.bind.annotation.XmlAnyElement;
-import java.util.List;
-
-@XmlType
- (
- name = "signalRequest",
- namespace = "http://jbpm.org/jpdl/ws/01/2008/"
-)
-public class SignalRequest
-{
- private long tokenId;
- private String transitionName;
- private List<Element> any;
-
- public SignalRequest()
- {
- }
-
- public SignalRequest(long tokenId, String transitionName)
- {
- this.tokenId = tokenId;
- this.transitionName = transitionName;
- }
-
- @XmlAttribute(required = true)
- public long getTokenId()
- {
- return tokenId;
- }
-
- public void setTokenId(long tokenId)
- {
- this.tokenId = tokenId;
- }
-
- @XmlElement(required = false)
- public String getTransitionName()
- {
- return transitionName;
- }
-
- public void setTransitionName(String transitionName)
- {
- this.transitionName = transitionName;
- }
-
- @XmlAnyElement
- public List<Element> getAny()
- {
- return any;
- }
-
- public void setAny(List<Element> any)
- {
- this.any = any;
- }
-}
Copied: jbpm3/branches/tdiesler/modules/jpdl/ws/src/main/java/org/jbpm/command/ws2/SignalRequest.java (from rev 1570, jbpm3/trunk/modules/jpdl/ws/src/main/java/org/jbpm/command/ws2/SignalRequest.java)
===================================================================
--- jbpm3/branches/tdiesler/modules/jpdl/ws/src/main/java/org/jbpm/command/ws2/SignalRequest.java (rev 0)
+++ jbpm3/branches/tdiesler/modules/jpdl/ws/src/main/java/org/jbpm/command/ws2/SignalRequest.java 2008-07-24 11:40:18 UTC (rev 1704)
@@ -0,0 +1,92 @@
+/*
+ * 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.jbpm.command.ws2;
+
+/**
+ * All that you need to make a signal
+ *
+ *
+ * @author Salaboy21 (mailto:salaboy@gmail.com)
+ *
+ */
+import org.w3c.dom.Element;
+
+import javax.xml.bind.annotation.XmlAttribute;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlType;
+import javax.xml.bind.annotation.XmlAnyElement;
+import java.util.List;
+
+@XmlType
+ (
+ name = "signalRequest",
+ namespace = "http://jbpm.org/jpdl/ws/01/2008/"
+)
+public class SignalRequest
+{
+ private long tokenId;
+ private String transitionName;
+ private List<Element> any;
+
+ public SignalRequest()
+ {
+ }
+
+ public SignalRequest(long tokenId, String transitionName)
+ {
+ this.tokenId = tokenId;
+ this.transitionName = transitionName;
+ }
+
+ @XmlAttribute(required = true)
+ public long getTokenId()
+ {
+ return tokenId;
+ }
+
+ public void setTokenId(long tokenId)
+ {
+ this.tokenId = tokenId;
+ }
+
+ @XmlElement(required = false)
+ public String getTransitionName()
+ {
+ return transitionName;
+ }
+
+ public void setTransitionName(String transitionName)
+ {
+ this.transitionName = transitionName;
+ }
+
+ @XmlAnyElement
+ public List<Element> getAny()
+ {
+ return any;
+ }
+
+ public void setAny(List<Element> any)
+ {
+ this.any = any;
+ }
+}
Deleted: jbpm3/branches/tdiesler/modules/jpdl/ws/src/main/java/org/jbpm/command/ws2/TokenRef.java
===================================================================
--- jbpm3/trunk/modules/jpdl/ws/src/main/java/org/jbpm/command/ws2/TokenRef.java 2008-07-10 12:13:06 UTC (rev 1570)
+++ jbpm3/branches/tdiesler/modules/jpdl/ws/src/main/java/org/jbpm/command/ws2/TokenRef.java 2008-07-24 11:40:18 UTC (rev 1704)
@@ -1,87 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jbpm.command.ws2;
-
-import org.jbpm.graph.exe.Token;
-
-import javax.xml.bind.annotation.XmlType;
-
-/**
- * Reference info about a token
- *
- * @author Heiko.Braun(a)jboss.com
- * @author Salaboy21 (mailto:salaboy@gmail.com)
- *
- */
-@XmlType(
- name = "tokenReference",
- namespace = "http://jbpm.org/jpdl/ws/01/2008/"
-)
-public class TokenRef
-{
- long tokenId;
- String nodeName;
-
-
- public TokenRef()
- {
- }
-
- public TokenRef(long tokenId, String nodeName)
- {
- this.tokenId = tokenId;
- this.nodeName = nodeName;
-
- }
-
- public TokenRef(Token token)
- {
- this(
- token.getId(),
- token.getNode().getName()
-
- );
- }
-
-
- public long getTokenId()
- {
- return tokenId;
- }
-
- public void setTokenId(long tokenId)
- {
- this.tokenId = tokenId;
- }
-
- public String getNodeName()
- {
- return nodeName;
- }
-
- public void setNodeName(String nodeName)
- {
- this.nodeName = nodeName;
- }
-
-
-}
Copied: jbpm3/branches/tdiesler/modules/jpdl/ws/src/main/java/org/jbpm/command/ws2/TokenRef.java (from rev 1570, jbpm3/trunk/modules/jpdl/ws/src/main/java/org/jbpm/command/ws2/TokenRef.java)
===================================================================
--- jbpm3/branches/tdiesler/modules/jpdl/ws/src/main/java/org/jbpm/command/ws2/TokenRef.java (rev 0)
+++ jbpm3/branches/tdiesler/modules/jpdl/ws/src/main/java/org/jbpm/command/ws2/TokenRef.java 2008-07-24 11:40:18 UTC (rev 1704)
@@ -0,0 +1,87 @@
+/*
+ * 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.jbpm.command.ws2;
+
+import org.jbpm.graph.exe.Token;
+
+import javax.xml.bind.annotation.XmlType;
+
+/**
+ * Reference info about a token
+ *
+ * @author Heiko.Braun(a)jboss.com
+ * @author Salaboy21 (mailto:salaboy@gmail.com)
+ *
+ */
+@XmlType(
+ name = "tokenReference",
+ namespace = "http://jbpm.org/jpdl/ws/01/2008/"
+)
+public class TokenRef
+{
+ long tokenId;
+ String nodeName;
+
+
+ public TokenRef()
+ {
+ }
+
+ public TokenRef(long tokenId, String nodeName)
+ {
+ this.tokenId = tokenId;
+ this.nodeName = nodeName;
+
+ }
+
+ public TokenRef(Token token)
+ {
+ this(
+ token.getId(),
+ token.getNode().getName()
+
+ );
+ }
+
+
+ public long getTokenId()
+ {
+ return tokenId;
+ }
+
+ public void setTokenId(long tokenId)
+ {
+ this.tokenId = tokenId;
+ }
+
+ public String getNodeName()
+ {
+ return nodeName;
+ }
+
+ public void setNodeName(String nodeName)
+ {
+ this.nodeName = nodeName;
+ }
+
+
+}
Modified: jbpm3/branches/tdiesler/pom.xml
===================================================================
--- jbpm3/branches/tdiesler/pom.xml 2008-07-24 11:31:32 UTC (rev 1703)
+++ jbpm3/branches/tdiesler/pom.xml 2008-07-24 11:40:18 UTC (rev 1704)
@@ -10,16 +10,12 @@
<!-- ====================================================================== -->
<!-- $Id: pom.xml 7412 2008-06-06 13:42:30Z thomas.diesler(a)jboss.com $ -->
-
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
-
<name>JBoss jBPM</name>
<groupId>org.jboss.jbpm</groupId>
<artifactId>jbpm</artifactId>
<packaging>pom</packaging>
-
<version>3.2.4-SNAPSHOT</version>
<!-- Parent -->
@@ -41,7 +37,6 @@
<!-- Properties -->
<properties>
<jboss.jbpm.api.version>1.0.0-SNAPSHOT</jboss.jbpm.api.version>
-
<apache.ant.version>1.7.0</apache.ant.version>
<apache.cactus.version>1.8.0</apache.cactus.version>
<apache.jackrabbit.version>1.4.5</apache.jackrabbit.version>
@@ -338,6 +333,12 @@
<plugin>
<artifactId>maven-javadoc-plugin</artifactId>
</plugin>
+ <plugin>
+ <artifactId>maven-surefire-plugin</artifactId>
+ <configuration>
+ <testFailureIgnore>true</testFailureIgnore>
+ </configuration>
+ </plugin>
</plugins>
</build>
@@ -391,5 +392,4 @@
</build>
</profile>
</profiles>
-
</project>
\ No newline at end of file
15 years, 11 months
JBoss JBPM SVN: r1703 - in jbpm3/branches/tdiesler/modules/jpdl: core/src/main/java/org/jbpm/db and 9 other directories.
by do-not-reply@jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2008-07-24 07:31:32 -0400 (Thu, 24 Jul 2008)
New Revision: 1703
Added:
jbpm3/branches/tdiesler/modules/jpdl/core/src/test/java/org/jbpm/job/executor/TimerOnTimerDbTest.java
jbpm3/branches/tdiesler/modules/jpdl/core/src/test/resources/org/jbpm/job/executor/timerOnTimer.jpdl.xml
Removed:
jbpm3/branches/tdiesler/modules/jpdl/integration/
Modified:
jbpm3/branches/tdiesler/modules/jpdl/core/src/main/java/org/jbpm/db/JobSession.java
jbpm3/branches/tdiesler/modules/jpdl/core/src/main/java/org/jbpm/job/ExecuteActionJob.java
jbpm3/branches/tdiesler/modules/jpdl/core/src/main/java/org/jbpm/job/ExecuteNodeJob.java
jbpm3/branches/tdiesler/modules/jpdl/core/src/main/java/org/jbpm/job/Timer.java
jbpm3/branches/tdiesler/modules/jpdl/core/src/main/java/org/jbpm/job/executor/JobExecutorThread.java
jbpm3/branches/tdiesler/modules/jpdl/core/src/main/java/org/jbpm/msg/db/DbMessageService.java
jbpm3/branches/tdiesler/modules/jpdl/core/src/main/java/org/jbpm/scheduler/db/DbSchedulerService.java
jbpm3/branches/tdiesler/modules/jpdl/core/src/main/java/org/jbpm/svc/Services.java
jbpm3/branches/tdiesler/modules/jpdl/core/src/main/resources/org/jbpm/db/hibernate.queries.hbm.xml
jbpm3/branches/tdiesler/modules/jpdl/core/src/test/resources/log4j.xml
jbpm3/branches/tdiesler/modules/jpdl/pom.xml
Log:
Rollback to -r1492. Merge -r1552:1558
Modified: jbpm3/branches/tdiesler/modules/jpdl/core/src/main/java/org/jbpm/db/JobSession.java
===================================================================
--- jbpm3/branches/tdiesler/modules/jpdl/core/src/main/java/org/jbpm/db/JobSession.java 2008-07-24 11:06:45 UTC (rev 1702)
+++ jbpm3/branches/tdiesler/modules/jpdl/core/src/main/java/org/jbpm/db/JobSession.java 2008-07-24 11:31:32 UTC (rev 1703)
@@ -15,7 +15,6 @@
import org.jbpm.graph.def.Action;
import org.jbpm.graph.exe.ProcessInstance;
import org.jbpm.graph.exe.Token;
-import org.jbpm.job.ExecuteNodeJob;
import org.jbpm.job.Job;
import org.jbpm.job.Timer;
import org.jbpm.svc.save.SaveOperation;
@@ -194,30 +193,18 @@
return;
}
- // the bulk delete was replaced with a query and session.deletes on
- // the retrieved elements to prevent stale object exceptions.
- // With a bulk delete, the hibernate session is not aware and gives a problem
- // if a later session.delete doesn't return 1.
log.debug("deleting timers for process instance "+processInstance);
Session session = jbpmContext.getSession();
- Query query = session.getNamedQuery("JobSession.getTimersForProcessInstance");
+ Query query = session.getNamedQuery("JobSession.deleteTimersForProcessInstance");
query.setParameter("processInstance", processInstance);
- List timers = query.list();
- for (Iterator i = timers.iterator(); i.hasNext();) {
- Timer timer = (Timer) i.next();
- session.delete(timer);
- }
- log.debug(timers.size()+" remaining timers for '"+processInstance+"' were deleted");
+ int entityCount = query.executeUpdate();
+ log.debug(entityCount+" remaining timers for '"+processInstance+"' were deleted");
log.debug("deleting execute-node-jobs for process instance "+processInstance);
- query = session.getNamedQuery("JobSession.getExecuteNodeJobsForProcessInstance");
+ query = session.getNamedQuery("JobSession.deleteExecuteNodeJobsForProcessInstance");
query.setParameter("processInstance", processInstance);
- List jobs = query.list();
- for (Iterator i = jobs.iterator(); i.hasNext();) {
- ExecuteNodeJob job = (ExecuteNodeJob) i.next();
- session.delete(job);
- }
- log.debug(jobs.size()+" remaining execute-node-jobs for '"+processInstance+"' are deleted");
+ entityCount = query.executeUpdate();
+ log.debug(entityCount+" remaining execute-node-jobs for '"+processInstance+"' are deleted");
}
}
Modified: jbpm3/branches/tdiesler/modules/jpdl/core/src/main/java/org/jbpm/job/ExecuteActionJob.java
===================================================================
--- jbpm3/branches/tdiesler/modules/jpdl/core/src/main/java/org/jbpm/job/ExecuteActionJob.java 2008-07-24 11:06:45 UTC (rev 1702)
+++ jbpm3/branches/tdiesler/modules/jpdl/core/src/main/java/org/jbpm/job/ExecuteActionJob.java 2008-07-24 11:31:32 UTC (rev 1703)
@@ -34,7 +34,7 @@
action.execute(executionContext);
}
- jbpmContext.save(token);
+ jbpmContext.save(processInstance);
return true;
}
Modified: jbpm3/branches/tdiesler/modules/jpdl/core/src/main/java/org/jbpm/job/ExecuteNodeJob.java
===================================================================
--- jbpm3/branches/tdiesler/modules/jpdl/core/src/main/java/org/jbpm/job/ExecuteNodeJob.java 2008-07-24 11:06:45 UTC (rev 1702)
+++ jbpm3/branches/tdiesler/modules/jpdl/core/src/main/java/org/jbpm/job/ExecuteNodeJob.java 2008-07-24 11:31:32 UTC (rev 1703)
@@ -25,7 +25,7 @@
token.unlock(this.toString());
ExecutionContext executionContext = new ExecutionContext(token);
node.execute(executionContext);
- jbpmContext.save(token);
+ jbpmContext.save(processInstance);
return true;
}
Modified: jbpm3/branches/tdiesler/modules/jpdl/core/src/main/java/org/jbpm/job/Timer.java
===================================================================
--- jbpm3/branches/tdiesler/modules/jpdl/core/src/main/java/org/jbpm/job/Timer.java 2008-07-24 11:06:45 UTC (rev 1702)
+++ jbpm3/branches/tdiesler/modules/jpdl/core/src/main/java/org/jbpm/job/Timer.java 2008-07-24 11:31:32 UTC (rev 1703)
@@ -35,7 +35,10 @@
}
public boolean execute(JbpmContext jbpmContext) throws Exception {
- boolean deleteThisJob = true;
+ if (processInstance.hasEnded()) {
+ // happens when a repeating timer is blocked at the time the process instance ends
+ return true;
+ }
ExecutionContext executionContext = new ExecutionContext(token);
executionContext.setTimer(this);
@@ -52,7 +55,7 @@
// then execute the action if there is one
if (action!=null) {
try {
- log.debug("executing timer '"+this+"'");
+ log.debug("executing '"+this+"'");
if (graphElement!=null) {
graphElement.executeAction(action, executionContext);
} else {
@@ -61,28 +64,19 @@
} catch (Exception actionException) {
// NOTE that Error's are not caught because that might halt the JVM and mask the original Error.
log.warn("timer action threw exception", actionException);
-
- // we put the exception in t
- Exception t = actionException;
- try {
- // if there is a graphElement connected to this timer...
- if (graphElement != null) {
+ // if there is a graphElement connected to this timer...
+ if (graphElement != null) {
+ try {
// we give that graphElement a chance to catch the exception
graphElement.raiseException(actionException, executionContext);
log.debug("timer exception got handled by '"+graphElement+"'");
- t = null;
+ } catch (Exception handlerException) {
+ // if the exception handler rethrows or the original exception results in a DelegationException...
+ throw handlerException;
}
- } catch (Exception rethrowOrDelegationException) {
- // NOTE that Error's are not caught because that might halt the JVM and mask the original Error.
- // if the exception handler rethrows or the original exception results in a DelegationException...
- t = rethrowOrDelegationException;
+ } else {
+ throw actionException;
}
-
- if (t!=null) {
- // This is either the original exception wrapped as a delegation exception
- // or an exception that was throws from an exception handler
- throw t;
- }
}
}
@@ -100,20 +94,17 @@
// if repeat is specified, reschedule the job
if (repeat!=null) {
- deleteThisJob = false;
-
// suppose that it took the timer runner thread a
// very long time to execute the timers.
// then the repeat action dueDate could already have passed.
while (dueDate.getTime()<=System.currentTimeMillis()) {
- dueDate = businessCalendar
- .add(dueDate,
- new Duration(repeat));
+ dueDate = businessCalendar.add(dueDate, new Duration(repeat));
}
- log.debug("updated timer for repetition '"+this+"' in '"+(dueDate.getTime()-System.currentTimeMillis())+"' millis");
- }
+ log.debug("updated '"+this+"' for repetition on '"+formatDueDate(dueDate)+"'");
+ return false;
+ }
- return deleteThisJob;
+ return true;
}
public String toString() {
Modified: jbpm3/branches/tdiesler/modules/jpdl/core/src/main/java/org/jbpm/job/executor/JobExecutorThread.java
===================================================================
--- jbpm3/branches/tdiesler/modules/jpdl/core/src/main/java/org/jbpm/job/executor/JobExecutorThread.java 2008-07-24 11:06:45 UTC (rev 1702)
+++ jbpm3/branches/tdiesler/modules/jpdl/core/src/main/java/org/jbpm/job/executor/JobExecutorThread.java 2008-07-24 11:31:32 UTC (rev 1703)
@@ -2,7 +2,6 @@
import java.io.PrintWriter;
import java.io.StringWriter;
-import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
import java.util.Date;
@@ -19,6 +18,7 @@
import org.jbpm.job.Timer;
import org.jbpm.persistence.JbpmPersistenceException;
import org.jbpm.persistence.db.StaleObjectLogConfigurer;
+import org.jbpm.svc.Services;
public class JobExecutorThread extends Thread {
@@ -48,65 +48,59 @@
volatile boolean isActive = true;
public void run() {
- try {
- currentIdleInterval = idleInterval;
- while (isActive) {
- try {
- Collection acquiredJobs = acquireJobs();
+ currentIdleInterval = idleInterval;
+ while (isActive) {
+ try {
+ Collection acquiredJobs = acquireJobs();
- if (! acquiredJobs.isEmpty()) {
- Iterator iter = acquiredJobs.iterator();
- while (iter.hasNext() && isActive) {
- Job job = (Job) iter.next();
- executeJob(job);
- }
+ if (! acquiredJobs.isEmpty()) {
+ Iterator iter = acquiredJobs.iterator();
+ while (iter.hasNext() && isActive) {
+ Job job = (Job) iter.next();
+ executeJob(job);
+ }
- } else { // no jobs acquired
- if (isActive) {
- long waitPeriod = getWaitPeriod();
- if (waitPeriod>0) {
- synchronized(jobExecutor) {
- jobExecutor.wait(waitPeriod);
- }
+ } else { // no jobs acquired
+ if (isActive) {
+ long waitPeriod = getWaitPeriod();
+ if (waitPeriod>0) {
+ synchronized(jobExecutor) {
+ jobExecutor.wait(waitPeriod);
}
}
}
-
- // no exception so resetting the currentIdleInterval
- currentIdleInterval = idleInterval;
+ }
+
+ // no exception so resetting the currentIdleInterval
+ currentIdleInterval = idleInterval;
- } catch (InterruptedException e) {
- log.info((isActive? "active" : "inactive")+" job executor thread '"+getName()+"' got interrupted");
- } catch (Exception e) {
- log.error("exception in job executor thread. waiting "+currentIdleInterval+" milliseconds", e);
- try {
- synchronized(jobExecutor) {
- jobExecutor.wait(currentIdleInterval);
- }
- } catch (InterruptedException e2) {
- log.debug("delay after exception got interrupted", e2);
+ } catch (InterruptedException e) {
+ log.info((isActive? "active" : "inactive")+" job executor thread '"+getName()+"' got interrupted");
+ } catch (Exception e) {
+ log.error("exception in job executor thread. waiting "+currentIdleInterval+" milliseconds", e);
+ try {
+ synchronized(jobExecutor) {
+ jobExecutor.wait(currentIdleInterval);
}
- // after an exception, the current idle interval is doubled to prevent
- // continuous exception generation when e.g. the db is unreachable
- currentIdleInterval <<= 1;
- if (currentIdleInterval > maxIdleInterval || currentIdleInterval < 0) {
- currentIdleInterval = maxIdleInterval;
- }
+ } catch (InterruptedException e2) {
+ log.debug("delay after exception got interrupted", e2);
}
+ // after an exception, the current idle interval is doubled to prevent
+ // continuous exception generation when e.g. the db is unreachable
+ currentIdleInterval <<= 1;
+ if (currentIdleInterval > maxIdleInterval || currentIdleInterval < 0) {
+ currentIdleInterval = maxIdleInterval;
+ }
}
- } catch (Exception e) {
- // NOTE that Error's are not caught because that might halt the JVM and mask the original Error.
- log.error("exception in job executor thread", e);
- } finally {
- log.info(getName()+" leaves cyberspace");
}
+ log.info(getName()+" leaves cyberspace");
}
protected Collection acquireJobs() {
Collection acquiredJobs;
synchronized (jobExecutor) {
- Collection jobsToLock = new ArrayList();
log.debug("acquiring jobs for execution...");
+ Collection jobsToLock = Collections.EMPTY_LIST;
JbpmContext jbpmContext = jbpmConfiguration.createJbpmContext();
try {
JobSession jobSession = jbpmContext.getJobSession();
@@ -116,11 +110,11 @@
if (job.isExclusive()) {
log.debug("exclusive acquirable job found ("+job+"). querying for other exclusive jobs to lock them all in one tx...");
List otherExclusiveJobs = jobSession.findExclusiveJobs(getName(), job.getProcessInstance());
- jobsToLock.addAll(otherExclusiveJobs);
+ jobsToLock = otherExclusiveJobs;
log.debug("trying to obtain a process-instance exclusive locks for '"+otherExclusiveJobs+"'");
} else {
log.debug("trying to obtain a lock for '"+job+"'");
- jobsToLock.add(job);
+ jobsToLock = Collections.singletonList(job);
}
Iterator iter = jobsToLock.iterator();
@@ -145,17 +139,13 @@
log.debug("obtained lock on jobs: "+acquiredJobs);
}
catch (JbpmPersistenceException e) {
- // if this is a stale object exception, the jbpm configuration has control over the logging
- if ("org.hibernate.StaleObjectStateException".equals(e.getCause().getClass().getName())) {
- log.info("problem committing job acquisition transaction: optimistic locking failed");
- StaleObjectLogConfigurer.staleObjectExceptionsLog.error("problem committing job acquisition transaction: optimistic locking failed", e);
+ // if this is a stale object exception, keep it quiet
+ if (Services.isCausedByStaleState(e)) {
+ log.debug("optimistic locking failed, couldn't obtain lock on jobs: "+jobsToLock);
+ acquiredJobs = Collections.EMPTY_LIST;
} else {
- // TODO run() will log this exception, log it here too?
- log.error("problem committing job acquisition transaction", e);
throw e;
}
- acquiredJobs = Collections.EMPTY_LIST;
- log.debug("couldn't obtain lock on jobs: "+jobsToLock);
}
}
}
@@ -173,7 +163,6 @@
if (job.execute(jbpmContext)) {
jobSession.deleteJob(job);
}
-
} catch (Exception e) {
log.debug("exception while executing '"+job+"'", e);
StringWriter sw = new StringWriter();
@@ -187,7 +176,6 @@
if (totalLockTimeInMillis>maxLockTime) {
jbpmContext.setRollbackOnly();
}
-
} finally {
try {
jbpmContext.close();
Modified: jbpm3/branches/tdiesler/modules/jpdl/core/src/main/java/org/jbpm/msg/db/DbMessageService.java
===================================================================
--- jbpm3/branches/tdiesler/modules/jpdl/core/src/main/java/org/jbpm/msg/db/DbMessageService.java 2008-07-24 11:06:45 UTC (rev 1702)
+++ jbpm3/branches/tdiesler/modules/jpdl/core/src/main/java/org/jbpm/msg/db/DbMessageService.java 2008-07-24 11:31:32 UTC (rev 1703)
@@ -37,9 +37,8 @@
private static final long serialVersionUID = 1L;
- JbpmConfiguration jbpmConfiguration;
JobSession jobSession = null;
- Collection destinations = null;
+ JobExecutor jobExecutor = null;
boolean hasProducedJobs = false;
public DbMessageService() {
@@ -47,8 +46,8 @@
if (jbpmContext==null) {
throw new JbpmException("instantiation of the DbMessageService requires a current JbpmContext");
}
- this.jbpmConfiguration = jbpmContext.getJbpmConfiguration();
- this.jobSession = jbpmContext.getJobSession();
+ jobSession = jbpmContext.getJobSession();
+ jobExecutor = jbpmContext.getJbpmConfiguration().getJobExecutor();
}
public void send(Job job) {
@@ -58,11 +57,10 @@
}
public void close() {
- JobExecutor jobExecutor = jbpmConfiguration.getJobExecutor();
if ( (hasProducedJobs)
&& (jobExecutor!=null)
) {
- log.debug("messages were produced the jobExecutor will be signalled");
+ log.debug("messages were produced, job executor will be signalled");
synchronized(jobExecutor) {
jobExecutor.notify();
}
Modified: jbpm3/branches/tdiesler/modules/jpdl/core/src/main/java/org/jbpm/scheduler/db/DbSchedulerService.java
===================================================================
--- jbpm3/branches/tdiesler/modules/jpdl/core/src/main/java/org/jbpm/scheduler/db/DbSchedulerService.java 2008-07-24 11:06:45 UTC (rev 1702)
+++ jbpm3/branches/tdiesler/modules/jpdl/core/src/main/java/org/jbpm/scheduler/db/DbSchedulerService.java 2008-07-24 11:31:32 UTC (rev 1703)
@@ -21,26 +21,39 @@
*/
package org.jbpm.scheduler.db;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
import org.jbpm.JbpmContext;
import org.jbpm.JbpmException;
import org.jbpm.db.JobSession;
import org.jbpm.graph.exe.ProcessInstance;
import org.jbpm.graph.exe.Token;
import org.jbpm.job.Timer;
+import org.jbpm.job.executor.JobExecutor;
import org.jbpm.scheduler.SchedulerService;
public class DbSchedulerService implements SchedulerService {
private static final long serialVersionUID = 1L;
+
+ private static final Log log = LogFactory.getLog(DbSchedulerService.class);
JobSession jobSession = null;
-
+ JobExecutor jobExecutor = null;
+ boolean hasProducedJobs = false;
+
public DbSchedulerService() {
- this.jobSession = JbpmContext.getCurrentJbpmContext().getJobSession();
+ JbpmContext jbpmContext = JbpmContext.getCurrentJbpmContext();
+ if (jbpmContext==null) {
+ throw new JbpmException("instantiation of the DbSchedulerService requires a current JbpmContext");
+ }
+ this.jobSession = jbpmContext.getJobSession();
+ this.jobExecutor = jbpmContext.getJbpmConfiguration().getJobExecutor();
}
public void createTimer(Timer timerJob) {
jobSession.saveJob(timerJob);
+ hasProducedJobs = true;
}
public void deleteTimersByName(String timerName, Token token) {
@@ -55,5 +68,11 @@
}
public void close() {
+ if (hasProducedJobs && jobExecutor != null) {
+ log.debug("timers were produced, job executor will be signalled");
+ synchronized (jobExecutor) {
+ jobExecutor.notify();
+ }
+ }
}
}
Modified: jbpm3/branches/tdiesler/modules/jpdl/core/src/main/java/org/jbpm/svc/Services.java
===================================================================
--- jbpm3/branches/tdiesler/modules/jpdl/core/src/main/java/org/jbpm/svc/Services.java 2008-07-24 11:06:45 UTC (rev 1702)
+++ jbpm3/branches/tdiesler/modules/jpdl/core/src/main/java/org/jbpm/svc/Services.java 2008-07-24 11:31:32 UTC (rev 1703)
@@ -31,6 +31,7 @@
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
+import org.hibernate.StaleStateException;
import org.jbpm.JbpmContext;
import org.jbpm.JbpmException;
import org.jbpm.graph.exe.ProcessInstance;
@@ -234,8 +235,8 @@
log.debug("closing service '"+serviceName+"': "+service);
service.close();
} catch (JbpmPersistenceException e) {
- // if this is a stale object exception, the jbpm configuration has control over the logging
- if ("org.hibernate.StaleObjectStateException".equals(e.getCause().getClass().getName())) {
+ // if this is a stale state exception, the jbpm configuration has control over the logging
+ if (isCausedByStaleState(e)) {
log.info("problem closing service '"+serviceName+"': optimistic locking failed");
StaleObjectLogConfigurer.staleObjectExceptionsLog.error("problem closing service '"+serviceName+"': optimistic locking failed", e);
} else {
@@ -263,6 +264,14 @@
}
}
+ public static boolean isCausedByStaleState(JbpmPersistenceException persistenceException) {
+ for (Throwable cause = persistenceException.getCause(); cause != null; cause = cause.getCause()) {
+ if (cause instanceof StaleStateException)
+ return true;
+ }
+ return false;
+ }
+
public static void assignId(Object object) {
JbpmContext jbpmContext = JbpmContext.getCurrentJbpmContext();
if (jbpmContext!=null) {
Modified: jbpm3/branches/tdiesler/modules/jpdl/core/src/main/resources/org/jbpm/db/hibernate.queries.hbm.xml
===================================================================
--- jbpm3/branches/tdiesler/modules/jpdl/core/src/main/resources/org/jbpm/db/hibernate.queries.hbm.xml 2008-07-24 11:06:45 UTC (rev 1702)
+++ jbpm3/branches/tdiesler/modules/jpdl/core/src/main/resources/org/jbpm/db/hibernate.queries.hbm.xml 2008-07-24 11:31:32 UTC (rev 1703)
@@ -314,19 +314,19 @@
]]>
</query>
- <query name="JobSession.getTimersForProcessInstance">
+ <query name="JobSession.deleteTimersForProcessInstance">
<![CDATA[
- select timer
- from org.jbpm.job.Timer timer
+ delete from org.jbpm.job.Timer timer
where timer.processInstance = :processInstance
+ and timer.lockOwner is null
]]>
</query>
- <query name="JobSession.getExecuteNodeJobsForProcessInstance">
+ <query name="JobSession.deleteExecuteNodeJobsForProcessInstance">
<![CDATA[
- select job
- from org.jbpm.job.ExecuteNodeJob job
+ delete from org.jbpm.job.ExecuteNodeJob job
where job.processInstance = :processInstance
+ and job.lockOwner is null
]]>
</query>
Copied: jbpm3/branches/tdiesler/modules/jpdl/core/src/test/java/org/jbpm/job/executor/TimerOnTimerDbTest.java (from rev 1558, jbpm3/trunk/modules/jpdl/core/src/test/java/org/jbpm/job/executor/TimerOnTimerDbTest.java)
===================================================================
--- jbpm3/branches/tdiesler/modules/jpdl/core/src/test/java/org/jbpm/job/executor/TimerOnTimerDbTest.java (rev 0)
+++ jbpm3/branches/tdiesler/modules/jpdl/core/src/test/java/org/jbpm/job/executor/TimerOnTimerDbTest.java 2008-07-24 11:31:32 UTC (rev 1703)
@@ -0,0 +1,105 @@
+/*
+ * 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.executor;
+
+import java.io.Serializable;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.jbpm.db.AbstractDbTestCase;
+import org.jbpm.graph.def.ProcessDefinition;
+import org.jbpm.graph.exe.ProcessInstance;
+
+/**
+ * Test case for JBPM-1135
+ * @author Alejandro Guizar
+ */
+public class TimerOnTimerDbTest extends AbstractDbTestCase {
+
+ private static final Log log = LogFactory.getLog(TimerOnTimerDbTest.class);
+
+ public void testTimerOnTimer() {
+ ProcessDefinition processDefinition = ProcessDefinition.parseXmlResource("org/jbpm/job/executor/timerOnTimer.jpdl.xml");
+ jbpmContext.deployProcessDefinition(processDefinition);
+
+ ProcessInstance processInstance = jbpmContext.newProcessInstanceForUpdate("timerTest");
+ processInstance.getContextInstance().setVariable("timerTestWorkflow", new WorkflowLogger());
+ processInstance.signal();
+ commitAndCloseSession();
+ long tokenId = processInstance.getRootToken().getId();
+
+ startJobExecutor();
+ try {
+ sleep(500);
+ beginSessionTransaction();
+ assertEquals("timerTest", jbpmContext.loadToken(tokenId).getNode().getName());
+ commitAndCloseSession();
+
+ sleep(1000);
+ beginSessionTransaction();
+ assertEquals("secondTimerTest", jbpmContext.loadToken(tokenId).getNode().getName());
+ commitAndCloseSession();
+
+ sleep(1000);
+ beginSessionTransaction();
+ assertTrue(jbpmContext.loadToken(tokenId).getProcessInstance().hasEnded());
+ }
+ finally {
+ stopJobExecutor();
+ }
+ }
+
+ private void sleep(long millis) {
+ try {
+ Thread.sleep(millis);
+ }
+ catch (InterruptedException e) {
+ // reassert interruption
+ Thread.currentThread().interrupt();
+ }
+ }
+
+ public static final class WorkflowLogger implements Serializable {
+
+ private static final long serialVersionUID = 1L;
+
+ public void logNodeEnter() {
+ log.info("entered node");
+ }
+
+ public void logNodeLeave() {
+ log.info("left node");
+ }
+
+ public void logTaskCreate() {
+ log.info("created task");
+ }
+
+ public void logTimerCreate() {
+ log.info("created timer");
+ }
+
+ public void logTimerFired() {
+ log.info("fired timer");
+ }
+ }
+}
Modified: jbpm3/branches/tdiesler/modules/jpdl/core/src/test/resources/log4j.xml
===================================================================
--- jbpm3/branches/tdiesler/modules/jpdl/core/src/test/resources/log4j.xml 2008-07-24 11:06:45 UTC (rev 1702)
+++ jbpm3/branches/tdiesler/modules/jpdl/core/src/test/resources/log4j.xml 2008-07-24 11:31:32 UTC (rev 1703)
@@ -12,7 +12,7 @@
<param name="Append" value="false"/>
<layout class="org.apache.log4j.PatternLayout">
<!-- The default pattern: Date Priority [Category] Message\n -->
- <param name="ConversionPattern" value="%d %-5p [%c:%L] %m%n"/>
+ <param name="ConversionPattern" value="%d %-5p [%c] %m%n"/>
</layout>
</appender>
@@ -24,7 +24,7 @@
<param name="Target" value="System.out" />
<param name="Threshold" value="INFO" />
<layout class="org.apache.log4j.PatternLayout">
- <param name="ConversionPattern" value="%d{HH:mm:ss,SSS} [%t] %-5p %C{1} : %m%n" />
+ <param name="ConversionPattern" value="%d{HH:mm:ss,SSS} %-5p [%c{1}] %m%n" />
</layout>
</appender>
@@ -40,11 +40,17 @@
<priority value="INFO" />
</category>
- <!-- hide optimistic locking failures -->
+ <!-- hide optimistic locking failures
<category name="org.hibernate.event.def.AbstractFlushingEventListener">
<priority value="FATAL" />
</category>
+ -->
+ <!-- hide proxy narrowing warns -->
+ <category name="org.hibernate.engine.StatefulPersistenceContext.ProxyWarnLog">
+ <priority value="ERROR" />
+ </category>
+
<!-- show SQL DML statements as they are executed -->
<category name="org.hibernate.SQL">
<priority value="DEBUG" />
Copied: jbpm3/branches/tdiesler/modules/jpdl/core/src/test/resources/org/jbpm/job/executor/timerOnTimer.jpdl.xml (from rev 1558, jbpm3/trunk/modules/jpdl/core/src/test/resources/org/jbpm/job/executor/timerOnTimer.jpdl.xml)
===================================================================
--- jbpm3/branches/tdiesler/modules/jpdl/core/src/test/resources/org/jbpm/job/executor/timerOnTimer.jpdl.xml (rev 0)
+++ jbpm3/branches/tdiesler/modules/jpdl/core/src/test/resources/org/jbpm/job/executor/timerOnTimer.jpdl.xml 2008-07-24 11:31:32 UTC (rev 1703)
@@ -0,0 +1,50 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<process-definition name="timerTest" xmlns="urn:jbpm.org:jpdl-3.2"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="urn:jbpm.org:jpdl-3.2 http://jbpm.org/xsd/jpdl-3.2.xsd">
+
+ <start-state name="start">
+ <transition name="" to="timerTest" />
+ </start-state>
+
+ <task-node name="timerTest" end-tasks="true">
+ <event type="node-enter">
+ <action expression="#{timerTestWorkflow.logNodeEnter}" />
+ </event>
+ <event type="node-leave">
+ <action expression="#{timerTestWorkflow.logNodeLeave}" />
+ </event>
+ <transition name="doneFirst" to="secondTimerTest" />
+ <task name="timerTestTask" description="TimerTestTask">
+ <assignment actor-id="admin" />
+ <event type="task-create">
+ <action expression="#{timerTestWorkflow.logTaskCreate}" />
+ </event>
+ <event type="timer-create">
+ <action expression="#{timerTestWorkflow.logTimerCreate}" />
+ </event>
+ <timer duedate="1 second" transition="doneFirst">
+ <action expression="#{timerTestWorkflow.logTimerFired}" />
+ </timer>
+ </task>
+ </task-node>
+
+ <task-node name="secondTimerTest">
+ <task name="secondTimerTestTask" description="SecondTimerTestTask">
+ <assignment actor-id="admin" />
+ <event type="task-create">
+ <action expression="#{timerTestWorkflow.logTaskCreate}" />
+ </event>
+ <event type="timer-create">
+ <action expression="#{timerTestWorkflow.logTimerCreate}" />
+ </event>
+ <timer duedate="1 second" transition="doneSecond">
+ <action expression="#{timerTestWorkflow.logTimerFired}" />
+ </timer>
+ </task>
+ <transition name="doneSecond" to="end" />
+ </task-node>
+
+ <end-state name="end" />
+
+</process-definition>
\ No newline at end of file
Modified: jbpm3/branches/tdiesler/modules/jpdl/pom.xml
===================================================================
--- jbpm3/branches/tdiesler/modules/jpdl/pom.xml 2008-07-24 11:06:45 UTC (rev 1702)
+++ jbpm3/branches/tdiesler/modules/jpdl/pom.xml 2008-07-24 11:31:32 UTC (rev 1703)
@@ -34,7 +34,6 @@
<module>db</module>
<module>examples</module>
<module>identity</module>
- <module>integration</module>
<module>simulation</module>
<module>userguide</module>
<module>ws</module>
15 years, 11 months
JBoss JBPM SVN: r1702 - jbpm3/branches.
by do-not-reply@jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2008-07-24 07:06:45 -0400 (Thu, 24 Jul 2008)
New Revision: 1702
Added:
jbpm3/branches/tdiesler/
Log:
recreate userbranch
Copied: jbpm3/branches/tdiesler (from rev 1492, jbpm3/trunk)
15 years, 11 months
JBoss JBPM SVN: r1701 - jbpm3/branches.
by do-not-reply@jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2008-07-24 07:06:15 -0400 (Thu, 24 Jul 2008)
New Revision: 1701
Removed:
jbpm3/branches/tdiesler/
Log:
recreate userbranch
15 years, 11 months
JBoss JBPM SVN: r1700 - jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/internal/model.
by do-not-reply@jboss.org
Author: pascal.verdage
Date: 2008-07-24 04:24:55 -0400 (Thu, 24 Jul 2008)
New Revision: 1700
Modified:
jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/internal/model/ExecutionImpl.java
Log:
set timer's bidirectional reference
Modified: jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/internal/model/ExecutionImpl.java
===================================================================
--- jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/internal/model/ExecutionImpl.java 2008-07-23 20:18:28 UTC (rev 1699)
+++ jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/internal/model/ExecutionImpl.java 2008-07-24 08:24:55 UTC (rev 1700)
@@ -843,6 +843,7 @@
// instantiate the timer
TimerImpl timerImpl = instantiateTimer();
// create the bidirectional reference
+ timerImpl.setExecution(this);
timers.add(timerImpl);
hasTimers = true;
// setInverseReference(timerImpl);
15 years, 11 months
JBoss JBPM SVN: r1699 - jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/model/internal.
by do-not-reply@jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2008-07-23 16:18:28 -0400 (Wed, 23 Jul 2008)
New Revision: 1699
Added:
jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/model/internal/ExclusiveGatewayDataBasedImpl.java
Log:
Add more gateway support for STP
Added: jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/model/internal/ExclusiveGatewayDataBasedImpl.java
===================================================================
--- jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/model/internal/ExclusiveGatewayDataBasedImpl.java (rev 0)
+++ jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/model/internal/ExclusiveGatewayDataBasedImpl.java 2008-07-23 20:18:28 UTC (rev 1699)
@@ -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.jboss.bpm.model.internal;
+
+//$Id$
+
+import org.jboss.bpm.NotImplementedException;
+import org.jboss.bpm.model.ExclusiveGatewayDataBased;
+import org.jboss.bpm.model.Gate;
+
+/**
+ * A point in the workflow process where, based on a decision or workflow control data, one of several branches is chosen.
+ *
+ * @author thomas.diesler(a)jboss.com
+ * @since 08-Jul-2008
+ */
+public class ExclusiveGatewayDataBasedImpl extends ExclusiveGatewayImpl implements ExclusiveGatewayDataBased
+{
+ public ExclusiveGatewayDataBasedImpl(String name)
+ {
+ super(name);
+ }
+
+ public ExclusiveType getExclusiveType()
+ {
+ return ExclusiveType.Data;
+ }
+
+ public Gate getDefaultGate()
+ {
+ throw new NotImplementedException();
+ }
+
+ public String toString()
+ {
+ return "ExclusiveGateway[" + getName() + "]";
+ }
+}
\ No newline at end of file
Property changes on: jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/model/internal/ExclusiveGatewayDataBasedImpl.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
15 years, 11 months
JBoss JBPM SVN: r1698 - in jbossbpm/spec/trunk/modules: dialects/api10/src/main/java/org/jboss/bpm/dialect/api10 and 4 other directories.
by do-not-reply@jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2008-07-23 16:17:53 -0400 (Wed, 23 Jul 2008)
New Revision: 1698
Added:
jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/model/ExclusiveGatewayDataBased.java
jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/model/ExclusiveGatewayEventBased.java
jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/model/Flow.java
jbossbpm/spec/trunk/modules/dialects/api10/src/main/java/org/jboss/bpm/dialect/api10/model/JAXBFlow.java
Removed:
jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/model/DataBasedExclusiveGateway.java
jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/model/EventBasedExclusiveGateway.java
jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/model/Flow.java
jbossbpm/spec/trunk/modules/dialects/api10/src/main/java/org/jboss/bpm/dialect/api10/model/JAXBConnectingObject.java
Modified:
jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/model/MessageFlow.java
jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/model/ProcessBuilder.java
jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/model/SequenceFlow.java
jbossbpm/spec/trunk/modules/dialects/api10/src/main/java/org/jboss/bpm/dialect/api10/ProcessUnmarshaller.java
jbossbpm/spec/trunk/modules/dialects/api10/src/main/java/org/jboss/bpm/dialect/api10/model/JAXBGateway.java
jbossbpm/spec/trunk/modules/dialects/api10/src/main/java/org/jboss/bpm/dialect/api10/model/JAXBIntermediateEvent.java
jbossbpm/spec/trunk/modules/dialects/api10/src/main/java/org/jboss/bpm/dialect/api10/model/JAXBMessageFlow.java
jbossbpm/spec/trunk/modules/dialects/api10/src/main/java/org/jboss/bpm/dialect/api10/model/JAXBSequenceFlow.java
jbossbpm/spec/trunk/modules/dialects/api10/src/main/java/org/jboss/bpm/dialect/api10/model/JAXBStartEvent.java
jbossbpm/spec/trunk/modules/dialects/api10/src/main/java/org/jboss/bpm/dialect/api10/model/JAXBSubProcess.java
jbossbpm/spec/trunk/modules/dialects/api10/src/main/java/org/jboss/bpm/dialect/api10/model/JAXBTask.java
jbossbpm/spec/trunk/modules/dialects/stp/src/main/java/org/jboss/bpm/dialect/stp/ProcessUnmarshaller.java
jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/client/internal/ExecutionManagerImpl.java
jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/model/internal/ComplexGatewayImpl.java
jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/model/internal/ExclusiveGatewayImpl.java
jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/model/internal/FlowImpl.java
jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/model/internal/FlowObjectImpl.java
jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/model/internal/GatewayImpl.java
jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/model/internal/InclusiveGatewayImpl.java
jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/model/internal/MessageFlowImpl.java
jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/model/internal/ParallelGatewayImpl.java
jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/model/internal/ProcessBuilderImpl.java
jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/model/internal/SequenceFlowImpl.java
Log:
Add more gateway support for STP
Deleted: jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/model/DataBasedExclusiveGateway.java
===================================================================
--- jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/model/DataBasedExclusiveGateway.java 2008-07-23 13:52:06 UTC (rev 1697)
+++ jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/model/DataBasedExclusiveGateway.java 2008-07-23 20:17:53 UTC (rev 1698)
@@ -1,55 +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.jboss.bpm.model;
-
-
-//$Id$
-
-/**
- * The Data-Based Exclusive Gateways are the most commonly used type of Gateways. The set of Gates for Data-Based
- * Exclusive Decisions is based on the boolean expression contained in the ConditionExpression attribute of the outgoing
- * Sequence Flow of the Gateway. These expressions use the values of process data to determine which path should be taken
- * (hence the name Data-Based).
- *
- * The conditions for the alternative Gates should be evaluated in a specific order. The first one that evaluates as TRUE will
- * determine the Sequence Flow that will be taken. Since the behavior of this Gateway is exclusive, any other conditions that
- * may actually be TRUE will be ignored--only one Gate can be chosen. One of the Gates may be “default” (or otherwise),
- * and is the last Gate considered. This means that if none of the other Gates are chosen, then the default Gate will be
- * chosen—along with its associated Sequence Flow.
- *
- * The default Gate is not mandatory for a Gateway. This means that if it is not used, then it is up to the modeler to insure
- * that at least one Gate be valid at runtime. BPMN does not specify what will happen if there are no valid Gates. However,
- * BPMN does specify that there MUST NOT be implicit flow and that all Normal Flow of a Process must be expressed
- * through Sequence Flow. This would mean that a Process Model that has a Gateway that potentially does not have a valid
- * Gate at runtime is an invalid model.
- *
- * @author thomas.diesler(a)jboss.com
- * @since 08-Jul-2008
- */
-public interface DataBasedExclusiveGateway extends ExclusiveGateway
-{
- /**
- * A Default Gate MAY be specified
- */
- Gate getDefaultGate();
-
-}
\ No newline at end of file
Deleted: jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/model/EventBasedExclusiveGateway.java
===================================================================
--- jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/model/EventBasedExclusiveGateway.java 2008-07-23 13:52:06 UTC (rev 1697)
+++ jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/model/EventBasedExclusiveGateway.java 2008-07-23 20:17:53 UTC (rev 1698)
@@ -1,53 +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.jboss.bpm.model;
-
-
-//$Id$
-
-/**
- * The inclusion of Event-Based Exclusive Gateways is the result of recent developments in the handling of distributed
- * systems (e.g., with pi-calculus) and was derived from the BPEL4WS pick. On the input side, their behavior is the same as
- * a Data-Based Exclusive Gateway (see “Data-Based” on page 73). On the output side, the basic idea is that this Decision
- * represents a branching point in the process where the alternatives are based on events that occurs at that point in the
- * Process, rather than the evaluation of expressions using process data. A specific event, usually the receipt of a message,
- * determines which of the paths will be taken. For example, if a company is waiting for a response from a customer, they
- * will perform one set of activities if the customer responds “Yes” and another set of activities if the customer responds
- * “No.” The customer’s response determines which path is taken. The identity of the Message determines which path is taken.
- * That is, the “Yes” Message and the “No” message are different messages—they are not the same message with different values
- * within a property of the Message. The receipt of the message can be modeled with a Task of TaskType Receive or an
- * Intermediate Event with a Message Trigger. In addition to Messages, other Triggers for Intermediate Events can be used, such as Timers.
- *
- * @author thomas.diesler(a)jboss.com
- * @since 08-Jul-2008
- */
-public interface EventBasedExclusiveGateway extends ExclusiveGateway
-{
- /**
- * Event-Based Gateways can be defined as the instantiation mechanism for the
- * Process with the Instantiate attribute. This attribute MAY be set to true if the
- * Gateway is the first element after the Start Event or a starting Gateway if there is
- * no Start Event (i.e., there are no incoming Sequence Flow).
- */
- boolean isInstantiate();
-
-}
\ No newline at end of file
Copied: jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/model/ExclusiveGatewayDataBased.java (from rev 1697, jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/model/DataBasedExclusiveGateway.java)
===================================================================
--- jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/model/ExclusiveGatewayDataBased.java (rev 0)
+++ jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/model/ExclusiveGatewayDataBased.java 2008-07-23 20:17:53 UTC (rev 1698)
@@ -0,0 +1,55 @@
+/*
+ * 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.jboss.bpm.model;
+
+
+//$Id$
+
+/**
+ * The Data-Based Exclusive Gateways are the most commonly used type of Gateways. The set of Gates for Data-Based
+ * Exclusive Decisions is based on the boolean expression contained in the ConditionExpression attribute of the outgoing
+ * Sequence Flow of the Gateway. These expressions use the values of process data to determine which path should be taken
+ * (hence the name Data-Based).
+ *
+ * The conditions for the alternative Gates should be evaluated in a specific order. The first one that evaluates as TRUE will
+ * determine the Sequence Flow that will be taken. Since the behavior of this Gateway is exclusive, any other conditions that
+ * may actually be TRUE will be ignored--only one Gate can be chosen. One of the Gates may be “default” (or otherwise),
+ * and is the last Gate considered. This means that if none of the other Gates are chosen, then the default Gate will be
+ * chosen—along with its associated Sequence Flow.
+ *
+ * The default Gate is not mandatory for a Gateway. This means that if it is not used, then it is up to the modeler to insure
+ * that at least one Gate be valid at runtime. BPMN does not specify what will happen if there are no valid Gates. However,
+ * BPMN does specify that there MUST NOT be implicit flow and that all Normal Flow of a Process must be expressed
+ * through Sequence Flow. This would mean that a Process Model that has a Gateway that potentially does not have a valid
+ * Gate at runtime is an invalid model.
+ *
+ * @author thomas.diesler(a)jboss.com
+ * @since 08-Jul-2008
+ */
+public interface ExclusiveGatewayDataBased extends ExclusiveGateway
+{
+ /**
+ * A Default Gate MAY be specified
+ */
+ Gate getDefaultGate();
+
+}
\ No newline at end of file
Copied: jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/model/ExclusiveGatewayEventBased.java (from rev 1697, jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/model/EventBasedExclusiveGateway.java)
===================================================================
--- jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/model/ExclusiveGatewayEventBased.java (rev 0)
+++ jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/model/ExclusiveGatewayEventBased.java 2008-07-23 20:17:53 UTC (rev 1698)
@@ -0,0 +1,53 @@
+/*
+ * 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.jboss.bpm.model;
+
+
+//$Id$
+
+/**
+ * The inclusion of Event-Based Exclusive Gateways is the result of recent developments in the handling of distributed
+ * systems (e.g., with pi-calculus) and was derived from the BPEL4WS pick. On the input side, their behavior is the same as
+ * a Data-Based Exclusive Gateway (see “Data-Based” on page 73). On the output side, the basic idea is that this Decision
+ * represents a branching point in the process where the alternatives are based on events that occurs at that point in the
+ * Process, rather than the evaluation of expressions using process data. A specific event, usually the receipt of a message,
+ * determines which of the paths will be taken. For example, if a company is waiting for a response from a customer, they
+ * will perform one set of activities if the customer responds “Yes” and another set of activities if the customer responds
+ * “No.” The customer’s response determines which path is taken. The identity of the Message determines which path is taken.
+ * That is, the “Yes” Message and the “No” message are different messages—they are not the same message with different values
+ * within a property of the Message. The receipt of the message can be modeled with a Task of TaskType Receive or an
+ * Intermediate Event with a Message Trigger. In addition to Messages, other Triggers for Intermediate Events can be used, such as Timers.
+ *
+ * @author thomas.diesler(a)jboss.com
+ * @since 08-Jul-2008
+ */
+public interface ExclusiveGatewayEventBased extends ExclusiveGateway
+{
+ /**
+ * Event-Based Gateways can be defined as the instantiation mechanism for the
+ * Process with the Instantiate attribute. This attribute MAY be set to true if the
+ * Gateway is the first element after the Start Event or a starting Gateway if there is
+ * no Start Event (i.e., there are no incoming Sequence Flow).
+ */
+ boolean isInstantiate();
+
+}
\ No newline at end of file
Deleted: jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/model/Flow.java
===================================================================
--- jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/model/Flow.java 2008-07-23 13:52:06 UTC (rev 1697)
+++ jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/model/Flow.java 2008-07-23 20:17:53 UTC (rev 1698)
@@ -1,58 +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.jboss.bpm.model;
-
-//$Id$
-
-/**
- * A Flow is a graphical line connecting two objects in a BPD.
- * <p/>
- * There are two types of Flow: {@link SequenceFlow} and {@link MessageFlow}, each with their own line style.
- * Flow is also used in a generic sense (and lowercase) to describe how Tokens will traverse from the
- * {@link StartEvent} to an {@link EndEvent}.
- *
- * @author thomas.diesler(a)jboss.com
- * @since 08-Jul-2008
- */
-public interface Flow extends SupportingElement
-{
- /**
- * Get the optional name
- */
- String getName();
-
- /**
- * Get the required target name
- */
- String getTargetName();
-
- /**
- * Get the source flow object
- */
- FlowObject getSource();
-
- /**
- * Get the target flow object
- */
- FlowObject getTarget();
-
-}
\ No newline at end of file
Added: jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/model/Flow.java
===================================================================
--- jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/model/Flow.java (rev 0)
+++ jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/model/Flow.java 2008-07-23 20:17:53 UTC (rev 1698)
@@ -0,0 +1,59 @@
+/*
+ * 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.jboss.bpm.model;
+
+//$Id$
+
+/**
+ * There are two ways of Connecting Objects in BPMN: a Flow, either sequence or message, and an Association. Sequence
+ * Flow and Message Flow, to a certain extent, represent orthogonal aspects of the business processes depicted in a model,
+ * although they both affect the performance of activities within a Process.
+ *
+ * @author thomas.diesler(a)jboss.com
+ * @since 08-Jul-2008
+ */
+public interface Flow extends GraphicalElement
+{
+ /**
+ * Name is an optional attribute that is text description of the Connecting Object.
+ */
+ String getName();
+
+ /**
+ * SourceRef is an attribute that identifies which Graphical Element the Connecting
+ * Object is connected from. Note: there are restrictions as to what objects Sequence
+ * Flow and Message Flow can connect.
+ */
+ GraphicalElement getSourceRef();
+
+ /**
+ * TargetRef is an attribute that identifies which Graphical Element the Connecting
+ * Object is connected to. Note: there are restrictions as to what objects Sequence
+ * Flow and Message Flow can connect.
+ */
+ GraphicalElement getTargetRef();
+
+ /**
+ * Get the required target name
+ */
+ String getTargetName();
+}
\ No newline at end of file
Modified: jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/model/MessageFlow.java
===================================================================
--- jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/model/MessageFlow.java 2008-07-23 13:52:06 UTC (rev 1697)
+++ jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/model/MessageFlow.java 2008-07-23 20:17:53 UTC (rev 1698)
@@ -24,13 +24,19 @@
//$Id$
/**
- * A Message Flow is a dashed line that is used to show the flow of messages between two entities that are prepared to send and receive them.
- * In BPMN, two separate Pools in the Diagram will represent the two entities.
+ * A Message Flow is a dashed line that is used to show the flow of messages between two entities that are prepared to
+ * send and receive them. In BPMN, two separate Pools in the Diagram will represent the two entities.
*
+ * Message Flow MUST connect two Pools, either to the Pools themselves or to Flow Objects within the Pools. They cannot
+ * connect two objects within the same Pool.
+ *
* @author thomas.diesler(a)jboss.com
* @since 08-Jul-2008
*/
public interface MessageFlow extends Flow
{
-
+ /**
+ * MessageRef is an optional attribute that identifies the Message that is being sent.
+ */
+ Message getMessageRef();
}
\ No newline at end of file
Modified: jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/model/ProcessBuilder.java
===================================================================
--- jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/model/ProcessBuilder.java 2008-07-23 13:52:06 UTC (rev 1697)
+++ jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/model/ProcessBuilder.java 2008-07-23 20:17:53 UTC (rev 1698)
@@ -80,7 +80,7 @@
/**
* Add an {@link ExclusiveGateway} with a given name
*/
- ProcessBuilder addExclusiveGateway(String name);
+ ProcessBuilder addExclusiveDataBasedGateway(String name);
/**
* Add an {@link InclusiveGateway} with a given name
Modified: jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/model/SequenceFlow.java
===================================================================
--- jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/model/SequenceFlow.java 2008-07-23 13:52:06 UTC (rev 1697)
+++ jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/model/SequenceFlow.java 2008-07-23 20:17:53 UTC (rev 1698)
@@ -24,13 +24,48 @@
//$Id$
/**
- * A Sequence Flow is a solid graphical line that is used to show the order that Activities will be performed in a Process.
- * Each Flow has only one source and only one target.
+ * A Sequence Flow is used to show the order that activities will be performed in a Process. Each Flow has only one
+ * source and only one target. The source and target must be from the set of the following Flow Objects: Events (Start,
+ * Intermediate, and End), Activities (Task and Sub-Process), and Gateways. During performance (or simulation) of the
+ * process, a Token will leave the source Flow Object, traverse down the Sequence Flow, and enter the target Flow
+ * Object.
*
* @author thomas.diesler(a)jboss.com
* @since 08-Jul-2008
*/
public interface SequenceFlow extends Flow
{
+ /**
+ * The ConditionType
+ */
+ enum ConditionType
+ {
+ None, Expression, Default
+ }
+ /**
+ * By default, the ConditionType of a Sequence Flow is None. This means that there is no evaluation at runtime to
+ * determine whether or not the Sequence Flow will be used. Once a Token is ready to traverse the Sequence Flow (i.e.,
+ * the Source is an activity that has completed), then the Token will do so. The normal, uncontrolled use of Sequence
+ * Flow, in a sequence of activities, will have a None ConditionType. A None ConditionType MUST NOT be used if the
+ * Source of the Sequence Flow is an Exclusive Data-Based or Inclusive Gateway. The ConditionType attribute MAY be set
+ * to Expression if the Source of the Sequence Flow is a Task, a Sub-Process, or a Gateway of type Exclusive-Data-
+ * Based or Inclusive. If the ConditionType attribute is set to Expression, then a condition marker SHALL be added to
+ * the line if the Sequence Flow is outgoing from an activity. However, a condition indicator MUST NOT be added to the
+ * line if the Sequence Flow is outgoing from a Gateway. An Expression ConditionType MUST NOT be used if the Source of
+ * the Sequence Flow is an Event-Based Exclusive Gateway, a Complex Gateway, a Parallel Gateway, a Start Event, or an
+ * Intermediate Event. In addition, an Expression ConditionType MUST NOT be used if the Sequence Flow is associated
+ * with the Default Gate of a Gateway. The ConditionType attribute MAY be set to Default only if the Source of the
+ * Sequence Flow is an activity or an Exclusive Data-Based Gateway.
+ */
+ ConditionType getConditionType();
+
+ /**
+ * If the ConditionType attribute is set to Expression, then the ConditionExpression attribute MUST be defined as a
+ * valid expression. The expression will be evaluated at runtime. If the result of the evaluation is TRUE, then a
+ * Token will be generated and will traverse the Sequence--Subject to any constraints imposed by a Source that is a
+ * Gateway.
+ */
+ Expression getConditionExpression();
+
}
\ No newline at end of file
Modified: jbossbpm/spec/trunk/modules/dialects/api10/src/main/java/org/jboss/bpm/dialect/api10/ProcessUnmarshaller.java
===================================================================
--- jbossbpm/spec/trunk/modules/dialects/api10/src/main/java/org/jboss/bpm/dialect/api10/ProcessUnmarshaller.java 2008-07-23 13:52:06 UTC (rev 1697)
+++ jbossbpm/spec/trunk/modules/dialects/api10/src/main/java/org/jboss/bpm/dialect/api10/ProcessUnmarshaller.java 2008-07-23 20:17:53 UTC (rev 1698)
@@ -34,7 +34,7 @@
import org.jboss.bpm.dialect.api10.model.JAXBComplexGateway;
import org.jboss.bpm.dialect.api10.model.JAXBEndEvent;
import org.jboss.bpm.dialect.api10.model.JAXBExclusiveGateway;
-import org.jboss.bpm.dialect.api10.model.JAXBConnectingObject;
+import org.jboss.bpm.dialect.api10.model.JAXBFlow;
import org.jboss.bpm.dialect.api10.model.JAXBFlowObject;
import org.jboss.bpm.dialect.api10.model.JAXBHandler;
import org.jboss.bpm.dialect.api10.model.JAXBInclusiveGateway;
@@ -121,29 +121,29 @@
private void adaptExclusiveGateway(ProcessBuilder builder, JAXBExclusiveGateway jaxb)
{
- builder.addExclusiveGateway(jaxb.getName());
- for(JAXBConnectingObject flow : jaxb.getOutFlows())
+ builder.addExclusiveDataBasedGateway(jaxb.getName());
+ for(JAXBFlow flow : jaxb.getOutFlows())
builder.addSequenceFlow(flow.getTargetName());
}
private void adaptInclusiveGateway(ProcessBuilder builder, JAXBInclusiveGateway jaxb)
{
builder.addInclusiveGateway(jaxb.getName());
- for(JAXBConnectingObject flow : jaxb.getOutFlows())
+ for(JAXBFlow flow : jaxb.getOutFlows())
builder.addSequenceFlow(flow.getTargetName());
}
private void adaptComplexGateway(ProcessBuilder builder, JAXBComplexGateway jaxb)
{
builder.addComplexGateway(jaxb.getName());
- for(JAXBConnectingObject flow : jaxb.getOutFlows())
+ for(JAXBFlow flow : jaxb.getOutFlows())
builder.addSequenceFlow(flow.getTargetName());
}
private void adaptParallelGateway(ProcessBuilder builder, JAXBParallelGateway jaxb)
{
builder.addParallelGateway(jaxb.getName());
- for(JAXBConnectingObject flow : jaxb.getOutFlows())
+ for(JAXBFlow flow : jaxb.getOutFlows())
builder.addSequenceFlow(flow.getTargetName());
}
Deleted: jbossbpm/spec/trunk/modules/dialects/api10/src/main/java/org/jboss/bpm/dialect/api10/model/JAXBConnectingObject.java
===================================================================
--- jbossbpm/spec/trunk/modules/dialects/api10/src/main/java/org/jboss/bpm/dialect/api10/model/JAXBConnectingObject.java 2008-07-23 13:52:06 UTC (rev 1697)
+++ jbossbpm/spec/trunk/modules/dialects/api10/src/main/java/org/jboss/bpm/dialect/api10/model/JAXBConnectingObject.java 2008-07-23 20:17:53 UTC (rev 1698)
@@ -1,68 +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.jboss.bpm.dialect.api10.model;
-
-import javax.xml.bind.annotation.XmlAttribute;
-import javax.xml.bind.annotation.XmlType;
-
-// $Id$
-
-/**
- * A Flow is a graphical line connecting two objects in a BPD.
- *
- * There are two types of Flow: Sequence Flow and Message Flow, each with their own line style. Flow is also used in a generic sense (and lowercase) to describe how
- * Tokens will traverse Sequence Flow from the Start Event to an End Event.
- *
- * @author thomas.diesler(a)jboss.com
- * @since 08-Jul-2008
- */
-@XmlType(name = "ConnectingObject")
-public class JAXBConnectingObject extends JAXBGraphicalElement
-{
- private String name;
- private String targetName;
-
- public String getName()
- {
- return name;
- }
-
- @XmlAttribute(required = false)
- public void setName(String name)
- {
- this.name = name;
- }
-
- public String getTargetName()
- {
- return targetName;
- }
-
- /**
- * Set the target name Note, this MUST NOT leak into the public API.
- */
- @XmlAttribute(name = "to", required = true)
- public void setTargetName(String targetName)
- {
- this.targetName = targetName;
- }
-}
\ No newline at end of file
Copied: jbossbpm/spec/trunk/modules/dialects/api10/src/main/java/org/jboss/bpm/dialect/api10/model/JAXBFlow.java (from rev 1697, jbossbpm/spec/trunk/modules/dialects/api10/src/main/java/org/jboss/bpm/dialect/api10/model/JAXBConnectingObject.java)
===================================================================
--- jbossbpm/spec/trunk/modules/dialects/api10/src/main/java/org/jboss/bpm/dialect/api10/model/JAXBFlow.java (rev 0)
+++ jbossbpm/spec/trunk/modules/dialects/api10/src/main/java/org/jboss/bpm/dialect/api10/model/JAXBFlow.java 2008-07-23 20:17:53 UTC (rev 1698)
@@ -0,0 +1,68 @@
+/*
+ * 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.jboss.bpm.dialect.api10.model;
+
+import javax.xml.bind.annotation.XmlAttribute;
+import javax.xml.bind.annotation.XmlType;
+
+// $Id$
+
+/**
+ * A Flow is a graphical line connecting two objects in a BPD.
+ *
+ * There are two types of Flow: Sequence Flow and Message Flow, each with their own line style. Flow is also used in a generic sense (and lowercase) to describe how
+ * Tokens will traverse Sequence Flow from the Start Event to an End Event.
+ *
+ * @author thomas.diesler(a)jboss.com
+ * @since 08-Jul-2008
+ */
+@XmlType(name = "Flow")
+public class JAXBFlow extends JAXBGraphicalElement
+{
+ private String name;
+ private String targetName;
+
+ public String getName()
+ {
+ return name;
+ }
+
+ @XmlAttribute(required = false)
+ public void setName(String name)
+ {
+ this.name = name;
+ }
+
+ public String getTargetName()
+ {
+ return targetName;
+ }
+
+ /**
+ * Set the target name Note, this MUST NOT leak into the public API.
+ */
+ @XmlAttribute(name = "to", required = true)
+ public void setTargetName(String targetName)
+ {
+ this.targetName = targetName;
+ }
+}
\ No newline at end of file
Modified: jbossbpm/spec/trunk/modules/dialects/api10/src/main/java/org/jboss/bpm/dialect/api10/model/JAXBGateway.java
===================================================================
--- jbossbpm/spec/trunk/modules/dialects/api10/src/main/java/org/jboss/bpm/dialect/api10/model/JAXBGateway.java 2008-07-23 13:52:06 UTC (rev 1697)
+++ jbossbpm/spec/trunk/modules/dialects/api10/src/main/java/org/jboss/bpm/dialect/api10/model/JAXBGateway.java 2008-07-23 20:17:53 UTC (rev 1698)
@@ -50,7 +50,7 @@
@XmlElement(name = "sequence", type = JAXBSequenceFlow.class),
@XmlElement(name = "message", type = JAXBMessageFlow.class)
})
- private List<JAXBConnectingObject> outFlows = new ArrayList<JAXBConnectingObject>();
+ private List<JAXBFlow> outFlows = new ArrayList<JAXBFlow>();
public String getName()
{
@@ -67,12 +67,12 @@
this.name = name;
}
- public List<JAXBConnectingObject> getOutFlows()
+ public List<JAXBFlow> getOutFlows()
{
return outFlows;
}
- public void setOutFlow(List<JAXBConnectingObject> outFlow)
+ public void setOutFlow(List<JAXBFlow> outFlow)
{
this.outFlows = outFlow;
}
Modified: jbossbpm/spec/trunk/modules/dialects/api10/src/main/java/org/jboss/bpm/dialect/api10/model/JAXBIntermediateEvent.java
===================================================================
--- jbossbpm/spec/trunk/modules/dialects/api10/src/main/java/org/jboss/bpm/dialect/api10/model/JAXBIntermediateEvent.java 2008-07-23 13:52:06 UTC (rev 1697)
+++ jbossbpm/spec/trunk/modules/dialects/api10/src/main/java/org/jboss/bpm/dialect/api10/model/JAXBIntermediateEvent.java 2008-07-23 20:17:53 UTC (rev 1698)
@@ -49,7 +49,7 @@
@XmlElement(name = "sequence", type = JAXBSequenceFlow.class),
@XmlElement(name = "message", type = JAXBMessageFlow.class)
})
- private JAXBConnectingObject outFlow;
+ private JAXBFlow outFlow;
public String getName()
{
@@ -69,13 +69,13 @@
this.name = name;
}
- public JAXBConnectingObject getOutFlow()
+ public JAXBFlow getOutFlow()
{
return outFlow;
}
@XmlTransient
- public void setOutFlow(JAXBConnectingObject outFlow)
+ public void setOutFlow(JAXBFlow outFlow)
{
this.outFlow = outFlow;
}
Modified: jbossbpm/spec/trunk/modules/dialects/api10/src/main/java/org/jboss/bpm/dialect/api10/model/JAXBMessageFlow.java
===================================================================
--- jbossbpm/spec/trunk/modules/dialects/api10/src/main/java/org/jboss/bpm/dialect/api10/model/JAXBMessageFlow.java 2008-07-23 13:52:06 UTC (rev 1697)
+++ jbossbpm/spec/trunk/modules/dialects/api10/src/main/java/org/jboss/bpm/dialect/api10/model/JAXBMessageFlow.java 2008-07-23 20:17:53 UTC (rev 1698)
@@ -34,6 +34,6 @@
* @since 08-Jul-2008
*/
@XmlType(name="MessageFlow")
-public class JAXBMessageFlow extends JAXBConnectingObject
+public class JAXBMessageFlow extends JAXBFlow
{
}
\ No newline at end of file
Modified: jbossbpm/spec/trunk/modules/dialects/api10/src/main/java/org/jboss/bpm/dialect/api10/model/JAXBSequenceFlow.java
===================================================================
--- jbossbpm/spec/trunk/modules/dialects/api10/src/main/java/org/jboss/bpm/dialect/api10/model/JAXBSequenceFlow.java 2008-07-23 13:52:06 UTC (rev 1697)
+++ jbossbpm/spec/trunk/modules/dialects/api10/src/main/java/org/jboss/bpm/dialect/api10/model/JAXBSequenceFlow.java 2008-07-23 20:17:53 UTC (rev 1698)
@@ -34,6 +34,6 @@
* @since 08-Jul-2008
*/
@XmlType(name="SequenceFlow")
-public class JAXBSequenceFlow extends JAXBConnectingObject
+public class JAXBSequenceFlow extends JAXBFlow
{
}
\ No newline at end of file
Modified: jbossbpm/spec/trunk/modules/dialects/api10/src/main/java/org/jboss/bpm/dialect/api10/model/JAXBStartEvent.java
===================================================================
--- jbossbpm/spec/trunk/modules/dialects/api10/src/main/java/org/jboss/bpm/dialect/api10/model/JAXBStartEvent.java 2008-07-23 13:52:06 UTC (rev 1697)
+++ jbossbpm/spec/trunk/modules/dialects/api10/src/main/java/org/jboss/bpm/dialect/api10/model/JAXBStartEvent.java 2008-07-23 20:17:53 UTC (rev 1698)
@@ -41,15 +41,15 @@
@XmlElements( {
@XmlElement(name = "sequence", type = JAXBSequenceFlow.class),
@XmlElement(name = "message", type = JAXBMessageFlow.class) })
- private JAXBConnectingObject outFlow;
+ private JAXBFlow outFlow;
- public JAXBConnectingObject getOutFlow()
+ public JAXBFlow getOutFlow()
{
return outFlow;
}
@XmlTransient
- public void setOutFlow(JAXBConnectingObject outFlow)
+ public void setOutFlow(JAXBFlow outFlow)
{
this.outFlow = outFlow;
}
Modified: jbossbpm/spec/trunk/modules/dialects/api10/src/main/java/org/jboss/bpm/dialect/api10/model/JAXBSubProcess.java
===================================================================
--- jbossbpm/spec/trunk/modules/dialects/api10/src/main/java/org/jboss/bpm/dialect/api10/model/JAXBSubProcess.java 2008-07-23 13:52:06 UTC (rev 1697)
+++ jbossbpm/spec/trunk/modules/dialects/api10/src/main/java/org/jboss/bpm/dialect/api10/model/JAXBSubProcess.java 2008-07-23 20:17:53 UTC (rev 1698)
@@ -44,15 +44,15 @@
@XmlElements( {
@XmlElement(name = "sequence", type = JAXBSequenceFlow.class),
@XmlElement(name = "message", type = JAXBMessageFlow.class) })
- private JAXBConnectingObject outFlow;
+ private JAXBFlow outFlow;
- public JAXBConnectingObject getOutFlow()
+ public JAXBFlow getOutFlow()
{
return outFlow;
}
@XmlTransient
- public void setOutFlow(JAXBConnectingObject outFlow)
+ public void setOutFlow(JAXBFlow outFlow)
{
this.outFlow = outFlow;
}
Modified: jbossbpm/spec/trunk/modules/dialects/api10/src/main/java/org/jboss/bpm/dialect/api10/model/JAXBTask.java
===================================================================
--- jbossbpm/spec/trunk/modules/dialects/api10/src/main/java/org/jboss/bpm/dialect/api10/model/JAXBTask.java 2008-07-23 13:52:06 UTC (rev 1697)
+++ jbossbpm/spec/trunk/modules/dialects/api10/src/main/java/org/jboss/bpm/dialect/api10/model/JAXBTask.java 2008-07-23 20:17:53 UTC (rev 1698)
@@ -48,7 +48,7 @@
@XmlElements( {
@XmlElement(name = "sequence", type = JAXBSequenceFlow.class),
@XmlElement(name = "message", type = JAXBMessageFlow.class) })
- private JAXBConnectingObject outFlow;
+ private JAXBFlow outFlow;
enum TaskType { Service, Receive, Send, User, Script, Manual, Reference, None}
private TaskType taskType;
@@ -56,13 +56,13 @@
// WebService, Java, Other, Unspecified
private String implementation;
- public JAXBConnectingObject getOutFlow()
+ public JAXBFlow getOutFlow()
{
return outFlow;
}
@XmlTransient
- public void setOutFlow(JAXBConnectingObject outFlow)
+ public void setOutFlow(JAXBFlow outFlow)
{
this.outFlow = outFlow;
}
Modified: jbossbpm/spec/trunk/modules/dialects/stp/src/main/java/org/jboss/bpm/dialect/stp/ProcessUnmarshaller.java
===================================================================
--- jbossbpm/spec/trunk/modules/dialects/stp/src/main/java/org/jboss/bpm/dialect/stp/ProcessUnmarshaller.java 2008-07-23 13:52:06 UTC (rev 1697)
+++ jbossbpm/spec/trunk/modules/dialects/stp/src/main/java/org/jboss/bpm/dialect/stp/ProcessUnmarshaller.java 2008-07-23 20:17:53 UTC (rev 1698)
@@ -167,6 +167,18 @@
builder.addTask(name);
adaptOutgoingEdges(builder, stpActivity);
}
+ else if (activityType == ActivityType.GATEWAY_DATA_BASED_EXCLUSIVE)
+ {
+ String name = stpActivity.getLabel();
+ builder.addExclusiveDataBasedGateway(name);
+ adaptOutgoingEdges(builder, stpActivity);
+ }
+ else if (activityType == ActivityType.GATEWAY_PARALLEL)
+ {
+ String name = stpActivity.getLabel();
+ builder.addParallelGateway(name);
+ adaptOutgoingEdges(builder, stpActivity);
+ }
else
{
throw new InvalidProcessException("Unsupported activity type: " + activityType);
@@ -175,13 +187,17 @@
private void adaptOutgoingEdges(ProcessBuilder builder, Activity stpActivity)
{
- for (String edgeId : stpActivity.getOutgoingEdges())
+ for (String edgeIds : stpActivity.getOutgoingEdges())
{
- SequenceEdge seqEdge = getSequenceEdgeById(edgeId);
- String targetId = seqEdge.getTarget();
- Activity targetAct = getActivityById(targetId);
- String targetName = targetAct.getLabel();
- builder.addSequenceFlow(targetName);
+ String[] edgeIdArr = edgeIds.split("\\s");
+ for (String edgeId : edgeIdArr)
+ {
+ SequenceEdge seqEdge = getSequenceEdgeById(edgeId);
+ String targetId = seqEdge.getTarget();
+ Activity targetAct = getActivityById(targetId);
+ String targetName = targetAct.getLabel();
+ builder.addSequenceFlow(targetName);
+ }
}
}
@@ -192,7 +208,7 @@
if (seqEdge.getId().equals(edgeId))
return seqEdge;
}
- return null;
+ throw new InvalidProcessException("Cannot find SequenceEdge: " + edgeId);
}
private Activity getActivityById(String id)
@@ -202,6 +218,6 @@
if (act.getId().equals(id))
return act;
}
- return null;
+ throw new InvalidProcessException("Cannot find Activity: " + id);
}
}
Modified: jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/client/internal/ExecutionManagerImpl.java
===================================================================
--- jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/client/internal/ExecutionManagerImpl.java 2008-07-23 13:52:06 UTC (rev 1697)
+++ jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/client/internal/ExecutionManagerImpl.java 2008-07-23 20:17:53 UTC (rev 1698)
@@ -87,7 +87,7 @@
Token token = tuple.getToken();
// Get the target and its handlers
- FlowObject target = flow.getTarget();
+ FlowObject target = (FlowObject)flow.getTargetRef();
ExecutionHandler exHandler = getExecutionHandler(target);
SignalHandler sigHandler = getSignalHandler(target);
FlowHandler flowHandler = getFlowHandler(target);
@@ -125,7 +125,7 @@
InitialFlow(StartEvent start)
{
super("start");
- setTarget(start);
+ setTargetRef(start);
}
}
Modified: jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/model/internal/ComplexGatewayImpl.java
===================================================================
--- jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/model/internal/ComplexGatewayImpl.java 2008-07-23 13:52:06 UTC (rev 1697)
+++ jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/model/internal/ComplexGatewayImpl.java 2008-07-23 20:17:53 UTC (rev 1698)
@@ -23,11 +23,17 @@
//$Id$
+import java.util.List;
+
+import org.jboss.bpm.NotImplementedException;
import org.jboss.bpm.model.ComplexGateway;
+import org.jboss.bpm.model.Expression;
+import org.jboss.bpm.model.Gate;
/**
- * A Complex Gateway handles situations that are not easily handled through the other types of Gateways. Complex Gateways can also be used to combine a set of linked
- * simple Gateways into a single, more compact situation. Modelers can provide complex expressions that determine the merging and/or splitting behavior of the Gateway.
+ * A Complex Gateway handles situations that are not easily handled through the other types of Gateways. Complex
+ * Gateways can also be used to combine a set of linked simple Gateways into a single, more compact situation. Modelers
+ * can provide complex expressions that determine the merging and/or splitting behavior of the Gateway.
*
* @author thomas.diesler(a)jboss.com
* @since 08-Jul-2008
@@ -39,6 +45,26 @@
super(name);
}
+ public Expression getIncommingCondition()
+ {
+ throw new NotImplementedException();
+ }
+
+ public Expression getOutgoingCondition()
+ {
+ throw new NotImplementedException();
+ }
+
+ public List<Gate> getGates()
+ {
+ throw new NotImplementedException();
+ }
+
+ public GatewayType getGatewayType()
+ {
+ throw new NotImplementedException();
+ }
+
public String toString()
{
return "ComplexGateway[" + getName() + "]";
Modified: jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/model/internal/ExclusiveGatewayImpl.java
===================================================================
--- jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/model/internal/ExclusiveGatewayImpl.java 2008-07-23 13:52:06 UTC (rev 1697)
+++ jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/model/internal/ExclusiveGatewayImpl.java 2008-07-23 20:17:53 UTC (rev 1698)
@@ -23,7 +23,11 @@
//$Id$
+import java.util.List;
+
+import org.jboss.bpm.NotImplementedException;
import org.jboss.bpm.model.ExclusiveGateway;
+import org.jboss.bpm.model.Gate;
/**
* A point in the workflow process where, based on a decision or workflow control data, one of several branches is chosen.
@@ -31,13 +35,18 @@
* @author thomas.diesler(a)jboss.com
* @since 08-Jul-2008
*/
-public class ExclusiveGatewayImpl extends GatewayImpl implements ExclusiveGateway
+public abstract class ExclusiveGatewayImpl extends GatewayImpl implements ExclusiveGateway
{
public ExclusiveGatewayImpl(String name)
{
super(name);
}
+ public GatewayType getGatewayType()
+ {
+ return GatewayType.Exclusive;
+ }
+
public String toString()
{
return "ExclusiveGateway[" + getName() + "]";
Modified: jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/model/internal/FlowImpl.java
===================================================================
--- jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/model/internal/FlowImpl.java 2008-07-23 13:52:06 UTC (rev 1697)
+++ jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/model/internal/FlowImpl.java 2008-07-23 20:17:53 UTC (rev 1698)
@@ -23,8 +23,10 @@
//$Id$
+import org.jboss.bpm.NotImplementedException;
import org.jboss.bpm.model.Flow;
import org.jboss.bpm.model.FlowObject;
+import org.jboss.bpm.model.GraphicalElement;
/**
* A Flow is a graphical line connecting two objects in a BPD. There are two types of Flow: Sequence Flow and Message Flow, each with their own line style. Flow is also
@@ -37,8 +39,8 @@
{
private String name;
private String targetName;
- private FlowObject source;
- private FlowObject target;
+ private GraphicalElement source;
+ private GraphicalElement target;
public FlowImpl(String targetName)
{
@@ -55,28 +57,28 @@
this.name = name;
}
- public String getTargetName()
+ public GraphicalElement getSourceRef()
{
- return targetName;
- }
-
- public FlowObject getSource()
- {
return source;
}
- public void setSource(FlowObject source)
+ protected void setSourceRef(GraphicalElement source)
{
this.source = source;
}
- public FlowObject getTarget()
+ public GraphicalElement getTargetRef()
{
return target;
}
-
- public void setTarget(FlowObject target)
+
+ protected void setTargetRef(GraphicalElement target)
{
this.target = target;
}
+
+ public String getTargetName()
+ {
+ return targetName;
+ }
}
\ No newline at end of file
Modified: jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/model/internal/FlowObjectImpl.java
===================================================================
--- jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/model/internal/FlowObjectImpl.java 2008-07-23 13:52:06 UTC (rev 1697)
+++ jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/model/internal/FlowObjectImpl.java 2008-07-23 20:17:53 UTC (rev 1698)
@@ -129,8 +129,8 @@
throw new InvalidProcessException("Target does not support in flow: " + target);
}
- flow.setSource(this);
- flow.setTarget(target);
+ flow.setSourceRef(this);
+ flow.setTargetRef(target);
}
}
}
\ No newline at end of file
Modified: jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/model/internal/GatewayImpl.java
===================================================================
--- jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/model/internal/GatewayImpl.java 2008-07-23 13:52:06 UTC (rev 1697)
+++ jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/model/internal/GatewayImpl.java 2008-07-23 20:17:53 UTC (rev 1698)
@@ -29,8 +29,10 @@
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
+import org.jboss.bpm.NotImplementedException;
import org.jboss.bpm.model.Flow;
import org.jboss.bpm.model.FlowObject;
+import org.jboss.bpm.model.Gate;
import org.jboss.bpm.model.Gateway;
import org.jboss.bpm.model.Signal;
import org.jboss.bpm.runtime.ExecutionHandler;
@@ -47,7 +49,7 @@
* @author thomas.diesler(a)jboss.com
* @since 08-Jul-2008
*/
-public class GatewayImpl extends FlowObjectImpl implements Gateway, HandlerSetterSupport, MultipleInFlowSetterSupport, MultipleOutFlowSetterSupport
+public abstract class GatewayImpl extends FlowObjectImpl implements Gateway, HandlerSetterSupport, MultipleInFlowSetterSupport, MultipleOutFlowSetterSupport
{
// provide logging
private static final Log log = LogFactory.getLog(GatewayImpl.class);
@@ -69,6 +71,11 @@
return name;
}
+ public List<Gate> getGates()
+ {
+ throw new NotImplementedException();
+ }
+
public List<Flow> getOutFlows()
{
return Collections.unmodifiableList(outFlows);
Modified: jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/model/internal/InclusiveGatewayImpl.java
===================================================================
--- jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/model/internal/InclusiveGatewayImpl.java 2008-07-23 13:52:06 UTC (rev 1697)
+++ jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/model/internal/InclusiveGatewayImpl.java 2008-07-23 20:17:53 UTC (rev 1698)
@@ -23,6 +23,10 @@
//$Id$
+import java.util.List;
+
+import org.jboss.bpm.NotImplementedException;
+import org.jboss.bpm.model.Gate;
import org.jboss.bpm.model.InclusiveGateway;
@@ -42,6 +46,21 @@
super(name);
}
+ public Gate getDefaultGate()
+ {
+ throw new NotImplementedException();
+ }
+
+ public List<Gate> getGates()
+ {
+ throw new NotImplementedException();
+ }
+
+ public GatewayType getGatewayType()
+ {
+ throw new NotImplementedException();
+ }
+
public String toString()
{
return "InclusiveGateway[" + getName() + "]";
Modified: jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/model/internal/MessageFlowImpl.java
===================================================================
--- jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/model/internal/MessageFlowImpl.java 2008-07-23 13:52:06 UTC (rev 1697)
+++ jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/model/internal/MessageFlowImpl.java 2008-07-23 20:17:53 UTC (rev 1698)
@@ -23,6 +23,9 @@
//$Id$
+import org.jboss.bpm.NotImplementedException;
+import org.jboss.bpm.model.GraphicalElement;
+import org.jboss.bpm.model.Message;
import org.jboss.bpm.model.MessageFlow;
/**
@@ -39,4 +42,19 @@
{
super(targetName);
}
+
+ public Message getMessageRef()
+ {
+ throw new NotImplementedException();
+ }
+
+ public GraphicalElement getSourceRef()
+ {
+ throw new NotImplementedException();
+ }
+
+ public GraphicalElement getTargetRef()
+ {
+ throw new NotImplementedException();
+ }
}
\ No newline at end of file
Modified: jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/model/internal/ParallelGatewayImpl.java
===================================================================
--- jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/model/internal/ParallelGatewayImpl.java 2008-07-23 13:52:06 UTC (rev 1697)
+++ jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/model/internal/ParallelGatewayImpl.java 2008-07-23 20:17:53 UTC (rev 1698)
@@ -23,7 +23,11 @@
//$Id$
+import java.util.List;
+
+import org.jboss.bpm.NotImplementedException;
import org.jboss.bpm.model.Flow;
+import org.jboss.bpm.model.Gate;
import org.jboss.bpm.model.ParallelGateway;
import org.jboss.bpm.runtime.FlowHandler;
import org.jboss.bpm.runtime.FlowScheduler;
@@ -44,6 +48,16 @@
super(name);
}
+ public List<Gate> getGates()
+ {
+ throw new NotImplementedException();
+ }
+
+ public GatewayType getGatewayType()
+ {
+ throw new NotImplementedException();
+ }
+
/**
* The default FlowHandler adds all out flows to the queue
*/
Modified: jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/model/internal/ProcessBuilderImpl.java
===================================================================
--- jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/model/internal/ProcessBuilderImpl.java 2008-07-23 13:52:06 UTC (rev 1697)
+++ jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/model/internal/ProcessBuilderImpl.java 2008-07-23 20:17:53 UTC (rev 1698)
@@ -124,9 +124,9 @@
return this;
}
- public ProcessBuilder addExclusiveGateway(String name)
+ public ProcessBuilder addExclusiveDataBasedGateway(String name)
{
- flowObject = new ExclusiveGatewayImpl(name);
+ flowObject = new ExclusiveGatewayDataBasedImpl(name);
proc.addFlowObject(flowObject);
return this;
}
Modified: jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/model/internal/SequenceFlowImpl.java
===================================================================
--- jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/model/internal/SequenceFlowImpl.java 2008-07-23 13:52:06 UTC (rev 1697)
+++ jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/model/internal/SequenceFlowImpl.java 2008-07-23 20:17:53 UTC (rev 1698)
@@ -23,6 +23,9 @@
//$Id$
+import org.jboss.bpm.NotImplementedException;
+import org.jboss.bpm.model.Expression;
+import org.jboss.bpm.model.GraphicalElement;
import org.jboss.bpm.model.SequenceFlow;
/**
@@ -38,4 +41,14 @@
{
super(targetName);
}
+
+ public Expression getConditionExpression()
+ {
+ throw new NotImplementedException();
+ }
+
+ public ConditionType getConditionType()
+ {
+ throw new NotImplementedException();
+ }
}
\ No newline at end of file
15 years, 11 months
JBoss JBPM SVN: r1697 - in jbossbpm/spec/trunk: eclipse and 6 other directories.
by do-not-reply@jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2008-07-23 09:52:06 -0400 (Wed, 23 Jul 2008)
New Revision: 1697
Added:
jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/model/Assignment.java
jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/model/DataBasedExclusiveGateway.java
jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/model/EventBasedExclusiveGateway.java
jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/model/Gate.java
jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/model/ManualTask.java
jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/model/ReceiveTask.java
jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/model/ReferenceTask.java
jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/model/ScriptTask.java
jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/model/SendTask.java
jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/model/ServiceTask.java
jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/model/UserTask.java
jbossbpm/spec/trunk/modules/testsuite/src/test/java/org/jboss/bpm/samples/airticket/
jbossbpm/spec/trunk/modules/testsuite/src/test/java/org/jboss/bpm/samples/airticket/AirticketTest.java
jbossbpm/spec/trunk/modules/testsuite/src/test/java/org/jboss/bpm/samples/airticket/FrontGateServlet.java
Modified:
jbossbpm/spec/trunk/.classpath
jbossbpm/spec/trunk/eclipse/jBPMCodeStyle.xml
jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/model/Activity.java
jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/model/ComplexGateway.java
jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/model/ExclusiveGateway.java
jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/model/Gateway.java
jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/model/InclusiveGateway.java
jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/model/Process.java
jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/model/Task.java
jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/model/internal/SubProcessImpl.java
jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/model/internal/TaskImpl.java
jbossbpm/spec/trunk/modules/testsuite/pom.xml
jbossbpm/spec/trunk/modules/testsuite/src/test/resources/samples/airticket/airticket.png
jbossbpm/spec/trunk/pom.xml
Log:
More BPMN API
Modified: jbossbpm/spec/trunk/.classpath
===================================================================
--- jbossbpm/spec/trunk/.classpath 2008-07-23 05:22:41 UTC (rev 1696)
+++ jbossbpm/spec/trunk/.classpath 2008-07-23 13:52:06 UTC (rev 1697)
@@ -1,12 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" output="modules/api/target/classes" path="modules/api/src/main/java"/>
+ <classpathentry kind="src" path="modules/ri/src/main/java"/>
<classpathentry kind="src" path="modules/dialects/api10/src/main/java"/>
<classpathentry kind="src" path="modules/dialects/stp/src/test/java"/>
<classpathentry kind="src" path="modules/dialects/stp/src/main/java"/>
<classpathentry kind="src" path="modules/dialects/xpdl21/src/main/java"/>
<classpathentry kind="src" path="modules/dialects/jpdl32/src/main/java"/>
- <classpathentry kind="src" path="modules/impl/src/main/java"/>
<classpathentry kind="src" output="modules/testsuite/target/test-classes" path="modules/testsuite/src/test/java"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
<classpathentry kind="con" path="org.maven.ide.eclipse.MAVEN2_CLASSPATH_CONTAINER"/>
Modified: jbossbpm/spec/trunk/eclipse/jBPMCodeStyle.xml
===================================================================
--- jbossbpm/spec/trunk/eclipse/jBPMCodeStyle.xml 2008-07-23 05:22:41 UTC (rev 1696)
+++ jbossbpm/spec/trunk/eclipse/jBPMCodeStyle.xml 2008-07-23 13:52:06 UTC (rev 1697)
@@ -186,7 +186,7 @@
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant" value="16"/>
<setting id="org.eclipse.jdt.core.formatter.comment.format_javadoc_comments" value="true"/>
-<setting id="org.eclipse.jdt.core.formatter.comment.line_length" value="168"/>
+<setting id="org.eclipse.jdt.core.formatter.comment.line_length" value="120"/>
<setting id="org.eclipse.jdt.core.formatter.blank_lines_between_import_groups" value="1"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_semicolon" value="do not insert"/>
Modified: jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/model/Activity.java
===================================================================
--- jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/model/Activity.java 2008-07-23 05:22:41 UTC (rev 1696)
+++ jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/model/Activity.java 2008-07-23 13:52:06 UTC (rev 1697)
@@ -21,17 +21,100 @@
*/
package org.jboss.bpm.model;
+import java.util.List;
+
//$Id$
/**
- * An activity is a generic term for work that a company or organization performs via business processes.
- * An activity can be atomic or non-atomic (compound).
- * The types of activities that are a part of a Process Model are: {@link Process}, {@link SubProcess}, and {@link Task}.
+ * An activity is a generic term for work that a company or organization performs via business processes. An activity can be atomic or non-atomic (compound). The types
+ * of activities that are a part of a Process Model are: {@link Process}, {@link SubProcess}, and {@link Task}.
*
* @author thomas.diesler(a)jboss.com
* @since 08-Jul-2008
*/
public interface Activity extends FlowObject, NameSupport
{
+ /**
+ * The ActivityType MUST be of type Task or Sub-Process.
+ */
+ enum ActivityType
+ {
+ Task, SubProcess
+ }
+
+ /**
+ * The Activity LoopType
+ */
+ enum LoopType
+ {
+ None, Standard, MultiInstance
+ }
+
+ /**
+ * The ActivityType MUST be of type Task or Sub-Process.
+ */
+ ActivityType getActivityType();
+ /**
+ * One or more Performers MAY be entered. The Performer attribute defines the
+ * resource that will perform or will be responsible for the activity. The Performer
+ * entry could be in the form of a specific individual, a group, an organization role
+ * or position, or an organization.
+ */
+ List<String> getPerformers();
+
+ /**
+ * Modeler-defined Properties MAY be added to an activity. These Properties are
+ * “local” to the activity. These Properties are only for use within the processing of
+ * the activity. The fully delineated name of these properties is “<process name>.<activity name>.<property name>”
+ * (e.g., “Add Customer.Review Credit.Status”).
+ */
+ List<Property> getProperties();
+
+ /**
+ * The InputSets attribute defines the data requirements for input to the Activity.
+ * Zero or more InputSets MAY be defined. Each Input set is sufficient to allow the
+ * Activity to be performed (if it has first been instantiated by the appropriate signal
+ * arriving from an incoming Sequence Flow)
+ */
+ List<InputSet> getInputSets();
+
+ /**
+ * The OutputSets attribute defines the data requirements for output from the
+ * activity. Zero or more OutputSets MAY be defined. At the completion of the
+ * activity, only one of the OutputSets may be produced--It is up to the
+ * implementation of the activity to determine which set will be produced. However,
+ * the IORules attribute MAY indicate a relationship between an OutputSet and an
+ * InputSet that started the activity.
+ */
+ List<OutputSet> getOutputSets();
+
+ /**
+ * The IORules attribute is a collection of expressions, each of which specifies the
+ * required relationship between one input and one output. That is, if the activity is
+ * instantiated with a specified input, that activity shall complete with the specified
+ * output.
+ */
+ List<Expression> getIORules();
+
+ /**
+ * The default value is 1. The value MUST NOT be less than 1. This attribute
+ * defines the number of Tokens that must arrive before the activity can begin.
+ */
+ int getStartQuantity();
+
+ /**
+ * The default value is 1. The value MUST NOT be less than 1. This attribute
+ * defines the number of Tokens that must be generated from the activity. This
+ * number of Tokens will be sent down any outgoing Sequence Flow (assuming any
+ * Sequence Flow Conditions are satisfied).
+ */
+ int getCompletionQuantity();
+
+ /**
+ * LoopType is an attribute and is by default None, but MAY be set to Standard or
+ * MultiInstance. A Task of type Receive that has its Instantiate attribute set to True MUST NOT
+ * have a Standard or MultiInstance LoopType.
+ */
+ LoopType getLoopType();
}
\ No newline at end of file
Added: jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/model/Assignment.java
===================================================================
--- jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/model/Assignment.java (rev 0)
+++ jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/model/Assignment.java 2008-07-23 13:52:06 UTC (rev 1697)
@@ -0,0 +1,65 @@
+/*
+ * 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.jboss.bpm.model;
+
+//$Id$
+
+/**
+ * An Assignment, which is used in the definition of attributes for Process,
+ * Activities, Events, Gateways, and Gates.
+ *
+ * @author thomas.diesler(a)jboss.com
+ * @since 08-Jul-2008
+ */
+public interface Assignment extends BPMNElement
+{
+ enum AssignTime
+ {
+ Start, End
+ }
+
+ /**
+ * The target for the Assignment MUST be a Property of the Process or the activity
+ * itself.
+ */
+ Property getTo();
+
+ /**
+ * The Expression MUST be made up of a combination of Values, Properties, and
+ * Attributes, which are separated by operators such as add or multiply. The expression
+ * language is defined in the ExpressionLanguage attribute of the Business Process
+ * Diagram
+ */
+ Expression getFrom();
+
+ /**
+ * An Assignment MAY have a AssignTime setting. If the Object is an activity (Task,
+ * Sub-Process, or Process), then the Assignment MUST have an AssignTime.
+ * A value of Start means that the assignment SHALL occur at the start of the activity.
+ * This can be used to assign the higher-level (global) Properties of the Process to the
+ * (local) Properties of the activity as an input to the activity.
+ * A value of End means that the assignment SHALL occur at the end of the activity.
+ * This can be used to assign the (local) Properties of the activity to the higher-level
+ * (global) Properties of the Process as an output to the activity.
+ */
+ AssignTime getAssignTime();
+}
Property changes on: jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/model/Assignment.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Modified: jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/model/ComplexGateway.java
===================================================================
--- jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/model/ComplexGateway.java 2008-07-23 05:22:41 UTC (rev 1696)
+++ jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/model/ComplexGateway.java 2008-07-23 13:52:06 UTC (rev 1697)
@@ -21,17 +21,30 @@
*/
package org.jboss.bpm.model;
-
// $Id$
/**
- * A Complex Gateway handles situations that are not easily handled through the other types of Gateways. Complex Gateways can also be used to combine a set of linked
- * simple Gateways into a single, more compact situation. Modelers can provide complex expressions that determine the merging and/or splitting behavior of the Gateway.
+ * A Complex Gateway handles situations that are not easily handled through the other types of Gateways. Complex
+ * Gateways can also be used to combine a set of linked simple Gateways into a single, more compact situation. Modelers
+ * can provide complex expressions that determine the merging and/or splitting behavior of the Gateway.
*
* @author thomas.diesler(a)jboss.com
* @since 08-Jul-2008
*/
public interface ComplexGateway extends Gateway
{
+ /**
+ * If there are multiple incoming Sequence Flow, an IncomingCondition expression
+ * MUST be set by the modeler. This will consist of an expression that can reference
+ * Sequence Flow names and/or Process Properties (Data).
+ */
+ Expression getIncommingCondition();
+ /**
+ * If there are multiple outgoing Sequence Flow, an OutgoingCondition expression
+ * MUST be set by the modeler. This will consist of an expression that can reference
+ * (outgoing) Sequence Flow Ids and/or Process Properties (Data).
+ */
+ Expression getOutgoingCondition();
+
}
\ No newline at end of file
Added: jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/model/DataBasedExclusiveGateway.java
===================================================================
--- jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/model/DataBasedExclusiveGateway.java (rev 0)
+++ jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/model/DataBasedExclusiveGateway.java 2008-07-23 13:52:06 UTC (rev 1697)
@@ -0,0 +1,55 @@
+/*
+ * 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.jboss.bpm.model;
+
+
+//$Id$
+
+/**
+ * The Data-Based Exclusive Gateways are the most commonly used type of Gateways. The set of Gates for Data-Based
+ * Exclusive Decisions is based on the boolean expression contained in the ConditionExpression attribute of the outgoing
+ * Sequence Flow of the Gateway. These expressions use the values of process data to determine which path should be taken
+ * (hence the name Data-Based).
+ *
+ * The conditions for the alternative Gates should be evaluated in a specific order. The first one that evaluates as TRUE will
+ * determine the Sequence Flow that will be taken. Since the behavior of this Gateway is exclusive, any other conditions that
+ * may actually be TRUE will be ignored--only one Gate can be chosen. One of the Gates may be “default” (or otherwise),
+ * and is the last Gate considered. This means that if none of the other Gates are chosen, then the default Gate will be
+ * chosen—along with its associated Sequence Flow.
+ *
+ * The default Gate is not mandatory for a Gateway. This means that if it is not used, then it is up to the modeler to insure
+ * that at least one Gate be valid at runtime. BPMN does not specify what will happen if there are no valid Gates. However,
+ * BPMN does specify that there MUST NOT be implicit flow and that all Normal Flow of a Process must be expressed
+ * through Sequence Flow. This would mean that a Process Model that has a Gateway that potentially does not have a valid
+ * Gate at runtime is an invalid model.
+ *
+ * @author thomas.diesler(a)jboss.com
+ * @since 08-Jul-2008
+ */
+public interface DataBasedExclusiveGateway extends ExclusiveGateway
+{
+ /**
+ * A Default Gate MAY be specified
+ */
+ Gate getDefaultGate();
+
+}
\ No newline at end of file
Property changes on: jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/model/DataBasedExclusiveGateway.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/model/EventBasedExclusiveGateway.java
===================================================================
--- jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/model/EventBasedExclusiveGateway.java (rev 0)
+++ jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/model/EventBasedExclusiveGateway.java 2008-07-23 13:52:06 UTC (rev 1697)
@@ -0,0 +1,53 @@
+/*
+ * 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.jboss.bpm.model;
+
+
+//$Id$
+
+/**
+ * The inclusion of Event-Based Exclusive Gateways is the result of recent developments in the handling of distributed
+ * systems (e.g., with pi-calculus) and was derived from the BPEL4WS pick. On the input side, their behavior is the same as
+ * a Data-Based Exclusive Gateway (see “Data-Based” on page 73). On the output side, the basic idea is that this Decision
+ * represents a branching point in the process where the alternatives are based on events that occurs at that point in the
+ * Process, rather than the evaluation of expressions using process data. A specific event, usually the receipt of a message,
+ * determines which of the paths will be taken. For example, if a company is waiting for a response from a customer, they
+ * will perform one set of activities if the customer responds “Yes” and another set of activities if the customer responds
+ * “No.” The customer’s response determines which path is taken. The identity of the Message determines which path is taken.
+ * That is, the “Yes” Message and the “No” message are different messages—they are not the same message with different values
+ * within a property of the Message. The receipt of the message can be modeled with a Task of TaskType Receive or an
+ * Intermediate Event with a Message Trigger. In addition to Messages, other Triggers for Intermediate Events can be used, such as Timers.
+ *
+ * @author thomas.diesler(a)jboss.com
+ * @since 08-Jul-2008
+ */
+public interface EventBasedExclusiveGateway extends ExclusiveGateway
+{
+ /**
+ * Event-Based Gateways can be defined as the instantiation mechanism for the
+ * Process with the Instantiate attribute. This attribute MAY be set to true if the
+ * Gateway is the first element after the Start Event or a starting Gateway if there is
+ * no Start Event (i.e., there are no incoming Sequence Flow).
+ */
+ boolean isInstantiate();
+
+}
\ No newline at end of file
Property changes on: jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/model/EventBasedExclusiveGateway.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Modified: jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/model/ExclusiveGateway.java
===================================================================
--- jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/model/ExclusiveGateway.java 2008-07-23 05:22:41 UTC (rev 1696)
+++ jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/model/ExclusiveGateway.java 2008-07-23 13:52:06 UTC (rev 1697)
@@ -25,12 +25,33 @@
//$Id$
/**
- * A point in the workflow process where, based on a decision or workflow control data, one of several branches is chosen.
+ * Exclusive Gateways (Decisions) are locations within a business process where the Sequence Flow can take two or more
+ * alternative paths. This is basically the “fork in the road” for a process. For a given performance (or instance) of the
+ * process, only one of the paths can be taken (this should not be confused with forking of paths—refer to “Forking Flow”)
*
+ * A Decision is not an activity from the business process perspective, but is a type of Gateway that controls
+ * the Sequence Flow between activities. It can be thought of as a question that is asked at that point in the Process. The
+ * question has a defined set of alternative answers (Gates). Each Decision Gate is associated with a condition expression
+ * found within an outgoing Sequence Flow. When a Gate is chosen during the performance of the Process, the
+ * corresponding Sequence Flow is then chosen. A Token arriving at the Decision would be directed down the appropriate
+ * path, based on the chosen Gate.
+ *
+ * The Exclusive Decision has two or more outgoing Sequence Flow, but only one of them may be taken during the
+ * performance of the Process. Thus, the Exclusive Decision defines a set of alternative paths for the Token to take as it
+ * traverses the Flow. There are two types of Exclusive Decisions: Data-Based and Event-Based.
+ *
* @author thomas.diesler(a)jboss.com
* @since 08-Jul-2008
*/
public interface ExclusiveGateway extends Gateway
{
-
+ enum ExclusiveType
+ {
+ Data, Event
+ }
+
+ /**
+ * ExclusiveType is by default Data. The ExclusiveType MAY be set to Event.
+ */
+ ExclusiveType getExclusiveType();
}
\ No newline at end of file
Added: jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/model/Gate.java
===================================================================
--- jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/model/Gate.java (rev 0)
+++ jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/model/Gate.java 2008-07-23 13:52:06 UTC (rev 1697)
@@ -0,0 +1,75 @@
+/*
+ * 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.jboss.bpm.model;
+
+import java.util.List;
+
+
+
+//$Id$
+
+/**
+ * There MAY be zero or more Gates (except where noted below). Zero Gates are
+ * allowed if the Gateway is last object in a Process flow and there are no Start or
+ * End Events for the Process. If there are zero or only one incoming Sequence
+ * Flow, then there MUST be at least two Gates.
+ *
+ * For Exclusive Data-Based Gateways
+ * When two Gates are required, one of them MAY be the DefaultGate.
+ *
+ * For Exclusive Event-Based Gateways
+ * There MUST be two or more Gates. (Note that this type of Gateway does not act
+ * only as a Merge--it is always a Decision, at least.)
+ *
+ * For Inclusive Gateways
+ * When two Gates are required, one of them MAY be the DefaultGate.
+ *
+ * @author thomas.diesler(a)jboss.com
+ * @since 08-Jul-2008
+ */
+public interface Gate extends BPMNElement
+{
+ /**
+ * Each Gate MUST have an associated (outgoing) Sequence Flow.
+ *
+ * For Exclusive Event-Based, Complex, and Parallel Gateways:
+ * The Sequence Flow MUST have its Condition attribute set to None (there is not an
+ * evaluation of a condition expression).
+ *
+ * For Exclusive Data-Based, and Inclusive Gateways:
+ * The Sequence Flow MUST have its Condition attribute set to Expression and
+ * MUST have a valid ConditionExpression. The ConditionExpression MUST be
+ * unique for all the Gates within the Gateway. If there is only one Gate (i.e., the
+ * Gateway is acting only as a Merge), then Sequence Flow MUST have its Condition
+ * set to None.
+ *
+ * For DefaultGates:
+ * The Sequence Flow MUST have its Condition attribute set to Otherwise
+ */
+ SequenceFlow getOutgoingSequenceFlow();
+
+ /**
+ * One or more assignment expressions MAY be made for each Gate. The
+ * Assignment SHALL be performed when the Gate is selected.
+ */
+ List<Assignment> getAssignments();
+}
Property changes on: jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/model/Gate.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Modified: jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/model/Gateway.java
===================================================================
--- jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/model/Gateway.java 2008-07-23 05:22:41 UTC (rev 1696)
+++ jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/model/Gateway.java 2008-07-23 13:52:06 UTC (rev 1697)
@@ -21,18 +21,50 @@
*/
package org.jboss.bpm.model;
+import java.util.List;
//$Id$
/**
- * Gateways are modelling elements that are used to control how Flows interact as they converge and diverge within a Process.
- * </p>
- * If the flow does not need to be controlled, then a Gateway is not needed.
+ * Gateways are modeling elements that are used to control how Sequence Flow interact as they converge and diverge within
+ * a Process. If the flow does not need to be controlled, then a Gateway is not needed. The term “Gateway” implies that
+ * there is a gating mechanism that either allows or disallows passage through the Gateway--that is, as Tokens arrive at a
+ * Gateway, they can be merged together on input and/or split apart on output as the Gateway mechanisms are invoked. To
+ * be more descriptive, a Gateway is actually a collection of “Gates.”
*
* @author thomas.diesler(a)jboss.com
* @since 08-Jul-2008
*/
public interface Gateway extends FlowObject, NameSupport, MultipleOutFlowSupport, MultipleInFlowSupport
{
+ /**
+ * The GatewayType
+ *
+ */
+ enum GatewayType
+ {
+ Exclusive, Inclusive, Complex, Parallel
+ }
+ /**
+ * GatewayType is by default Exclusive. The GatewayType MAY be set to Inclusive, Complex, or Parallel. The GatewayType will determine the behavior of the Gateway,
+ * both for incoming and outgoing Sequence Flow
+ */
+ GatewayType getGatewayType();
+
+ /**
+ * There MAY be zero or more Gates (except where noted below). Zero Gates are allowed if the Gateway is last object in a Process flow and there are no Start or End
+ * Events for the Process. If there are zero or only one incoming Sequence Flow, then there MUST be at least two Gates.
+ *
+ * For Exclusive Data-Based Gateways.
+ * When two Gates are required, one of them MAY be the DefaultGate.
+ *
+ * For Exclusive Event-Based Gateways.
+ * There MUST be two or more Gates. (Note that this type of Gateway does not act only as a Merge--it is always a Decision, at
+ * least.)
+ *
+ * For Inclusive Gateways.
+ * When two Gates are required, one of them MAY be the DefaultGate.
+ */
+ List<Gate> getGates();
}
\ No newline at end of file
Modified: jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/model/InclusiveGateway.java
===================================================================
--- jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/model/InclusiveGateway.java 2008-07-23 05:22:41 UTC (rev 1696)
+++ jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/model/InclusiveGateway.java 2008-07-23 13:52:06 UTC (rev 1697)
@@ -24,14 +24,20 @@
//$Id$
/**
- * This Decision represents a branching point where Alternatives are based on conditional expressions contained within outgoing Sequence Flow.
- * However, in this case, the True evaluation of one condition expression does not exclude the evaluation of other condition expressions.
- * All Sequence Flow with a True evaluation will be traversed by a Token.
+ * This Decision represents a branching point where Alternatives are based on conditional expressions contained within
+ * outgoing Sequence Flow. However, in this case, the True evaluation of one condition expression does not exclude the
+ * evaluation of other condition expressions. All Sequence Flow with a True evaluation will be traversed by a Token. In
+ * some sense it’s like a grouping of related independent Binary (Yes/No) Decisions--and can be modeled that way. Since
+ * each path is independent, all combinations of the paths may be taken, from zero to all. However, it should be
+ * designed so that at least one path is taken.
*
* @author thomas.diesler(a)jboss.com
* @since 08-Jul-2008
*/
public interface InclusiveGateway extends Gateway
{
-
+ /**
+ * A Default Gate MAY be specified
+ */
+ Gate getDefaultGate();
}
\ No newline at end of file
Added: jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/model/ManualTask.java
===================================================================
--- jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/model/ManualTask.java (rev 0)
+++ jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/model/ManualTask.java 2008-07-23 13:52:06 UTC (rev 1697)
@@ -0,0 +1,35 @@
+/*
+ * 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.jboss.bpm.model;
+
+//$Id$
+
+/**
+ * A Manual Task is a Task that is expected to be performed without the aid of any business process execution engine or any
+ * application. An example of this could be a telephone technician installing a telephone at a customer location.
+ *
+ * @author thomas.diesler(a)jboss.com
+ * @since 08-Jul-2008
+ */
+public interface ManualTask extends Task
+{
+}
\ No newline at end of file
Property changes on: jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/model/ManualTask.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Modified: jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/model/Process.java
===================================================================
--- jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/model/Process.java 2008-07-23 05:22:41 UTC (rev 1696)
+++ jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/model/Process.java 2008-07-23 13:52:06 UTC (rev 1697)
@@ -100,13 +100,17 @@
List<InputSet> getInputSets();
/**
- * The InputSets attribute defines the data requirements for input to the Process.
- * Zero or more InputSets MAY be defined. Each Input set is sufficient to allow the
- * Process to be performed (if it has first been instantiated by the appropriate signal
- * arriving from an incoming Sequence Flow)
+ * The OutputSets attribute defines the data requirements for output from the
+ * Process. Zero or more OutputSets MAY be defined. At the completion of the
+ * Process, only one of the OutputSets may be produced--It is up to the
+ * implementation of the Process to determine which set will be produced. However,
+ * the IORules attribute MAY indicate a relationship between an OutputSet and an
+ * InputSet that started the Process.
*/
List<OutputSet> getOutputSets();
+ // Not Part of BPMN ========================================================================
+
/**
* Get the start event
*/
Added: jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/model/ReceiveTask.java
===================================================================
--- jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/model/ReceiveTask.java (rev 0)
+++ jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/model/ReceiveTask.java 2008-07-23 13:52:06 UTC (rev 1697)
@@ -0,0 +1,59 @@
+/*
+ * 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.jboss.bpm.model;
+
+//$Id$
+
+/**
+ * A Receive Task.
+ *
+ * @author thomas.diesler(a)jboss.com
+ * @since 08-Jul-2008
+ */
+public interface ReceiveTask extends Task
+{
+ /**
+ * A Message for the MessageRef attribute MUST be entered. This indicates
+ * that the Message will be received by the Task. The Message in this context
+ * is equivalent to an in-only message pattern (Web service). One or more
+ * corresponding incoming Message Flows MAY be shown on the diagram.
+ * However, the display of the Message Flow is not required. The Message is
+ * applied to all incoming Message Flow, but can arrive for only one of the
+ * incoming Message Flow for a single instance of the Task.
+ */
+ Message getMessageRef();
+
+ /**
+ * Receive Tasks can be defined as the instantiation mechanism for the
+ * Process with the Instantiate attribute. This attribute MAY be set to true if
+ * the Task is the first activity after the Start Event or a starting Task if there
+ * is no Start Event (i.e., there are no incoming Sequence Flow). Multiple
+ * Tasks MAY have this attribute set to True.
+ */
+ boolean isInstantiate();
+
+ /**
+ * This attribute specifies the technology that will be used to send or receive the
+ * message. A Web service is the default technology.
+ */
+ Implementation getImplementation();
+}
\ No newline at end of file
Property changes on: jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/model/ReceiveTask.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/model/ReferenceTask.java
===================================================================
--- jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/model/ReferenceTask.java (rev 0)
+++ jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/model/ReferenceTask.java 2008-07-23 13:52:06 UTC (rev 1697)
@@ -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.jboss.bpm.model;
+
+//$Id$
+
+/**
+ * There may be times where a modeler may want to reference another activity that has been defined. If the two (or more)
+ * activities share the exact same behavior, then by one referencing the other, the attributes that define the behavior only
+ * have to be created once and maintained in only one location.
+ *
+ * @author thomas.diesler(a)jboss.com
+ * @since 08-Jul-2008
+ */
+public interface ReferenceTask extends Task
+{
+ /**
+ * The Task being referenced MUST be identified.
+ */
+ Task getTaskRef();
+}
\ No newline at end of file
Property changes on: jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/model/ReferenceTask.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/model/ScriptTask.java
===================================================================
--- jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/model/ScriptTask.java (rev 0)
+++ jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/model/ScriptTask.java 2008-07-23 13:52:06 UTC (rev 1697)
@@ -0,0 +1,41 @@
+/*
+ * 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.jboss.bpm.model;
+
+//$Id$
+
+/**
+ * A Script Task is executed by a business process engine. The modeler or implementer defines a script in a language that
+ * the engine can interpret. When the Task is ready to start, the engine will execute the script. When the script is completed,
+ * the Task will also be completed.
+ *
+ * @author thomas.diesler(a)jboss.com
+ * @since 08-Jul-2008
+ */
+public interface ScriptTask extends Task
+{
+ /**
+ * The modeler MAY include a script that can be run when the Task is performed. If
+ * a script is not included, then the Task will act equivalent to a TaskType of None.
+ */
+ String getScript();
+}
\ No newline at end of file
Property changes on: jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/model/ScriptTask.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/model/SendTask.java
===================================================================
--- jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/model/SendTask.java (rev 0)
+++ jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/model/SendTask.java 2008-07-23 13:52:06 UTC (rev 1697)
@@ -0,0 +1,46 @@
+/*
+ * 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.jboss.bpm.model;
+
+//$Id$
+
+/**
+ * A Send Task.
+ *
+ * @author thomas.diesler(a)jboss.com
+ * @since 08-Jul-2008
+ */
+public interface SendTask extends Task
+{
+ /**
+ * A Message for the MessageRef attribute MUST be entered. This indicates that the Message will be sent by the Task. The Message in this context is equivalent to an
+ * out-only message pattern (Web service). One or more corresponding outgoing Message Flow MAY be shown on the diagram. However, the display of the Message Flow is
+ * not required. The Message is applied to all outgoing Message Flow and the Message will be sent down all outgoing Message Flow at the completion of a single
+ * instance of the Task.
+ */
+ Message getMessageRef();
+
+ /**
+ * This attribute specifies the technology that will be used to send or receive the message. A Web service is the default technology.
+ */
+ Implementation getImplementation();
+}
\ No newline at end of file
Property changes on: jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/model/SendTask.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/model/ServiceTask.java
===================================================================
--- jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/model/ServiceTask.java (rev 0)
+++ jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/model/ServiceTask.java 2008-07-23 13:52:06 UTC (rev 1697)
@@ -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.jboss.bpm.model;
+
+//$Id$
+
+/**
+ * A Service Task.
+ *
+ * @author thomas.diesler(a)jboss.com
+ * @since 08-Jul-2008
+ */
+public interface ServiceTask extends Task
+{
+ /**
+ * A Message for the InMessageRef attribute MUST be entered. This indicates
+ * that the Message will be received at the start of the Task, after the
+ * availability of any defined InputSets. One or more corresponding incoming
+ * Message Flows MAY be shown on the diagram. However, the display of the
+ * Message Flow is not required. The Message is applied to all incoming
+ * Message Flow, but can arrive for only one of the incoming Message Flow
+ * for a single instance of the Task.
+ */
+ Message getInMessageRef();
+
+ /**
+ * A Message for the OutMessageRef attribute MUST be entered. The sending
+ * of this message marks the completion of the Task, which may cause the
+ * production of an OutputSet. One or more corresponding outgoing Message
+ * Flow MAY be shown on the diagram. However, the display of the Message
+ * Flow is not required. The Message is applied to all outgoing Message Flow
+ * and the Message will be sent down all outgoing Message Flow at the
+ * completion of a single instance of the Task.
+ */
+ Message getOutMessageRef();
+
+ /**
+ * This attribute specifies the technology that will be used to send or receive the
+ * message. A Web service is the default technology.
+ */
+ Implementation getImplementation();
+}
\ No newline at end of file
Property changes on: jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/model/ServiceTask.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Modified: jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/model/Task.java
===================================================================
--- jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/model/Task.java 2008-07-23 05:22:41 UTC (rev 1696)
+++ jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/model/Task.java 2008-07-23 13:52:06 UTC (rev 1697)
@@ -22,6 +22,7 @@
package org.jboss.bpm.model;
+
//$Id$
/**
@@ -35,4 +36,31 @@
*/
public interface Task extends Activity, SingleInFlowSupport, SingleOutFlowSupport
{
+ /**
+ * Specifies the technology that will be used to send or receive the
+ * message.
+ */
+ enum Implementation
+ {
+ WebService, Other, Unspecified
+ }
+
+ /**
+ * The TaskType
+ */
+ enum TaskType
+ {
+ Service, Receive, Send, User, Script, Manual, Reference, None
+ }
+
+ /**
+ * TaskType is an attribute that has a default of None, but MAY be set to Send,
+ * Receive, User, Script, Manual, Reference, or Service. The TaskType will be
+ * impacted by the Message Flow to and/or from the Task, if Message Flow are
+ * used. A TaskType of Receive MUST NOT have an outgoing Message Flow. A
+ * TaskType of Send MUST NOT have an incoming Message Flow. A TaskType of
+ * Script or Manual MUST NOT have an incoming or an outgoing Message Flow.
+ * The TaskType list MAY be extended to include new types.
+ */
+ TaskType getTaskType();
}
\ No newline at end of file
Added: jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/model/UserTask.java
===================================================================
--- jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/model/UserTask.java (rev 0)
+++ jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/model/UserTask.java 2008-07-23 13:52:06 UTC (rev 1697)
@@ -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.jboss.bpm.model;
+
+//$Id$
+
+/**
+ * A User Task is a typical “workflow” task where a human performer performs the Task with the assistance of a software
+ * application and is scheduled through a task list manager of some sort.
+ *
+ * @author thomas.diesler(a)jboss.com
+ * @since 08-Jul-2008
+ */
+public interface UserTask extends Task
+{
+ /**
+ * A Message for the InMessageRef attribute MUST be entered. This indicates
+ * that the Message will be received at the start of the Task, after the
+ * availability of any defined InputSets. One or more corresponding incoming
+ * Message Flows MAY be shown on the diagram. However, the display of the
+ * Message Flow is not required. The Message is applied to all incoming
+ * Message Flow, but can arrive for only one of the incoming Message Flow
+ * for a single instance of the Task.
+ */
+ Message getInMessageRef();
+
+ /**
+ * A Message for the OutMessageRef attribute MUST be entered. The sending
+ * of this message marks the completion of the Task, which may cause the
+ * production of an OutputSet. One or more corresponding outgoing Message
+ * Flow MAY be shown on the diagram. However, the display of the Message
+ * Flow is not required. The Message is applied to all outgoing Message Flow
+ * and the Message will be sent down all outgoing Message Flow at the
+ * completion of a single instance of the Task.
+ */
+ Message getOutMessageRef();
+
+ /**
+ * This attribute specifies the technology that will be used to send or receive the message. A Web service is the default technology.
+ */
+ Implementation getImplementation();
+}
\ No newline at end of file
Property changes on: jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/model/UserTask.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Modified: jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/model/internal/SubProcessImpl.java
===================================================================
--- jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/model/internal/SubProcessImpl.java 2008-07-23 05:22:41 UTC (rev 1696)
+++ jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/model/internal/SubProcessImpl.java 2008-07-23 13:52:06 UTC (rev 1697)
@@ -23,9 +23,15 @@
//$Id$
+import java.util.List;
+
import org.jboss.bpm.NotImplementedException;
+import org.jboss.bpm.model.Expression;
import org.jboss.bpm.model.Flow;
import org.jboss.bpm.model.FlowObject;
+import org.jboss.bpm.model.InputSet;
+import org.jboss.bpm.model.OutputSet;
+import org.jboss.bpm.model.Property;
import org.jboss.bpm.model.Signal;
import org.jboss.bpm.model.SubProcess;
import org.jboss.bpm.runtime.ExecutionHandler;
@@ -54,6 +60,51 @@
super(name);
}
+ public ActivityType getActivityType()
+ {
+ return ActivityType.SubProcess;
+ }
+
+ public int getCompletionQuantity()
+ {
+ throw new NotImplementedException();
+ }
+
+ public List<Expression> getIORules()
+ {
+ throw new NotImplementedException();
+ }
+
+ public List<InputSet> getInputSets()
+ {
+ throw new NotImplementedException();
+ }
+
+ public LoopType getLoopType()
+ {
+ throw new NotImplementedException();
+ }
+
+ public List<OutputSet> getOutputSets()
+ {
+ throw new NotImplementedException();
+ }
+
+ public List<String> getPerformers()
+ {
+ throw new NotImplementedException();
+ }
+
+ public List<Property> getProperties()
+ {
+ throw new NotImplementedException();
+ }
+
+ public int getStartQuantity()
+ {
+ throw new NotImplementedException();
+ }
+
public Flow getInFlow()
{
return inFlow;
Modified: jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/model/internal/TaskImpl.java
===================================================================
--- jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/model/internal/TaskImpl.java 2008-07-23 05:22:41 UTC (rev 1696)
+++ jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/model/internal/TaskImpl.java 2008-07-23 13:52:06 UTC (rev 1697)
@@ -21,9 +21,16 @@
*/
package org.jboss.bpm.model.internal;
+import java.util.List;
+
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
+import org.jboss.bpm.NotImplementedException;
+import org.jboss.bpm.model.Expression;
import org.jboss.bpm.model.Flow;
+import org.jboss.bpm.model.InputSet;
+import org.jboss.bpm.model.OutputSet;
+import org.jboss.bpm.model.Property;
import org.jboss.bpm.model.Signal;
import org.jboss.bpm.model.Task;
import org.jboss.bpm.runtime.ExecutionHandler;
@@ -60,6 +67,56 @@
super(name);
}
+ public ActivityType getActivityType()
+ {
+ return ActivityType.Task;
+ }
+
+ public int getCompletionQuantity()
+ {
+ throw new NotImplementedException();
+ }
+
+ public List<Expression> getIORules()
+ {
+ throw new NotImplementedException();
+ }
+
+ public List<InputSet> getInputSets()
+ {
+ throw new NotImplementedException();
+ }
+
+ public LoopType getLoopType()
+ {
+ throw new NotImplementedException();
+ }
+
+ public List<OutputSet> getOutputSets()
+ {
+ throw new NotImplementedException();
+ }
+
+ public List<String> getPerformers()
+ {
+ throw new NotImplementedException();
+ }
+
+ public List<Property> getProperties()
+ {
+ throw new NotImplementedException();
+ }
+
+ public int getStartQuantity()
+ {
+ throw new NotImplementedException();
+ }
+
+ public TaskType getTaskType()
+ {
+ throw new NotImplementedException();
+ }
+
/**
* Get the out flow
*/
Modified: jbossbpm/spec/trunk/modules/testsuite/pom.xml
===================================================================
--- jbossbpm/spec/trunk/modules/testsuite/pom.xml 2008-07-23 05:22:41 UTC (rev 1696)
+++ jbossbpm/spec/trunk/modules/testsuite/pom.xml 2008-07-23 13:52:06 UTC (rev 1697)
@@ -1,16 +1,30 @@
<?xml version="1.0" encoding="UTF-8"?>
-
-<!-- ====================================================================== -->
-<!-- -->
-<!-- JBoss, the OpenSource J2EE webOS -->
-<!-- -->
-<!-- Distributable under LGPL license. -->
-<!-- See terms of license at http://www.gnu.org. -->
-<!-- -->
-<!-- ====================================================================== -->
-
-<!-- $Id$ -->
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+ <!--
+ ======================================================================
+ -->
+ <!--
+ -->
+ <!--
+ JBoss, the OpenSource J2EE webOS
+ -->
+ <!--
+ -->
+ <!--
+ Distributable under LGPL license.
+ -->
+ <!--
+ See terms of license at http://www.gnu.org.
+ -->
+ <!--
+ -->
+ <!--
+ ======================================================================
+ -->
+ <!--
+ $Id$
+ -->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<name>JBossBPM - Spec Testsuite</name>
<groupId>org.jboss.bpm</groupId>
@@ -37,6 +51,11 @@
<!-- Test Dependencies -->
<dependency>
+ <groupId>javax.servlet</groupId>
+ <artifactId>servlet-api</artifactId>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<scope>test</scope>
@@ -114,7 +133,8 @@
<configuration>
<artifacts>
<artifact>
- <file>target/${project.artifactId}-${project.version}.zip</file>
+ <file>target/${project.artifactId}-${project.version}.zip
+ </file>
<type>zip</type>
</artifact>
</artifacts>
Added: jbossbpm/spec/trunk/modules/testsuite/src/test/java/org/jboss/bpm/samples/airticket/AirticketTest.java
===================================================================
--- jbossbpm/spec/trunk/modules/testsuite/src/test/java/org/jboss/bpm/samples/airticket/AirticketTest.java (rev 0)
+++ jbossbpm/spec/trunk/modules/testsuite/src/test/java/org/jboss/bpm/samples/airticket/AirticketTest.java 2008-07-23 13:52:06 UTC (rev 1697)
@@ -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.jboss.bpm.samples.airticket;
+
+// $Id$
+
+import java.net.URL;
+
+import org.jboss.bpm.client.ProcessManager;
+import org.jboss.bpm.model.Process;
+import org.jboss.bpm.test.DefaultEngineTestCase;
+
+/**
+ * Test the Airticket sample application
+ *
+ * @author thomas.diesler(a)jboss.com
+ * @since 03-Jul-2008
+ */
+public class AirticketTest extends DefaultEngineTestCase
+{
+ public void testProcessStart() throws Exception
+ {
+ URL jpdlURL = getResourceURL("samples/airticket/airticket.bpmn");
+
+ // Create a Process through the ProcessManager
+ ProcessManager pm = ProcessManager.locateProcessManager();
+ Process proc = pm.createProcess(jpdlURL);
+ assertNotNull(proc);
+
+ }
+}
Property changes on: jbossbpm/spec/trunk/modules/testsuite/src/test/java/org/jboss/bpm/samples/airticket/AirticketTest.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: jbossbpm/spec/trunk/modules/testsuite/src/test/java/org/jboss/bpm/samples/airticket/FrontGateServlet.java
===================================================================
--- jbossbpm/spec/trunk/modules/testsuite/src/test/java/org/jboss/bpm/samples/airticket/FrontGateServlet.java (rev 0)
+++ jbossbpm/spec/trunk/modules/testsuite/src/test/java/org/jboss/bpm/samples/airticket/FrontGateServlet.java 2008-07-23 13:52:06 UTC (rev 1697)
@@ -0,0 +1,64 @@
+/*
+ * 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.jboss.bpm.samples.airticket;
+
+// $Id$
+
+import java.io.IOException;
+import java.net.MalformedURLException;
+
+import javax.servlet.ServletConfig;
+import javax.servlet.ServletException;
+import javax.servlet.http.HttpServlet;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+/**
+ * Test that the execution context
+ *
+ * @author thomas.diesler(a)jboss.com
+ * @since 03-Jul-2008
+ */
+@SuppressWarnings("serial")
+public class FrontGateServlet extends HttpServlet
+{
+ @Override
+ public void init(ServletConfig config) throws ServletException
+ {
+ super.init(config);
+
+ try
+ {
+ config.getServletContext().getResource("airticket.bpmn");
+ }
+ catch (MalformedURLException e)
+ {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ }
+ }
+
+ @Override
+ protected void service(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException
+ {
+ }
+}
Property changes on: jbossbpm/spec/trunk/modules/testsuite/src/test/java/org/jboss/bpm/samples/airticket/FrontGateServlet.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Modified: jbossbpm/spec/trunk/modules/testsuite/src/test/resources/samples/airticket/airticket.png
===================================================================
(Binary files differ)
Modified: jbossbpm/spec/trunk/pom.xml
===================================================================
--- jbossbpm/spec/trunk/pom.xml 2008-07-23 05:22:41 UTC (rev 1696)
+++ jbossbpm/spec/trunk/pom.xml 2008-07-23 13:52:06 UTC (rev 1697)
@@ -10,16 +10,13 @@
<!-- ====================================================================== -->
<!-- $Id: pom.xml 7412 2008-06-06 13:42:30Z thomas.diesler(a)jboss.com $ -->
-
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
-
<name>JBossBPM - Spec</name>
<groupId>org.jboss.bpm</groupId>
<artifactId>bpm-spec</artifactId>
<packaging>pom</packaging>
-
<version>1.0.0-SNAPSHOT</version>
<!-- Parent -->
@@ -41,6 +38,7 @@
<properties>
<commons.logging.version>1.1.1</commons.logging.version>
<jaxb.ri.version>2.1.7</jaxb.ri.version>
+ <javax.servlet.version>2.5</javax.servlet.version>
<jboss.microcontainer.version>2.0.0.Beta15</jboss.microcontainer.version>
<jboss.jbpm3.version>3.2.4-SNAPSHOT</jboss.jbpm3.version>
</properties>
@@ -68,22 +66,20 @@
<artifactId>jboss-kernel</artifactId>
<version>${jboss.microcontainer.version}</version>
</dependency>
+ <dependency>
+ <groupId>javax.servlet</groupId>
+ <artifactId>servlet-api</artifactId>
+ <version>${javax.servlet.version}</version>
+ </dependency>
</dependencies>
</dependencyManagement>
<!-- DistributionManagement -->
<distributionManagement>
<!--
- Add this to your ~/.m2/settings.xml
- <servers>
- <server>
- <id>jbpm.dyndns.org</id>
- <username>yourname</username>
- <privateKey>/home/yourname/.ssh/id_rsa</privateKey>
- <passphrase>yourpass</passphrase>
- </server>
- </servers>
- -->
+ Add this to your ~/.m2/settings.xml <servers> <server> <id>jbpm.dyndns.org</id> <username>yourname</username>
+ <privateKey>/home/yourname/.ssh/id_rsa</privateKey> <passphrase>yourpass</passphrase> </server> </servers>
+ -->
<site>
<id>jbpm.dyndns.org</id>
<url>scp://jbpm.dyndns.org/var/www/html/jbpm-site</url>
@@ -110,5 +106,4 @@
</build>
</profile>
</profiles>
-
</project>
\ No newline at end of file
15 years, 11 months
JBoss JBPM SVN: r1696 - jbossbpm/spec/trunk/modules/testsuite/src/test/resources/samples/airticket.
by do-not-reply@jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2008-07-23 01:22:41 -0400 (Wed, 23 Jul 2008)
New Revision: 1696
Added:
jbossbpm/spec/trunk/modules/testsuite/src/test/resources/samples/airticket/describtion.txt
Modified:
jbossbpm/spec/trunk/modules/testsuite/src/test/resources/samples/airticket/airticket.bpmn
jbossbpm/spec/trunk/modules/testsuite/src/test/resources/samples/airticket/airticket.bpmn_diagram
Log:
Add notes
Modified: jbossbpm/spec/trunk/modules/testsuite/src/test/resources/samples/airticket/airticket.bpmn
===================================================================
--- jbossbpm/spec/trunk/modules/testsuite/src/test/resources/samples/airticket/airticket.bpmn 2008-07-23 04:45:36 UTC (rev 1695)
+++ jbossbpm/spec/trunk/modules/testsuite/src/test/resources/samples/airticket/airticket.bpmn 2008-07-23 05:22:41 UTC (rev 1696)
@@ -2,28 +2,28 @@
<bpmn:BpmnDiagram xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:bpmn="http://stp.eclipse.org/bpmn" xmi:id="_iYxIQFhrEd2aHsyOaYt_3g" iD="_iYwhMFhrEd2aHsyOaYt_3g">
<pools xmi:type="bpmn:Pool" xmi:id="_dhOfoVhtEd2aHsyOaYt_3g" iD="_dhOfoFhtEd2aHsyOaYt_3g" name="Pool">
<vertices xmi:type="bpmn:Activity" xmi:id="_huULIVhtEd2aHsyOaYt_3g" iD="_huULIFhtEd2aHsyOaYt_3g" outgoingEdges="_iyzG8VhtEd2aHsyOaYt_3g" activityType="EventStartEmpty"/>
- <vertices xmi:type="bpmn:Activity" xmi:id="_iyPtUVhtEd2aHsyOaYt_3g" iD="_iyPtUFhtEd2aHsyOaYt_3g" outgoingEdges="_lMqhUFhtEd2aHsyOaYt_3g" incomingEdges="_iyzG8VhtEd2aHsyOaYt_3g _1UWrsVhvEd2aHsyOaYt_3g" name="Home Page" activityType="Task"/>
- <vertices xmi:type="bpmn:Activity" xmi:id="_lMlo0VhtEd2aHsyOaYt_3g" iD="_lMlo0FhtEd2aHsyOaYt_3g" outgoingEdges="_rsTeQVhtEd2aHsyOaYt_3g" incomingEdges="_lMqhUFhtEd2aHsyOaYt_3g _efVRMVhuEd2aHsyOaYt_3g _r-90MVhwEd2aHsyOaYt_3g" name="Receive Req" activityType="Task"/>
+ <vertices xmi:type="bpmn:Activity" xmi:id="_iyPtUVhtEd2aHsyOaYt_3g" iD="_iyPtUFhtEd2aHsyOaYt_3g" outgoingEdges="_lMqhUFhtEd2aHsyOaYt_3g" incomingEdges="_iyzG8VhtEd2aHsyOaYt_3g _1UWrsVhvEd2aHsyOaYt_3g" name="HomePage" activityType="Task"/>
+ <vertices xmi:type="bpmn:Activity" xmi:id="_lMlo0VhtEd2aHsyOaYt_3g" iD="_lMlo0FhtEd2aHsyOaYt_3g" outgoingEdges="_rsTeQVhtEd2aHsyOaYt_3g" incomingEdges="_lMqhUFhtEd2aHsyOaYt_3g _efVRMVhuEd2aHsyOaYt_3g _r-90MVhwEd2aHsyOaYt_3g" name="ReceiveReq" activityType="Task"/>
<vertices xmi:type="bpmn:Activity" xmi:id="_rsQa8VhtEd2aHsyOaYt_3g" iD="_rsQa8FhtEd2aHsyOaYt_3g" outgoingEdges="_zUIyUFhtEd2aHsyOaYt_3g _ApdYMVhvEd2aHsyOaYt_3g" incomingEdges="_rsTeQVhtEd2aHsyOaYt_3g" name=" Validate" activityType="GatewayDataBasedExclusive"/>
- <vertices xmi:type="bpmn:Activity" xmi:id="_zUDSwVhtEd2aHsyOaYt_3g" iD="_zUDSwFhtEd2aHsyOaYt_3g" outgoingEdges="_9Q4IQVhtEd2aHsyOaYt_3g" incomingEdges="_zUIyUFhtEd2aHsyOaYt_3g" name="Check Avail" activityType="Task"/>
+ <vertices xmi:type="bpmn:Activity" xmi:id="_zUDSwVhtEd2aHsyOaYt_3g" iD="_zUDSwFhtEd2aHsyOaYt_3g" outgoingEdges="_9Q4IQVhtEd2aHsyOaYt_3g" incomingEdges="_zUIyUFhtEd2aHsyOaYt_3g" name="CheckAvail" activityType="Task"/>
<vertices xmi:type="bpmn:Activity" xmi:id="_9Q1sAFhtEd2aHsyOaYt_3g" iD="_9Q1E8FhtEd2aHsyOaYt_3g" outgoingEdges="_BdGREVhuEd2aHsyOaYt_3g _fHP64VhwEd2aHsyOaYt_3g" incomingEdges="_9Q4IQVhtEd2aHsyOaYt_3g" name="Available" activityType="GatewayDataBasedExclusive"/>
- <vertices xmi:type="bpmn:Activity" xmi:id="_BdDNwVhuEd2aHsyOaYt_3g" iD="_BdDNwFhuEd2aHsyOaYt_3g" outgoingEdges="_D-M74VhuEd2aHsyOaYt_3g" incomingEdges="_BdGREVhuEd2aHsyOaYt_3g" name="Send Offer" activityType="Task"/>
- <vertices xmi:type="bpmn:Activity" xmi:id="_D-IqcVhuEd2aHsyOaYt_3g" iD="_D-IqcFhuEd2aHsyOaYt_3g" outgoingEdges="_lVOK8VhuEd2aHsyOaYt_3g _1UWrsVhvEd2aHsyOaYt_3g" incomingEdges="_D-M74VhuEd2aHsyOaYt_3g" name="Accepted" activityType="GatewayDataBasedExclusive"/>
- <vertices xmi:type="bpmn:Activity" xmi:id="_T7iiUVhuEd2aHsyOaYt_3g" iD="_T7iiUFhuEd2aHsyOaYt_3g" outgoingEdges="_efVRMVhuEd2aHsyOaYt_3g" incomingEdges="_ApdYMVhvEd2aHsyOaYt_3g" name=" Send Invalid" activityType="Task"/>
+ <vertices xmi:type="bpmn:Activity" xmi:id="_BdDNwVhuEd2aHsyOaYt_3g" iD="_BdDNwFhuEd2aHsyOaYt_3g" outgoingEdges="_tT3_YVh1Ed2aHsyOaYt_3g" incomingEdges="_BdGREVhuEd2aHsyOaYt_3g" name="SendOffer" activityType="Task"/>
+ <vertices xmi:type="bpmn:Activity" xmi:id="_D-IqcVhuEd2aHsyOaYt_3g" iD="_D-IqcFhuEd2aHsyOaYt_3g" outgoingEdges="_lVOK8VhuEd2aHsyOaYt_3g _1UWrsVhvEd2aHsyOaYt_3g" incomingEdges="_waDtMVh1Ed2aHsyOaYt_3g" name="Accepted" activityType="GatewayDataBasedExclusive"/>
+ <vertices xmi:type="bpmn:Activity" xmi:id="_T7iiUVhuEd2aHsyOaYt_3g" iD="_T7iiUFhuEd2aHsyOaYt_3g" outgoingEdges="_efVRMVhuEd2aHsyOaYt_3g" incomingEdges="_ApdYMVhvEd2aHsyOaYt_3g" name=" SendInvalid" activityType="Task"/>
<vertices xmi:type="bpmn:Activity" xmi:id="_lVLHoVhuEd2aHsyOaYt_3g" iD="_lVLHoFhuEd2aHsyOaYt_3g" outgoingEdges="_VtHYMVhvEd2aHsyOaYt_3g _Ypm-gVhvEd2aHsyOaYt_3g" incomingEdges="_lVOK8VhuEd2aHsyOaYt_3g" activityType="GatewayParallel"/>
- <vertices xmi:type="bpmn:Activity" xmi:id="_VtDt0VhvEd2aHsyOaYt_3g" iD="_VtDt0FhvEd2aHsyOaYt_3g" outgoingEdges="_Fj6DgVhwEd2aHsyOaYt_3g" incomingEdges="_VtHYMVhvEd2aHsyOaYt_3g" name="Credit Card" activityType="Task"/>
+ <vertices xmi:type="bpmn:Activity" xmi:id="_VtDt0VhvEd2aHsyOaYt_3g" iD="_VtDt0FhvEd2aHsyOaYt_3g" outgoingEdges="_Fj6DgVhwEd2aHsyOaYt_3g" incomingEdges="_VtHYMVhvEd2aHsyOaYt_3g" name="CreditCard" activityType="Task"/>
<vertices xmi:type="bpmn:Activity" xmi:id="_Ypj7MVhvEd2aHsyOaYt_3g" iD="_Ypj7MFhvEd2aHsyOaYt_3g" outgoingEdges="_GJUdsVhwEd2aHsyOaYt_3g" incomingEdges="_Ypm-gVhvEd2aHsyOaYt_3g" name="Booking" activityType="Task"/>
<vertices xmi:type="bpmn:Activity" xmi:id="_Fj1LAVhwEd2aHsyOaYt_3g" iD="_Fj1LAFhwEd2aHsyOaYt_3g" outgoingEdges="_LXfLsVhwEd2aHsyOaYt_3g" incomingEdges="_Fj6DgVhwEd2aHsyOaYt_3g _GJUdsVhwEd2aHsyOaYt_3g" activityType="GatewayParallel"/>
- <vertices xmi:type="bpmn:Activity" xmi:id="_LXbhUVhwEd2aHsyOaYt_3g" iD="_LXbhUFhwEd2aHsyOaYt_3g" outgoingEdges="_QQQ4gVhwEd2aHsyOaYt_3g" incomingEdges="_LXfLsVhwEd2aHsyOaYt_3g" name="Send Confirm" activityType="Task"/>
+ <vertices xmi:type="bpmn:Activity" xmi:id="_LXbhUVhwEd2aHsyOaYt_3g" iD="_LXbhUFhwEd2aHsyOaYt_3g" outgoingEdges="_QQQ4gVhwEd2aHsyOaYt_3g" incomingEdges="_LXfLsVhwEd2aHsyOaYt_3g" name="SendConfirm" activityType="Task"/>
<vertices xmi:type="bpmn:Activity" xmi:id="_QQMAAVhwEd2aHsyOaYt_3g" iD="_QQMAAFhwEd2aHsyOaYt_3g" incomingEdges="_QQQ4gVhwEd2aHsyOaYt_3g" activityType="EventEndEmpty"/>
- <vertices xmi:type="bpmn:Activity" xmi:id="_fHKbUVhwEd2aHsyOaYt_3g" iD="_fHKbUFhwEd2aHsyOaYt_3g" outgoingEdges="_r-90MVhwEd2aHsyOaYt_3g" incomingEdges="_fHP64VhwEd2aHsyOaYt_3g" name=" Send Not Avail" activityType="Task"/>
+ <vertices xmi:type="bpmn:Activity" xmi:id="_fHKbUVhwEd2aHsyOaYt_3g" iD="_fHKbUFhwEd2aHsyOaYt_3g" outgoingEdges="_r-90MVhwEd2aHsyOaYt_3g" incomingEdges="_fHP64VhwEd2aHsyOaYt_3g" name=" SendNotAvail" activityType="Task"/>
+ <vertices xmi:type="bpmn:Activity" xmi:id="_tTzG4Fh1Ed2aHsyOaYt_3g" iD="_tTyf0Fh1Ed2aHsyOaYt_3g" outgoingEdges="_waDtMVh1Ed2aHsyOaYt_3g" incomingEdges="_tT3_YVh1Ed2aHsyOaYt_3g" name="ReceiveOrder" activityType="Task"/>
<sequenceEdges xmi:type="bpmn:SequenceEdge" xmi:id="_iyzG8VhtEd2aHsyOaYt_3g" iD="_iyzG8FhtEd2aHsyOaYt_3g" source="_huULIVhtEd2aHsyOaYt_3g" target="_iyPtUVhtEd2aHsyOaYt_3g"/>
<sequenceEdges xmi:type="bpmn:SequenceEdge" xmi:id="_lMqhUFhtEd2aHsyOaYt_3g" iD="_lMp6QFhtEd2aHsyOaYt_3g" source="_iyPtUVhtEd2aHsyOaYt_3g" target="_lMlo0VhtEd2aHsyOaYt_3g"/>
<sequenceEdges xmi:type="bpmn:SequenceEdge" xmi:id="_rsTeQVhtEd2aHsyOaYt_3g" iD="_rsTeQFhtEd2aHsyOaYt_3g" source="_lMlo0VhtEd2aHsyOaYt_3g" target="_rsQa8VhtEd2aHsyOaYt_3g"/>
<sequenceEdges xmi:type="bpmn:SequenceEdge" xmi:id="_zUIyUFhtEd2aHsyOaYt_3g" iD="_zUILQFhtEd2aHsyOaYt_3g" source="_rsQa8VhtEd2aHsyOaYt_3g" target="_zUDSwVhtEd2aHsyOaYt_3g"/>
<sequenceEdges xmi:type="bpmn:SequenceEdge" xmi:id="_9Q4IQVhtEd2aHsyOaYt_3g" iD="_9Q4IQFhtEd2aHsyOaYt_3g" source="_zUDSwVhtEd2aHsyOaYt_3g" target="_9Q1sAFhtEd2aHsyOaYt_3g"/>
<sequenceEdges xmi:type="bpmn:SequenceEdge" xmi:id="_BdGREVhuEd2aHsyOaYt_3g" iD="_BdGREFhuEd2aHsyOaYt_3g" source="_9Q1sAFhtEd2aHsyOaYt_3g" target="_BdDNwVhuEd2aHsyOaYt_3g"/>
- <sequenceEdges xmi:type="bpmn:SequenceEdge" xmi:id="_D-M74VhuEd2aHsyOaYt_3g" iD="_D-M74FhuEd2aHsyOaYt_3g" source="_BdDNwVhuEd2aHsyOaYt_3g" target="_D-IqcVhuEd2aHsyOaYt_3g"/>
<sequenceEdges xmi:type="bpmn:SequenceEdge" xmi:id="_efVRMVhuEd2aHsyOaYt_3g" iD="_efVRMFhuEd2aHsyOaYt_3g" source="_T7iiUVhuEd2aHsyOaYt_3g" target="_lMlo0VhtEd2aHsyOaYt_3g"/>
<sequenceEdges xmi:type="bpmn:SequenceEdge" xmi:id="_lVOK8VhuEd2aHsyOaYt_3g" iD="_lVOK8FhuEd2aHsyOaYt_3g" source="_D-IqcVhuEd2aHsyOaYt_3g" target="_lVLHoVhuEd2aHsyOaYt_3g"/>
<sequenceEdges xmi:type="bpmn:SequenceEdge" xmi:id="_ApdYMVhvEd2aHsyOaYt_3g" iD="_ApdYMFhvEd2aHsyOaYt_3g" source="_rsQa8VhtEd2aHsyOaYt_3g" target="_T7iiUVhuEd2aHsyOaYt_3g"/>
@@ -36,5 +36,7 @@
<sequenceEdges xmi:type="bpmn:SequenceEdge" xmi:id="_QQQ4gVhwEd2aHsyOaYt_3g" iD="_QQQ4gFhwEd2aHsyOaYt_3g" source="_LXbhUVhwEd2aHsyOaYt_3g" target="_QQMAAVhwEd2aHsyOaYt_3g"/>
<sequenceEdges xmi:type="bpmn:SequenceEdge" xmi:id="_fHP64VhwEd2aHsyOaYt_3g" iD="_fHP64FhwEd2aHsyOaYt_3g" source="_9Q1sAFhtEd2aHsyOaYt_3g" target="_fHKbUVhwEd2aHsyOaYt_3g"/>
<sequenceEdges xmi:type="bpmn:SequenceEdge" xmi:id="_r-90MVhwEd2aHsyOaYt_3g" iD="_r-90MFhwEd2aHsyOaYt_3g" source="_fHKbUVhwEd2aHsyOaYt_3g" target="_lMlo0VhtEd2aHsyOaYt_3g"/>
+ <sequenceEdges xmi:type="bpmn:SequenceEdge" xmi:id="_tT3_YVh1Ed2aHsyOaYt_3g" iD="_tT3_YFh1Ed2aHsyOaYt_3g" source="_BdDNwVhuEd2aHsyOaYt_3g" target="_tTzG4Fh1Ed2aHsyOaYt_3g"/>
+ <sequenceEdges xmi:type="bpmn:SequenceEdge" xmi:id="_waDtMVh1Ed2aHsyOaYt_3g" iD="_waDtMFh1Ed2aHsyOaYt_3g" source="_tTzG4Fh1Ed2aHsyOaYt_3g" target="_D-IqcVhuEd2aHsyOaYt_3g"/>
</pools>
</bpmn:BpmnDiagram>
Modified: jbossbpm/spec/trunk/modules/testsuite/src/test/resources/samples/airticket/airticket.bpmn_diagram
===================================================================
--- jbossbpm/spec/trunk/modules/testsuite/src/test/resources/samples/airticket/airticket.bpmn_diagram 2008-07-23 04:45:36 UTC (rev 1695)
+++ jbossbpm/spec/trunk/modules/testsuite/src/test/resources/samples/airticket/airticket.bpmn_diagram 2008-07-23 05:22:41 UTC (rev 1696)
@@ -150,6 +150,15 @@
<element xmi:type="bpmn:Activity" href="airticket.bpmn#_fHKbUVhwEd2aHsyOaYt_3g"/>
<layoutConstraint xmi:type="notation:Bounds" xmi:id="_fHLpdVhwEd2aHsyOaYt_3g" x="648" y="120"/>
</children>
+ <children xmi:type="notation:Node" xmi:id="_tTzt8Fh1Ed2aHsyOaYt_3g" type="2001">
+ <children xmi:type="notation:Node" xmi:id="_tT0VAFh1Ed2aHsyOaYt_3g" type="4001"/>
+ <styles xmi:type="notation:FontStyle" xmi:id="_tTzt8Vh1Ed2aHsyOaYt_3g" fontName="Arial"/>
+ <styles xmi:type="notation:DescriptionStyle" xmi:id="_tTzt8lh1Ed2aHsyOaYt_3g"/>
+ <styles xmi:type="notation:FillStyle" xmi:id="_tTzt81h1Ed2aHsyOaYt_3g"/>
+ <styles xmi:type="notation:LineStyle" xmi:id="_tTzt9Fh1Ed2aHsyOaYt_3g" lineColor="0"/>
+ <element xmi:type="bpmn:Activity" href="airticket.bpmn#_tTzG4Fh1Ed2aHsyOaYt_3g"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_tTzt9Vh1Ed2aHsyOaYt_3g" x="804"/>
+ </children>
<styles xmi:type="notation:DrawerStyle" xmi:id="_dhSKAVhtEd2aHsyOaYt_3g"/>
<styles xmi:type="notation:SortingStyle" xmi:id="_dhSKAlhtEd2aHsyOaYt_3g"/>
<styles xmi:type="notation:FilteringStyle" xmi:id="_dhSKA1htEd2aHsyOaYt_3g"/>
@@ -159,7 +168,7 @@
<styles xmi:type="notation:FillStyle" xmi:id="_dhRi8VhtEd2aHsyOaYt_3g" fillColor="16771304"/>
<styles xmi:type="notation:LineStyle" xmi:id="_dhRi8lhtEd2aHsyOaYt_3g" lineColor="11119017"/>
<element xmi:type="bpmn:Pool" href="airticket.bpmn#_dhOfoVhtEd2aHsyOaYt_3g"/>
- <layoutConstraint xmi:type="notation:Bounds" xmi:id="_dhRi81htEd2aHsyOaYt_3g" x="16" y="24" width="1012" height="565"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_dhRi81htEd2aHsyOaYt_3g" x="16" y="24" width="1253" height="565"/>
</children>
<styles xmi:type="notation:PageStyle" xmi:id="_iZDcIVhrEd2aHsyOaYt_3g"/>
<styles xmi:type="notation:GuideStyle" xmi:id="_iZDcIlhrEd2aHsyOaYt_3g"/>
@@ -237,18 +246,6 @@
<element xmi:type="bpmn:SequenceEdge" href="airticket.bpmn#_BdGREVhuEd2aHsyOaYt_3g"/>
<bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_BdHfNFhuEd2aHsyOaYt_3g" points="[-23, -3, 668, 87]$[-689, -90, 2, 0]"/>
</edges>
- <edges xmi:type="notation:Edge" xmi:id="_D-Ni8FhuEd2aHsyOaYt_3g" type="3001" source="_BdD00FhuEd2aHsyOaYt_3g" target="_D-J4kFhuEd2aHsyOaYt_3g">
- <children xmi:type="notation:Node" xmi:id="_D-OKAFhuEd2aHsyOaYt_3g" type="4012">
- <styles xmi:type="notation:FillStyle" xmi:id="_D-OKAVhuEd2aHsyOaYt_3g" fillColor="16776959"/>
- <styles xmi:type="notation:LineStyle" xmi:id="_D-OKAlhuEd2aHsyOaYt_3g" lineColor="16776959"/>
- <layoutConstraint xmi:type="notation:Location" xmi:id="_D-OKA1huEd2aHsyOaYt_3g" y="-10"/>
- </children>
- <styles xmi:type="notation:RoutingStyle" xmi:id="_D-Ni8VhuEd2aHsyOaYt_3g" routing="Rectilinear" smoothness="Normal" closestDistance="true"/>
- <styles xmi:type="notation:FontStyle" xmi:id="_D-Ni8lhuEd2aHsyOaYt_3g" fontName="Arial"/>
- <styles xmi:type="notation:LineStyle" xmi:id="_D-Ni81huEd2aHsyOaYt_3g" lineColor="0"/>
- <element xmi:type="bpmn:SequenceEdge" href="airticket.bpmn#_D-M74VhuEd2aHsyOaYt_3g"/>
- <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_D-Ni9FhuEd2aHsyOaYt_3g" points="[-53, -6, 760, 79]$[-811, -85, 2, 0]"/>
- </edges>
<edges xmi:type="notation:Edge" xmi:id="_efV4QFhuEd2aHsyOaYt_3g" type="3001" source="_T7jwcFhuEd2aHsyOaYt_3g" target="_lMmP4FhtEd2aHsyOaYt_3g">
<children xmi:type="notation:Node" xmi:id="_efWfUFhuEd2aHsyOaYt_3g" type="4012">
<styles xmi:type="notation:FillStyle" xmi:id="_efWfUVhuEd2aHsyOaYt_3g" fillColor="16776959"/>
@@ -393,4 +390,28 @@
<element xmi:type="bpmn:SequenceEdge" href="airticket.bpmn#_r-90MVhwEd2aHsyOaYt_3g"/>
<bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_r_A3hFhwEd2aHsyOaYt_3g" points="[-53, -6, 391, 54]$[-415, -31, 29, 29]"/>
</edges>
+ <edges xmi:type="notation:Edge" xmi:id="_tT5NgFh1Ed2aHsyOaYt_3g" type="3001" source="_BdD00FhuEd2aHsyOaYt_3g" target="_tTzt8Fh1Ed2aHsyOaYt_3g">
+ <children xmi:type="notation:Node" xmi:id="_tT5NhVh1Ed2aHsyOaYt_3g" type="4012">
+ <styles xmi:type="notation:FillStyle" xmi:id="_tT5Nhlh1Ed2aHsyOaYt_3g" fillColor="16776959"/>
+ <styles xmi:type="notation:LineStyle" xmi:id="_tT5Nh1h1Ed2aHsyOaYt_3g" lineColor="16776959"/>
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_tT5NiFh1Ed2aHsyOaYt_3g" y="-10"/>
+ </children>
+ <styles xmi:type="notation:RoutingStyle" xmi:id="_tT5NgVh1Ed2aHsyOaYt_3g" routing="Rectilinear" smoothness="Normal" closestDistance="true"/>
+ <styles xmi:type="notation:FontStyle" xmi:id="_tT5Nglh1Ed2aHsyOaYt_3g" fontName="Arial"/>
+ <styles xmi:type="notation:LineStyle" xmi:id="_tT5Ng1h1Ed2aHsyOaYt_3g" lineColor="0"/>
+ <element xmi:type="bpmn:SequenceEdge" href="airticket.bpmn#_tT3_YVh1Ed2aHsyOaYt_3g"/>
+ <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_tT5NhFh1Ed2aHsyOaYt_3g" points="[-53, -3, 650, 27]$[-701, -30, 2, 0]"/>
+ </edges>
+ <edges xmi:type="notation:Edge" xmi:id="_waE7UFh1Ed2aHsyOaYt_3g" type="3001" source="_tTzt8Fh1Ed2aHsyOaYt_3g" target="_D-J4kFhuEd2aHsyOaYt_3g">
+ <children xmi:type="notation:Node" xmi:id="_waFiYFh1Ed2aHsyOaYt_3g" type="4012">
+ <styles xmi:type="notation:FillStyle" xmi:id="_waFiYVh1Ed2aHsyOaYt_3g" fillColor="16776959"/>
+ <styles xmi:type="notation:LineStyle" xmi:id="_waFiYlh1Ed2aHsyOaYt_3g" lineColor="16776959"/>
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_waFiY1h1Ed2aHsyOaYt_3g" y="40"/>
+ </children>
+ <styles xmi:type="notation:RoutingStyle" xmi:id="_waE7UVh1Ed2aHsyOaYt_3g" routing="Rectilinear" smoothness="Normal" closestDistance="true"/>
+ <styles xmi:type="notation:FontStyle" xmi:id="_waE7Ulh1Ed2aHsyOaYt_3g" fontName="Arial"/>
+ <styles xmi:type="notation:LineStyle" xmi:id="_waE7U1h1Ed2aHsyOaYt_3g" lineColor="0"/>
+ <element xmi:type="bpmn:SequenceEdge" href="airticket.bpmn#_waDtMVh1Ed2aHsyOaYt_3g"/>
+ <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_waE7VFh1Ed2aHsyOaYt_3g" points="[-8, 29, 8, -100]$[-40, 128, -24, -1]"/>
+ </edges>
</notation:Diagram>
Added: jbossbpm/spec/trunk/modules/testsuite/src/test/resources/samples/airticket/describtion.txt
===================================================================
--- jbossbpm/spec/trunk/modules/testsuite/src/test/resources/samples/airticket/describtion.txt (rev 0)
+++ jbossbpm/spec/trunk/modules/testsuite/src/test/resources/samples/airticket/describtion.txt 2008-07-23 05:22:41 UTC (rev 1696)
@@ -0,0 +1,19 @@
+# $Id$
+#
+# A description/notes for the Airticket sample
+
+* FrontGateServlet receives a request
+* New Session starts the process
+* HomePage Task sends request form
+* ReceiveReq Task requires RequestData
+* FrontGateServlet sends RequestData to ReceiveReq Task
+* Validate ExclusiveGateway branches based on BPMN props
+* CheckAvail Task contacts airline for seat availability
+* Available ExclusiveGateway branches based on BPMN props
+* ReceiveOrder Task requires OrderData
+* Accept ExclusiveGateway branches based on BPMN props
+* Both CreditCard and Booking Task require OrderData
+* Process fails if OrderData requirement not sattisfied
+* Join waits for both Tasks to finish
+* SendConfirm Task sends confirmation
+* Process ends
Property changes on: jbossbpm/spec/trunk/modules/testsuite/src/test/resources/samples/airticket/describtion.txt
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
15 years, 11 months