[jboss-svn-commits] JBL Code SVN: r28923 - in labs/jbossrules/trunk/drools-process/drools-bpmn2/src: test/resources and 1 other directory.
jboss-svn-commits at lists.jboss.org
jboss-svn-commits at lists.jboss.org
Wed Aug 12 11:17:32 EDT 2009
Author: KrisVerlaenen
Date: 2009-08-12 11:17:30 -0400 (Wed, 12 Aug 2009)
New Revision: 28923
Modified:
labs/jbossrules/trunk/drools-process/drools-bpmn2/src/main/java/org/drools/bpmn2/xml/AbstractNodeHandler.java
labs/jbossrules/trunk/drools-process/drools-bpmn2/src/main/java/org/drools/bpmn2/xml/ProcessHandler.java
labs/jbossrules/trunk/drools-process/drools-bpmn2/src/main/java/org/drools/bpmn2/xml/ScriptTaskHandler.java
labs/jbossrules/trunk/drools-process/drools-bpmn2/src/main/java/org/drools/bpmn2/xml/TaskHandler.java
labs/jbossrules/trunk/drools-process/drools-bpmn2/src/main/java/org/drools/bpmn2/xml/UserTaskHandler.java
labs/jbossrules/trunk/drools-process/drools-bpmn2/src/main/java/org/drools/bpmn2/xml/XmlBPMNProcessDumper.java
labs/jbossrules/trunk/drools-process/drools-bpmn2/src/test/resources/BPMN2-EvaluationProcess2.xml
labs/jbossrules/trunk/drools-process/drools-bpmn2/src/test/resources/BPMN2-MinimalProcess.xml
labs/jbossrules/trunk/drools-process/drools-bpmn2/src/test/resources/BPMN2-MinimalProcessWithGraphical.xml
Log:
- adding bpmn2 module
Modified: labs/jbossrules/trunk/drools-process/drools-bpmn2/src/main/java/org/drools/bpmn2/xml/AbstractNodeHandler.java
===================================================================
--- labs/jbossrules/trunk/drools-process/drools-bpmn2/src/main/java/org/drools/bpmn2/xml/AbstractNodeHandler.java 2009-08-12 13:57:50 UTC (rev 28922)
+++ labs/jbossrules/trunk/drools-process/drools-bpmn2/src/main/java/org/drools/bpmn2/xml/AbstractNodeHandler.java 2009-08-12 15:17:30 UTC (rev 28923)
@@ -9,6 +9,7 @@
import org.drools.xml.BaseAbstractHandler;
import org.drools.xml.ExtensibleXmlParser;
import org.drools.xml.Handler;
+import org.drools.xml.XmlDumper;
import org.w3c.dom.Element;
import org.xml.sax.Attributes;
import org.xml.sax.SAXException;
@@ -42,9 +43,14 @@
parser.startElementBuilder( localName, attrs );
NodeContainer nodeContainer = (NodeContainer) parser.getParent();
final Node node = createNode(attrs);
- final String id = attrs.getValue("id");
- node.setName(id);
- node.setId(nodeContainer.getNodes().length);
+ String id = attrs.getValue("id");
+ // remove starting _
+ id = id.substring(1);
+ // remove ids of parent nodes
+ id = id.substring(id.lastIndexOf(":") + 1);
+ final String name = attrs.getValue("name");
+ node.setName(name);
+ node.setId(new Integer(id));
nodeContainer.addNode(node);
return node;
}
@@ -102,8 +108,9 @@
protected void writeNode(final String name, final Node node,
final StringBuilder xmlDump, boolean includeMeta) {
xmlDump.append(" <" + name + " ");
+ xmlDump.append("id=\"_" + node.getUniqueId() + "\" ");
if (node.getName() != null) {
- xmlDump.append("id=\"" + node.getName() + "\" ");
+ xmlDump.append("name=\"" + XmlDumper.replaceIllegalChars(node.getName()) + "\" ");
}
if (includeMeta) {
Integer x = (Integer) node.getMetaData("x");
Modified: labs/jbossrules/trunk/drools-process/drools-bpmn2/src/main/java/org/drools/bpmn2/xml/ProcessHandler.java
===================================================================
--- labs/jbossrules/trunk/drools-process/drools-bpmn2/src/main/java/org/drools/bpmn2/xml/ProcessHandler.java 2009-08-12 13:57:50 UTC (rev 28922)
+++ labs/jbossrules/trunk/drools-process/drools-bpmn2/src/main/java/org/drools/bpmn2/xml/ProcessHandler.java 2009-08-12 15:17:30 UTC (rev 28923)
@@ -74,28 +74,14 @@
for (SequenceFlow connection: connections) {
String sourceRef = connection.getSourceRef();
String targetRef = connection.getTargetRef();
- Node source = null;
- for (Node node: process.getNodes()) {
- if (sourceRef.equals(node.getName())) {
- source = node;
- break;
- }
- }
- Node target = null;
- for (Node node: process.getNodes()) {
- if (targetRef.equals(node.getName())) {
- target = node;
- break;
- }
- }
- if (source == null) {
- throw new IllegalArgumentException(
- "Could not find source " + sourceRef);
- }
- if (target == null) {
- throw new IllegalArgumentException(
- "Could not find target " + targetRef);
- }
+ // remove starting _
+ sourceRef = sourceRef.substring(1);
+ targetRef = targetRef.substring(1);
+ // remove ids of parent nodes
+ sourceRef = sourceRef.substring(sourceRef.lastIndexOf(":") + 1);
+ targetRef = targetRef.substring(targetRef.lastIndexOf(":") + 1);
+ Node source = process.getNode(new Integer(sourceRef));
+ Node target = process.getNode(new Integer(targetRef));
Connection result = new ConnectionImpl(
source, NodeImpl.CONNECTION_DEFAULT_TYPE,
target, NodeImpl.CONNECTION_DEFAULT_TYPE);
Modified: labs/jbossrules/trunk/drools-process/drools-bpmn2/src/main/java/org/drools/bpmn2/xml/ScriptTaskHandler.java
===================================================================
--- labs/jbossrules/trunk/drools-process/drools-bpmn2/src/main/java/org/drools/bpmn2/xml/ScriptTaskHandler.java 2009-08-12 13:57:50 UTC (rev 28922)
+++ labs/jbossrules/trunk/drools-process/drools-bpmn2/src/main/java/org/drools/bpmn2/xml/ScriptTaskHandler.java 2009-08-12 15:17:30 UTC (rev 28923)
@@ -45,9 +45,18 @@
ActionNode actionNode = (ActionNode) node;
writeNode("scriptTask", actionNode, xmlDump, includeMeta);
DroolsConsequenceAction action = (DroolsConsequenceAction) actionNode.getAction();
- xmlDump.append("scriptLanguage=\"" + action.getDialect() + "\" >\n");
- xmlDump.append(" <script>" + XmlDumper.replaceIllegalChars(action.getConsequence()) + "</script>\n");
- endNode("scriptTask", xmlDump);
+ if (action != null) {
+ xmlDump.append("scriptLanguage=\"" + action.getDialect() + "\" ");
+ if (action.getConsequence() != null) {
+ xmlDump.append(">" + EOL +
+ " <script>" + XmlDumper.replaceIllegalChars(action.getConsequence()) + "</script>" + EOL);
+ endNode("scriptTask", xmlDump);
+ } else {
+ endNode(xmlDump);
+ }
+ } else {
+ endNode(xmlDump);
+ }
}
}
Modified: labs/jbossrules/trunk/drools-process/drools-bpmn2/src/main/java/org/drools/bpmn2/xml/TaskHandler.java
===================================================================
--- labs/jbossrules/trunk/drools-process/drools-bpmn2/src/main/java/org/drools/bpmn2/xml/TaskHandler.java 2009-08-12 13:57:50 UTC (rev 28922)
+++ labs/jbossrules/trunk/drools-process/drools-bpmn2/src/main/java/org/drools/bpmn2/xml/TaskHandler.java 2009-08-12 15:17:30 UTC (rev 28923)
@@ -73,15 +73,15 @@
String from = subSubNode.getTextContent();
subNode = subNode.getNextSibling();
String to = subNode.getTextContent();
- workItemNode.getWork().setParameter(to.substring(workItemNode.getName().length() + 1), from);
+ workItemNode.getWork().setParameter(to.substring(workItemNode.getUniqueId().length() + 2), from);
} else {
String from = subNode.getTextContent();
// targetRef
subNode = subNode.getNextSibling();
String to = subNode.getTextContent();
workItemNode.addInMapping(
- dataInputs.get(to).substring(workItemNode.getName().length() + 1),
- from.substring(workItemNode.getName().length() + 1));
+ dataInputs.get(to).substring(workItemNode.getUniqueId().length() + 2),
+ from.substring(workItemNode.getUniqueId().length() + 2));
}
}
@@ -93,8 +93,8 @@
subNode = subNode.getNextSibling();
String to = subNode.getTextContent();
workItemNode.addOutMapping(
- from.substring(workItemNode.getName().length() + 1),
- dataOutputs.get(to).substring(workItemNode.getName().length() + 1));
+ from.substring(workItemNode.getUniqueId().length() + 2),
+ dataOutputs.get(to).substring(workItemNode.getUniqueId().length() + 2));
}
public void writeNode(Node node, StringBuilder xmlDump, boolean includeMeta) {
@@ -108,30 +108,30 @@
protected void writeIO(WorkItemNode workItemNode, StringBuilder xmlDump) {
xmlDump.append(" <ioSpecification>" + EOL);
for (Map.Entry<String, String> entry: workItemNode.getInMappings().entrySet()) {
- xmlDump.append(" <dataInput id=\"" + workItemNode.getName() + "_" + entry.getKey() + "Input\" name=\"" + entry.getKey() + "\" />" + EOL);
+ xmlDump.append(" <dataInput id=\"_" + workItemNode.getUniqueId() + "_" + entry.getKey() + "Input\" name=\"" + entry.getKey() + "\" />" + EOL);
}
for (Map.Entry<String, Object> entry: workItemNode.getWork().getParameters().entrySet()) {
if (entry.getValue() != null) {
- xmlDump.append(" <dataInput id=\"" + workItemNode.getName() + "_" + entry.getKey() + "Input\" name=\"" + entry.getKey() + "\" />" + EOL);
+ xmlDump.append(" <dataInput id=\"_" + workItemNode.getUniqueId() + "_" + entry.getKey() + "Input\" name=\"" + entry.getKey() + "\" />" + EOL);
}
}
for (Map.Entry<String, String> entry: workItemNode.getOutMappings().entrySet()) {
- xmlDump.append(" <dataOutput id=\"" + workItemNode.getName() + "_" + entry.getKey() + "Output\" name=\"" + entry.getKey() + "\" />" + EOL);
+ xmlDump.append(" <dataOutput id=\"_" + workItemNode.getUniqueId() + "_" + entry.getKey() + "Output\" name=\"" + entry.getKey() + "\" />" + EOL);
}
xmlDump.append(" <inputSet>" + EOL);
for (Map.Entry<String, String> entry: workItemNode.getInMappings().entrySet()) {
- xmlDump.append(" <dataInputRefs>" + workItemNode.getName() + "_" + entry.getKey() + "Input</dataInputRefs>" + EOL);
+ xmlDump.append(" <dataInputRefs>_" + workItemNode.getUniqueId() + "_" + entry.getKey() + "Input</dataInputRefs>" + EOL);
}
for (Map.Entry<String, Object> entry: workItemNode.getWork().getParameters().entrySet()) {
if (entry.getValue() != null) {
- xmlDump.append(" <dataInputRefs>" + workItemNode.getName() + "_" + entry.getKey() + "Input</dataInputRefs>" + EOL);
+ xmlDump.append(" <dataInputRefs>_" + workItemNode.getUniqueId() + "_" + entry.getKey() + "Input</dataInputRefs>" + EOL);
}
}
xmlDump.append(
" </inputSet>" + EOL);
xmlDump.append(" <outputSet>" + EOL);
for (Map.Entry<String, String> entry: workItemNode.getOutMappings().entrySet()) {
- xmlDump.append(" <dataOutputRefs>" + workItemNode.getName() + "_" + entry.getKey() + "Output</dataOutputRefs>" + EOL);
+ xmlDump.append(" <dataOutputRefs>_" + workItemNode.getUniqueId() + "_" + entry.getKey() + "Output</dataOutputRefs>" + EOL);
}
xmlDump.append(
" </outputSet>" + EOL);
@@ -140,14 +140,14 @@
for (Map.Entry<String, Object> entry: workItemNode.getWork().getParameters().entrySet()) {
if (entry.getValue() != null) {
xmlDump.append(
- " <property id=\"" + workItemNode.getName() + "_" + entry.getKey() + "\" />" + EOL);
+ " <property id=\"_" + workItemNode.getUniqueId() + "_" + entry.getKey() + "\" />" + EOL);
}
}
for (Map.Entry<String, String> entry: workItemNode.getInMappings().entrySet()) {
xmlDump.append(" <dataInputAssociation>" + EOL);
xmlDump.append(
- " <sourceRef>" + workItemNode.getName() + "_" + entry.getValue() + "</sourceRef>" + EOL +
- " <targetRef>" + workItemNode.getName() + "_" + entry.getKey() + "</targetRef>" + EOL);
+ " <sourceRef>_" + workItemNode.getUniqueId() + "_" + entry.getValue() + "</sourceRef>" + EOL +
+ " <targetRef>_" + workItemNode.getUniqueId() + "_" + entry.getKey() + "</targetRef>" + EOL);
xmlDump.append(" </dataInputAssociation>" + EOL);
}
for (Map.Entry<String, Object> entry: workItemNode.getWork().getParameters().entrySet()) {
@@ -156,18 +156,18 @@
xmlDump.append(
" <assignment>" + EOL +
" <from xs:type=\"tFormalExpression\">" + entry.getValue().toString() + "</from>" + EOL +
- " <to xs:type=\"tFormalExpression\">" + workItemNode.getName() + "_" + entry.getKey() + "Input</to>" + EOL +
+ " <to xs:type=\"tFormalExpression\">_" + workItemNode.getUniqueId() + "_" + entry.getKey() + "Input</to>" + EOL +
" </assignment>" + EOL +
- " <sourceRef>" + workItemNode.getName() + "_" + entry.getKey() + "</sourceRef>" + EOL +
- " <targetRef>" + workItemNode.getName() + "_" + entry.getKey() + "Input</targetRef>" + EOL);
+ " <sourceRef>_" + workItemNode.getUniqueId() + "_" + entry.getKey() + "</sourceRef>" + EOL +
+ " <targetRef>_" + workItemNode.getUniqueId() + "_" + entry.getKey() + "Input</targetRef>" + EOL);
xmlDump.append(" </dataInputAssociation>" + EOL);
}
}
for (Map.Entry<String, String> entry: workItemNode.getOutMappings().entrySet()) {
xmlDump.append(" <dataOutputAssociation>" + EOL);
xmlDump.append(
- " <sourceRef>" + workItemNode.getName() + "_" + entry.getKey() + "</sourceRef>" + EOL +
- " <targetRef>" + workItemNode.getName() + "_" + entry.getValue() + "</targetRef>" + EOL);
+ " <sourceRef>_" + workItemNode.getUniqueId() + "_" + entry.getKey() + "</sourceRef>" + EOL +
+ " <targetRef>_" + workItemNode.getUniqueId() + "_" + entry.getValue() + "</targetRef>" + EOL);
xmlDump.append(" </dataOutputAssociation>" + EOL);
}
}
Modified: labs/jbossrules/trunk/drools-process/drools-bpmn2/src/main/java/org/drools/bpmn2/xml/UserTaskHandler.java
===================================================================
--- labs/jbossrules/trunk/drools-process/drools-bpmn2/src/main/java/org/drools/bpmn2/xml/UserTaskHandler.java 2009-08-12 13:57:50 UTC (rev 28922)
+++ labs/jbossrules/trunk/drools-process/drools-bpmn2/src/main/java/org/drools/bpmn2/xml/UserTaskHandler.java 2009-08-12 15:17:30 UTC (rev 28923)
@@ -86,30 +86,30 @@
protected void writeIO(WorkItemNode workItemNode, StringBuilder xmlDump) {
xmlDump.append(" <ioSpecification>" + EOL);
for (Map.Entry<String, String> entry: workItemNode.getInMappings().entrySet()) {
- xmlDump.append(" <dataInput id=\"" + workItemNode.getName() + "_" + entry.getKey() + "Input\" name=\"" + entry.getKey() + "\" />" + EOL);
+ xmlDump.append(" <dataInput id=\"_" + workItemNode.getUniqueId() + "_" + entry.getKey() + "Input\" name=\"" + entry.getKey() + "\" />" + EOL);
}
for (Map.Entry<String, Object> entry: workItemNode.getWork().getParameters().entrySet()) {
if (!"ActorId".equals(entry.getKey()) && entry.getValue() != null) {
- xmlDump.append(" <dataInput id=\"" + workItemNode.getName() + "_" + entry.getKey() + "Input\" name=\"" + entry.getKey() + "\" />" + EOL);
+ xmlDump.append(" <dataInput id=\"_" + workItemNode.getUniqueId() + "_" + entry.getKey() + "Input\" name=\"" + entry.getKey() + "\" />" + EOL);
}
}
for (Map.Entry<String, String> entry: workItemNode.getOutMappings().entrySet()) {
- xmlDump.append(" <dataOutput id=\"" + workItemNode.getName() + "_" + entry.getKey() + "Output\" name=\"" + entry.getKey() + "\" />" + EOL);
+ xmlDump.append(" <dataOutput id=\"_" + workItemNode.getUniqueId() + "_" + entry.getKey() + "Output\" name=\"" + entry.getKey() + "\" />" + EOL);
}
xmlDump.append(" <inputSet>" + EOL);
for (Map.Entry<String, String> entry: workItemNode.getInMappings().entrySet()) {
- xmlDump.append(" <dataInputRefs>" + workItemNode.getName() + "_" + entry.getKey() + "Input</dataInputRefs>" + EOL);
+ xmlDump.append(" <dataInputRefs>_" + workItemNode.getUniqueId() + "_" + entry.getKey() + "Input</dataInputRefs>" + EOL);
}
for (Map.Entry<String, Object> entry: workItemNode.getWork().getParameters().entrySet()) {
if (!"ActorId".equals(entry.getKey()) && entry.getValue() != null) {
- xmlDump.append(" <dataInputRefs>" + workItemNode.getName() + "_" + entry.getKey() + "Input</dataInputRefs>" + EOL);
+ xmlDump.append(" <dataInputRefs>_" + workItemNode.getUniqueId() + "_" + entry.getKey() + "Input</dataInputRefs>" + EOL);
}
}
xmlDump.append(
" </inputSet>" + EOL);
xmlDump.append(" <outputSet>" + EOL);
for (Map.Entry<String, String> entry: workItemNode.getOutMappings().entrySet()) {
- xmlDump.append(" <dataOutputRefs>" + workItemNode.getName() + "_" + entry.getKey() + "Output</dataOutputRefs>" + EOL);
+ xmlDump.append(" <dataOutputRefs>_" + workItemNode.getUniqueId() + "_" + entry.getKey() + "Output</dataOutputRefs>" + EOL);
}
xmlDump.append(
" </outputSet>" + EOL);
@@ -118,14 +118,14 @@
for (Map.Entry<String, Object> entry: workItemNode.getWork().getParameters().entrySet()) {
if (!"ActorId".equals(entry.getKey()) && entry.getValue() != null) {
xmlDump.append(
- " <property id=\"" + workItemNode.getName() + "_" + entry.getKey() + "\" />" + EOL);
+ " <property id=\"_" + workItemNode.getUniqueId() + "_" + entry.getKey() + "\" />" + EOL);
}
}
for (Map.Entry<String, String> entry: workItemNode.getInMappings().entrySet()) {
xmlDump.append(" <dataInputAssociation>" + EOL);
xmlDump.append(
- " <sourceRef>" + workItemNode.getName() + "_" + entry.getValue() + "</sourceRef>" + EOL +
- " <targetRef>" + workItemNode.getName() + "_" + entry.getKey() + "</targetRef>" + EOL);
+ " <sourceRef>_" + workItemNode.getUniqueId() + "_" + entry.getValue() + "</sourceRef>" + EOL +
+ " <targetRef>_" + workItemNode.getUniqueId() + "_" + entry.getKey() + "</targetRef>" + EOL);
xmlDump.append(" </dataInputAssociation>" + EOL);
}
for (Map.Entry<String, Object> entry: workItemNode.getWork().getParameters().entrySet()) {
@@ -134,18 +134,18 @@
xmlDump.append(
" <assignment>" + EOL +
" <from xs:type=\"tFormalExpression\">" + entry.getValue().toString() + "</from>" + EOL +
- " <to xs:type=\"tFormalExpression\">" + workItemNode.getName() + "_" + entry.getKey() + "Input</to>" + EOL +
+ " <to xs:type=\"tFormalExpression\">_" + workItemNode.getUniqueId() + "_" + entry.getKey() + "Input</to>" + EOL +
" </assignment>" + EOL +
- " <sourceRef>" + workItemNode.getName() + "_" + entry.getKey() + "</sourceRef>" + EOL +
- " <targetRef>" + workItemNode.getName() + "_" + entry.getKey() + "Input</targetRef>" + EOL);
+ " <sourceRef>_" + workItemNode.getUniqueId() + "_" + entry.getKey() + "</sourceRef>" + EOL +
+ " <targetRef>_" + workItemNode.getUniqueId() + "_" + entry.getKey() + "Input</targetRef>" + EOL);
xmlDump.append(" </dataInputAssociation>" + EOL);
}
}
for (Map.Entry<String, String> entry: workItemNode.getOutMappings().entrySet()) {
xmlDump.append(" <dataOutputAssociation>" + EOL);
xmlDump.append(
- " <sourceRef>" + workItemNode.getName() + "_" + entry.getKey() + "</sourceRef>" + EOL +
- " <targetRef>" + workItemNode.getName() + "_" + entry.getValue() + "</targetRef>" + EOL);
+ " <sourceRef>_" + workItemNode.getUniqueId() + "_" + entry.getKey() + "</sourceRef>" + EOL +
+ " <targetRef>_" + workItemNode.getUniqueId() + "_" + entry.getValue() + "</targetRef>" + EOL);
xmlDump.append(" </dataOutputAssociation>" + EOL);
}
}
Modified: labs/jbossrules/trunk/drools-process/drools-bpmn2/src/main/java/org/drools/bpmn2/xml/XmlBPMNProcessDumper.java
===================================================================
--- labs/jbossrules/trunk/drools-process/drools-bpmn2/src/main/java/org/drools/bpmn2/xml/XmlBPMNProcessDumper.java 2009-08-12 13:57:50 UTC (rev 28922)
+++ labs/jbossrules/trunk/drools-process/drools-bpmn2/src/main/java/org/drools/bpmn2/xml/XmlBPMNProcessDumper.java 2009-08-12 15:17:30 UTC (rev 28923)
@@ -141,9 +141,9 @@
}
public void visitConnection(Connection connection, StringBuilder xmlDump, boolean includeMeta) {
- xmlDump.append(" <sequenceFlow sourceRef=\"" + connection.getFrom().getName() + "\" ");
+ xmlDump.append(" <sequenceFlow sourceRef=\"_" + connection.getFrom().getId() + "\" ");
// TODO fromType, toType
- xmlDump.append("targetRef=\"" + connection.getTo().getName() + "\" ");
+ xmlDump.append("targetRef=\"_" + connection.getTo().getId() + "\" ");
if (includeMeta) {
String bendpoints = (String) connection.getMetaData("bendpoints");
if (bendpoints != null) {
Modified: labs/jbossrules/trunk/drools-process/drools-bpmn2/src/test/resources/BPMN2-EvaluationProcess2.xml
===================================================================
--- labs/jbossrules/trunk/drools-process/drools-bpmn2/src/test/resources/BPMN2-EvaluationProcess2.xml 2009-08-12 13:57:50 UTC (rev 28922)
+++ labs/jbossrules/trunk/drools-process/drools-bpmn2/src/test/resources/BPMN2-EvaluationProcess2.xml 2009-08-12 15:17:30 UTC (rev 28923)
@@ -13,218 +13,229 @@
<resource id="Actor" name="Human Actor" />
- <process id="com.sample.evaluation" name="Evaluation Process" >
+ <process id="com.sample.evaluation" name="Evaluation" >
<!-- process variables -->
<property id="employee" itemSubjectRef="tns:employeeItem"/>
<!-- nodes -->
- <endEvent id="EndProcess" g:x="683" g:y="56" g:width="48" g:height="48" />
- <userTask id="Project_Manager_Evaluation" g:x="352" g:y="16" g:width="225" g:height="48" >
+ <startEvent id="_1" name="StartProcess" g:x="16" g:y="56" g:width="48" g:height="48" />
+ <userTask id="_2" name="Self Evaluation" g:x="96" g:y="56" g:width="100" g:height="48" >
<ioSpecification>
- <dataInput id="Project_Manager_Evaluation_CommentInput" name="Comment" />
- <dataInput id="Project_Manager_Evaluation_TaskNameInput" name="TaskName" />
- <dataInput id="Project_Manager_Evaluation_PriorityInput" name="Priority" />
- <dataInput id="Project_Manager_Evaluation_ContentInput" name="Content" />
- <dataInput id="Project_Manager_Evaluation_SkippableInput" name="Skippable" />
+ <dataInput id="_2_CommentInput" name="Comment" />
+ <dataInput id="_2_TaskNameInput" name="TaskName" />
+ <dataInput id="_2_PriorityInput" name="Priority" />
+ <dataInput id="_2_ContentInput" name="Content" />
+ <dataInput id="_2_SkippableInput" name="Skippable" />
<inputSet>
- <dataInputRefs>Project_Manager_Evaluation_CommentInput</dataInputRefs>
- <dataInputRefs>Project_Manager_Evaluation_TaskNameInput</dataInputRefs>
- <dataInputRefs>Project_Manager_Evaluation_PriorityInput</dataInputRefs>
- <dataInputRefs>Project_Manager_Evaluation_ContentInput</dataInputRefs>
- <dataInputRefs>Project_Manager_Evaluation_SkippableInput</dataInputRefs>
+ <dataInputRefs>_2_CommentInput</dataInputRefs>
+ <dataInputRefs>_2_TaskNameInput</dataInputRefs>
+ <dataInputRefs>_2_PriorityInput</dataInputRefs>
+ <dataInputRefs>_2_ContentInput</dataInputRefs>
+ <dataInputRefs>_2_SkippableInput</dataInputRefs>
</inputSet>
<outputSet>
</outputSet>
</ioSpecification>
- <property id="Project_Manager_Evaluation_Comment" />
- <property id="Project_Manager_Evaluation_TaskName" />
- <property id="Project_Manager_Evaluation_Priority" />
- <property id="Project_Manager_Evaluation_Content" />
- <property id="Project_Manager_Evaluation_Skippable" />
+ <property id="_2_Comment" />
+ <property id="_2_TaskName" />
+ <property id="_2_Priority" />
+ <property id="_2_Content" />
+ <property id="_2_Skippable" />
<dataInputAssociation>
<assignment>
- <from xs:type="tFormalExpression">You need to perform an evaluation for #{employee}</from>
- <to xs:type="tFormalExpression">Project_Manager_Evaluation_CommentInput</to>
+ <from xs:type="tFormalExpression">You need to perform a self evaluation</from>
+ <to xs:type="tFormalExpression">_2_CommentInput</to>
</assignment>
- <sourceRef>Project_Manager_Evaluation_Comment</sourceRef>
- <targetRef>Project_Manager_Evaluation_CommentInput</targetRef>
+ <sourceRef>_2_Comment</sourceRef>
+ <targetRef>_2_CommentInput</targetRef>
</dataInputAssociation>
<dataInputAssociation>
<assignment>
<from xs:type="tFormalExpression">Performance Evaluation</from>
- <to xs:type="tFormalExpression">Project_Manager_Evaluation_TaskNameInput</to>
+ <to xs:type="tFormalExpression">_2_TaskNameInput</to>
</assignment>
- <sourceRef>Project_Manager_Evaluation_TaskName</sourceRef>
- <targetRef>Project_Manager_Evaluation_TaskNameInput</targetRef>
+ <sourceRef>_2_TaskName</sourceRef>
+ <targetRef>_2_TaskNameInput</targetRef>
</dataInputAssociation>
<dataInputAssociation>
<assignment>
<from xs:type="tFormalExpression">1</from>
- <to xs:type="tFormalExpression">Project_Manager_Evaluation_PriorityInput</to>
+ <to xs:type="tFormalExpression">_2_PriorityInput</to>
</assignment>
- <sourceRef>Project_Manager_Evaluation_Priority</sourceRef>
- <targetRef>Project_Manager_Evaluation_PriorityInput</targetRef>
+ <sourceRef>_2_Priority</sourceRef>
+ <targetRef>_2_PriorityInput</targetRef>
</dataInputAssociation>
<dataInputAssociation>
<assignment>
<from xs:type="tFormalExpression"></from>
- <to xs:type="tFormalExpression">Project_Manager_Evaluation_ContentInput</to>
+ <to xs:type="tFormalExpression">_2_ContentInput</to>
</assignment>
- <sourceRef>Project_Manager_Evaluation_Content</sourceRef>
- <targetRef>Project_Manager_Evaluation_ContentInput</targetRef>
+ <sourceRef>_2_Content</sourceRef>
+ <targetRef>_2_ContentInput</targetRef>
</dataInputAssociation>
<dataInputAssociation>
<assignment>
<from xs:type="tFormalExpression">false</from>
- <to xs:type="tFormalExpression">Project_Manager_Evaluation_SkippableInput</to>
+ <to xs:type="tFormalExpression">_2_SkippableInput</to>
</assignment>
- <sourceRef>Project_Manager_Evaluation_Skippable</sourceRef>
- <targetRef>Project_Manager_Evaluation_SkippableInput</targetRef>
+ <sourceRef>_2_Skippable</sourceRef>
+ <targetRef>_2_SkippableInput</targetRef>
</dataInputAssociation>
<potentialOwner resourceRef="tns:Actor" >
<resourceAssignmentExpression>
- <formalExpression>john</formalExpression>
+ <formalExpression>#{employee}</formalExpression>
</resourceAssignmentExpression>
</potentialOwner>
</userTask>
- <startEvent id="StartProcess" g:x="16" g:y="56" g:width="48" g:height="48" />
- <userTask id="HR_Manager_Evaluation" g:x="352" g:y="96" g:width="225" g:height="48" >
+ <parallelGateway id="_3" name="Diverge" g:x="228" g:y="56" g:width="49" g:height="49" gatewayDirection="diverging" />
+ <userTask id="_4" name="Project Manager" g:x="309" g:y="16" g:width="122" g:height="48" >
<ioSpecification>
- <dataInput id="HR_Manager_Evaluation_CommentInput" name="Comment" />
- <dataInput id="HR_Manager_Evaluation_TaskNameInput" name="TaskName" />
- <dataInput id="HR_Manager_Evaluation_PriorityInput" name="Priority" />
- <dataInput id="HR_Manager_Evaluation_ContentInput" name="Content" />
- <dataInput id="HR_Manager_Evaluation_SkippableInput" name="Skippable" />
+ <dataInput id="_4_CommentInput" name="Comment" />
+ <dataInput id="_4_TaskNameInput" name="TaskName" />
+ <dataInput id="_4_PriorityInput" name="Priority" />
+ <dataInput id="_4_ContentInput" name="Content" />
+ <dataInput id="_4_SkippableInput" name="Skippable" />
<inputSet>
- <dataInputRefs>HR_Manager_Evaluation_CommentInput</dataInputRefs>
- <dataInputRefs>HR_Manager_Evaluation_TaskNameInput</dataInputRefs>
- <dataInputRefs>HR_Manager_Evaluation_PriorityInput</dataInputRefs>
- <dataInputRefs>HR_Manager_Evaluation_ContentInput</dataInputRefs>
- <dataInputRefs>HR_Manager_Evaluation_SkippableInput</dataInputRefs>
+ <dataInputRefs>_4_CommentInput</dataInputRefs>
+ <dataInputRefs>_4_TaskNameInput</dataInputRefs>
+ <dataInputRefs>_4_PriorityInput</dataInputRefs>
+ <dataInputRefs>_4_ContentInput</dataInputRefs>
+ <dataInputRefs>_4_SkippableInput</dataInputRefs>
</inputSet>
<outputSet>
</outputSet>
</ioSpecification>
- <property id="HR_Manager_Evaluation_Comment" />
- <property id="HR_Manager_Evaluation_TaskName" />
- <property id="HR_Manager_Evaluation_Priority" />
- <property id="HR_Manager_Evaluation_Content" />
- <property id="HR_Manager_Evaluation_Skippable" />
+ <property id="_4_Comment" />
+ <property id="_4_TaskName" />
+ <property id="_4_Priority" />
+ <property id="_4_Content" />
+ <property id="_4_Skippable" />
<dataInputAssociation>
<assignment>
- <from xs:type="tFormalExpression">You need to perform an evaluation for #{employee}</from>
- <to xs:type="tFormalExpression">HR_Manager_Evaluation_CommentInput</to>
+ <from xs:type="tFormalExpression">You need to perform an evaluation for employee #{employee}</from>
+ <to xs:type="tFormalExpression">_4_CommentInput</to>
</assignment>
- <sourceRef>HR_Manager_Evaluation_Comment</sourceRef>
- <targetRef>HR_Manager_Evaluation_CommentInput</targetRef>
+ <sourceRef>_4_Comment</sourceRef>
+ <targetRef>_4_CommentInput</targetRef>
</dataInputAssociation>
<dataInputAssociation>
<assignment>
<from xs:type="tFormalExpression">Performance Evaluation</from>
- <to xs:type="tFormalExpression">HR_Manager_Evaluation_TaskNameInput</to>
+ <to xs:type="tFormalExpression">_4_TaskNameInput</to>
</assignment>
- <sourceRef>HR_Manager_Evaluation_TaskName</sourceRef>
- <targetRef>HR_Manager_Evaluation_TaskNameInput</targetRef>
+ <sourceRef>_4_TaskName</sourceRef>
+ <targetRef>_4_TaskNameInput</targetRef>
</dataInputAssociation>
<dataInputAssociation>
<assignment>
<from xs:type="tFormalExpression">1</from>
- <to xs:type="tFormalExpression">HR_Manager_Evaluation_PriorityInput</to>
+ <to xs:type="tFormalExpression">_4_PriorityInput</to>
</assignment>
- <sourceRef>HR_Manager_Evaluation_Priority</sourceRef>
- <targetRef>HR_Manager_Evaluation_PriorityInput</targetRef>
+ <sourceRef>_4_Priority</sourceRef>
+ <targetRef>_4_PriorityInput</targetRef>
</dataInputAssociation>
<dataInputAssociation>
<assignment>
<from xs:type="tFormalExpression"></from>
- <to xs:type="tFormalExpression">HR_Manager_Evaluation_ContentInput</to>
+ <to xs:type="tFormalExpression">_4_ContentInput</to>
</assignment>
- <sourceRef>HR_Manager_Evaluation_Content</sourceRef>
- <targetRef>HR_Manager_Evaluation_ContentInput</targetRef>
+ <sourceRef>_4_Content</sourceRef>
+ <targetRef>_4_ContentInput</targetRef>
</dataInputAssociation>
<dataInputAssociation>
<assignment>
<from xs:type="tFormalExpression">false</from>
- <to xs:type="tFormalExpression">HR_Manager_Evaluation_SkippableInput</to>
+ <to xs:type="tFormalExpression">_4_SkippableInput</to>
</assignment>
- <sourceRef>HR_Manager_Evaluation_Skippable</sourceRef>
- <targetRef>HR_Manager_Evaluation_SkippableInput</targetRef>
+ <sourceRef>_4_Skippable</sourceRef>
+ <targetRef>_4_SkippableInput</targetRef>
</dataInputAssociation>
<potentialOwner resourceRef="tns:Actor" >
<resourceAssignmentExpression>
- <formalExpression>mary</formalExpression>
+ <formalExpression>john</formalExpression>
</resourceAssignmentExpression>
</potentialOwner>
</userTask>
- <userTask id="Self_Evaluation" g:x="96" g:y="56" g:width="143" g:height="48" >
+ <userTask id="_5" name="HR Manager" g:x="309" g:y="96" g:width="122" g:height="48" >
<ioSpecification>
- <dataInput id="Self_Evaluation_SkippableInput" name="Skippable" />
- <dataInput id="Self_Evaluation_PriorityInput" name="Priority" />
- <dataInput id="Self_Evaluation_TaskNameInput" name="TaskName" />
- <dataInput id="Self_Evaluation_CommentInput" name="Comment" />
+ <dataInput id="_5_CommentInput" name="Comment" />
+ <dataInput id="_5_TaskNameInput" name="TaskName" />
+ <dataInput id="_5_PriorityInput" name="Priority" />
+ <dataInput id="_5_ContentInput" name="Content" />
+ <dataInput id="_5_SkippableInput" name="Skippable" />
<inputSet>
- <dataInputRefs>Self_Evaluation_SkippableInput</dataInputRefs>
- <dataInputRefs>Self_Evaluation_PriorityInput</dataInputRefs>
- <dataInputRefs>Self_Evaluation_TaskNameInput</dataInputRefs>
- <dataInputRefs>Self_Evaluation_CommentInput</dataInputRefs>
+ <dataInputRefs>_5_CommentInput</dataInputRefs>
+ <dataInputRefs>_5_TaskNameInput</dataInputRefs>
+ <dataInputRefs>_5_PriorityInput</dataInputRefs>
+ <dataInputRefs>_5_ContentInput</dataInputRefs>
+ <dataInputRefs>_5_SkippableInput</dataInputRefs>
</inputSet>
<outputSet>
</outputSet>
</ioSpecification>
- <property id="Self_Evaluation_Skippable" />
- <property id="Self_Evaluation_Priority" />
- <property id="Self_Evaluation_TaskName" />
- <property id="Self_Evaluation_Comment" />
+ <property id="_5_Comment" />
+ <property id="_5_TaskName" />
+ <property id="_5_Priority" />
+ <property id="_5_Content" />
+ <property id="_5_Skippable" />
<dataInputAssociation>
<assignment>
- <from xs:type="tFormalExpression">false</from>
- <to xs:type="tFormalExpression">Self_Evaluation_SkippableInput</to>
+ <from xs:type="tFormalExpression">You need to perform an evaluation for employee #{employee}</from>
+ <to xs:type="tFormalExpression">_5_CommentInput</to>
</assignment>
- <sourceRef>Self_Evaluation_Skippable</sourceRef>
- <targetRef>Self_Evaluation_SkippableInput</targetRef>
+ <sourceRef>_5_Comment</sourceRef>
+ <targetRef>_5_CommentInput</targetRef>
</dataInputAssociation>
<dataInputAssociation>
<assignment>
- <from xs:type="tFormalExpression">1</from>
- <to xs:type="tFormalExpression">Self_Evaluation_PriorityInput</to>
+ <from xs:type="tFormalExpression">Performance Evaluation</from>
+ <to xs:type="tFormalExpression">_5_TaskNameInput</to>
</assignment>
- <sourceRef>Self_Evaluation_Priority</sourceRef>
- <targetRef>Self_Evaluation_PriorityInput</targetRef>
+ <sourceRef>_5_TaskName</sourceRef>
+ <targetRef>_5_TaskNameInput</targetRef>
</dataInputAssociation>
<dataInputAssociation>
<assignment>
- <from xs:type="tFormalExpression">Performance Evaluation</from>
- <to xs:type="tFormalExpression">Self_Evaluation_TaskNameInput</to>
+ <from xs:type="tFormalExpression">1</from>
+ <to xs:type="tFormalExpression">_5_PriorityInput</to>
</assignment>
- <sourceRef>Self_Evaluation_TaskName</sourceRef>
- <targetRef>Self_Evaluation_TaskNameInput</targetRef>
+ <sourceRef>_5_Priority</sourceRef>
+ <targetRef>_5_PriorityInput</targetRef>
</dataInputAssociation>
<dataInputAssociation>
<assignment>
<from xs:type="tFormalExpression"></from>
- <to xs:type="tFormalExpression">Self_Evaluation_CommentInput</to>
+ <to xs:type="tFormalExpression">_5_ContentInput</to>
</assignment>
- <sourceRef>Self_Evaluation_Comment</sourceRef>
- <targetRef>Self_Evaluation_CommentInput</targetRef>
+ <sourceRef>_5_Content</sourceRef>
+ <targetRef>_5_ContentInput</targetRef>
</dataInputAssociation>
+ <dataInputAssociation>
+ <assignment>
+ <from xs:type="tFormalExpression">false</from>
+ <to xs:type="tFormalExpression">_5_SkippableInput</to>
+ </assignment>
+ <sourceRef>_5_Skippable</sourceRef>
+ <targetRef>_5_SkippableInput</targetRef>
+ </dataInputAssociation>
<potentialOwner resourceRef="tns:Actor" >
<resourceAssignmentExpression>
- <formalExpression>#{employee}</formalExpression>
+ <formalExpression>mary</formalExpression>
</resourceAssignmentExpression>
</potentialOwner>
</userTask>
- <parallelGateway id="Converge" g:x="603" g:y="56" g:width="49" g:height="49" gatewayDirection="converging" />
- <parallelGateway id="Diverge" g:x="271" g:y="56" g:width="49" g:height="49" gatewayDirection="diverging" />
+ <parallelGateway id="_6" name="Converge" g:x="463" g:y="56" g:width="49" g:height="49" gatewayDirection="converging" />
+ <endEvent id="_7" name="EndProcess" g:x="547" g:y="56" g:width="48" g:height="48" />
<!-- connections -->
- <sequenceFlow sourceRef="Converge" targetRef="EndProcess" />
- <sequenceFlow sourceRef="Diverge" targetRef="Project_Manager_Evaluation" g:bendpoints="[295,39]" />
- <sequenceFlow sourceRef="Diverge" targetRef="HR_Manager_Evaluation" g:bendpoints="[295,120]" />
- <sequenceFlow sourceRef="StartProcess" targetRef="Self_Evaluation" />
- <sequenceFlow sourceRef="Project_Manager_Evaluation" targetRef="Converge" g:bendpoints="[627,40]" />
- <sequenceFlow sourceRef="HR_Manager_Evaluation" targetRef="Converge" g:bendpoints="[627,121]" />
- <sequenceFlow sourceRef="Self_Evaluation" targetRef="Diverge" />
+ <sequenceFlow sourceRef="_6" targetRef="_7" />
+ <sequenceFlow sourceRef="_1" targetRef="_2" />
+ <sequenceFlow sourceRef="_4" targetRef="_6" />
+ <sequenceFlow sourceRef="_5" targetRef="_6" />
+ <sequenceFlow sourceRef="_3" targetRef="_4" />
+ <sequenceFlow sourceRef="_3" targetRef="_5" />
+ <sequenceFlow sourceRef="_2" targetRef="_3" />
</process>
Modified: labs/jbossrules/trunk/drools-process/drools-bpmn2/src/test/resources/BPMN2-MinimalProcess.xml
===================================================================
--- labs/jbossrules/trunk/drools-process/drools-bpmn2/src/test/resources/BPMN2-MinimalProcess.xml 2009-08-12 13:57:50 UTC (rev 28922)
+++ labs/jbossrules/trunk/drools-process/drools-bpmn2/src/test/resources/BPMN2-MinimalProcess.xml 2009-08-12 15:17:30 UTC (rev 28923)
@@ -9,12 +9,12 @@
xmlns:tns="http://www.example.org/MinimalExample">
<process id="Minimal" name="Minimal Process">
- <startEvent id="StartProcess"/>
- <sequenceFlow sourceRef="StartProcess" targetRef="Hello"/>
- <scriptTask id="Hello" scriptLanguage="java">
+ <startEvent id="_1" name="StartProcess"/>
+ <sequenceFlow sourceRef="_1" targetRef="_2"/>
+ <scriptTask id="_2" name="Hello" scriptLanguage="java">
<script>System.out.println("Hello World");</script>
</scriptTask>
- <sequenceFlow sourceRef="Hello" targetRef="EndProcess"/>
- <endEvent id="EndProcess"/>
+ <sequenceFlow sourceRef="_2" targetRef="_3"/>
+ <endEvent id="_3" name="EndProcess"/>
</process>
</definitions>
Modified: labs/jbossrules/trunk/drools-process/drools-bpmn2/src/test/resources/BPMN2-MinimalProcessWithGraphical.xml
===================================================================
--- labs/jbossrules/trunk/drools-process/drools-bpmn2/src/test/resources/BPMN2-MinimalProcessWithGraphical.xml 2009-08-12 13:57:50 UTC (rev 28922)
+++ labs/jbossrules/trunk/drools-process/drools-bpmn2/src/test/resources/BPMN2-MinimalProcessWithGraphical.xml 2009-08-12 15:17:30 UTC (rev 28923)
@@ -11,13 +11,13 @@
xmlns:tns="http://www.example.org/MinimalExample">
<process id="Minimal" name="Minimal Process">
- <startEvent id="StartProcess" g:x="1" g:y="1" />
- <sequenceFlow sourceRef="StartProcess" targetRef="Hello"/>
- <scriptTask id="Hello" scriptLanguage="java">
+ <startEvent id="_1" name="StartProcess" g:x="1" g:y="1" />
+ <sequenceFlow sourceRef="_1" targetRef="_2"/>
+ <scriptTask id="_2" name="Hello" scriptLanguage="java">
<script>System.out.println("Hello World");</script>
</scriptTask>
- <sequenceFlow sourceRef="Hello" targetRef="EndProcess" g:bendpoints="[10,10]" />
- <endEvent id="EndProcess"/>
+ <sequenceFlow sourceRef="_2" targetRef="_3" g:bendpoints="[10,10]" />
+ <endEvent id="_3" name="EndProcess"/>
</process>
</definitions>
More information about the jboss-svn-commits
mailing list