Skip to content
This repository was archived by the owner on May 12, 2021. It is now read-only.

Commit 28503b8

Browse files
committed
Micheal Hahn PR#6, Extension Activity improvements
1 parent 93c9155 commit 28503b8

33 files changed

Lines changed: 1554 additions & 744 deletions

File tree

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,3 +22,5 @@ derby.log
2222
Gemfile.lock
2323
spoon
2424
*.log
25+
.m2
26+
tmp/

README.extensions

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
=============================================
2+
Apache ODE - Extension Installation Guide
3+
=============================================
4+
5+
BPEL 2.0 introduces extensibility mechanisms, which allow you to extend
6+
the set of activities and/or variable assignment mechanisms.
7+
With BPEL 2.0 it is possible to extend the language by user-defined
8+
activities and custom assignment logic.
9+
10+
Since version 1.2 Apache ODE supports these extensibility mechanismns
11+
and provides a plug-in architecture that allows for registering
12+
third-party extensions.
13+
14+
1.) Installation of extensions (WAR)
15+
1) Copy the extension
16+
TBC
17+
18+
2.) Installation of extensions (JBI)
19+
TBW
20+
21+
3.) Writing ODE extensions
22+
TBW

Rakefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -316,7 +316,7 @@ define "ode" do
316316
desc "ODE BPEL Tests"
317317
define "bpel-test" do
318318
compile.with projects("bpel-api", "bpel-compiler", "bpel-dao", "bpel-runtime",
319-
"bpel-store", "utils", "bpel-epr", "dao-hibernate", "agents", "scheduler-simple"),
319+
"bpel-store", "utils", "bpel-epr", "dao-hibernate", "agents", "scheduler-simple", "bpel-nobj"),
320320
DERBY, JUnit.dependencies, JAVAX.persistence, OPENJPA, WSDL4J, COMMONS.httpclient, COMMONS.io,
321321
GERONIMO.transaction, GERONIMO.kernel, GERONIMO.connector, JAVAX.connector, JAVAX.ejb, JAVAX.transaction, TRANQL, "tranql:tranql-connector-derby-common:jar:1.1",
322322
SPRING_TEST, COMMONS.codec, SLF4J, LOG4J2

bpel-api/src/main/java/org/apache/ode/bpel/eapi/ExtensionContext.java

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,10 @@
1414
*/
1515
package org.apache.ode.bpel.eapi;
1616

17-
import java.util.List;
1817
import java.util.Map;
1918

2019
import org.apache.ode.bpel.common.FaultException;
21-
import org.apache.ode.bpel.obj.OLink;
20+
import org.apache.ode.bpel.obj.OActivity;
2221
import org.apache.ode.bpel.obj.OProcess;
2322
import org.apache.ode.bpel.obj.OScope;
2423
import org.w3c.dom.Node;
@@ -41,14 +40,6 @@ public interface ExtensionContext {
4140
*/
4241
Map<String, OScope.Variable> getVisibleVariables() throws FaultException;
4342

44-
/**
45-
* Returns a list of links.
46-
*
47-
* @return an unmodifiable list of visible variables.
48-
* @throws FaultException
49-
*/
50-
List<OLink> getLinks() throws FaultException;
51-
5243
/**
5344
* Read the value of a BPEL variable.
5445
*
@@ -95,19 +86,28 @@ public interface ExtensionContext {
9586
String readMessageProperty(OScope.Variable variable, OProcess.OProperty property)
9687
throws FaultException;
9788

98-
/**
99-
* Obtain the status of a control link.
100-
*
101-
* @param olink link to check
102-
* @return <code>true</code> if the link is active, <code>false</code> otherwise.
103-
*/
104-
boolean isLinkActive(OLink olink) throws FaultException;
105-
10689
/**
10790
* Reads the current process instance id.
10891
*
10992
* @return instance id
11093
*/
11194
Long getProcessId();
11295

96+
/**
97+
* Returns the name of the invoking activity.
98+
* @return activity name
99+
*/
100+
String getActivityName();
101+
102+
/**
103+
* Low-level-method
104+
*/
105+
OActivity getOActivity();
106+
107+
//ScopeFrame getScopeFrame();
108+
void complete();
109+
110+
void completeWithFault(Throwable t);
111+
112+
void completeWithFault(FaultException fault);
113113
}

bpel-compiler/src/main/java/org/apache/ode/bpel/compiler/BpelCompiler.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1665,6 +1665,9 @@ private void compileExtension(Extension ext) {
16651665

16661666
_declaredExtensionNS.add(ext.getNamespaceURI());
16671667
_oprocess.getDeclaredExtensions().add(oextension);
1668+
if (ext.isMustUnderstand()) {
1669+
_oprocess.getMustUnderstandExtensions().add(oextension);
1670+
}
16681671

16691672
if (__log.isDebugEnabled())
16701673
__log.debug("Compiled extension " + oextension);

bpel-compiler/src/main/java/org/apache/ode/bpel/compiler/bom/ExtensibilityQNames.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ public abstract class ExtensibilityQNames {
4646

4747
public static final String NS_BPEL_EXTENSIBILITY = "http://ode.apache.org/bpelExtensibility";
4848

49-
public static final QName UNKNOWN_EO_FAULT_NAME = new QName(NS_BPEL_EXTENSIBILITY, "unknownExtensionOperation");
49+
public static final QName UNKNOWN_EA_FAULT_NAME = new QName(NS_BPEL_EXTENSIBILITY, "unknownExtensionImplementation");
5050

5151
public static final QName INVALID_EXTENSION_ELEMENT = new QName(NS_BPEL_EXTENSIBILITY, "invalidExtensionElement");
5252
}

0 commit comments

Comments
 (0)