Re-submit BPEL instances from BAM

Here is what I did for re-initiating BPEL instances from BAM.

a) While defining the BAM sensor action, passed in the conversation Id of the instance [obtained using the xpath function ora:getConversationId()]
b) Developed a Servlet that takes in a conversationId as a request parameter and initiates a new BPEL instance with the same input message.
c) Created a table with an Action button that invokes the Servlet [using Open URL action] and passes in the conversationId.. The table contains columns that contain key identifiers for the transaction. [e.g. POId etc]
d) At runtime, users select the rows in the table based on the identifiers and click on the action button - this will re-initiate the BPEL instance.

Here is a snippet of code that does the trick.

        IBPELDomainHandle domain = null;
        Locator locator = null;
        String convId = request.getParameter("convId");

        Properties p = new Properties();
        java.net.URL url = ClassLoader.getSystemResource("context.properties");
        p.load(url.openStream());

        locator = new Locator("default","weblogic",p);
        domain = locator.lookupDomain();
        WhereCondition wc = new WhereCondition("conv_id=?");
        wc.setString(1,convId);
        IInvokeMetaData[] invMetadataArr = locator.listInvokeMessages(wc);
        IInvokeMetaData invMetadata = invMetadataArr[0];
        String messageGuid = invMetadata.getMessageGUID();
        domain.recoverInvokeMessages(new String[]{messageGuid});

Comments:

Hi Ram, Many thanks for your post on the customtasks.jar(Customizing any BPEL Project Artifact using customizeDocument) , this has helped us in resolving code issues, however I need to understand the following Is this customtasks.jar an Open Source Code? Does it have any IPR(Intellectual Properiety Rights) issues ? Can this be submitted as a part of Code Delivery to customer ? Can you please let me know any other link (preferably Oracle /SUN Link) from where this jar can be downloaded. In case you need to discuss anything , please give me call my contact details are mentioned below. Thanks and Regards Amar 0091-9903396732

Posted by Amar Misra on October 22, 2008 at 02:36 PM PDT #

Hi Ram , Our client also has the similar requirement . We have two asyncronous bpel processes call. Bpel 1 Calls Bpel 2 (both are asyncronous process). now while doing so BPel 2 fails.Now our smart Bpel 2 before termination calls Errorhandle bpel process to tell user about error through mail. Now once they do action on the xml we want to resubmitt same message through Bpel 2 via code you have provided in Errorhandle bpel . After seeing your code I realised that we can get Instance mesasge and then resubmitt bpel task once again. But I guess your code is incomplete Can you assist me doing changes . Than x, Rashmi.

Posted by rashmi on November 04, 2008 at 11:15 PM PST #

Mam ogromną prośbę, bo właśnie chciałbym zrobić blog zbliżony do Twojego. Napisz, proszę, jak się uchronić przed śmieciowymi wpisami, bo kolega mi powiedział, że to największy problem... Od razu dziękuję. A tak w ogóle, to świetnie piszesz :). Pozdrawiam.

Posted by dziwnow on September 20, 2010 at 02:12 PM PDT #

Thanks for great post!

Posted by Vimax Reviews on April 29, 2011 at 05:32 AM PDT #

Post a Comment:
  • HTML Syntax: NOT allowed
About

Principal Product Manager

Search

Archives
« April 2014
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today