Java Embed Activity in BPEL sharing instance

寵の児 提交于 2019-12-11 04:47:13

问题


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.


回答1:


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)




回答2:


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.



来源:https://stackoverflow.com/questions/5662799/java-embed-activity-in-bpel-sharing-instance

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!