Search code examples
javasoabpel

Java Embed Activity in BPEL sharing instance


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.


Solution

  • 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)