Thanks a lot for the patch! I'll have to ask you to please create a Jira
issue for this and add the patch as an attachment. It's not simple
bureaucracy, there's a little checkbox in the Jira attachments dialog to
signify your patch is meant for inclusion. It helps a lot keeping our IP
simple.
Thanks!
Matthieu
On Mon, Jun 23, 2008 at 9:47 AM, Vittorio Ballestra <
[EMAIL PROTECTED]> wrote:
> Here's a patch to correct a bug in ode 1.1-SNAPSHOT.
> Correlation for ONE-WAY invokation should not specify a pattern.
> So you should treat UNSET correlation PATTERN for ONE_WAY invokation as
> request.
>
>
> Index:
> /home/vittorio/tmp/apache-ode-branches_1.1/bpel-compiler/src/main/java/org/apache/ode/bpel/compiler/InvokeGenerator.java
> ===================================================================
> ---
> /home/vittorio/tmp/apache-ode-branches_1.1/bpel-compiler/src/main/java/org/apache/ode/bpel/compiler/InvokeGenerator.java
> (revision 670669)
> +++
> /home/vittorio/tmp/apache-ode-branches_1.1/bpel-compiler/src/main/java/org/apache/ode/bpel/compiler/InvokeGenerator.java
> (working copy)
> @@ -35,6 +35,8 @@
> import java.util.Collection;
> import java.util.List;
>
> +import javax.wsdl.OperationType;
> +
> /**
> * Generates code for <code><invoke></code> activities.
> */
> @@ -48,7 +50,7 @@
>
> public void compile(OActivity output, Activity srcx) {
> InvokeActivity src = (InvokeActivity) srcx;
> - OInvoke oinvoke = (OInvoke) output;
> + final OInvoke oinvoke = (OInvoke) output;
>
> oinvoke.partnerLink =
> _context.resolvePartnerLink(src.getPartnerLink());
> oinvoke.operation =
> _context.resolvePartnerRoleOperation(oinvoke.partnerLink,
> src.getOperation());
> @@ -80,9 +82,10 @@
> List<Correlation> correlations = src.getCorrelations();
> List<Correlation> incorrelations = CollectionsX.filter(new
> ArrayList<Correlation>(), correlations,
> new MemberOfFunction<Correlation>() {
> +
> @Override
> public boolean isMember(Correlation o) {
> - return o.getPattern() ==
> Correlation.CorrelationPattern.IN;
> + return o.getPattern() ==
> Correlation.CorrelationPattern.IN || (o.getPattern()==
> Correlation.CorrelationPattern.UNSET && oinvoke.operation.getStyle()==
> OperationType.ONE_WAY );
> }
> });
> List<Correlation> outcorrelations = CollectionsX.filter(new
> ArrayList<Correlation>(), correlations,
>
>
>