Author: objectiser
Date: 2009-06-20 19:25:56 -0400 (Sat, 20 Jun 2009)
New Revision: 648
Added:
cdl/trunk/tools/plugins/org.jboss.tools.overlord.cdl.bpel/src/java/org/jboss/tools/overlord/cdl/bpel/model/component/Source.java
cdl/trunk/tools/plugins/org.jboss.tools.overlord.cdl.bpel/src/java/org/jboss/tools/overlord/cdl/bpel/model/component/Target.java
cdl/trunk/tools/plugins/org.jboss.tools.overlord.cdl.bpel/src/plugintest/org/jboss/tools/overlord/cdl/bpel/parser/testmodels/LoanApprovalService(a)Service.bpel
Modified:
cdl/trunk/tools/plugins/org.jboss.tools.overlord.cdl.bpel/META-INF/MANIFEST.MF
cdl/trunk/tools/plugins/org.jboss.tools.overlord.cdl.bpel/src/java/org/jboss/tools/overlord/cdl/bpel/model/component/BPELActivity.java
cdl/trunk/tools/plugins/org.jboss.tools.overlord.cdl.bpel/src/java/org/jboss/tools/overlord/cdl/bpel/model/component/Catch.java
cdl/trunk/tools/plugins/org.jboss.tools.overlord.cdl.bpel/src/java/org/jboss/tools/overlord/cdl/bpel/model/component/Exit.java
cdl/trunk/tools/plugins/org.jboss.tools.overlord.cdl.bpel/src/java/org/jboss/tools/overlord/cdl/bpel/model/component/Flow.java
cdl/trunk/tools/plugins/org.jboss.tools.overlord.cdl.bpel/src/java/org/jboss/tools/overlord/cdl/bpel/model/component/ForEach.java
cdl/trunk/tools/plugins/org.jboss.tools.overlord.cdl.bpel/src/java/org/jboss/tools/overlord/cdl/bpel/model/component/If.java
cdl/trunk/tools/plugins/org.jboss.tools.overlord.cdl.bpel/src/java/org/jboss/tools/overlord/cdl/bpel/model/component/Invoke.java
cdl/trunk/tools/plugins/org.jboss.tools.overlord.cdl.bpel/src/java/org/jboss/tools/overlord/cdl/bpel/model/component/OnMessage.java
cdl/trunk/tools/plugins/org.jboss.tools.overlord.cdl.bpel/src/java/org/jboss/tools/overlord/cdl/bpel/model/component/Pick.java
cdl/trunk/tools/plugins/org.jboss.tools.overlord.cdl.bpel/src/java/org/jboss/tools/overlord/cdl/bpel/model/component/Receive.java
cdl/trunk/tools/plugins/org.jboss.tools.overlord.cdl.bpel/src/java/org/jboss/tools/overlord/cdl/bpel/model/component/RepeatUntil.java
cdl/trunk/tools/plugins/org.jboss.tools.overlord.cdl.bpel/src/java/org/jboss/tools/overlord/cdl/bpel/model/component/Reply.java
cdl/trunk/tools/plugins/org.jboss.tools.overlord.cdl.bpel/src/java/org/jboss/tools/overlord/cdl/bpel/model/component/Rethrow.java
cdl/trunk/tools/plugins/org.jboss.tools.overlord.cdl.bpel/src/java/org/jboss/tools/overlord/cdl/bpel/model/component/Scope.java
cdl/trunk/tools/plugins/org.jboss.tools.overlord.cdl.bpel/src/java/org/jboss/tools/overlord/cdl/bpel/model/component/Sequence.java
cdl/trunk/tools/plugins/org.jboss.tools.overlord.cdl.bpel/src/java/org/jboss/tools/overlord/cdl/bpel/model/component/Throw.java
cdl/trunk/tools/plugins/org.jboss.tools.overlord.cdl.bpel/src/java/org/jboss/tools/overlord/cdl/bpel/model/component/Wait.java
cdl/trunk/tools/plugins/org.jboss.tools.overlord.cdl.bpel/src/java/org/jboss/tools/overlord/cdl/bpel/model/component/While.java
cdl/trunk/tools/plugins/org.jboss.tools.overlord.cdl.bpel/src/plugintest/org/jboss/tools/overlord/cdl/bpel/parser/ParserTest.java
cdl/trunk/tools/plugins/org.jboss.tools.overlord.cdl.bpel/src/test/org/jboss/tools/overlord/cdl/bpel/model/component/TestAbstractInteraction.java
cdl/trunk/tools/plugins/org.jboss.tools.overlord.cdl.bpel/src/test/org/jboss/tools/overlord/cdl/bpel/model/component/TestBPELActivity.java
Log:
Implementation of flow and target/source link mechanism. One part remaining of new example
- to deal with fault handler based on invoke in one of the flow paths.
Modified: cdl/trunk/tools/plugins/org.jboss.tools.overlord.cdl.bpel/META-INF/MANIFEST.MF
===================================================================
---
cdl/trunk/tools/plugins/org.jboss.tools.overlord.cdl.bpel/META-INF/MANIFEST.MF 2009-06-20
20:28:04 UTC (rev 647)
+++
cdl/trunk/tools/plugins/org.jboss.tools.overlord.cdl.bpel/META-INF/MANIFEST.MF 2009-06-20
23:25:56 UTC (rev 648)
@@ -15,7 +15,8 @@
org.junit,
org.scribble.conversation.parser,
org.pi4soa.scribble;resolution:=optional,
- org.apache.commons.logging
+ org.apache.commons.logging,
+ org.scribble.expression.xpath
Bundle-ActivationPolicy: lazy
Bundle-RequiredExecutionEnvironment: J2SE-1.5
Bundle-Vendor:
www.jboss.org
Modified:
cdl/trunk/tools/plugins/org.jboss.tools.overlord.cdl.bpel/src/java/org/jboss/tools/overlord/cdl/bpel/model/component/BPELActivity.java
===================================================================
---
cdl/trunk/tools/plugins/org.jboss.tools.overlord.cdl.bpel/src/java/org/jboss/tools/overlord/cdl/bpel/model/component/BPELActivity.java 2009-06-20
20:28:04 UTC (rev 647)
+++
cdl/trunk/tools/plugins/org.jboss.tools.overlord.cdl.bpel/src/java/org/jboss/tools/overlord/cdl/bpel/model/component/BPELActivity.java 2009-06-20
23:25:56 UTC (rev 648)
@@ -18,6 +18,7 @@
package org.jboss.tools.overlord.cdl.bpel.model.component;
import org.jboss.tools.overlord.cdl.bpel.model.BPELLanguageModel;
+import org.scribble.model.Activity;
/**
* This class represents the base class for all BPEL
@@ -25,6 +26,10 @@
*/
public abstract class BPELActivity extends BPELElement {
+ private static final String SOURCES = "sources";
+
+ private static final String TARGETS = "targets";
+
private static final String SUPPRESS_JOIN_FAILURE = "suppressJoinFailure";
private static final String NAME = "name";
@@ -40,6 +45,36 @@
public BPELActivity(BPELLanguageModel model,
org.w3c.dom.Element activity) {
super(model, activity);
+
+ org.w3c.dom.Element targets=findChildElement(TARGETS);
+
+ if (targets != null) {
+ org.w3c.dom.NodeList nl=targets.getChildNodes();
+
+ for (int i=0; i < nl.getLength(); i++) {
+ if (nl.item(i) instanceof org.w3c.dom.Element &&
+ nl.item(i).getLocalName().equals(Target.TARGET)
+ && nl.item(i) instanceof org.w3c.dom.Element) {
+ m_targets.add(new Target(model,
+ (org.w3c.dom.Element)nl.item(i)));
+ }
+ }
+ }
+
+ org.w3c.dom.Element sources=findChildElement(SOURCES);
+
+ if (sources != null) {
+ org.w3c.dom.NodeList nl=sources.getChildNodes();
+
+ for (int i=0; i < nl.getLength(); i++) {
+ if (nl.item(i) instanceof org.w3c.dom.Element &&
+ nl.item(i).getLocalName().equals(Source.SOURCE)
+ && nl.item(i) instanceof org.w3c.dom.Element) {
+ m_sources.add(new Source(model,
+ (org.w3c.dom.Element)nl.item(i)));
+ }
+ }
+ }
}
/**
@@ -112,4 +147,259 @@
return(ret);
}
+
+ /**
+ * This method adds a target to the activity.
+ *
+ * @param target The target to be added
+ * @param pos The position to add, or -1 if at the end
+ */
+ public void addTarget(Target target, int pos) {
+
+ org.w3c.dom.Element targets=null;
+
+ if (m_targets.size() == 0) {
+ targets = getDOMElement().getOwnerDocument().
+ createElementNS(BPEL_NS, TARGETS);
+
+ if (getDOMElement().getFirstChild() == null) {
+ getDOMElement().appendChild(targets);
+ } else {
+ getDOMElement().insertBefore(targets,
+ getDOMElement().getFirstChild());
+ }
+ } else {
+ targets = findChildElement(TARGETS);
+ }
+
+ org.w3c.dom.Node newNode=target.getDOMElement().cloneNode(true);
+
+ getDOMElement().getOwnerDocument().adoptNode(newNode);
+
+ target.setDOMElement((org.w3c.dom.Element)newNode);
+
+ if (pos == -1 && pos < m_targets.size()) {
+ m_targets.add(target);
+
+ targets.appendChild(newNode);
+ } else {
+
+ Target cur=m_targets.get(pos);
+
+ m_targets.add(pos, target);
+
+ if (cur != null) {
+ targets.insertBefore(newNode,
+ cur.getDOMElement());
+ } else {
+ targets.appendChild(newNode);
+ }
+ }
+ }
+
+ /**
+ * This method removes a target from the activity.
+ *
+ * @param target The target to be removed
+ * @return Whether the target was removed
+ */
+ public boolean removeTarget(Target target) {
+ boolean ret=m_targets.remove(target);
+
+ if (ret) {
+ org.w3c.dom.Element targets=
+ findChildElement(TARGETS);
+
+ if (targets != null) {
+ targets.removeChild(target.getDOMElement());
+
+ if (m_targets.size() == 0) {
+ getDOMElement().removeChild(targets);
+ }
+ }
+ }
+
+ return(ret);
+ }
+
+ /**
+ * This method returns the list of targets associated
+ * with the activity.
+ *
+ * @return The list of targets
+ */
+ public java.util.List<Target> getTargets() {
+ return(m_targets);
+ }
+
+ /**
+ * This method adds a source to the activity.
+ *
+ * @param source The source to be added
+ * @param pos The position to add, or -1 if at the end
+ */
+ public void addSource(Source source, int pos) {
+
+ org.w3c.dom.Element sources=null;
+
+ if (m_sources.size() == 0) {
+ sources = getDOMElement().getOwnerDocument().
+ createElementNS(BPEL_NS, SOURCES);
+
+ if (getDOMElement().getFirstChild() == null) {
+ getDOMElement().appendChild(sources);
+ } else {
+ getDOMElement().insertBefore(sources,
+ getDOMElement().getFirstChild());
+ }
+ } else {
+ sources = findChildElement(SOURCES);
+ }
+
+ org.w3c.dom.Node newNode=source.getDOMElement().cloneNode(true);
+
+ getDOMElement().getOwnerDocument().adoptNode(newNode);
+
+ source.setDOMElement((org.w3c.dom.Element)newNode);
+
+ if (pos == -1 && pos < m_sources.size()) {
+ m_sources.add(source);
+
+ sources.appendChild(newNode);
+ } else {
+
+ Source cur=m_sources.get(pos);
+
+ m_sources.add(pos, source);
+
+ if (cur != null) {
+ sources.insertBefore(newNode,
+ cur.getDOMElement());
+ } else {
+ sources.appendChild(newNode);
+ }
+ }
+ }
+
+ /**
+ * This method removes a source from the activity.
+ *
+ * @param source The source to be removed
+ * @return Whether the source was removed
+ */
+ public boolean removesource(Source source) {
+ boolean ret=m_sources.remove(source);
+
+ if (ret) {
+ org.w3c.dom.Element sources=
+ findChildElement(SOURCES);
+
+ if (sources != null) {
+ sources.removeChild(source.getDOMElement());
+
+ if (m_sources.size() == 0) {
+ getDOMElement().removeChild(sources);
+ }
+ }
+ }
+
+ return(ret);
+ }
+
+ /**
+ * This method returns the list of sources associated
+ * with the activity.
+ *
+ * @return The list of sources
+ */
+ public java.util.List<Source> getSources() {
+ return(m_sources);
+ }
+
+ /**
+ * This method converts the BPEL activity into an equivalent
+ * behavioural description for conformance checking.
+ *
+ * @param activities The list of activities that will contain
+ * the converted action(s)
+ * @param context The conversion context
+ */
+ public void convert(java.util.List<Activity> activities,
+ ConversionContext context) {
+
+ if (getTargets().size() > 0) {
+
+ // Create 'when' construct to wait for inbound links
+ // to be satisfied
+ org.scribble.expression.xpath.model.XPathExpression expr=
+ new org.scribble.expression.xpath.model.XPathExpression();
+
+ String query="";
+
+ for (int i=0; i < getTargets().size(); i++) {
+ if (i > 0) {
+ query += " and ";
+ }
+ query += "$"+getTargets().get(i).getLinkName();
+ }
+
+ expr.setQuery(query);
+
+ org.scribble.conversation.model.When elem=
+ new org.scribble.conversation.model.When();
+
+ org.scribble.conversation.model.ConditionalBlock block=
+ new org.scribble.conversation.model.ConditionalBlock();
+ block.setExpression(expr);
+
+ elem.getConditionalBlocks().add(block);
+
+ activities.add(elem);
+
+ activities = block.getContents();
+ }
+
+ convertActivity(activities, context);
+
+ // If sources, then set boolean variable
+ for (int i=0; i < getSources().size(); i++) {
+
+ org.scribble.conversation.model.Assignment assign=
+ new org.scribble.conversation.model.Assignment();
+
+ org.scribble.conversation.model.Variable var=
+ new org.scribble.conversation.model.Variable();
+
+ var.setName(getSources().get(i).getLinkName());
+
+ assign.setVariable(var);
+
+ org.scribble.expression.xpath.model.XPathExpression expr=
+ new org.scribble.expression.xpath.model.XPathExpression();
+
+ expr.setQuery("true()");
+ assign.setExpression(expr);
+
+ activities.add(assign);
+ }
+ }
+
+ /**
+ * This method does the actual work of converting the specific
+ * BPEL activity into an equivalent behavioural description for
+ * conformance checking. The 'convert' method provides
+ * a wrapper around this method, to handle the standard elements
+ * that can be associated with any BPEL activity.
+ *
+ * @param activities The list of activities that will contain
+ * the converted action(s)
+ * @param context The conversion context
+ */
+ protected abstract void convertActivity(java.util.List<Activity> activities,
+ ConversionContext context);
+
+ private java.util.List<Target> m_targets=
+ new java.util.Vector<Target>();
+ private java.util.List<Source> m_sources=
+ new java.util.Vector<Source>();
}
Modified:
cdl/trunk/tools/plugins/org.jboss.tools.overlord.cdl.bpel/src/java/org/jboss/tools/overlord/cdl/bpel/model/component/Catch.java
===================================================================
---
cdl/trunk/tools/plugins/org.jboss.tools.overlord.cdl.bpel/src/java/org/jboss/tools/overlord/cdl/bpel/model/component/Catch.java 2009-06-20
20:28:04 UTC (rev 647)
+++
cdl/trunk/tools/plugins/org.jboss.tools.overlord.cdl.bpel/src/java/org/jboss/tools/overlord/cdl/bpel/model/component/Catch.java 2009-06-20
23:25:56 UTC (rev 648)
@@ -59,8 +59,8 @@
@Override
public void convert(List<Activity> activities, ConversionContext context) {
- // TODO Auto-generated method stub
-
+ // Catch is not directly converted, only its contents indirectly as
+ // a fault response in a scope
}
/**
Modified:
cdl/trunk/tools/plugins/org.jboss.tools.overlord.cdl.bpel/src/java/org/jboss/tools/overlord/cdl/bpel/model/component/Exit.java
===================================================================
---
cdl/trunk/tools/plugins/org.jboss.tools.overlord.cdl.bpel/src/java/org/jboss/tools/overlord/cdl/bpel/model/component/Exit.java 2009-06-20
20:28:04 UTC (rev 647)
+++
cdl/trunk/tools/plugins/org.jboss.tools.overlord.cdl.bpel/src/java/org/jboss/tools/overlord/cdl/bpel/model/component/Exit.java 2009-06-20
23:25:56 UTC (rev 648)
@@ -64,14 +64,17 @@
}
/**
- * This method converts the BPEL activity into an equivalent
- * behavioural description for conformance checking.
+ * This method does the actual work of converting the specific
+ * BPEL activity into an equivalent behavioural description for
+ * conformance checking. The 'convert' method provides
+ * a wrapper around this method, to handle the standard elements
+ * that can be associated with any BPEL activity.
*
* @param activities The list of activities that will contain
* the converted action(s)
* @param context The conversion context
*/
- public void convert(java.util.List<Activity> activities,
+ protected void convertActivity(java.util.List<Activity> activities,
ConversionContext context) {
}
Modified:
cdl/trunk/tools/plugins/org.jboss.tools.overlord.cdl.bpel/src/java/org/jboss/tools/overlord/cdl/bpel/model/component/Flow.java
===================================================================
---
cdl/trunk/tools/plugins/org.jboss.tools.overlord.cdl.bpel/src/java/org/jboss/tools/overlord/cdl/bpel/model/component/Flow.java 2009-06-20
20:28:04 UTC (rev 647)
+++
cdl/trunk/tools/plugins/org.jboss.tools.overlord.cdl.bpel/src/java/org/jboss/tools/overlord/cdl/bpel/model/component/Flow.java 2009-06-20
23:25:56 UTC (rev 648)
@@ -48,7 +48,8 @@
org.w3c.dom.NodeList nl=links.getChildNodes();
for (int i=0; i < nl.getLength(); i++) {
- if (nl.item(i).getLocalName().equals(Link.LINK)
+ if (nl.item(i) instanceof org.w3c.dom.Element &&
+ nl.item(i).getLocalName().equals(Link.LINK)
&& nl.item(i) instanceof org.w3c.dom.Element) {
m_links.add(new Link(model,
(org.w3c.dom.Element)nl.item(i)));
@@ -225,15 +226,57 @@
}
/**
- * This method converts the BPEL activity into an equivalent
- * behavioural description for conformance checking.
+ * This method does the actual work of converting the specific
+ * BPEL activity into an equivalent behavioural description for
+ * conformance checking. The 'convert' method provides
+ * a wrapper around this method, to handle the standard elements
+ * that can be associated with any BPEL activity.
*
* @param activities The list of activities that will contain
* the converted action(s)
* @param context The conversion context
*/
- public void convert(java.util.List<Activity> activities,
+ protected void convertActivity(java.util.List<Activity> activities,
ConversionContext context) {
+
+ // If links have been defined, represent them as boolean
+ // variables that can be tested using a 'when' clause
+ if (getLinks().size() > 0) {
+ org.scribble.conversation.model.VariableList vl=
+ new org.scribble.conversation.model.VariableList();
+
+ org.scribble.model.TypeReference tref=
+ new org.scribble.model.TypeReference();
+ tref.setAlias("boolean");
+
+ vl.setType(tref);
+
+ for (int i=0; i < getLinks().size(); i++) {
+ Link l=getLinks().get(i);
+
+ org.scribble.conversation.model.Variable var=
+ new org.scribble.conversation.model.Variable();
+
+ var.setName(l.getName());
+
+ vl.getVariables().add(var);
+ }
+
+ activities.add(vl);
+ }
+
+ org.scribble.conversation.model.Parallel parallel=
+ new org.scribble.conversation.model.Parallel();
+
+ for (int i=0; i < getActivities().size(); i++) {
+ Block b=new Block();
+
+ getActivities().get(i).convert(b.getContents(), context);
+
+ parallel.getBlocks().add(b);
+ }
+
+ activities.add(parallel);
}
private java.util.List<Link> m_links=
Modified:
cdl/trunk/tools/plugins/org.jboss.tools.overlord.cdl.bpel/src/java/org/jboss/tools/overlord/cdl/bpel/model/component/ForEach.java
===================================================================
---
cdl/trunk/tools/plugins/org.jboss.tools.overlord.cdl.bpel/src/java/org/jboss/tools/overlord/cdl/bpel/model/component/ForEach.java 2009-06-20
20:28:04 UTC (rev 647)
+++
cdl/trunk/tools/plugins/org.jboss.tools.overlord.cdl.bpel/src/java/org/jboss/tools/overlord/cdl/bpel/model/component/ForEach.java 2009-06-20
23:25:56 UTC (rev 648)
@@ -95,14 +95,17 @@
}
/**
- * This method converts the BPEL activity into an equivalent
- * behavioural description for conformance checking.
+ * This method does the actual work of converting the specific
+ * BPEL activity into an equivalent behavioural description for
+ * conformance checking. The 'convert' method provides
+ * a wrapper around this method, to handle the standard elements
+ * that can be associated with any BPEL activity.
*
* @param activities The list of activities that will contain
* the converted action(s)
* @param context The conversion context
*/
- public void convert(java.util.List<Activity> activities,
+ protected void convertActivity(java.util.List<Activity> activities,
ConversionContext context) {
}
Modified:
cdl/trunk/tools/plugins/org.jboss.tools.overlord.cdl.bpel/src/java/org/jboss/tools/overlord/cdl/bpel/model/component/If.java
===================================================================
---
cdl/trunk/tools/plugins/org.jboss.tools.overlord.cdl.bpel/src/java/org/jboss/tools/overlord/cdl/bpel/model/component/If.java 2009-06-20
20:28:04 UTC (rev 647)
+++
cdl/trunk/tools/plugins/org.jboss.tools.overlord.cdl.bpel/src/java/org/jboss/tools/overlord/cdl/bpel/model/component/If.java 2009-06-20
23:25:56 UTC (rev 648)
@@ -93,14 +93,17 @@
}
/**
- * This method converts the BPEL activity into an equivalent
- * behavioural description for conformance checking.
+ * This method does the actual work of converting the specific
+ * BPEL activity into an equivalent behavioural description for
+ * conformance checking. The 'convert' method provides
+ * a wrapper around this method, to handle the standard elements
+ * that can be associated with any BPEL activity.
*
* @param activities The list of activities that will contain
* the converted action(s)
* @param context The conversion context
*/
- public void convert(java.util.List<Activity> activities,
+ protected void convertActivity(java.util.List<Activity> activities,
ConversionContext context) {
org.scribble.conversation.model.If elem=
Modified:
cdl/trunk/tools/plugins/org.jboss.tools.overlord.cdl.bpel/src/java/org/jboss/tools/overlord/cdl/bpel/model/component/Invoke.java
===================================================================
---
cdl/trunk/tools/plugins/org.jboss.tools.overlord.cdl.bpel/src/java/org/jboss/tools/overlord/cdl/bpel/model/component/Invoke.java 2009-06-20
20:28:04 UTC (rev 647)
+++
cdl/trunk/tools/plugins/org.jboss.tools.overlord.cdl.bpel/src/java/org/jboss/tools/overlord/cdl/bpel/model/component/Invoke.java 2009-06-20
23:25:56 UTC (rev 648)
@@ -105,14 +105,17 @@
}
/**
- * This method converts the BPEL activity into an equivalent
- * behavioural description for conformance checking.
+ * This method does the actual work of converting the specific
+ * BPEL activity into an equivalent behavioural description for
+ * conformance checking. The 'convert' method provides
+ * a wrapper around this method, to handle the standard elements
+ * that can be associated with any BPEL activity.
*
* @param activities The list of activities that will contain
* the converted action(s)
* @param context The conversion context
*/
- public void convert(java.util.List<Activity> activities,
+ protected void convertActivity(java.util.List<Activity> activities,
ConversionContext context) {
convertRequest(activities, context);
@@ -139,9 +142,16 @@
ms.setOperation(getOperation());
ms.getTypes().add(tref);
- interaction.setFromRole(new Role(context.getRole()));
- interaction.setToRole(new Role(getClientPartnerRole()));
+ if (context.getRole() != null) {
+ interaction.setFromRole(new Role(context.getRole()));
+ }
+ String toRole=getClientPartnerRole();
+
+ if (toRole != null) {
+ interaction.setToRole(new Role(toRole));
+ }
+
interaction.setMessageSignature(ms);
activities.add(interaction);
@@ -165,9 +175,16 @@
ms.setOperation(getOperation());
ms.getTypes().add(tref);
- interaction.setFromRole(new Role(getClientPartnerRole()));
- interaction.setToRole(new Role(context.getRole()));
+ String fromRole=getClientPartnerRole();
+ if (fromRole != null) {
+ interaction.setFromRole(new Role(fromRole));
+ }
+
+ if (context.getRole() != null) {
+ interaction.setToRole(new Role(context.getRole()));
+ }
+
interaction.setMessageSignature(ms);
activities.add(interaction);
Modified:
cdl/trunk/tools/plugins/org.jboss.tools.overlord.cdl.bpel/src/java/org/jboss/tools/overlord/cdl/bpel/model/component/OnMessage.java
===================================================================
---
cdl/trunk/tools/plugins/org.jboss.tools.overlord.cdl.bpel/src/java/org/jboss/tools/overlord/cdl/bpel/model/component/OnMessage.java 2009-06-20
20:28:04 UTC (rev 647)
+++
cdl/trunk/tools/plugins/org.jboss.tools.overlord.cdl.bpel/src/java/org/jboss/tools/overlord/cdl/bpel/model/component/OnMessage.java 2009-06-20
23:25:56 UTC (rev 648)
@@ -204,9 +204,16 @@
ms.setOperation(getOperation());
ms.getTypes().add(tref);
- interaction.setFromRole(new Role(getServerPartnerRole()));
- interaction.setToRole(new Role(context.getRole()));
+ String fromRole=getServerPartnerRole();
+ if (fromRole != null) {
+ interaction.setFromRole(new Role(fromRole));
+ }
+
+ if (context.getRole() != null) {
+ interaction.setToRole(new Role(context.getRole()));
+ }
+
interaction.setMessageSignature(ms);
activities.add(interaction);
Modified:
cdl/trunk/tools/plugins/org.jboss.tools.overlord.cdl.bpel/src/java/org/jboss/tools/overlord/cdl/bpel/model/component/Pick.java
===================================================================
---
cdl/trunk/tools/plugins/org.jboss.tools.overlord.cdl.bpel/src/java/org/jboss/tools/overlord/cdl/bpel/model/component/Pick.java 2009-06-20
20:28:04 UTC (rev 647)
+++
cdl/trunk/tools/plugins/org.jboss.tools.overlord.cdl.bpel/src/java/org/jboss/tools/overlord/cdl/bpel/model/component/Pick.java 2009-06-20
23:25:56 UTC (rev 648)
@@ -200,14 +200,17 @@
}
/**
- * This method converts the BPEL activity into an equivalent
- * behavioural description for conformance checking.
+ * This method does the actual work of converting the specific
+ * BPEL activity into an equivalent behavioural description for
+ * conformance checking. The 'convert' method provides
+ * a wrapper around this method, to handle the standard elements
+ * that can be associated with any BPEL activity.
*
* @param activities The list of activities that will contain
* the converted action(s)
* @param context The conversion context
*/
- public void convert(java.util.List<Activity> activities,
+ protected void convertActivity(java.util.List<Activity> activities,
ConversionContext context) {
org.scribble.conversation.model.If elem=
Modified:
cdl/trunk/tools/plugins/org.jboss.tools.overlord.cdl.bpel/src/java/org/jboss/tools/overlord/cdl/bpel/model/component/Receive.java
===================================================================
---
cdl/trunk/tools/plugins/org.jboss.tools.overlord.cdl.bpel/src/java/org/jboss/tools/overlord/cdl/bpel/model/component/Receive.java 2009-06-20
20:28:04 UTC (rev 647)
+++
cdl/trunk/tools/plugins/org.jboss.tools.overlord.cdl.bpel/src/java/org/jboss/tools/overlord/cdl/bpel/model/component/Receive.java 2009-06-20
23:25:56 UTC (rev 648)
@@ -118,14 +118,17 @@
}
/**
- * This method converts the BPEL activity into an equivalent
- * behavioural description for conformance checking.
+ * This method does the actual work of converting the specific
+ * BPEL activity into an equivalent behavioural description for
+ * conformance checking. The 'convert' method provides
+ * a wrapper around this method, to handle the standard elements
+ * that can be associated with any BPEL activity.
*
* @param activities The list of activities that will contain
* the converted action(s)
* @param context The conversion context
*/
- public void convert(java.util.List<Activity> activities,
+ protected void convertActivity(java.util.List<Activity> activities,
ConversionContext context) {
ConversationInteraction interaction=new ConversationInteraction();
@@ -147,9 +150,14 @@
fromRole = getClientPartnerRole();
}
- interaction.setFromRole(new Role(fromRole));
- interaction.setToRole(new Role(context.getRole()));
+ if (fromRole != null) {
+ interaction.setFromRole(new Role(fromRole));
+ }
+ if (context.getRole() != null) {
+ interaction.setToRole(new Role(context.getRole()));
+ }
+
interaction.setMessageSignature(ms);
activities.add(interaction);
Modified:
cdl/trunk/tools/plugins/org.jboss.tools.overlord.cdl.bpel/src/java/org/jboss/tools/overlord/cdl/bpel/model/component/RepeatUntil.java
===================================================================
---
cdl/trunk/tools/plugins/org.jboss.tools.overlord.cdl.bpel/src/java/org/jboss/tools/overlord/cdl/bpel/model/component/RepeatUntil.java 2009-06-20
20:28:04 UTC (rev 647)
+++
cdl/trunk/tools/plugins/org.jboss.tools.overlord.cdl.bpel/src/java/org/jboss/tools/overlord/cdl/bpel/model/component/RepeatUntil.java 2009-06-20
23:25:56 UTC (rev 648)
@@ -74,14 +74,17 @@
}
/**
- * This method converts the BPEL activity into an equivalent
- * behavioural description for conformance checking.
+ * This method does the actual work of converting the specific
+ * BPEL activity into an equivalent behavioural description for
+ * conformance checking. The 'convert' method provides
+ * a wrapper around this method, to handle the standard elements
+ * that can be associated with any BPEL activity.
*
* @param activities The list of activities that will contain
* the converted action(s)
* @param context The conversion context
*/
- public void convert(java.util.List<Activity> activities,
+ protected void convertActivity(java.util.List<Activity> activities,
ConversionContext context) {
}
Modified:
cdl/trunk/tools/plugins/org.jboss.tools.overlord.cdl.bpel/src/java/org/jboss/tools/overlord/cdl/bpel/model/component/Reply.java
===================================================================
---
cdl/trunk/tools/plugins/org.jboss.tools.overlord.cdl.bpel/src/java/org/jboss/tools/overlord/cdl/bpel/model/component/Reply.java 2009-06-20
20:28:04 UTC (rev 647)
+++
cdl/trunk/tools/plugins/org.jboss.tools.overlord.cdl.bpel/src/java/org/jboss/tools/overlord/cdl/bpel/model/component/Reply.java 2009-06-20
23:25:56 UTC (rev 648)
@@ -106,14 +106,17 @@
}
/**
- * This method converts the BPEL activity into an equivalent
- * behavioural description for conformance checking.
+ * This method does the actual work of converting the specific
+ * BPEL activity into an equivalent behavioural description for
+ * conformance checking. The 'convert' method provides
+ * a wrapper around this method, to handle the standard elements
+ * that can be associated with any BPEL activity.
*
* @param activities The list of activities that will contain
* the converted action(s)
* @param context The conversion context
*/
- public void convert(java.util.List<Activity> activities,
+ protected void convertActivity(java.util.List<Activity> activities,
ConversionContext context) {
ConversationInteraction interaction=new ConversationInteraction();
@@ -129,9 +132,16 @@
ms.setOperation(getOperation());
ms.getTypes().add(tref);
- interaction.setFromRole(new Role(context.getRole()));
- interaction.setToRole(new Role(getServerPartnerRole()));
+ if (context.getRole() != null) {
+ interaction.setFromRole(new Role(context.getRole()));
+ }
+ String toRole=getServerPartnerRole();
+
+ if (toRole != null) {
+ interaction.setToRole(new Role(toRole));
+ }
+
interaction.setMessageSignature(ms);
activities.add(interaction);
Modified:
cdl/trunk/tools/plugins/org.jboss.tools.overlord.cdl.bpel/src/java/org/jboss/tools/overlord/cdl/bpel/model/component/Rethrow.java
===================================================================
---
cdl/trunk/tools/plugins/org.jboss.tools.overlord.cdl.bpel/src/java/org/jboss/tools/overlord/cdl/bpel/model/component/Rethrow.java 2009-06-20
20:28:04 UTC (rev 647)
+++
cdl/trunk/tools/plugins/org.jboss.tools.overlord.cdl.bpel/src/java/org/jboss/tools/overlord/cdl/bpel/model/component/Rethrow.java 2009-06-20
23:25:56 UTC (rev 648)
@@ -64,14 +64,17 @@
}
/**
- * This method converts the BPEL activity into an equivalent
- * behavioural description for conformance checking.
+ * This method does the actual work of converting the specific
+ * BPEL activity into an equivalent behavioural description for
+ * conformance checking. The 'convert' method provides
+ * a wrapper around this method, to handle the standard elements
+ * that can be associated with any BPEL activity.
*
* @param activities The list of activities that will contain
* the converted action(s)
* @param context The conversion context
*/
- public void convert(java.util.List<Activity> activities,
+ protected void convertActivity(java.util.List<Activity> activities,
ConversionContext context) {
}
Modified:
cdl/trunk/tools/plugins/org.jboss.tools.overlord.cdl.bpel/src/java/org/jboss/tools/overlord/cdl/bpel/model/component/Scope.java
===================================================================
---
cdl/trunk/tools/plugins/org.jboss.tools.overlord.cdl.bpel/src/java/org/jboss/tools/overlord/cdl/bpel/model/component/Scope.java 2009-06-20
20:28:04 UTC (rev 647)
+++
cdl/trunk/tools/plugins/org.jboss.tools.overlord.cdl.bpel/src/java/org/jboss/tools/overlord/cdl/bpel/model/component/Scope.java 2009-06-20
23:25:56 UTC (rev 648)
@@ -516,14 +516,17 @@
}
/**
- * This method converts the BPEL activity into an equivalent
- * behavioural description for conformance checking.
+ * This method does the actual work of converting the specific
+ * BPEL activity into an equivalent behavioural description for
+ * conformance checking. The 'convert' method provides
+ * a wrapper around this method, to handle the standard elements
+ * that can be associated with any BPEL activity.
*
* @param activities The list of activities that will contain
* the converted action(s)
* @param context The conversion context
*/
- public void convert(java.util.List<Activity> activities,
+ protected void convertActivity(java.util.List<Activity> activities,
ConversionContext context) {
// Add variables to the context
Modified:
cdl/trunk/tools/plugins/org.jboss.tools.overlord.cdl.bpel/src/java/org/jboss/tools/overlord/cdl/bpel/model/component/Sequence.java
===================================================================
---
cdl/trunk/tools/plugins/org.jboss.tools.overlord.cdl.bpel/src/java/org/jboss/tools/overlord/cdl/bpel/model/component/Sequence.java 2009-06-20
20:28:04 UTC (rev 647)
+++
cdl/trunk/tools/plugins/org.jboss.tools.overlord.cdl.bpel/src/java/org/jboss/tools/overlord/cdl/bpel/model/component/Sequence.java 2009-06-20
23:25:56 UTC (rev 648)
@@ -126,14 +126,17 @@
}
/**
- * This method converts the BPEL activity into an equivalent
- * behavioural description for conformance checking.
+ * This method does the actual work of converting the specific
+ * BPEL activity into an equivalent behavioural description for
+ * conformance checking. The 'convert' method provides
+ * a wrapper around this method, to handle the standard elements
+ * that can be associated with any BPEL activity.
*
* @param activities The list of activities that will contain
* the converted action(s)
* @param context The conversion context
*/
- public void convert(java.util.List<Activity> activities,
+ protected void convertActivity(java.util.List<Activity> activities,
ConversionContext context) {
for (int i=0; i < m_activities.size(); i++) {
Added:
cdl/trunk/tools/plugins/org.jboss.tools.overlord.cdl.bpel/src/java/org/jboss/tools/overlord/cdl/bpel/model/component/Source.java
===================================================================
---
cdl/trunk/tools/plugins/org.jboss.tools.overlord.cdl.bpel/src/java/org/jboss/tools/overlord/cdl/bpel/model/component/Source.java
(rev 0)
+++
cdl/trunk/tools/plugins/org.jboss.tools.overlord.cdl.bpel/src/java/org/jboss/tools/overlord/cdl/bpel/model/component/Source.java 2009-06-20
23:25:56 UTC (rev 648)
@@ -0,0 +1,83 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat Middleware LLC, and others contributors as indicated
+ * by the @authors tag. All rights reserved.
+ * See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU Lesser General Public License, v. 2.1.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A
+ * 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,
+ * v.2.1 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301, USA.
+ */
+package org.jboss.tools.overlord.cdl.bpel.model.component;
+
+import java.util.List;
+
+import org.jboss.tools.overlord.cdl.bpel.model.BPELLanguageModel;
+import org.scribble.model.Activity;
+
+/**
+ * This class represents the BPEL source element, contained within
+ * any BPEL activity.
+ */
+public class Source extends BPELElement {
+
+ private static final long serialVersionUID = 4878669992635772776L;
+
+ private static final String LINK_NAME = "linkName";
+
+ public static final String SOURCE="source";
+
+ /**
+ * The constructor for the element.
+ *
+ * @param model The BPEL model
+ * @param elem The XML configuration details for the element
+ */
+ public Source(BPELLanguageModel model,
+ org.w3c.dom.Element elem) {
+ super(model, elem);
+ }
+
+ /**
+ * The constructor for the element.
+ *
+ * @param model The BPEL model
+ */
+ public Source(BPELLanguageModel model) {
+ super(model, SOURCE);
+ }
+
+ /**
+ * This method returns the name associated
+ * with the link.
+ *
+ * @return The link name
+ */
+ public String getLinkName() {
+ return(getDOMElement().getAttribute(LINK_NAME));
+ }
+
+ /**
+ * This method sets the link name.
+ *
+ * @param name The name
+ */
+ public void setLinkName(String name) {
+ getDOMElement().setAttribute(LINK_NAME, name);
+ }
+
+ @Override
+ public void convert(List<Activity> activities, ConversionContext context) {
+ // TODO Auto-generated method stub
+
+ }
+
+
+}
Added:
cdl/trunk/tools/plugins/org.jboss.tools.overlord.cdl.bpel/src/java/org/jboss/tools/overlord/cdl/bpel/model/component/Target.java
===================================================================
---
cdl/trunk/tools/plugins/org.jboss.tools.overlord.cdl.bpel/src/java/org/jboss/tools/overlord/cdl/bpel/model/component/Target.java
(rev 0)
+++
cdl/trunk/tools/plugins/org.jboss.tools.overlord.cdl.bpel/src/java/org/jboss/tools/overlord/cdl/bpel/model/component/Target.java 2009-06-20
23:25:56 UTC (rev 648)
@@ -0,0 +1,83 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat Middleware LLC, and others contributors as indicated
+ * by the @authors tag. All rights reserved.
+ * See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU Lesser General Public License, v. 2.1.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A
+ * 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,
+ * v.2.1 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301, USA.
+ */
+package org.jboss.tools.overlord.cdl.bpel.model.component;
+
+import java.util.List;
+
+import org.jboss.tools.overlord.cdl.bpel.model.BPELLanguageModel;
+import org.scribble.model.Activity;
+
+/**
+ * This class represents the BPEL target element, contained within
+ * any BPEL activity.
+ */
+public class Target extends BPELElement {
+
+ private static final long serialVersionUID = -8813636777020840433L;
+
+ private static final String LINK_NAME = "linkName";
+
+ public static final String TARGET="target";
+
+ /**
+ * The constructor for the element.
+ *
+ * @param model The BPEL model
+ * @param elem The XML configuration details for the element
+ */
+ public Target(BPELLanguageModel model,
+ org.w3c.dom.Element elem) {
+ super(model, elem);
+ }
+
+ /**
+ * The constructor for the element.
+ *
+ * @param model The BPEL model
+ */
+ public Target(BPELLanguageModel model) {
+ super(model, TARGET);
+ }
+
+ /**
+ * This method returns the name associated
+ * with the link.
+ *
+ * @return The link name
+ */
+ public String getLinkName() {
+ return(getDOMElement().getAttribute(LINK_NAME));
+ }
+
+ /**
+ * This method sets the link name.
+ *
+ * @param name The name
+ */
+ public void setLinkName(String name) {
+ getDOMElement().setAttribute(LINK_NAME, name);
+ }
+
+ @Override
+ public void convert(List<Activity> activities, ConversionContext context) {
+ // TODO Auto-generated method stub
+
+ }
+
+
+}
Modified:
cdl/trunk/tools/plugins/org.jboss.tools.overlord.cdl.bpel/src/java/org/jboss/tools/overlord/cdl/bpel/model/component/Throw.java
===================================================================
---
cdl/trunk/tools/plugins/org.jboss.tools.overlord.cdl.bpel/src/java/org/jboss/tools/overlord/cdl/bpel/model/component/Throw.java 2009-06-20
20:28:04 UTC (rev 647)
+++
cdl/trunk/tools/plugins/org.jboss.tools.overlord.cdl.bpel/src/java/org/jboss/tools/overlord/cdl/bpel/model/component/Throw.java 2009-06-20
23:25:56 UTC (rev 648)
@@ -105,14 +105,17 @@
}
/**
- * This method converts the BPEL activity into an equivalent
- * behavioural description for conformance checking.
+ * This method does the actual work of converting the specific
+ * BPEL activity into an equivalent behavioural description for
+ * conformance checking. The 'convert' method provides
+ * a wrapper around this method, to handle the standard elements
+ * that can be associated with any BPEL activity.
*
* @param activities The list of activities that will contain
* the converted action(s)
* @param context The conversion context
*/
- public void convert(java.util.List<Activity> activities,
+ protected void convertActivity(java.util.List<Activity> activities,
ConversionContext context) {
}
Modified:
cdl/trunk/tools/plugins/org.jboss.tools.overlord.cdl.bpel/src/java/org/jboss/tools/overlord/cdl/bpel/model/component/Wait.java
===================================================================
---
cdl/trunk/tools/plugins/org.jboss.tools.overlord.cdl.bpel/src/java/org/jboss/tools/overlord/cdl/bpel/model/component/Wait.java 2009-06-20
20:28:04 UTC (rev 647)
+++
cdl/trunk/tools/plugins/org.jboss.tools.overlord.cdl.bpel/src/java/org/jboss/tools/overlord/cdl/bpel/model/component/Wait.java 2009-06-20
23:25:56 UTC (rev 648)
@@ -130,14 +130,17 @@
}
/**
- * This method converts the BPEL activity into an equivalent
- * behavioural description for conformance checking.
+ * This method does the actual work of converting the specific
+ * BPEL activity into an equivalent behavioural description for
+ * conformance checking. The 'convert' method provides
+ * a wrapper around this method, to handle the standard elements
+ * that can be associated with any BPEL activity.
*
* @param activities The list of activities that will contain
* the converted action(s)
* @param context The conversion context
*/
- public void convert(java.util.List<Activity> activities,
+ protected void convertActivity(java.util.List<Activity> activities,
ConversionContext context) {
}
Modified:
cdl/trunk/tools/plugins/org.jboss.tools.overlord.cdl.bpel/src/java/org/jboss/tools/overlord/cdl/bpel/model/component/While.java
===================================================================
---
cdl/trunk/tools/plugins/org.jboss.tools.overlord.cdl.bpel/src/java/org/jboss/tools/overlord/cdl/bpel/model/component/While.java 2009-06-20
20:28:04 UTC (rev 647)
+++
cdl/trunk/tools/plugins/org.jboss.tools.overlord.cdl.bpel/src/java/org/jboss/tools/overlord/cdl/bpel/model/component/While.java 2009-06-20
23:25:56 UTC (rev 648)
@@ -74,14 +74,17 @@
}
/**
- * This method converts the BPEL activity into an equivalent
- * behavioural description for conformance checking.
+ * This method does the actual work of converting the specific
+ * BPEL activity into an equivalent behavioural description for
+ * conformance checking. The 'convert' method provides
+ * a wrapper around this method, to handle the standard elements
+ * that can be associated with any BPEL activity.
*
* @param activities The list of activities that will contain
* the converted action(s)
* @param context The conversion context
*/
- public void convert(java.util.List<Activity> activities,
+ protected void convertActivity(java.util.List<Activity> activities,
ConversionContext context) {
org.scribble.conversation.model.While elem=
Modified:
cdl/trunk/tools/plugins/org.jboss.tools.overlord.cdl.bpel/src/plugintest/org/jboss/tools/overlord/cdl/bpel/parser/ParserTest.java
===================================================================
---
cdl/trunk/tools/plugins/org.jboss.tools.overlord.cdl.bpel/src/plugintest/org/jboss/tools/overlord/cdl/bpel/parser/ParserTest.java 2009-06-20
20:28:04 UTC (rev 647)
+++
cdl/trunk/tools/plugins/org.jboss.tools.overlord.cdl.bpel/src/plugintest/org/jboss/tools/overlord/cdl/bpel/parser/ParserTest.java 2009-06-20
23:25:56 UTC (rev 648)
@@ -43,6 +43,7 @@
suite.addTest(new BPELToConversationTest("PurchaseGoods@Store"));
suite.addTest(new BPELToConversationTest("ReqRespFault@Buyer"));
suite.addTest(new BPELToConversationTest("ReqRespFault@Seller"));
+ suite.addTest(new
BPELToConversationTest("LoanApprovalService@Service"));
return suite;
}
Added:
cdl/trunk/tools/plugins/org.jboss.tools.overlord.cdl.bpel/src/plugintest/org/jboss/tools/overlord/cdl/bpel/parser/testmodels/LoanApprovalService(a)Service.bpel
===================================================================
---
cdl/trunk/tools/plugins/org.jboss.tools.overlord.cdl.bpel/src/plugintest/org/jboss/tools/overlord/cdl/bpel/parser/testmodels/LoanApprovalService(a)Service.bpel
(rev 0)
+++
cdl/trunk/tools/plugins/org.jboss.tools.overlord.cdl.bpel/src/plugintest/org/jboss/tools/overlord/cdl/bpel/parser/testmodels/LoanApprovalService(a)Service.bpel 2009-06-20
23:25:56 UTC (rev 648)
@@ -0,0 +1,123 @@
+<process name="loanApprovalProcess"
xmlns:ns0="http://www.scribble.org/conversation"
ns0:conversationType="LoanApprovalService@Service"
+
targetNamespace="http://example.com/loan-approval/"
+
xmlns="http://docs.oasis-open.org/wsbpel/2.0/process/executable"
+
xmlns:lns="http://example.com/loan-approval/wsdl/"
+ suppressJoinFailure="yes">
+ <import
importType="http://schemas.xmlsoap.org/wsdl/"
+ location="loanServicePT.wsdl"
+
namespace="http://example.com/loan-approval/wsdl/" />
+ <partnerLinks>
+ <partnerLink name="customer"
+ partnerLinkType="lns:loanPartnerLT"
+ myRole="loanService" />
+ <partnerLink name="approver"
+ partnerLinkType="lns:loanApprovalLT"
+ partnerRole="approver" />
+ <partnerLink name="assessor"
+ partnerLinkType="lns:riskAssessmentLT"
+ partnerRole="assessor" />
+ </partnerLinks>
+ <variables>
+ <variable name="request"
+ messageType="lns:creditInformationMessage" />
+ <variable name="risk"
+ messageType="lns:riskAssessmentMessage" />
+ <variable name="approval"
+ messageType="lns:approvalMessage" />
+ </variables>
+ <faultHandlers>
+ <catch faultName="lns:loanProcessFault"
+ faultVariable="error"
+ faultMessageType="lns:errorMessage">
+ <reply partnerLink="customer"
+ portType="lns:loanServicePT"
+ operation="request" variable="error"
+ faultName="unableToHandleRequest" />
+ </catch>
+ </faultHandlers>
+ <flow>
+ <links>
+ <link name="receive-to-assess" />
+ <link name="receive-to-approval" />
+ <link name="approval-to-reply" />
+ <link name="assess-to-setMessage" />
+ <link name="setMessage-to-reply" />
+ <link name="assess-to-approval" />
+ </links>
+ <receive partnerLink="customer"
+ portType="lns:loanServicePT"
+ operation="request"
+ variable="request"
+ createInstance="yes">
+ <sources>
+ <source linkName="receive-to-assess">
+ <transitionCondition>
+ $request.amount < 10000
+ </transitionCondition>
+ </source>
+ <source linkName="receive-to-approval">
+ <transitionCondition>
+ $request.amount >= 10000
+ </transitionCondition>
+ </source>
+ </sources>
+ </receive>
+ <invoke partnerLink="assessor"
+ portType="lns:riskAssessmentPT"
+ operation="check"
+ inputVariable="request"
+ outputVariable="risk">
+ <targets>
+ <target linkName="receive-to-assess" />
+ </targets>
+ <sources>
+ <source linkName="assess-to-setMessage">
+ <transitionCondition>
+ $risk.level='low'
+ </transitionCondition>
+ </source>
+ <source linkName="assess-to-approval">
+ <transitionCondition>
+ $risk.level!='low'
+ </transitionCondition>
+ </source>
+ </sources>
+ </invoke>
+ <assign>
+ <targets>
+ <target linkName="assess-to-setMessage" />
+ </targets>
+ <sources>
+ <source linkName="setMessage-to-reply" />
+ </sources>
+ <copy>
+ <from>
+ <literal>yes</literal>
+ </from>
+ <to variable="approval" part="accept" />
+ </copy>
+ </assign>
+ <invoke partnerLink="approver"
+ portType="lns:loanApprovalPT"
+ operation="approve"
+ inputVariable="request"
+ outputVariable="approval">
+ <targets>
+ <target linkName="receive-to-approval" />
+ <target linkName="assess-to-approval" />
+ </targets>
+ <sources>
+ <source linkName="approval-to-reply" />
+ </sources>
+ </invoke>
+ <reply partnerLink="customer"
+ portType="lns:loanServicePT"
+ operation="request"
+ variable="approval">
+ <targets>
+ <target linkName="setMessage-to-reply" />
+ <target linkName="approval-to-reply" />
+ </targets>
+ </reply>
+ </flow>
+</process>
Modified:
cdl/trunk/tools/plugins/org.jboss.tools.overlord.cdl.bpel/src/test/org/jboss/tools/overlord/cdl/bpel/model/component/TestAbstractInteraction.java
===================================================================
---
cdl/trunk/tools/plugins/org.jboss.tools.overlord.cdl.bpel/src/test/org/jboss/tools/overlord/cdl/bpel/model/component/TestAbstractInteraction.java 2009-06-20
20:28:04 UTC (rev 647)
+++
cdl/trunk/tools/plugins/org.jboss.tools.overlord.cdl.bpel/src/test/org/jboss/tools/overlord/cdl/bpel/model/component/TestAbstractInteraction.java 2009-06-20
23:25:56 UTC (rev 648)
@@ -35,8 +35,19 @@
super(model, "test");
}
- @Override
- public void convert(List<Activity> activities, ConversionContext context) {
+ /**
+ * This method does the actual work of converting the specific
+ * BPEL activity into an equivalent behavioural description for
+ * conformance checking. The 'convert' method provides
+ * a wrapper around this method, to handle the standard elements
+ * that can be associated with any BPEL activity.
+ *
+ * @param activities The list of activities that will contain
+ * the converted action(s)
+ * @param context The conversion context
+ */
+ protected void convertActivity(java.util.List<Activity> activities,
+ ConversionContext context) {
// TODO Auto-generated method stub
}
Modified:
cdl/trunk/tools/plugins/org.jboss.tools.overlord.cdl.bpel/src/test/org/jboss/tools/overlord/cdl/bpel/model/component/TestBPELActivity.java
===================================================================
---
cdl/trunk/tools/plugins/org.jboss.tools.overlord.cdl.bpel/src/test/org/jboss/tools/overlord/cdl/bpel/model/component/TestBPELActivity.java 2009-06-20
20:28:04 UTC (rev 647)
+++
cdl/trunk/tools/plugins/org.jboss.tools.overlord.cdl.bpel/src/test/org/jboss/tools/overlord/cdl/bpel/model/component/TestBPELActivity.java 2009-06-20
23:25:56 UTC (rev 648)
@@ -35,8 +35,19 @@
super(model, "test");
}
- @Override
- public void convert(List<Activity> activities, ConversionContext context) {
+ /**
+ * This method does the actual work of converting the specific
+ * BPEL activity into an equivalent behavioural description for
+ * conformance checking. The 'convert' method provides
+ * a wrapper around this method, to handle the standard elements
+ * that can be associated with any BPEL activity.
+ *
+ * @param activities The list of activities that will contain
+ * the converted action(s)
+ * @param context The conversion context
+ */
+ protected void convertActivity(java.util.List<Activity> activities,
+ ConversionContext context) {
// TODO Auto-generated method stub
}