JBoss JBPM SVN: r1685 - jbossbpm.
by do-not-reply@jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2008-07-22 10:48:33 -0400 (Tue, 22 Jul 2008)
New Revision: 1685
Added:
jbossbpm/spec/
Removed:
jbossbpm/api/
Log:
Migrate to JBossBPM
Copied: jbossbpm/spec (from rev 1684, jbossbpm/api)
17 years, 9 months
JBoss JBPM SVN: r1684 - jbossbpm.
by do-not-reply@jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2008-07-22 10:47:29 -0400 (Tue, 22 Jul 2008)
New Revision: 1684
Added:
jbossbpm/impl/
Log:
Migrate to JBossBPM
17 years, 9 months
JBoss JBPM SVN: r1683 - jbossbpm and 1 other directory.
by do-not-reply@jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2008-07-22 10:28:12 -0400 (Tue, 22 Jul 2008)
New Revision: 1683
Added:
jbossbpm/api/
Removed:
api/
Log:
Migrate to JBossBPM
Copied: jbossbpm/api (from rev 1682, api)
17 years, 9 months
JBoss JBPM SVN: r1682 - /.
by do-not-reply@jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2008-07-22 10:27:39 -0400 (Tue, 22 Jul 2008)
New Revision: 1682
Added:
jbossbpm/
Log:
Migrate to JBossBPM
17 years, 9 months
JBoss JBPM SVN: r1681 - in api/trunk: modules/api/src/main/java/org/jboss/bpm/model and 3 other directories.
by do-not-reply@jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2008-07-21 11:28:51 -0400 (Mon, 21 Jul 2008)
New Revision: 1681
Added:
api/trunk/modules/api/src/main/java/org/jboss/bpm/model/Artifact.java
api/trunk/modules/api/src/main/java/org/jboss/bpm/model/ArtifactInput.java
api/trunk/modules/api/src/main/java/org/jboss/bpm/model/ArtifactOutput.java
api/trunk/modules/api/src/main/java/org/jboss/bpm/model/CancelEventDetail.java
api/trunk/modules/api/src/main/java/org/jboss/bpm/model/CompensateEventDetail.java
api/trunk/modules/api/src/main/java/org/jboss/bpm/model/Condition.java
api/trunk/modules/api/src/main/java/org/jboss/bpm/model/ConditionalEventDetail.java
api/trunk/modules/api/src/main/java/org/jboss/bpm/model/DataObject.java
api/trunk/modules/api/src/main/java/org/jboss/bpm/model/Entity.java
api/trunk/modules/api/src/main/java/org/jboss/bpm/model/ErrorEventDetail.java
api/trunk/modules/api/src/main/java/org/jboss/bpm/model/EventDetail.java
api/trunk/modules/api/src/main/java/org/jboss/bpm/model/Expression.java
api/trunk/modules/api/src/main/java/org/jboss/bpm/model/InputSet.java
api/trunk/modules/api/src/main/java/org/jboss/bpm/model/LinkEventDetail.java
api/trunk/modules/api/src/main/java/org/jboss/bpm/model/Message.java
api/trunk/modules/api/src/main/java/org/jboss/bpm/model/MessageEventDetail.java
api/trunk/modules/api/src/main/java/org/jboss/bpm/model/NameSupport.java
api/trunk/modules/api/src/main/java/org/jboss/bpm/model/OutputSet.java
api/trunk/modules/api/src/main/java/org/jboss/bpm/model/Participant.java
api/trunk/modules/api/src/main/java/org/jboss/bpm/model/Property.java
api/trunk/modules/api/src/main/java/org/jboss/bpm/model/Role.java
api/trunk/modules/api/src/main/java/org/jboss/bpm/model/SignalEventDetail.java
api/trunk/modules/api/src/main/java/org/jboss/bpm/model/TerminateEventDetail.java
api/trunk/modules/api/src/main/java/org/jboss/bpm/model/TimeDateExpression.java
api/trunk/modules/api/src/main/java/org/jboss/bpm/model/TimerEventDetail.java
api/trunk/modules/testsuite/src/test/resources/cts/
api/trunk/modules/testsuite/src/test/resources/cts/cts-specification.txt
Removed:
api/trunk/modules/api/src/main/java/org/jboss/bpm/model/NamedFlowObject.java
Modified:
api/trunk/eclipse/jBPMCodeStyle.xml
api/trunk/modules/api/src/main/java/org/jboss/bpm/model/Activity.java
api/trunk/modules/api/src/main/java/org/jboss/bpm/model/EndEvent.java
api/trunk/modules/api/src/main/java/org/jboss/bpm/model/Event.java
api/trunk/modules/api/src/main/java/org/jboss/bpm/model/Gateway.java
api/trunk/modules/api/src/main/java/org/jboss/bpm/model/IntermediateEvent.java
api/trunk/modules/api/src/main/java/org/jboss/bpm/model/Process.java
api/trunk/modules/api/src/main/java/org/jboss/bpm/model/StartEvent.java
api/trunk/modules/impl/src/main/java/org/jboss/bpm/model/internal/FlowObjectImpl.java
api/trunk/modules/impl/src/main/java/org/jboss/bpm/model/internal/ProcessImpl.java
api/trunk/modules/impl/src/main/java/org/jboss/bpm/model/internal/StartEventImpl.java
Log:
Add more BPMN constructs
Modified: api/trunk/eclipse/jBPMCodeStyle.xml
===================================================================
--- api/trunk/eclipse/jBPMCodeStyle.xml 2008-07-21 11:34:27 UTC (rev 1680)
+++ api/trunk/eclipse/jBPMCodeStyle.xml 2008-07-21 15:28:51 UTC (rev 1681)
@@ -70,7 +70,7 @@
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment" value="false"/>
-<setting id="org.eclipse.jdt.core.formatter.lineSplit" value="168"/>
+<setting id="org.eclipse.jdt.core.formatter.lineSplit" value="120"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression" value="do not insert"/>
Modified: api/trunk/modules/api/src/main/java/org/jboss/bpm/model/Activity.java
===================================================================
--- api/trunk/modules/api/src/main/java/org/jboss/bpm/model/Activity.java 2008-07-21 11:34:27 UTC (rev 1680)
+++ api/trunk/modules/api/src/main/java/org/jboss/bpm/model/Activity.java 2008-07-21 15:28:51 UTC (rev 1681)
@@ -31,7 +31,7 @@
* @author thomas.diesler(a)jboss.com
* @since 08-Jul-2008
*/
-public interface Activity extends FlowObject, NamedFlowObject
+public interface Activity extends FlowObject, NameSupport
{
}
\ No newline at end of file
Added: api/trunk/modules/api/src/main/java/org/jboss/bpm/model/Artifact.java
===================================================================
--- api/trunk/modules/api/src/main/java/org/jboss/bpm/model/Artifact.java (rev 0)
+++ api/trunk/modules/api/src/main/java/org/jboss/bpm/model/Artifact.java 2008-07-21 15:28:51 UTC (rev 1681)
@@ -0,0 +1,48 @@
+/*
+ * 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 ArtifactInput, which is used in the definition of attributes for InputSet
+ *
+ * @author thomas.diesler(a)jboss.com
+ * @since 21-Jul-2008
+ */
+public interface Artifact extends GraphicalElement
+{
+ /**
+ * Defines the type of an {@link Artifact}
+ */
+ enum ArtifactType
+ {
+ DataObject, Group, Annotation
+ };
+
+ /**
+ * The ArtifactType MAY be set to DataObject, Group, or Annotation.
+ * The ArtifactType list MAY be extended to include new types.
+ */
+ ArtifactType getArtifactType();
+}
Property changes on: api/trunk/modules/api/src/main/java/org/jboss/bpm/model/Artifact.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: api/trunk/modules/api/src/main/java/org/jboss/bpm/model/ArtifactInput.java
===================================================================
--- api/trunk/modules/api/src/main/java/org/jboss/bpm/model/ArtifactInput.java (rev 0)
+++ api/trunk/modules/api/src/main/java/org/jboss/bpm/model/ArtifactInput.java 2008-07-21 15:28:51 UTC (rev 1681)
@@ -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.model;
+
+//$Id$
+
+
+/**
+ * An ArtifactInput, which is used in the definition of attributes for @{link InputSet}
+ *
+ * @author thomas.diesler(a)jboss.com
+ * @since 21-Jul-2008
+ */
+public interface ArtifactInput extends Artifact
+{
+ /**
+ * This attribute identifies an Artifact that will be used as an input to an activity. The
+ * identified Artifact will be part of an InputSet for an activity.
+ */
+ Artifact getArtifactRef();
+
+ /**
+ * The default value for this attribute is True. This means that the Input is required for
+ * an activity to start. If set to False, then the activity MAY start within the input if it
+ * is available, but MAY accept the input (more than once) after the activity has
+ * started. An InputSet may have a some of ArtifactInputs that have this attribute set
+ * to True and some that are set to False.
+ */
+ boolean isRequireForStart();
+
+}
Property changes on: api/trunk/modules/api/src/main/java/org/jboss/bpm/model/ArtifactInput.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: api/trunk/modules/api/src/main/java/org/jboss/bpm/model/ArtifactOutput.java
===================================================================
--- api/trunk/modules/api/src/main/java/org/jboss/bpm/model/ArtifactOutput.java (rev 0)
+++ api/trunk/modules/api/src/main/java/org/jboss/bpm/model/ArtifactOutput.java 2008-07-21 15:28:51 UTC (rev 1681)
@@ -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.model;
+
+//$Id$
+
+
+/**
+ * An ArtifactOutput, which is used in the definition of attributes for @{link OutputSet}
+ *
+ * @author thomas.diesler(a)jboss.com
+ * @since 21-Jul-2008
+ */
+public interface ArtifactOutput extends Artifact
+{
+ /**
+ * This attribute identifies an Artifact that will be used as an output to an activity. The
+ * identified Artifact will be part of an OutputSet for an activity.
+ */
+ Artifact getArtifactRef();
+
+ /**
+ * The default value for this attribute is True. This means that the Output will be
+ * produced when an activity has been completed. If set to False, then the activity
+ * MAY produce the output (more than once) before it has completed. An OutputSet
+ * may have a some of ArtifactOutputs that have this attribute set to True and some that
+ * are set to False.
+ */
+ boolean isProduceAtCompletion();
+
+}
Property changes on: api/trunk/modules/api/src/main/java/org/jboss/bpm/model/ArtifactOutput.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: api/trunk/modules/api/src/main/java/org/jboss/bpm/model/CancelEventDetail.java
===================================================================
--- api/trunk/modules/api/src/main/java/org/jboss/bpm/model/CancelEventDetail.java (rev 0)
+++ api/trunk/modules/api/src/main/java/org/jboss/bpm/model/CancelEventDetail.java 2008-07-21 15:28:51 UTC (rev 1681)
@@ -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$
+
+/**
+ * The Cancel event detail
+ *
+ * @author thomas.diesler(a)jboss.com
+ * @since 21-Jul-2008
+ */
+public interface CancelEventDetail extends EventDetail
+{
+
+}
Property changes on: api/trunk/modules/api/src/main/java/org/jboss/bpm/model/CancelEventDetail.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: api/trunk/modules/api/src/main/java/org/jboss/bpm/model/CompensateEventDetail.java
===================================================================
--- api/trunk/modules/api/src/main/java/org/jboss/bpm/model/CompensateEventDetail.java (rev 0)
+++ api/trunk/modules/api/src/main/java/org/jboss/bpm/model/CompensateEventDetail.java 2008-07-21 15:28:51 UTC (rev 1681)
@@ -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.model;
+
+//$Id$
+
+/**
+ * The Compensate event detail
+ *
+ * @author thomas.diesler(a)jboss.com
+ * @since 21-Jul-2008
+ */
+public interface CompensateEventDetail extends EventDetail
+{
+ /**
+ * For an End Event:
+ *
+ * If the Result is a Compensation, then the Activity that needs to be compensated MAY be supplied.
+ * If an Activity is not supplied, then the Event broadcast to all completed activities in the Process Instance.
+ *
+ * For an Intermediate Event within Normal Flow: If the Trigger is a Compensation, then the Activity that needs
+ * to be compensated MAY be supplied. If an Activity is not supplied, then the Event broadcast to all completed
+ * activities in the Process Instance. This “throws” the compensation.
+ *
+ * For an Intermediate Event attached to the boundary of an Activity: This Event “catches” the compensation.
+ * No further information is required. The Activity the Event is attached to will provide the Id necessary
+ * to match the compensation event with the event that “threw” the compensation or the compensation will be a
+ * broadcast.
+ */
+ Activity getActivityRef();
+}
Property changes on: api/trunk/modules/api/src/main/java/org/jboss/bpm/model/CompensateEventDetail.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: api/trunk/modules/api/src/main/java/org/jboss/bpm/model/Condition.java
===================================================================
--- api/trunk/modules/api/src/main/java/org/jboss/bpm/model/Condition.java (rev 0)
+++ api/trunk/modules/api/src/main/java/org/jboss/bpm/model/Condition.java 2008-07-21 15:28:51 UTC (rev 1681)
@@ -0,0 +1,48 @@
+/*
+ * 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 Condition, which is used in the definition of attributes for Start Event and
+ * Intermediate Event
+ *
+ * @author thomas.diesler(a)jboss.com
+ * @since 21-Jul-2008
+ */
+public interface Condition
+{
+ /**
+ * Name is an optional attribute that is text description of the Condition. If a Name is
+ * not entered, then a ConditionExpression MUST be entered
+ */
+ String getName();
+
+ /**
+ * A ConditionExpression MAY be entered. In some cases the Condition itself will be
+ * stored and maintained in a separate application (e.g., a Rules Engine). If a ConditionExpression
+ * is not entered, then a Name MUST be entered
+ */
+ Expression getConditionExpression();
+
+}
Property changes on: api/trunk/modules/api/src/main/java/org/jboss/bpm/model/Condition.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: api/trunk/modules/api/src/main/java/org/jboss/bpm/model/ConditionalEventDetail.java
===================================================================
--- api/trunk/modules/api/src/main/java/org/jboss/bpm/model/ConditionalEventDetail.java (rev 0)
+++ api/trunk/modules/api/src/main/java/org/jboss/bpm/model/ConditionalEventDetail.java 2008-07-21 15:28:51 UTC (rev 1681)
@@ -0,0 +1,39 @@
+/*
+ * 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 Conditional event detail
+ *
+ * @author thomas.diesler(a)jboss.com
+ * @since 21-Jul-2008
+ */
+public interface ConditionalEventDetail extends EventDetail
+{
+ /**
+ * If the Trigger is Conditional, then a Condition MUST be entered.
+ */
+ Condition getConditionRef();
+
+}
Property changes on: api/trunk/modules/api/src/main/java/org/jboss/bpm/model/ConditionalEventDetail.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: api/trunk/modules/api/src/main/java/org/jboss/bpm/model/DataObject.java
===================================================================
--- api/trunk/modules/api/src/main/java/org/jboss/bpm/model/DataObject.java (rev 0)
+++ api/trunk/modules/api/src/main/java/org/jboss/bpm/model/DataObject.java 2008-07-21 15:28:51 UTC (rev 1681)
@@ -0,0 +1,54 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.bpm.model;
+
+import java.util.List;
+
+//$Id$
+
+
+/**
+ * DataObject, which extends common Artifact
+ *
+ * @author thomas.diesler(a)jboss.com
+ * @since 21-Jul-2008
+ */
+public interface DataObject extends Artifact
+{
+ /**
+ * Name is an attribute that is text description of the object.
+ */
+ String getName();
+
+ /**
+ * State is an optional attribute that indicates the impact the Process has had on the Data
+ * Object. Multiple Data Objects with the same name MAY share the same state within one Process.
+ */
+ String getState();
+
+ /**
+ * Modeler-defined Properties MAY be added to a Data Object. The fully delineated name of these
+ * properties are “<process name>.<task name>.<property name>”
+ * (e.g., “Add Customer.Review Credit Report.Score”).
+ */
+ List<Property> getProperties();
+}
Property changes on: api/trunk/modules/api/src/main/java/org/jboss/bpm/model/DataObject.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Modified: api/trunk/modules/api/src/main/java/org/jboss/bpm/model/EndEvent.java
===================================================================
--- api/trunk/modules/api/src/main/java/org/jboss/bpm/model/EndEvent.java 2008-07-21 11:34:27 UTC (rev 1680)
+++ api/trunk/modules/api/src/main/java/org/jboss/bpm/model/EndEvent.java 2008-07-21 15:28:51 UTC (rev 1681)
@@ -33,7 +33,7 @@
* @author thomas.diesler(a)jboss.com
* @since 08-Jul-2008
*/
-public interface EndEvent extends Event, NamedFlowObject, SingleInFlowSupport
+public interface EndEvent extends Event, NameSupport, SingleInFlowSupport
{
/**
* Get the {@link Result}
Added: api/trunk/modules/api/src/main/java/org/jboss/bpm/model/Entity.java
===================================================================
--- api/trunk/modules/api/src/main/java/org/jboss/bpm/model/Entity.java (rev 0)
+++ api/trunk/modules/api/src/main/java/org/jboss/bpm/model/Entity.java 2008-07-21 15:28:51 UTC (rev 1681)
@@ -0,0 +1,38 @@
+/*
+ * 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 Entity, which is used in the definition of attributes for a @{link Participant}
+ *
+ * @author thomas.diesler(a)jboss.com
+ * @since 21-Jul-2008
+ */
+public interface Entity
+{
+ /**
+ * Name is an attribute that is text description of the Entity.
+ */
+ String getName();
+}
Property changes on: api/trunk/modules/api/src/main/java/org/jboss/bpm/model/Entity.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: api/trunk/modules/api/src/main/java/org/jboss/bpm/model/ErrorEventDetail.java
===================================================================
--- api/trunk/modules/api/src/main/java/org/jboss/bpm/model/ErrorEventDetail.java (rev 0)
+++ api/trunk/modules/api/src/main/java/org/jboss/bpm/model/ErrorEventDetail.java 2008-07-21 15:28:51 UTC (rev 1681)
@@ -0,0 +1,51 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.bpm.model;
+
+//$Id$
+
+/**
+ * The Error event detail
+ *
+ * @author thomas.diesler(a)jboss.com
+ * @since 21-Jul-2008
+ */
+public interface ErrorEventDetail extends EventDetail
+{
+ /**
+ * For an End Event:
+ * If the Result is an Error, then the ErrorCode MUST be supplied.This “throws” the
+ * error.
+ *
+ * For an Intermediate Event within Normal Flow:
+ * If the Trigger is an Error, then the ErrorCode MUST be entered. This “throws”
+ * the error.
+ *
+ * For an Intermediate Event attached to the boundary of an Activity:
+ * If the Trigger is an Error, then the ErrorCode MAY be entered. This Event
+ * “catches” the error. If there is no ErrorCode, then any error SHALL trigger the
+ * Event. If there is an ErrorCode, then only an error that matches the ErrorCode
+ * SHALL trigger the Event.
+ */
+ String getErrorCode();
+
+}
Property changes on: api/trunk/modules/api/src/main/java/org/jboss/bpm/model/ErrorEventDetail.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Modified: api/trunk/modules/api/src/main/java/org/jboss/bpm/model/Event.java
===================================================================
--- api/trunk/modules/api/src/main/java/org/jboss/bpm/model/Event.java 2008-07-21 11:34:27 UTC (rev 1680)
+++ api/trunk/modules/api/src/main/java/org/jboss/bpm/model/Event.java 2008-07-21 15:28:51 UTC (rev 1681)
@@ -34,5 +34,11 @@
*/
public interface Event extends FlowObject
{
-
+ /**
+ * Defines the type of an {@link Event}
+ */
+ enum EventType
+ {
+ Start, End, Intermediate
+ };
}
\ No newline at end of file
Added: api/trunk/modules/api/src/main/java/org/jboss/bpm/model/EventDetail.java
===================================================================
--- api/trunk/modules/api/src/main/java/org/jboss/bpm/model/EventDetail.java (rev 0)
+++ api/trunk/modules/api/src/main/java/org/jboss/bpm/model/EventDetail.java 2008-07-21 15:28:51 UTC (rev 1681)
@@ -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.model;
+
+//$Id$
+
+/**
+ * The base of all supported event details.
+ *
+ * @author thomas.diesler(a)jboss.com
+ * @since 08-Jul-2008
+ */
+public interface EventDetail extends SupportingElement
+{
+ /**
+ * Defines the type of an {@link Event}
+ */
+ enum EventDetailType
+ {
+ Message, Timer, Error, Conditional, Link, Signal, Compensate, Cancel, Terminate
+ };
+
+ /**
+ * The EventDetailType attribute defines the type of trigger expected for an Event. The
+ * set of types includes Message, Timer, Error, Conditional, Link, Signal, Compensate,
+ * Cancel, and Terminate. The EventTypes (Start, Intermediate, and End) will each
+ * have a subset of the EventDetailTypes that can be used.
+ * The EventDetailType list MAY be extended to include new types.
+ */
+ EventDetailType getEventDetailType();
+}
Property changes on: api/trunk/modules/api/src/main/java/org/jboss/bpm/model/EventDetail.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: api/trunk/modules/api/src/main/java/org/jboss/bpm/model/Expression.java
===================================================================
--- api/trunk/modules/api/src/main/java/org/jboss/bpm/model/Expression.java (rev 0)
+++ api/trunk/modules/api/src/main/java/org/jboss/bpm/model/Expression.java 2008-07-21 15:28:51 UTC (rev 1681)
@@ -0,0 +1,48 @@
+/*
+ * 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 Expression, which is used in the definition of attributes for @{link StartEvent},
+ * @{link IntermediateEvent}, @{link Activity}, @{link ComplexGateway}, and @{link SequenceFlow}
+ *
+ * @author thomas.diesler(a)jboss.com
+ * @since 21-Jul-2008
+ */
+public interface Expression
+{
+ /**
+ * An ExpressionBody MUST be entered to provide the text of the expression, which
+ * will be written in the language defined by the ExpressionLanguage attribute.
+ */
+ String getExpressionBody();
+
+ /**
+ * A Language MUST be provided to identify the language of the ExpressionBody.
+ * The value of the ExpressionLanguage should follow the naming conventions for the
+ * version of the specified language.
+ */
+ String getExpressionLanguage();
+
+}
Property changes on: api/trunk/modules/api/src/main/java/org/jboss/bpm/model/Expression.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Modified: api/trunk/modules/api/src/main/java/org/jboss/bpm/model/Gateway.java
===================================================================
--- api/trunk/modules/api/src/main/java/org/jboss/bpm/model/Gateway.java 2008-07-21 11:34:27 UTC (rev 1680)
+++ api/trunk/modules/api/src/main/java/org/jboss/bpm/model/Gateway.java 2008-07-21 15:28:51 UTC (rev 1681)
@@ -22,7 +22,7 @@
package org.jboss.bpm.model;
-//$Id: ExecutionHandlerImpl.java 1627 2008-07-14 15:16:28Z thomas.diesler(a)jboss.com $
+//$Id$
/**
* Gateways are modelling elements that are used to control how Flows interact as they converge and diverge within a Process.
@@ -32,7 +32,7 @@
* @author thomas.diesler(a)jboss.com
* @since 08-Jul-2008
*/
-public interface Gateway extends FlowObject, NamedFlowObject, MultipleOutFlowSupport, MultipleInFlowSupport
+public interface Gateway extends FlowObject, NameSupport, MultipleOutFlowSupport, MultipleInFlowSupport
{
}
\ No newline at end of file
Added: api/trunk/modules/api/src/main/java/org/jboss/bpm/model/InputSet.java
===================================================================
--- api/trunk/modules/api/src/main/java/org/jboss/bpm/model/InputSet.java (rev 0)
+++ api/trunk/modules/api/src/main/java/org/jboss/bpm/model/InputSet.java 2008-07-21 15:28:51 UTC (rev 1681)
@@ -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.model;
+
+//$Id$
+
+import java.util.List;
+
+/**
+ * An InputSet, which is used in the definition of common attributes for Activities and for attributes of a Process
+ *
+ * @author thomas.diesler(a)jboss.com
+ * @since 21-Jul-2008
+ */
+public interface InputSet
+{
+ /**
+ * Zero or more ArtifactInputs MAY be defined for each InputSet. For the
+ * combination of ArtifactInputs and PropertyInputs, there MUST be at least one
+ * item defined for the InputSet. An ArtifactInput is an Artifact, usually a Data
+ * Object.
+ */
+ List<ArtifactInput> getArtifactInputs();
+
+ /**
+ * Zero or more PropertyInputs MAY be defined for each InputSet. For the
+ * combination of ArtifactInputs and PropertyInputs, there MUST be at least one
+ * item defined for the InputSet.
+ */
+ List<Property> getPropertyInputs();
+}
Property changes on: api/trunk/modules/api/src/main/java/org/jboss/bpm/model/InputSet.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Modified: api/trunk/modules/api/src/main/java/org/jboss/bpm/model/IntermediateEvent.java
===================================================================
--- api/trunk/modules/api/src/main/java/org/jboss/bpm/model/IntermediateEvent.java 2008-07-21 11:34:27 UTC (rev 1680)
+++ api/trunk/modules/api/src/main/java/org/jboss/bpm/model/IntermediateEvent.java 2008-07-21 15:28:51 UTC (rev 1681)
@@ -33,6 +33,6 @@
* @author thomas.diesler(a)jboss.com
* @since 08-Jul-2008
*/
-public interface IntermediateEvent extends Event, NamedFlowObject, SingleInFlowSupport, SingleOutFlowSupport
+public interface IntermediateEvent extends Event, NameSupport, SingleInFlowSupport, SingleOutFlowSupport
{
}
\ No newline at end of file
Added: api/trunk/modules/api/src/main/java/org/jboss/bpm/model/LinkEventDetail.java
===================================================================
--- api/trunk/modules/api/src/main/java/org/jboss/bpm/model/LinkEventDetail.java (rev 0)
+++ api/trunk/modules/api/src/main/java/org/jboss/bpm/model/LinkEventDetail.java 2008-07-21 15:28:51 UTC (rev 1681)
@@ -0,0 +1,38 @@
+/*
+ * 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 Link event detail
+ *
+ * @author thomas.diesler(a)jboss.com
+ * @since 21-Jul-2008
+ */
+public interface LinkEventDetail extends EventDetail
+{
+ /**
+ * If the Trigger is a Link, then the Name MUST be entered.
+ */
+ String getName();
+}
Property changes on: api/trunk/modules/api/src/main/java/org/jboss/bpm/model/LinkEventDetail.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: api/trunk/modules/api/src/main/java/org/jboss/bpm/model/Message.java
===================================================================
--- api/trunk/modules/api/src/main/java/org/jboss/bpm/model/Message.java (rev 0)
+++ api/trunk/modules/api/src/main/java/org/jboss/bpm/model/Message.java 2008-07-21 15:28:51 UTC (rev 1681)
@@ -0,0 +1,56 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.bpm.model;
+
+import java.util.List;
+
+//$Id$
+
+/**
+ * A Message, which is used in the definition of attributes for a @{link StartEvent},
+ * @{EndEvent}, @{IntermediateEvent}, @{Task}, and @{MessageFlow}
+ *
+ * @author thomas.diesler(a)jboss.com
+ * @since 21-Jul-2008
+ */
+public interface Message
+{
+ /**
+ * Name is an attribute that is text description of the Message.
+ */
+ String getName();
+
+ /**
+ * Multiple Properties MAY entered for the Message.
+ */
+ List<Property> getProperties();
+
+ /**
+ * This defines the source of the Message.
+ */
+ Participant getFromRef();
+
+ /**
+ * This defines the target of the Message.
+ */
+ Participant getToRef();
+}
Property changes on: api/trunk/modules/api/src/main/java/org/jboss/bpm/model/Message.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: api/trunk/modules/api/src/main/java/org/jboss/bpm/model/MessageEventDetail.java
===================================================================
--- api/trunk/modules/api/src/main/java/org/jboss/bpm/model/MessageEventDetail.java (rev 0)
+++ api/trunk/modules/api/src/main/java/org/jboss/bpm/model/MessageEventDetail.java 2008-07-21 15:28:51 UTC (rev 1681)
@@ -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 Message event detail
+ *
+ * @author thomas.diesler(a)jboss.com
+ * @since 21-Jul-2008
+ */
+public interface MessageEventDetail extends EventDetail
+{
+ /**
+ * Specifies the technology that will be used to send or receive the
+ * message.
+ */
+ enum Implementation
+ {
+ WebService, Other, Unspecified
+ }
+
+ /**
+ * If the EventDetailType is a MessageRef, then the a Message MUST be supplied.
+ */
+ 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();
+}
Property changes on: api/trunk/modules/api/src/main/java/org/jboss/bpm/model/MessageEventDetail.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Copied: api/trunk/modules/api/src/main/java/org/jboss/bpm/model/NameSupport.java (from rev 1680, api/trunk/modules/api/src/main/java/org/jboss/bpm/model/NamedFlowObject.java)
===================================================================
--- api/trunk/modules/api/src/main/java/org/jboss/bpm/model/NameSupport.java (rev 0)
+++ api/trunk/modules/api/src/main/java/org/jboss/bpm/model/NameSupport.java 2008-07-21 15:28:51 UTC (rev 1681)
@@ -0,0 +1,39 @@
+/*
+ * 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$
+
+/**
+ * Implementing {@link BPMNElement} have can be uniquely identified
+ * in the {@link Process} by name.
+ *
+ * @author thomas.diesler(a)jboss.com
+ * @since 08-Jul-2008
+ */
+public interface NameSupport
+{
+ /**
+ * Get the unique name.
+ */
+ String getName();
+}
\ No newline at end of file
Deleted: api/trunk/modules/api/src/main/java/org/jboss/bpm/model/NamedFlowObject.java
===================================================================
--- api/trunk/modules/api/src/main/java/org/jboss/bpm/model/NamedFlowObject.java 2008-07-21 11:34:27 UTC (rev 1680)
+++ api/trunk/modules/api/src/main/java/org/jboss/bpm/model/NamedFlowObject.java 2008-07-21 15:28:51 UTC (rev 1681)
@@ -1,39 +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$
-
-/**
- * Implementing {@link BPMNElement} have can be uniquely identified
- * in the {@link Process} by name.
- *
- * @author thomas.diesler(a)jboss.com
- * @since 08-Jul-2008
- */
-public interface NamedFlowObject
-{
- /**
- * Get the unique name.
- */
- String getName();
-}
\ No newline at end of file
Added: api/trunk/modules/api/src/main/java/org/jboss/bpm/model/OutputSet.java
===================================================================
--- api/trunk/modules/api/src/main/java/org/jboss/bpm/model/OutputSet.java (rev 0)
+++ api/trunk/modules/api/src/main/java/org/jboss/bpm/model/OutputSet.java 2008-07-21 15:28:51 UTC (rev 1681)
@@ -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.model;
+
+//$Id$
+
+import java.util.List;
+
+/**
+ * An OuputSet, which is used in the definition of common attributes for Activities and for attributes of a Process
+ *
+ * @author thomas.diesler(a)jboss.com
+ * @since 21-Jul-2008
+ */
+public interface OutputSet
+{
+ /**
+ * Zero or more ArtifactOutputs MAY be defined for each OutputSet. For the
+ * combination of ArtifactOutputs and PropertyOutputs, there MUST be at least one
+ * item defined for the OutputSet. An ArtifactOutput is an @{link Artifact},
+ * usually a @{link DataObject}.
+ */
+ List<ArtifactOutput> getArtifactOutputs();
+
+ /**
+ * Zero or more PropertyInputs MAY be defined for each InputSet. For the
+ * combination of ArtifactInputs and PropertyInputs, there MUST be at least one
+ * item defined for the InputSet.
+ */
+ List<Property> getPropertyOutputs();
+}
Property changes on: api/trunk/modules/api/src/main/java/org/jboss/bpm/model/OutputSet.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: api/trunk/modules/api/src/main/java/org/jboss/bpm/model/Participant.java
===================================================================
--- api/trunk/modules/api/src/main/java/org/jboss/bpm/model/Participant.java (rev 0)
+++ api/trunk/modules/api/src/main/java/org/jboss/bpm/model/Participant.java 2008-07-21 15:28:51 UTC (rev 1681)
@@ -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$
+
+/**
+ * A Participant, which is used in the definition of attributes for a @{link Pool},
+ *
+ * @{link Message}, and @{link WebService}
+ *
+ * @author thomas.diesler(a)jboss.com
+ * @since 21-Jul-2008
+ */
+public interface Participant
+{
+ enum ParticipantType
+ {
+ Role, Entity
+ }
+
+ /**
+ * Get the type of this participant
+ */
+ ParticipantType getParticipantType();
+
+ /**
+ * If the ParticipantType = Role, then a Role MUST be identified.
+ */
+ Role getRoleRef();
+
+ /**
+ * If the ParticipantType = Entity, then an Entity MUST be identified.
+ */
+ Entity getEntityRef();
+}
Property changes on: api/trunk/modules/api/src/main/java/org/jboss/bpm/model/Participant.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Modified: api/trunk/modules/api/src/main/java/org/jboss/bpm/model/Process.java
===================================================================
--- api/trunk/modules/api/src/main/java/org/jboss/bpm/model/Process.java 2008-07-21 11:34:27 UTC (rev 1680)
+++ api/trunk/modules/api/src/main/java/org/jboss/bpm/model/Process.java 2008-07-21 15:28:51 UTC (rev 1681)
@@ -34,38 +34,90 @@
* @author thomas.diesler(a)jboss.com
* @since 08-Jul-2008
*/
-public interface Process extends GraphicalElement, NamedFlowObject
+public interface Process extends SupportingElement, NameSupport
{
/**
- * Defines the state a {@link Process} can be in
+ * Defines the type of a {@link Process}
*/
- enum ProcessState
+ enum ProcessType
{
- /** The Process is created but not yet initialized */
- CREATED,
- /** The Process is initialized but not yet started */
- INITIALIZED,
- /** The Process is started but has not yet ended */
- STARTED,
- /** The Process has ended */
- ENDED
+ None, Private, Abstract, Collaboration
};
/**
- * Get the start event
+ * Defines the status a {@link Process} can be in
*/
- StartEvent getStartEvent();
+ enum Status
+ {
+ None, Ready, Active, Cancelled, Aborting, Aborted, Completing, Completed
+ };
/**
- * Get the set of end events
+ * Get the process type
*/
- List<EndEvent> getEndEvents();
+ ProcessType getProcessType();
+
+ /**
+ * Get the process state
+ */
+ Status getStatus();
/**
* Get the list of flow objects
*/
List<FlowObject> getFlowObjects();
+ /**
+ * One or more Performers MAY be entered. The Performers attribute defines the
+ * resource that will be responsible for the Process. The Performers entry could be in
+ * the form of a specific individual, a group, an organization role or position, or an
+ * organization.
+ */
+ List<String> getPerformers();
+
+ /**
+ * One or more assignment expressions MAY be made for the object. The
+ * Assignment SHALL be performed as defined by the AssignTime attribute.
+ */
+ List<String> getAssignments();
+
+ /**
+ * Modeler-defined Properties MAY be added to a Process. These Properties are
+ * “local” to the Process. All Tasks, Sub-Process objects, and Sub-Processes that are
+ * embedded SHALL have access to these Properties. The fully delineated name of
+ * these properties are “<process name>.<property name>” (e.g., “Add Customer.Customer Name”).
+ * If a process is embedded within another Process, then the fully delineated name SHALL
+ * also be preceded by the Parent Process name for as many Parents there are until the top level Process.
+ */
+ List<Property> getProperties();
+
+ /**
+ * 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)
+ */
+ 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)
+ */
+ List<OutputSet> getOutputSets();
+
+ /**
+ * Get the start event
+ */
+ StartEvent getStartEvent();
+
+ /**
+ * Get the set of end events
+ */
+ List<EndEvent> getEndEvents();
+
+
/** Start the process */
Future<Result> startProcess();
@@ -79,9 +131,5 @@
*/
FlowObject findFlowObject(String name);
- /**
- * Get the process state
- */
- ProcessState getProcessState();
}
\ No newline at end of file
Added: api/trunk/modules/api/src/main/java/org/jboss/bpm/model/Property.java
===================================================================
--- api/trunk/modules/api/src/main/java/org/jboss/bpm/model/Property.java (rev 0)
+++ api/trunk/modules/api/src/main/java/org/jboss/bpm/model/Property.java 2008-07-21 15:28:51 UTC (rev 1681)
@@ -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$
+
+/**
+ * A Property, which is used in the definition of attributes for a Process and common activity attributes
+ *
+ * @author thomas.diesler(a)jboss.com
+ * @since 21-Jul-2008
+ */
+public interface Property extends SupportingElement
+{
+ /**
+ * Each Property has a Name (e.g., name=”Customer Name”).
+ */
+ String getName();
+
+ /**
+ * Each Property has a Type (e.g., type=”String”). Properties may be defined
+ * hierarchically.
+ */
+ String getType();
+
+ /**
+ * Each Property MAY have a Value specified.
+ */
+ Expression getValue();
+
+ /**
+ * If the Correlation attribute is set to True, then the Property is marked to be used for
+ * correlation (e.g., for incoming Messages).
+ */
+ boolean isCorrelation();
+}
Property changes on: api/trunk/modules/api/src/main/java/org/jboss/bpm/model/Property.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: api/trunk/modules/api/src/main/java/org/jboss/bpm/model/Role.java
===================================================================
--- api/trunk/modules/api/src/main/java/org/jboss/bpm/model/Role.java (rev 0)
+++ api/trunk/modules/api/src/main/java/org/jboss/bpm/model/Role.java 2008-07-21 15:28:51 UTC (rev 1681)
@@ -0,0 +1,39 @@
+/*
+ * 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 Role, which is used in the definition of attributes for a @{link Participant}
+ *
+ * @author thomas.diesler(a)jboss.com
+ * @since 21-Jul-2008
+ */
+public interface Role
+{
+ /**
+ * Name is an attribute that is text description of the Role.
+ */
+ String getName();
+
+}
Property changes on: api/trunk/modules/api/src/main/java/org/jboss/bpm/model/Role.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: api/trunk/modules/api/src/main/java/org/jboss/bpm/model/SignalEventDetail.java
===================================================================
--- api/trunk/modules/api/src/main/java/org/jboss/bpm/model/SignalEventDetail.java (rev 0)
+++ api/trunk/modules/api/src/main/java/org/jboss/bpm/model/SignalEventDetail.java 2008-07-21 15:28:51 UTC (rev 1681)
@@ -0,0 +1,39 @@
+/*
+ * 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 Signal event detail
+ *
+ * @author thomas.diesler(a)jboss.com
+ * @since 21-Jul-2008
+ */
+public interface SignalEventDetail extends EventDetail
+{
+ /**
+ * If the Trigger is a Signal, then a Signal Shall be entered.
+ */
+ Signal getSignalRef();
+
+}
Property changes on: api/trunk/modules/api/src/main/java/org/jboss/bpm/model/SignalEventDetail.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Modified: api/trunk/modules/api/src/main/java/org/jboss/bpm/model/StartEvent.java
===================================================================
--- api/trunk/modules/api/src/main/java/org/jboss/bpm/model/StartEvent.java 2008-07-21 11:34:27 UTC (rev 1680)
+++ api/trunk/modules/api/src/main/java/org/jboss/bpm/model/StartEvent.java 2008-07-21 15:28:51 UTC (rev 1681)
@@ -21,6 +21,8 @@
*/
package org.jboss.bpm.model;
+import java.util.List;
+
//$Id$
/**
@@ -34,4 +36,5 @@
*/
public interface StartEvent extends Event, SingleOutFlowSupport
{
+ List<EventDetail> getTrigger();
}
\ No newline at end of file
Added: api/trunk/modules/api/src/main/java/org/jboss/bpm/model/TerminateEventDetail.java
===================================================================
--- api/trunk/modules/api/src/main/java/org/jboss/bpm/model/TerminateEventDetail.java (rev 0)
+++ api/trunk/modules/api/src/main/java/org/jboss/bpm/model/TerminateEventDetail.java 2008-07-21 15:28:51 UTC (rev 1681)
@@ -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$
+
+/**
+ * The Terminate event detail
+ *
+ * @author thomas.diesler(a)jboss.com
+ * @since 21-Jul-2008
+ */
+public interface TerminateEventDetail extends EventDetail
+{
+
+}
Property changes on: api/trunk/modules/api/src/main/java/org/jboss/bpm/model/TerminateEventDetail.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: api/trunk/modules/api/src/main/java/org/jboss/bpm/model/TimeDateExpression.java
===================================================================
--- api/trunk/modules/api/src/main/java/org/jboss/bpm/model/TimeDateExpression.java (rev 0)
+++ api/trunk/modules/api/src/main/java/org/jboss/bpm/model/TimeDateExpression.java 2008-07-21 15:28:51 UTC (rev 1681)
@@ -0,0 +1,37 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.bpm.model;
+
+//$Id$
+
+
+/**
+ * The TimeDateExpression supporting element is a sub-type of the Expression Element (Expression on page 273) and uses all
+ * the attributes of the @{link Expression} Element.
+ *
+ * @author Thomas.Diesler(a)jboss.com
+ * @since 21-Jul-2008
+ */
+public interface TimeDateExpression extends Expression
+{
+
+}
Property changes on: api/trunk/modules/api/src/main/java/org/jboss/bpm/model/TimeDateExpression.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: api/trunk/modules/api/src/main/java/org/jboss/bpm/model/TimerEventDetail.java
===================================================================
--- api/trunk/modules/api/src/main/java/org/jboss/bpm/model/TimerEventDetail.java (rev 0)
+++ api/trunk/modules/api/src/main/java/org/jboss/bpm/model/TimerEventDetail.java 2008-07-21 15:28:51 UTC (rev 1681)
@@ -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$
+
+/**
+ * The Timer event detail
+ *
+ * @author thomas.diesler(a)jboss.com
+ * @since 21-Jul-2008
+ */
+public interface TimerEventDetail extends EventDetail
+{
+ /**
+ * If the Trigger is a Timer, then a TimeDate MAY be entered. If a TimeDate is not
+ * entered, then a TimeCycle MUST be entered
+ */
+ TimeDateExpression getTimeDate();
+
+ /**
+ * If the Trigger is a Timer, then a TimeCycle MAY be entered. If a TimeCycle is
+ * not entered, then a TimeDate MUST be entered
+ */
+ TimeDateExpression getTimeCycle();
+
+}
Property changes on: api/trunk/modules/api/src/main/java/org/jboss/bpm/model/TimerEventDetail.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Modified: api/trunk/modules/impl/src/main/java/org/jboss/bpm/model/internal/FlowObjectImpl.java
===================================================================
--- api/trunk/modules/impl/src/main/java/org/jboss/bpm/model/internal/FlowObjectImpl.java 2008-07-21 11:34:27 UTC (rev 1680)
+++ api/trunk/modules/impl/src/main/java/org/jboss/bpm/model/internal/FlowObjectImpl.java 2008-07-21 15:28:51 UTC (rev 1681)
@@ -27,7 +27,7 @@
import org.jboss.bpm.model.FlowObject;
import org.jboss.bpm.model.MultipleInFlowSupport;
import org.jboss.bpm.model.MultipleOutFlowSupport;
-import org.jboss.bpm.model.NamedFlowObject;
+import org.jboss.bpm.model.NameSupport;
import org.jboss.bpm.model.Process;
import org.jboss.bpm.model.SingleInFlowSupport;
import org.jboss.bpm.model.SingleOutFlowSupport;
@@ -49,19 +49,19 @@
{
super.initialize(proc);
- if (this instanceof NamedFlowObject)
+ if (this instanceof NameSupport)
{
// Check required name
- String name = ((NamedFlowObject)this).getName();
+ String name = ((NameSupport)this).getName();
if (name == null)
throw new InvalidProcessException("Name is required for: " + this);
// Check name uniqueness
for (FlowObject aux : proc.getFlowObjects())
{
- if (aux != this && aux instanceof NamedFlowObject)
+ if (aux != this && aux instanceof NameSupport)
{
- String auxName = ((NamedFlowObject)aux).getName();
+ String auxName = ((NameSupport)aux).getName();
if (name.equals(auxName))
throw new NameNotUniqueException("NamedFlowObject: " + this);
}
Modified: api/trunk/modules/impl/src/main/java/org/jboss/bpm/model/internal/ProcessImpl.java
===================================================================
--- api/trunk/modules/impl/src/main/java/org/jboss/bpm/model/internal/ProcessImpl.java 2008-07-21 11:34:27 UTC (rev 1680)
+++ api/trunk/modules/impl/src/main/java/org/jboss/bpm/model/internal/ProcessImpl.java 2008-07-21 15:28:51 UTC (rev 1681)
@@ -29,12 +29,16 @@
import java.util.concurrent.Future;
import org.jboss.bpm.InvalidProcessException;
+import org.jboss.bpm.NotImplementedException;
import org.jboss.bpm.client.ExecutionManager;
import org.jboss.bpm.client.ProcessManager;
import org.jboss.bpm.model.EndEvent;
import org.jboss.bpm.model.FlowObject;
-import org.jboss.bpm.model.NamedFlowObject;
+import org.jboss.bpm.model.InputSet;
+import org.jboss.bpm.model.NameSupport;
+import org.jboss.bpm.model.OutputSet;
import org.jboss.bpm.model.Process;
+import org.jboss.bpm.model.Property;
import org.jboss.bpm.model.Result;
import org.jboss.bpm.model.StartEvent;
import org.jboss.bpm.runtime.Attachments;
@@ -49,7 +53,7 @@
{
private String name;
private List<FlowObject> flowObjects = new ArrayList<FlowObject>();
- private ProcessState processState = ProcessState.CREATED;
+ private Status processState = Status.None;
public ProcessImpl(String name)
{
@@ -62,6 +66,36 @@
return name;
}
+ public List<String> getAssignments()
+ {
+ throw new NotImplementedException();
+ }
+
+ public List<InputSet> getInputSets()
+ {
+ throw new NotImplementedException();
+ }
+
+ public List<OutputSet> getOutputSets()
+ {
+ throw new NotImplementedException();
+ }
+
+ public List<String> getPerformers()
+ {
+ throw new NotImplementedException();
+ }
+
+ public ProcessType getProcessType()
+ {
+ throw new NotImplementedException();
+ }
+
+ public List<Property> getProperties()
+ {
+ throw new NotImplementedException();
+ }
+
public void addFlowObject(FlowObject flowObject)
{
flowObjects.add(flowObject);
@@ -97,7 +131,7 @@
public List<FlowObject> getFlowObjects()
{
- if (processState == ProcessState.CREATED)
+ if (processState == Status.None)
return flowObjects;
return Collections.unmodifiableList(flowObjects);
@@ -110,10 +144,10 @@
public Future<Result> startProcess(Attachments att)
{
- if (processState != ProcessState.INITIALIZED)
+ if (processState != Status.Ready)
throw new IllegalStateException("Cannot start process in state: " + processState);
- processState = ProcessState.STARTED;
+ processState = Status.Active;
ExecutionManager exm = ExecutionManager.locateExecutionManager();
return exm.startProcess(new RuntimeProcessImpl(this), att);
}
@@ -126,9 +160,9 @@
FlowObject nfo = null;
for (FlowObject aux : flowObjects)
{
- if (aux instanceof NamedFlowObject)
+ if (aux instanceof NameSupport)
{
- NamedFlowObject auxnfo = (NamedFlowObject)aux;
+ NameSupport auxnfo = (NameSupport)aux;
if (name.equals(auxnfo.getName()))
{
nfo = aux;
@@ -139,7 +173,7 @@
return nfo;
}
- public ProcessState getProcessState()
+ public Status getStatus()
{
return processState;
}
@@ -149,7 +183,7 @@
*/
public void initialize()
{
- if (processState != ProcessState.CREATED)
+ if (processState != Status.None)
throw new IllegalStateException("Cannot initialize process in state: " + processState);
// Set the anonymous default name
@@ -171,7 +205,7 @@
((FlowObjectImpl)aux).initialize(this);
}
- processState = ProcessState.INITIALIZED;
+ processState = Status.Ready;
}
public String toString()
Modified: api/trunk/modules/impl/src/main/java/org/jboss/bpm/model/internal/StartEventImpl.java
===================================================================
--- api/trunk/modules/impl/src/main/java/org/jboss/bpm/model/internal/StartEventImpl.java 2008-07-21 11:34:27 UTC (rev 1680)
+++ api/trunk/modules/impl/src/main/java/org/jboss/bpm/model/internal/StartEventImpl.java 2008-07-21 15:28:51 UTC (rev 1681)
@@ -23,8 +23,12 @@
//$Id$
+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.EventDetail;
import org.jboss.bpm.model.Flow;
import org.jboss.bpm.model.Signal;
import org.jboss.bpm.model.StartEvent;
@@ -49,6 +53,11 @@
private Flow outFlow;
+ public List<EventDetail> getTrigger()
+ {
+ throw new NotImplementedException();
+ }
+
public Flow getOutFlow()
{
return outFlow;
Added: api/trunk/modules/testsuite/src/test/resources/cts/cts-specification.txt
===================================================================
--- api/trunk/modules/testsuite/src/test/resources/cts/cts-specification.txt (rev 0)
+++ api/trunk/modules/testsuite/src/test/resources/cts/cts-specification.txt 2008-07-21 15:28:51 UTC (rev 1681)
@@ -0,0 +1,8 @@
+# $Id$
+
+BPM Compatibility Test Specification
+
+1. Process
+
+
+
Property changes on: api/trunk/modules/testsuite/src/test/resources/cts/cts-specification.txt
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
17 years, 9 months
JBoss JBPM SVN: r1680 - jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/expr.
by do-not-reply@jboss.org
Author: pascal.verdage
Date: 2008-07-21 07:34:27 -0400 (Mon, 21 Jul 2008)
New Revision: 1680
Modified:
jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/expr/ExpressionTest.java
Log:
add simple test for groovy
Modified: jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/expr/ExpressionTest.java
===================================================================
--- jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/expr/ExpressionTest.java 2008-07-21 11:24:21 UTC (rev 1679)
+++ jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/expr/ExpressionTest.java 2008-07-21 11:34:27 UTC (rev 1680)
@@ -61,9 +61,9 @@
execution.setVariable("pv", "hello");
Environment environment = environmentFactory.openEnvironment();
- try {
+ try {
assertEquals("hello", scriptManager.evaluateExpression("#{pv}", execution, null));
-
+ assertEquals("hello", scriptManager.evaluateExpression("pv", execution, "groovy"));
} finally {
environment.close();
}
17 years, 9 months
JBoss JBPM SVN: r1679 - in jbpm4/pvm/trunk/modules/core/src: test/java/org/jbpm/pvm/expr and 1 other directory.
by do-not-reply@jboss.org
Author: pascal.verdage
Date: 2008-07-21 07:24:21 -0400 (Mon, 21 Jul 2008)
New Revision: 1679
Modified:
jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/internal/wire/binding/ScriptManagerBinding.java
jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/expr/ExpressionTest.java
Log:
update expression language binding and test
Modified: jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/internal/wire/binding/ScriptManagerBinding.java
===================================================================
--- jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/internal/wire/binding/ScriptManagerBinding.java 2008-07-21 08:36:44 UTC (rev 1678)
+++ jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/internal/wire/binding/ScriptManagerBinding.java 2008-07-21 11:24:21 UTC (rev 1679)
@@ -50,12 +50,16 @@
public Object parse(Element element, Parse parse, Parser parser) {
ObjectDescriptor descriptor = new ObjectDescriptor(ScriptManager.class);
- if (element.hasAttribute("default-language")) {
- String defaultLanguage = element.getAttribute("default-language");
- descriptor.addInjection("defaultLanguage", new StringDescriptor(defaultLanguage));
-
+ if (element.hasAttribute("default-expression-language")) {
+ String defaultLanguage = element.getAttribute("default-expression-language");
+ descriptor.addInjection("defaultExpressionLanguage", new StringDescriptor(defaultLanguage));
}
+ if (element.hasAttribute("default-script-language")) {
+ String defaultLanguage = element.getAttribute("default-script-language");
+ descriptor.addInjection("defaultScriptLanguage", new StringDescriptor(defaultLanguage));
+ }
+
if (element.hasAttribute("read-contexts")) {
String readContextsText = element.getAttribute("read-contexts");
List<String> readContextList = XmlUtil.parseCommaSeparatedList(readContextsText);
Modified: jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/expr/ExpressionTest.java
===================================================================
--- jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/expr/ExpressionTest.java 2008-07-21 08:36:44 UTC (rev 1678)
+++ jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/expr/ExpressionTest.java 2008-07-21 11:24:21 UTC (rev 1679)
@@ -21,6 +21,7 @@
*/
package org.jbpm.pvm.expr;
+import org.jbpm.pvm.samples.activities.WaitState;
import org.jbpm.pvm.test.base.JbpmTestCase;
import org.jbpm.pvm.client.ClientProcessInstance;
import org.jbpm.pvm.env.Environment;
@@ -32,6 +33,7 @@
/**
* @author Tom Baeyens
+ * @author Pascal Verdage
*/
public class ExpressionTest extends JbpmTestCase
{
@@ -40,22 +42,27 @@
EnvironmentFactory environmentFactory = PvmEnvironmentFactory.parseXmlString(
"<contexts>" +
" <environment-factory>" +
- " <script-manager default-language='juel'" +
+ " <script-manager default-expression-language='juel'" +
+ " default-script-language='juel'" +
" read-contexts='execution, environment, environment-factory' " +
" write-context='execution'>" +
" <script-language name='juel' factory='com.sun.script.juel.JuelScriptEngineFactory' />" +
+ " <script-language name='groovy' factory='com.sun.script.groovy.GroovyScriptEngineFactory' />" +
" </script-manager>" +
" </environment-factory>" +
"</contexts>"
);
-
+
ScriptManager scriptManager = environmentFactory.get(ScriptManager.class);
- ClientProcessInstance execution = ProcessFactory.build().done().beginProcessInstance();
+ ClientProcessInstance execution =
+ ProcessFactory.build()
+ .node("unused").initial().behaviour(WaitState.class)
+ .done().beginProcessInstance();
execution.setVariable("pv", "hello");
Environment environment = environmentFactory.openEnvironment();
try {
- assertEquals("hello", scriptManager.evaluate("#{pv}", execution, null));
+ assertEquals("hello", scriptManager.evaluateExpression("#{pv}", execution, null));
} finally {
environment.close();
17 years, 9 months
JBoss JBPM SVN: r1678 - 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-21 04:36:44 -0400 (Mon, 21 Jul 2008)
New Revision: 1678
Modified:
jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/internal/model/ExecutionImpl.java
Log:
remove trace (I forgot it, sorry)
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-21 08:34:37 UTC (rev 1677)
+++ jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/internal/model/ExecutionImpl.java 2008-07-21 08:36:44 UTC (rev 1678)
@@ -816,7 +816,6 @@
}
for (Timer timer : timers) {
timerSession.cancel(timer);
- System.out.println("timer deleted");
}
timers.clear();
hasTimers = false;
17 years, 9 months
JBoss JBPM SVN: r1677 - in jbpm4/pvm/trunk/modules/core/src: main/java/org/jbpm/pvm/internal/model and 1 other directories.
by do-not-reply@jboss.org
Author: pascal.verdage
Date: 2008-07-21 04:34:37 -0400 (Mon, 21 Jul 2008)
New Revision: 1677
Modified:
jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/internal/jobexecutor/ExecuteJobCmd.java
jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/internal/model/ExecutionImpl.java
jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/timer/TimerIntegrationTest.java
Log:
fix indentation in ExecuteJobCommand
fix destroyTimers implementation + add equals method (hibernate proxies)
add tests for timers
Modified: jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/internal/jobexecutor/ExecuteJobCmd.java
===================================================================
--- jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/internal/jobexecutor/ExecuteJobCmd.java 2008-07-18 15:41:20 UTC (rev 1676)
+++ jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/internal/jobexecutor/ExecuteJobCmd.java 2008-07-21 08:34:37 UTC (rev 1677)
@@ -50,19 +50,19 @@
}
public Job execute(Environment environment) throws Exception {
- Session session = environment.get(Session.class);
- if (session==null) {
- throw new PvmException("no hibernate-session configured to get job "+jobDbid+" for execution");
- }
- JobImpl<?> job = (JobImpl<?>) session.get(JobImpl.class, jobDbid);
+ Session session = environment.get(Session.class);
+ if (session==null) {
+ throw new PvmException("no hibernate-session configured to get job "+jobDbid+" for execution");
+ }
+ JobImpl<?> job = (JobImpl<?>) session.get(JobImpl.class, jobDbid);
- // in case of exclusive jobs, the jobImpl might have been deleted
- // before we execute it (they are in a list)
- if (job != null) {
+ // in case of exclusive jobs, the jobImpl might have been deleted
+ // before we execute it (they are in a list)
+ if (job != null) {
try {
log.debug("executing job "+job+"...");
job.execute(environment);
-
+
// if this job is locked too long, it could be unlocked by the lockmonitor and
// executed by another thread.
Date lockExpirationDate = job.getLockExpirationTime();
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-18 15:41:20 UTC (rev 1676)
+++ jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/internal/model/ExecutionImpl.java 2008-07-21 08:34:37 UTC (rev 1677)
@@ -58,6 +58,7 @@
import org.jbpm.pvm.internal.type.variable.NullVariable;
import org.jbpm.pvm.internal.type.variable.UnpersistableVariable;
import org.jbpm.pvm.internal.util.Clock;
+import org.jbpm.pvm.internal.util.EqualsUtil;
import org.jbpm.pvm.internal.util.Priority;
import org.jbpm.pvm.job.Timer;
import org.jbpm.pvm.listener.EventListener;
@@ -802,12 +803,23 @@
}
protected void destroyTimers(CompositeElementImpl scope) {
- // TODO: is it correct?
- TimerSession timerSession = Environment.getCurrent().get(TimerSession.class);
+ log.debug("destroying timers of "+toString());
if (hasTimers && timers!=null && !timers.isEmpty()) {
+ // get the TimerSession from the environment
+ Environment environment = Environment.getCurrent();
+ if (environment==null) {
+ throw new PvmException("non environment for initializing timers");
+ }
+ TimerSession timerSession = environment.get(TimerSession.class);
+ if (timerSession==null) {
+ throw new PvmException("no TimerSession in environment for initializing timers");
+ }
for (Timer timer : timers) {
timerSession.cancel(timer);
+ System.out.println("timer deleted");
}
+ timers.clear();
+ hasTimers = false;
}
}
@@ -1314,6 +1326,13 @@
throw new PvmException("unsuppported extension "+extensionClass.getName());
}
+ // equals ///////////////////////////////////////////////////////////////////
+ // hack to support comparing hibernate proxies against the real objects
+ // since this always falls back to ==, we don't need to overwrite the hashcode
+ public boolean equals(Object o) {
+ return EqualsUtil.equals(this, o);
+ }
+
// getters and setters /////////////////////////////////////////////////////////
public List<Comment> getComments() {
Modified: jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/timer/TimerIntegrationTest.java
===================================================================
--- jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/timer/TimerIntegrationTest.java 2008-07-18 15:41:20 UTC (rev 1676)
+++ jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/timer/TimerIntegrationTest.java 2008-07-21 08:34:37 UTC (rev 1677)
@@ -33,6 +33,7 @@
import org.jbpm.pvm.model.OpenExecution;
import org.jbpm.pvm.model.ProcessDefinition;
import org.jbpm.pvm.model.ProcessFactory;
+import org.jbpm.pvm.samples.activities.AutomaticActivity;
import org.jbpm.pvm.session.DbSession;
import org.jbpm.pvm.session.PvmDbSession;
import org.jbpm.pvm.test.base.DbTestCase;
@@ -244,9 +245,6 @@
// timer execution is tested in testTimerExecution
}
- //TODO: the test fails because the child execution is not deleted and the timer
- // still exist.
- //Still, main execution is in the the good state
public void testReschedulingTimer() {
Date now = Clock.getCurrentTime();
long twoDaysFromNow = now.getTime() + twoDaysDuration;
@@ -279,22 +277,19 @@
// check that timer's dueDate is good
Timer timer = child.getTimers().iterator().next();
assertTrue("error is "+(timer.getDueDate().getTime()-twoDaysFromNow)+" millis",
- twoDaysFromNow <= timer.getDueDate().getTime());
+ twoDaysFromNow <= timer.getDueDate().getTime()+200);
+ // set next minimum due date
+ twoDaysFromNow = Clock.getCurrentTime().getTime() + twoDaysDuration;
+
// execute timer
- twoDaysFromNow = Clock.getCurrentTime().getTime() + twoDaysDuration - 100;
JobTestHelper jobTestHelper = getEnvironmentFactory().get(JobTestHelper.class);
jobTestHelper.executeTimer(timer.getDbid());
child = loadExecutionFromDb(child.getDbid());
}
- // check that the subExecution was deleted
- if (child!=null) {
- System.out.println(child.getNodeName());
- System.out.println(child.getVariable("counter"));
- execution = loadExecutionFromDb(processInstance.getDbid());
- System.out.println(execution.getNodeName());
- }
+ newTransaction();
+ child = loadExecutionFromDb(child.getDbid());
assertNull(child);
// check that timers have been deleted
@@ -307,45 +302,42 @@
assertEquals("reassign", execution.getNodeName());
}
- /*
- TODO finish after refactoring
-
- public void testTimerEndingProcess() {
- ProcessDefinition processDefinition = ProcessFactory.build("timed2")
- .node("get input").initial().behaviour(WaitState.class)
- .timer("2 business days", "escalate")
- .transition("escalate").to("manager decision")
- .transition("submit").to("process input")
- .node("process input").behaviour(WaitState.class)
- .node("manager decision").behaviour(AutomaticActivity.class)
+ public void testTimerEndingProcessExecution() {
+ ProcessDefinition processDefinition = ProcessFactory.build("timerEndingProcess")
+ .node("decide").initial().behaviour(WaitState.class)
+ .timer("2 business days", "timeout")
+ .transition("decision made").to("response") // first defined transition is the default one
+ .transition("timeout").to("reassign")
+ .node("reassign").behaviour(AutomaticActivity.class)
+ .node("response").behaviour(WaitState.class)
.done();
- EnvironmentFactory environmentFactory = TimerConfiguration.getEnvironmentFactory();
- ProcessService processService = environmentFactory.get(ProcessService.class);
-
- processService.deploy(processDefinition);
-
- Date now = new Date();
- long fourtyEightHoursFromNow = now.getTime() + 48*60*60*1000;
-
- ExecutionService executionService = TimerConfiguration.getExecutionService();
- Execution execution = executionService.startExecution("timed2");
+ ExecutionImpl processInstance = deployAndInstanciateProcess(processDefinition);
- ActivityInstance activityInstance = execution.getActivityInstance();
- Node node = activityInstance.getNode();
- assertEquals("get input", node.getName());
- Timer timer = activityInstance
- .getTimers()
- .iterator()
- .next();
+ Execution execution = processInstance;
+ OpenExecution child = ((OpenExecution) execution).getExecutions().iterator().next();
+ assertEquals("decide", child.getNodeName());
- assertTrue(fourtyEightHoursFromNow < timer.getDueDate().getTime());
-
- JobTestHelper jobTestHelper = environmentFactory.get(JobTestHelper.class);
- execution = jobTestHelper.executeTimer(timer.getDbid());
-
- assertEquals("manager decision", execution.getNode().getName());
+ // timer execution
+ Timer timer = child.getTimers().iterator().next();
+
+ JobTestHelper jobTestHelper = getEnvironmentFactory().get(JobTestHelper.class);
+ child = (OpenExecution) jobTestHelper.executeTimer(timer.getDbid());
+ assertEquals(Execution.STATE_ENDED, child.getState());
+
+ // check that the subExecution was deleted
+ child = loadExecutionFromDb(child.getDbid());
+ assertNull(child);
+
+ // check that timers have been deleted
+ List<Job> jobs = Environment.getCurrent().get(PvmDbSession.class).findAllJobs();
+ assertNotNull(jobs);
+ assertTrue(jobs.isEmpty());
+
+ // check that process is in the right state
+ execution = loadExecutionFromDb(processInstance.getDbid());
+ assertEquals("reassign", execution.getNodeName());
assertEquals(Execution.STATE_ENDED, execution.getState());
}
- */
+
}
17 years, 9 months
JBoss JBPM SVN: r1676 - in jbpm4/pvm/trunk/modules/core/src: test/java/org/jbpm/pvm/timer and 1 other directory.
by do-not-reply@jboss.org
Author: pascal.verdage
Date: 2008-07-18 11:41:20 -0400 (Fri, 18 Jul 2008)
New Revision: 1676
Modified:
jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/internal/model/ExecutionImpl.java
jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/timer/IncrementCounterWaitState.java
jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/timer/TimerIntegrationTest.java
Log:
update some timer tests
+ use setters in ExecutionImpl instead of direct field access (problems with hibernate proxies)
+ destroyTimers implementation
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-18 14:11:32 UTC (rev 1675)
+++ jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/internal/model/ExecutionImpl.java 2008-07-18 15:41:20 UTC (rev 1676)
@@ -152,7 +152,7 @@
* null and is only created from the executions in case its needed. Note
* that not all executions are forced to have a name and duplicates are allowed.
* In case the {@link #executions} change, the executionsMap can be nulled or
- * also updated (but a check needs to be added wether it exists). */
+ * also updated (but a check needs to be added whether it exists). */
protected transient Map<String, OpenExecution> executionsMap = null;
// transient members
@@ -235,12 +235,12 @@
ExecutionImpl child = createExecution(scope.getName());
// copy the current state from the child execution to the parent execution
- child.node = node;
- child.transition = transition;
- child.propagation = propagation;
- child.transitionOrigin = transitionOrigin;
- child.previousTransition = previousTransition;
- child.previousNode = previousNode;
+ child.setNode(getNode());
+ child.setTransition(getTransition());
+ child.setPropagation(getPropagation());
+ child.setTransitionOrigin(getTransitionOrigin());
+ child.setPreviousTransition(getPreviousTransition());
+ child.setPreviousNode(getPreviousNode());
child.initializeVariables(scope, this);
child.initializeTimers(scope);
@@ -253,12 +253,12 @@
destroyVariables(scope, parent);
// copy the current state from the child execution to the parent execution
- parent.node = node;
- parent.transition = transition;
- parent.propagation = propagation;
- parent.transitionOrigin = transitionOrigin;
- parent.previousTransition = previousTransition;
- parent.previousNode = previousNode;
+ getParent().setNode(getNode());
+ getParent().setTransition(getTransition());
+ getParent().setPropagation(getPropagation());
+ getParent().setTransitionOrigin(getTransitionOrigin());
+ getParent().setPreviousTransition(getPreviousTransition());
+ getParent().setPreviousNode(getPreviousNode());
end();
parent.removeExecution(this);
@@ -413,12 +413,12 @@
public void take(Transition transition) {
checkLock();
- this.propagation = Propagation.EXPLICIT;
- this.transition = (TransitionImpl) transition;
+ setPropagation(Propagation.EXPLICIT);
+ setTransition((TransitionImpl) transition);
// copy the current node as the transition origin. the origin can be different from
// the transition source in case a transition is taken from an enclosing node
- this.transitionOrigin = node;
- this.previousTransition = null;
+ setTransitionOrigin(getNode());
+ setPreviousTransition(null);
performAtomicOperation(TAKE_TRANSITION);
}
@@ -463,7 +463,7 @@
public void proceed() {
checkLock();
- // in graph based processDefinition langauges we assume that a
+ // in graph based processDefinition languages we assume that a
// default transition is available
TransitionImpl defaultTransition = findDefaultTransition();
if (defaultTransition!=null) {
@@ -504,8 +504,8 @@
public void moveTo(NodeImpl destination) {
// if the parent node needs to know the previous node
if (destination.isPreviousNeeded()) {
- this.previousNode = node;
- this.previousTransition = transition;
+ setPreviousNode(getNode());
+ setPreviousTransition(getTransition());
} else {
this.previousNode = null;
this.previousTransition = null;
@@ -802,7 +802,13 @@
}
protected void destroyTimers(CompositeElementImpl scope) {
- // TODO
+ // TODO: is it correct?
+ TimerSession timerSession = Environment.getCurrent().get(TimerSession.class);
+ if (hasTimers && timers!=null && !timers.isEmpty()) {
+ for (Timer timer : timers) {
+ timerSession.cancel(timer);
+ }
+ }
}
public void createTimer(String eventName, String signalName, String dueDateDescription) {
@@ -814,15 +820,13 @@
}
public void createTimer(String eventName, String signalName, String dueDateDescription, Date dueDate, String repeat, Boolean isExclusive, Integer retries) {
- CompositeElementImpl compositeElement = null;
-
if ( (eventName==null)
&& (signalName==null)
) {
throw new PvmException("no event or signal specified");
}
if (log.isDebugEnabled()) {
- log.debug("creating timer on "+compositeElement);
+ log.debug("creating timer on "+this.toString());
}
// instantiate the timer
Modified: jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/timer/IncrementCounterWaitState.java
===================================================================
--- jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/timer/IncrementCounterWaitState.java 2008-07-18 14:11:32 UTC (rev 1675)
+++ jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/timer/IncrementCounterWaitState.java 2008-07-18 15:41:20 UTC (rev 1676)
@@ -21,32 +21,27 @@
/**
* @author Pascal Verdage
+ *
+ * static variables allows not to create the hibernate mapping
*/
public class IncrementCounterWaitState implements ExternalActivity {
private static final long serialVersionUID = 1L;
private static final Log log = Log.getLog(IncrementCounterWaitState.class.getName());
- public static final String COUNTER = "counter";
- public static final int MAX_COUNTER_VALUE = 5;
+ static final String COUNTER = "counter";
+ static final int MAX_COUNTER_VALUE = 5;
public void signal(ActivityExecution execution, String signalName, Map<String, Object> parameters) throws Exception {
boolean continueToWait = true;
if ("increment".equals(signalName)) {
Object variable = execution.getVariable(COUNTER);
- if (variable instanceof Integer) {
- log.debug("incrementing integer counter");
- int counter = ((Integer) variable) + 1;
- execution.setVariable(COUNTER, counter);
- if (counter >= MAX_COUNTER_VALUE) {
- continueToWait = false;
- }
- } else if (variable instanceof String) {
+ if (variable instanceof String) {
log.debug("incrementing string counter");
String tmp = ((String) variable);
try {
int counter = Integer.valueOf(tmp);
counter += 1;
- execution.setVariable(COUNTER, counter);
+ execution.setVariable(COUNTER, Integer.toString(counter));
if (counter >= MAX_COUNTER_VALUE) {
continueToWait = false;
}
@@ -54,11 +49,13 @@
log.debug("string variable is not an integer");
}
} else {
- log.debug("variable is neither an integer nor a string");
+ log.debug("variable is not a string");
}
}
if (continueToWait) {
execution.waitForSignal();
+ } else {
+ execution.take("timeout");
}
}
Modified: jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/timer/TimerIntegrationTest.java
===================================================================
--- jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/timer/TimerIntegrationTest.java 2008-07-18 14:11:32 UTC (rev 1675)
+++ jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/timer/TimerIntegrationTest.java 2008-07-18 15:41:20 UTC (rev 1676)
@@ -14,123 +14,302 @@
package org.jbpm.pvm.timer;
import java.util.Date;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
-import org.jbpm.pvm.test.base.JbpmTestCase;
+import org.jbpm.pvm.Execution;
+import org.jbpm.pvm.ExecutionService;
+import org.jbpm.pvm.ProcessService;
+import org.jbpm.pvm.activity.ActivityExecution;
+import org.jbpm.pvm.activity.ExternalActivity;
+import org.jbpm.pvm.env.Environment;
+import org.jbpm.pvm.internal.model.ExecutionImpl;
+import org.jbpm.pvm.internal.model.NodeImpl;
+import org.jbpm.pvm.internal.util.Clock;
+import org.jbpm.pvm.job.Job;
+import org.jbpm.pvm.job.JobTestHelper;
+import org.jbpm.pvm.job.Timer;
+import org.jbpm.pvm.model.OpenExecution;
+import org.jbpm.pvm.model.ProcessDefinition;
+import org.jbpm.pvm.model.ProcessFactory;
+import org.jbpm.pvm.session.DbSession;
+import org.jbpm.pvm.session.PvmDbSession;
+import org.jbpm.pvm.test.base.DbTestCase;
/**
* @author Pascal Verdage
*/
-public class TimerIntegrationTest extends JbpmTestCase {
+public class TimerIntegrationTest extends DbTestCase {
+ public static class WaitState implements ExternalActivity {
- protected Date getDueDate(long duration) {
+ private static final long serialVersionUID = 1L;
+
+ public void execute(ActivityExecution execution) {
+ execution.waitForSignal();
+ }
+
+ public void signal(ActivityExecution execution,
+ String signalName,
+ Map<String, Object> parameters) {
+ if (signalName!=null) {
+ execution.take(signalName);
+ }
+ }
+ }
+
+ private static Date getDueDate(long duration) {
return new Date(System.currentTimeMillis() + duration);
}
+
+ private static long twoDaysDuration = 2*24*60*60*1000;
- /*
- TODO finish after refactoring
+ private static ExecutionService getExecutionService() {
+ return Environment.getCurrent().get(ExecutionService.class);
+ }
+ private static ExecutionImpl deployAndInstanciateProcess(ProcessDefinition definition) {
+ ProcessService processService = Environment.getCurrent().get(ProcessService.class);
+ processService.deploy(definition);
- public void testFixedDateTimer() {
- Date now = new Date();
- long twoDaysDuration = 2*24*60*60*1000;
- String processName = "fixedDateTimer";
+ Execution processInstance = getExecutionService().startExecution(definition.getName());
- ProcessDefinition processDefinition = ProcessFactory.build(processName)
- .node("get input").initial().behaviour(WaitState.class)
- .timer(getDueDate(twoDaysDuration), "escalate")
- .transition("escalate").to("manager decision")
- .transition("submit").to("process input")
- .node("process input").behaviour(WaitState.class)
- .node("manager decision").behaviour(WaitState.class)
+ return (ExecutionImpl) processInstance;
+ }
+
+ public void testTimerDefinition() {
+ ProcessDefinition processDefinition = ProcessFactory.build("timerDefinition")
+ .node("request").initial().behaviour(WaitState.class)
+ .transition().to("decide")
+ .node("decide").behaviour(WaitState.class)
+ .timer(getDueDate(twoDaysDuration), "timeout")
+ .transition("decision made").to("response") // first defined transition is the default one
+ .transition("timeout").to("reassign")
+ .node("reassign").behaviour(WaitState.class)
+ .node("response").behaviour(WaitState.class)
.done();
+
+ ExecutionImpl processInstance = deployAndInstanciateProcess(processDefinition);
+ Execution execution = processInstance;
+ assertEquals("request", execution.getNodeName());
+ // first node is a wait state with no timer
+ execution = getExecutionService().signalExecution(execution.getDbid());
+ assertEquals("decide", execution.getNodeName());
+
+ assertTrue(execution instanceof OpenExecution);
+ OpenExecution openExecution = (OpenExecution) execution;
+
+ // timer are created in a child execution
+ assertFalse(openExecution.hasTimers());
+
+ assertEquals(1, openExecution.getExecutions().size());
+ OpenExecution child = openExecution.getExecutions().iterator().next();
+
+ NodeImpl node1 = (NodeImpl) openExecution.getNode();
+ NodeImpl node2 = (NodeImpl) child.getNode();
+ assertEquals(node1, node2);
+ assertEquals("decide", node1.getName());
+ assertNotNull(node1.getTimerDefinitions());
+
+ assertTrue(child.hasTimers());
+ Set<Timer> timers = child.getTimers();
+ assertEquals(1, timers.size());
+ }
+
+ private static ExecutionImpl loadExecutionFromDb(long id) {
+ return Environment.getCurrent().get(DbSession.class).get(ExecutionImpl.class, id);
+ }
+
+ public void testTimerExecution() {
+ ProcessDefinition processDefinition = ProcessFactory.build("timerExecution")
+ .node("decide").initial().behaviour(WaitState.class)
+ .timer(getDueDate(twoDaysDuration), "timeout")
+ .transition("decision made").to("response") // first defined transition is the default one
+ .transition("timeout").to("reassign")
+ .node("reassign").behaviour(WaitState.class)
+ .node("response").behaviour(WaitState.class)
+ .done();
+ ExecutionImpl processInstance = deployAndInstanciateProcess(processDefinition);
- ProcessService processService = TimerConfiguration.getProcessService();
- processService.deploy(processDefinition);
+ Execution execution = processInstance;
+ assertEquals("decide", execution.getNodeName());
- long twoDaysFromNow = now.getTime() + twoDaysDuration;
+ OpenExecution child = ((OpenExecution) execution).getExecutions().iterator().next();
+ assertEquals("decide", child.getNodeName());
+ Timer timer = child.getTimers().iterator().next();
- ExecutionService executionService = TimerConfiguration.getExecutionService();
- System.out.println("execution service: '"+executionService+"' ");
- Execution execution = executionService.startExecution(processDefinition.getName());
+ JobTestHelper jobTestHelper = getEnvironmentFactory().get(JobTestHelper.class);
+ child = (OpenExecution) jobTestHelper.executeTimer(timer.getDbid());
+ assertEquals(Execution.STATE_ENDED, child.getState());
- assertEquals("get input", execution.getNodeName());
+ // check that the subExecution was deleted
+ child = loadExecutionFromDb(child.getDbid());
+ assertNull(child);
+
+ // check that timers have been deleted
+ List<Job> jobs = Environment.getCurrent().get(PvmDbSession.class).findAllJobs();
+ assertNotNull(jobs);
+ assertTrue(jobs.isEmpty());
+
+ // check that process is in the right state
+ execution = loadExecutionFromDb(processInstance.getDbid());
+ assertEquals("reassign", execution.getNodeName());
+ }
+
+ public void testCanceledTimer() {
+ ProcessDefinition processDefinition = ProcessFactory.build("timerCanceled")
+ .node("decide").initial().behaviour(WaitState.class)
+ .timer(getDueDate(twoDaysDuration), "timeout")
+ .transition("decision made").to("response") // first defined transition is the default one
+ .transition("timeout").to("reassign")
+ .node("reassign").behaviour(WaitState.class)
+ .node("response").behaviour(WaitState.class)
+ .done();
+
+ ExecutionImpl processInstance = deployAndInstanciateProcess(processDefinition);
+
+ Execution execution = processInstance;
+ assertEquals("decide", execution.getNodeName());
+
+ // signal child execution
+ Execution child = ((OpenExecution)execution).getExecutions().iterator().next();
+ execution = getExecutionService().signalExecution(child.getDbid());
+ assertEquals(Execution.STATE_ENDED, execution.getState());
+
+ // check that the subExecution was deleted
+ child = loadExecutionFromDb(child.getDbid());
+ assertNull(child);
- org.jbpm.pvm.job.Timer timer = activityInstance
- .getTimers()
- .iterator()
- .next();
+ // check that timers have been deleted
+ List<Job> jobs = Environment.getCurrent().get(PvmDbSession.class).findAllJobs();
+ assertNotNull(jobs);
+ assertTrue(jobs.isEmpty());
- assertTrue(twoDaysFromNow <= timer.getDueDate().getTime());
+ // check that process is in the right state
+ execution = loadExecutionFromDb(processInstance.getDbid());
+ assertEquals("response", execution.getNodeName());
+ }
- EnvironmentFactory environmentFactory = TimerConfiguration.getEnvironmentFactory();
- JobTestHelper jobTestHelper = environmentFactory.get(JobTestHelper.class);
- execution = jobTestHelper.executeTimer(timer.getDbid());
+ public void testFixedDateTimer() {
+ Date now = new Date();
+ long twoDaysFromNow = now.getTime() + twoDaysDuration;
- assertEquals("manager decision", execution.getNode().getName());
+ ProcessDefinition processDefinition = ProcessFactory.build("fixedDateTimer")
+ .node("decide").initial().behaviour(WaitState.class)
+ .timer(getDueDate(twoDaysDuration), "timeout")
+ .transition("decision made").to("response") // first defined transition is the default one
+ .transition("timeout").to("reassign")
+ .node("reassign").behaviour(WaitState.class)
+ .node("response").behaviour(WaitState.class)
+ .done();
+
+ ExecutionImpl processInstance = deployAndInstanciateProcess(processDefinition);
+
+ Execution execution = processInstance;
+ OpenExecution child = ((OpenExecution) execution).getExecutions().iterator().next();
+ assertEquals("decide", child.getNodeName());
+
+ // check that timer's dueDate is good
+ Timer timer = child.getTimers().iterator().next();
+ assertTrue(twoDaysFromNow <= timer.getDueDate().getTime());
+
+ // timer execution is tested in testTimerExecution
}
-
- public void testRepeatedTimer() {
- long dayDuration = 24*60*60*1000;
- String processName = "repeatedTimer";
- ProcessDefinition processDefinition = ProcessFactory.build(processName)
- .node("get input").initial().behaviour(IncrementCounterWaitState.class)
- .variable(IncrementCounterWaitState.COUNTER, "0")
- .timer("1 day", "increment", "1 day")
- .transition("submit").to("process input")
- .node("process input").behaviour(WaitState.class)
+ public void testDueDateDescriptionTimer() {
+ Date now = new Date();
+ long twoDaysFromNow = now.getTime() + twoDaysDuration;
+
+ ProcessDefinition processDefinition = ProcessFactory.build("dueDateDescriptionTimer")
+ .node("decide").initial().behaviour(WaitState.class)
+ .timer("2 days", "timeout")
+ .transition("decision made").to("response") // first defined transition is the default one
+ .transition("timeout").to("reassign")
+ .node("reassign").behaviour(WaitState.class)
+ .node("response").behaviour(WaitState.class)
.done();
- ProcessService processService = TimerConfiguration.getProcessService();
- processService.deploy(processDefinition);
+ ExecutionImpl processInstance = deployAndInstanciateProcess(processDefinition);
- long minimumDueDate = Clock.getCurrentTime().getTime() + dayDuration;
+ Execution execution = processInstance;
+ OpenExecution child = ((OpenExecution) execution).getExecutions().iterator().next();
+ assertEquals("decide", child.getNodeName());
+
+ // check that timer's dueDate is good
+ Timer timer = child.getTimers().iterator().next();
+ assertTrue(twoDaysFromNow <= timer.getDueDate().getTime());
- ExecutionService executionService = TimerConfiguration.getExecutionService();
- Execution execution = executionService.startExecution(processName);
- long executionId = execution.getDbid();
+ // timer execution is tested in testTimerExecution
+ }
- EnvironmentFactory environmentFactory = TimerConfiguration.getEnvironmentFactory();
- JobTestHelper jobTestHelper = environmentFactory.get(JobTestHelper.class);
-
- for (int i=0;i<IncrementCounterWaitState.MAX_COUNTER_VALUE;i++) {
- long timerId;
- environmentFactory.openEnvironment();
- try {
- execution = Environment.getCurrent().get(PvmDbSession.class).get(ExecutionImpl.class, executionId);
- ActivityInstance activityInstance = execution.getActivityInstance();
- Node node = activityInstance.getNode();
- assertEquals("get input", node.getName());
- Set<Timer> timers = activityInstance.getTimers();
- assertNotNull(timers);
- assertEquals(1, timers.size());
- Timer timer = timers.iterator().next();
-
- long difference = timer.getDueDate().getTime() - minimumDueDate;
- assertTrue(difference+" should be positive (iteration "+i+")", difference >= -200);
- minimumDueDate = Clock.getCurrentTime().getTime() + dayDuration;
- timerId = timer.getDbid();
- } finally {
- Environment.getCurrent().close();
- }
- execution = jobTestHelper.executeTimer(timerId);
+ //TODO: the test fails because the child execution is not deleted and the timer
+ // still exist.
+ //Still, main execution is in the the good state
+ public void testReschedulingTimer() {
+ Date now = Clock.getCurrentTime();
+ long twoDaysFromNow = now.getTime() + twoDaysDuration;
+
+ ProcessDefinition processDefinition = ProcessFactory.build("reschedulingTimer")
+ .node("decide").initial().behaviour(IncrementCounterWaitState.class)
+ .variable(IncrementCounterWaitState.COUNTER, "0")
+ .timer("2 days", "increment", "2 days")
+ .transition("decision made").to("response") // first defined transition is the default one
+ .transition("timeout").to("reassign")
+ .node("reassign").behaviour(WaitState.class)
+ .node("response").behaviour(WaitState.class)
+ .done();
+
+ ExecutionImpl processInstance = deployAndInstanciateProcess(processDefinition);
+
+ Execution execution = processInstance;
+ OpenExecution child = ((OpenExecution) execution).getExecutions().iterator().next();
+
+ for (int i=0; i<IncrementCounterWaitState.MAX_COUNTER_VALUE; i++) {
+ // check that the execution is in the right node
+ assertNotNull(child);
+ assertEquals("decide", child.getNodeName());
+ assertEquals(Execution.STATE_ACTIVE, child.getState());
+
+ // check there is one timer
+ assertTrue(child.hasTimers());
+ assertEquals(1, child.getTimers().size());
+
+ // check that timer's dueDate is good
+ Timer timer = child.getTimers().iterator().next();
+ assertTrue("error is "+(timer.getDueDate().getTime()-twoDaysFromNow)+" millis",
+ twoDaysFromNow <= timer.getDueDate().getTime());
+
+ // execute timer
+ twoDaysFromNow = Clock.getCurrentTime().getTime() + twoDaysDuration - 100;
+ JobTestHelper jobTestHelper = getEnvironmentFactory().get(JobTestHelper.class);
+ jobTestHelper.executeTimer(timer.getDbid());
+ child = loadExecutionFromDb(child.getDbid());
}
-
- environmentFactory.openEnvironment();
- try {
- execution = Environment.getCurrent().get(PvmDbSession.class).get(ExecutionImpl.class, executionId);
- Node node = execution.getNode();
- assertEquals("process input", node.getName());
-
- assertTrue(execution.getTimers().isEmpty());
- } finally {
- Environment.getCurrent().close();
+
+ // check that the subExecution was deleted
+ if (child!=null) {
+ System.out.println(child.getNodeName());
+ System.out.println(child.getVariable("counter"));
+ execution = loadExecutionFromDb(processInstance.getDbid());
+ System.out.println(execution.getNodeName());
}
-
+ assertNull(child);
+
+ // check that timers have been deleted
+ List<Job> jobs = Environment.getCurrent().get(PvmDbSession.class).findAllJobs();
+ assertNotNull(jobs);
+ assertTrue(jobs.isEmpty());
+
+ // check that process is in the right state
+ execution = loadExecutionFromDb(processInstance.getDbid());
+ assertEquals("reassign", execution.getNodeName());
}
+ /*
+ TODO finish after refactoring
+
public void testTimerEndingProcess() {
ProcessDefinition processDefinition = ProcessFactory.build("timed2")
.node("get input").initial().behaviour(WaitState.class)
17 years, 9 months