Skip to content

Commit

Permalink
fix remote invoke bug
Browse files Browse the repository at this point in the history
  • Loading branch information
Rocky Yu committed Nov 30, 2022
1 parent 6ffdcf6 commit 0df5491
Show file tree
Hide file tree
Showing 16 changed files with 22 additions and 17 deletions.
2 changes: 1 addition & 1 deletion lattice-model/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<artifactId>lattice</artifactId>
<groupId>org.hiforce.lattice</groupId>
<version>1.0.12.3</version>
<version>1.0.13</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>lattice-model</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.collections4.CollectionUtils;
import org.apache.commons.lang3.StringUtils;
import org.apache.commons.lang3.reflect.MethodUtils;
import org.hiforce.lattice.annotation.model.ExtensionAnnotation;
import org.hiforce.lattice.model.ability.IBusinessExt;

Expand Down Expand Up @@ -58,7 +59,8 @@ public static Set<String> supportedExtCodes(IBusinessExt businessExt) {
continue;
}
if (StringUtils.isNotEmpty(annotation.getCode())) {
EXT_METHOD_MAP.put(key, annotation.getCode(), method);
EXT_METHOD_MAP.put(key, annotation.getCode(),
MethodUtils.getAccessibleMethod(method));
supportedCodes.add(annotation.getCode());
}

Expand Down
2 changes: 1 addition & 1 deletion lattice-remote/lattice-remote-client/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<artifactId>lattice-remote</artifactId>
<groupId>org.hiforce.lattice</groupId>
<version>1.0.12.3</version>
<version>1.0.13</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand Down
2 changes: 1 addition & 1 deletion lattice-remote/lattice-remote-container/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<artifactId>lattice-remote</artifactId>
<groupId>org.hiforce.lattice</groupId>
<version>1.0.12.3</version>
<version>1.0.13</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
package org.hiforce.lattice.remote.container.service;

import org.apache.commons.beanutils.MethodUtils;
import org.apache.commons.lang3.StringUtils;
import org.hiforce.lattice.model.ability.IBusinessExt;
import org.hiforce.lattice.model.register.RealizationSpec;
import org.hiforce.lattice.remote.client.LatticeRemoteInvoker;
import org.hiforce.lattice.runtime.Lattice;
Expand All @@ -26,8 +28,9 @@ public Serializable invoke(String bizCode, String scenario, String extCode, Obje
if (null == realizationSpec) {
return null;
}
Method method = BusinessExtUtils.getExtensionMethod(realizationSpec.getBusinessExt(), extCode, scenario);
try {
IBusinessExt businessExt = realizationSpec.getBusinessExt().getBusinessExtByCode(extCode, scenario);
Method method = BusinessExtUtils.getExtensionMethod(businessExt, extCode, scenario);
return (Serializable) method.invoke(realizationSpec.getBusinessExt(), params);
} catch (Exception e) {
throw new RuntimeException(e);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<artifactId>lattice-remote-runner</artifactId>
<groupId>org.hiforce.lattice</groupId>
<version>1.0.12.3</version>
<version>1.0.13</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand Down
2 changes: 1 addition & 1 deletion lattice-remote/lattice-remote-runner/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<artifactId>lattice-remote</artifactId>
<groupId>org.hiforce.lattice</groupId>
<version>1.0.12.3</version>
<version>1.0.13</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand Down
2 changes: 1 addition & 1 deletion lattice-remote/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<artifactId>lattice</artifactId>
<groupId>org.hiforce.lattice</groupId>
<version>1.0.12.3</version>
<version>1.0.13</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand Down
2 changes: 1 addition & 1 deletion lattice-runtime/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<artifactId>lattice</artifactId>
<groupId>org.hiforce.lattice</groupId>
<version>1.0.12.3</version>
<version>1.0.13</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand Down
2 changes: 1 addition & 1 deletion lattice-tools/lattice-dynamic-loading/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<artifactId>lattice-tools</artifactId>
<groupId>org.hiforce.lattice</groupId>
<version>1.0.12.3</version>
<version>1.0.13</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand Down
2 changes: 1 addition & 1 deletion lattice-tools/lattice-load-config-res/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<artifactId>lattice-tools</artifactId>
<groupId>org.hiforce.lattice</groupId>
<version>1.0.12.3</version>
<version>1.0.13</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<artifactId>lattice-maven-build</artifactId>
<groupId>org.hiforce.lattice</groupId>
<version>1.0.12.3</version>
<version>1.0.13</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<artifactId>lattice-maven-build</artifactId>
<groupId>org.hiforce.lattice</groupId>
<version>1.0.12.3</version>
<version>1.0.13</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<packaging>maven-plugin</packaging>
Expand Down
2 changes: 1 addition & 1 deletion lattice-tools/lattice-maven-build/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<artifactId>lattice-tools</artifactId>
<groupId>org.hiforce.lattice</groupId>
<version>1.0.12.3</version>
<version>1.0.13</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<packaging>pom</packaging>
Expand Down
2 changes: 1 addition & 1 deletion lattice-tools/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<artifactId>lattice</artifactId>
<groupId>org.hiforce.lattice</groupId>
<version>1.0.12.3</version>
<version>1.0.13</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<packaging>pom</packaging>
Expand Down
4 changes: 2 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@
<url>https://github.com/hiforce/lattice</url>
<inceptionYear>2022</inceptionYear>

<version>1.0.12.3</version>
<version>1.0.13</version>
<properties>
<version.lattice>1.0.12.3</version.lattice>
<version.lattice>1.0.13</version.lattice>
<version.spring>5.3.23</version.spring>
<version.spring.boot>2.7.4</version.spring.boot>
<springext-plugin-version>1.2</springext-plugin-version>
Expand Down

0 comments on commit 0df5491

Please sign in to comment.