Java Embed Activity in BPEL sharing instance

2019-08-02 04:16发布

I am creating a process in BPEL (say findRules) which has three Java Embeded Activity(A,B,C). and I have one java class(Rule.java) which I need to import on all Java Embed Activity.

and when I create an instance of Rule.java A activity, can I use the same instance in B and C activity. because I am performing some business logic in A and wanted to access the updated varibles in B and C. but because B and C are having new instance I am not able to find those updated variables.

标签: java soa bpel
2条回答
冷血范
2楼-- · 2019-08-02 04:26

Java Embedded Activities are not part of the BPEL standard, so without knowing which BPEL tooling you use it is impossible to give an appropriate answer. However, from a design point of view, I would guess that a middleware vendor would better isolate such activities. BPEL processes are typically meant to be executed in a long-running fashion and are able to survive hardware and software crashes. Making java objects visible to certain activities would IMO break these concepts.

查看更多
走好不送
3楼-- · 2019-08-02 04:32

If you are Oracle SOA suite, there is a way to do this, albeit a very dirty one. The old WLI tags are still available. Note that this will remove portability of your code.

<jpd:javacode xmlns:jpd="http://www.bea.com/wli/jpd" >
public void f() {
    LOGGER.log("Some log statement");
}
</jpd:javacode>

Then, you could use this Java method f(), and the same way as in wli (Using jpd:node and jpd:methodName tags)

查看更多
登录 后发表回答