开发者

Java Embed Activity in BPEL sharing instance

开发者 https://www.devze.com 2023-02-24 09:35 出处:网络
I am creating a process in BPEL (开发者_StackOverflow社区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 Acti

I am creating a process in BPEL (开发者_StackOverflow社区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.


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)


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号