BAPI_GOODSMVT_CREATE Async call

Hi.
I am calling BAPI_GOODSMVT_CREATE to post 2 goods movements one after the other (501 and 541). I am using BAPI_TRANSACTION_COMMIT, with the wait option after both the movements. (This is not being called in an update task, which might be evident from the call to BAPI_TRANSACTION_COMMIT).
The problem is that immediately after the 501 movement, if I try and post the 541 movement, the call to the BAPI fails. The error is that the data is locked with my user ID. Now if I put a WAIT UP TO n SECONDS, statement, the program works fine. My reasoning is that the control is returned to the program while there is some processing happening at the backend.
The program is working fine now, but using a WAIT UP TO.. doesn't seem an elegant approach. Could anyone suggest anything?

You can try 'SET UPDATE TASK LOCAL. ' before your BAPI call. It should work as it will stay in the user context as far as I remember.
Peter

Similar Messages

  • Using Async calls in a Util class

    I have a Utility class that I want to put code in that I'm reusing over and over again.  This includes Async.handleEvent calls.  If I call an instance of the Util class from a [Test(async)] method, can I use the Async call in that other event?
    When I tried this in my code, it said that it "Cannot add asynchronous functionality to methods defined by Test,Before or After that are not marked async" but my [Test] is marked as async. And when I was in the same class, I was able to have non-Test methods make Async calls.
    Thanks for the help!
    Mocked up Example (please note these are two separate files):
    // Test.as
    package
        import TimerUtil;
        public class Test
            [Test(async)]
            public function waitForTimer():void
                TimerUtil.newTimer();
    // TimerUtil.as
    package
        import flash.events.TimerEvent;
        import flash.utils.Timer;
        import org.flexunit.async.Async;
        public class TimerUtil
            private static var instance:TimerUtil;
            private var timer:Timer;
            private static const TIME_OUT:int = 1000;
            public static function newTimer() : void
                if (!instance) instance = new TimerUtil();
                instance.timer = new Timer(1000, 5);
                instance.timer.start();
                instance.waitForFifthTick();
            private function waitForFifthTick() : void
                Async.handleEvent(this, instance.timer, TimerEvent.TIMER, handleTimerTick, TIME_OUT);
            private function handleTimerTick ( evt:TimerEvent, eventObject:Object) : void
                if ( timer.currentCount == 5 )
                    // We are at the Fifth click, move on.
                else
                    Async.handleEvent(this, instance.timer, TimerEvent.TIMER, handleTimerTick, TIME_OUT);
    Message was edited by: zyellowman2
    I missed a comma.  And a few "instance"s

    Yes, you can put async calls in utility classes or wherever you want. That isn't the issue here though.
    In your test you call TimerUtil.newTimer()
    That code creates a timer and then returns. Then your test returns. At that moment, FlexUnit sees that your test has finished and that there are no outstanding registered asynchronous events so it declares the test a success. Then, a second later, your other method executes and tries to register an async call. FlexUnit has no idea what test this pertains to, or why this call is being made as it is no longer in the context of the original test, hence the message you are receiving that you can only using Async calls inside of a method marked with a Async... as, in FlexUnit's opion, the method that is executing this code no longer has anything to do with a test with an async param.
    The best way to think about this is a chain that cannot be broken. As soon as a method finishes executing with, FlexUnit will declare it a success unless we are waiting on something else (an async event of some sort) That is what the Async syntax really does, it tells the framework not to declare this method a success just yet, and that there is something else we need to account for to make that decision.
    So, right now, in your newTimer() you don't let the framework know that you will be waiting for an async event. Therefore, when that method and the test method is over, so is the test.
    Mike

  • Cancelling an async call in parallel flow activity

    Hi all,
    As known, each branch of a parallel flow activity must be completed for rest of the BPEL execution continues. Let me expose a scenario:
    Imagine you need to get the current market value of the euro. You have 3 different sources of information that deliver the same result. Using parallel flow activity, you perform calls to these 3 sources. Once the first source calls back, it´s not necessary to wait for the others callback, because you already have the information that you need in your hands. How can I cancel the other waiting async calls? In WLI, we set up the parallel flow as AND or OR type. Using AND (+) means that all branch must be completed so that the process continues. Using OR (-) means that once the first branch is finished, the others will be ignored (cancelled) and the process continues. How can I get the same feature in BPEL?

    Hi Gustavo,
    There may be easier way to do this, but somehow it's not striking at the moment. In the meantime, you can try the following and see. If i get more robust and easier solution, i'll post it here.
    Just thinking aloud here:
    1) Throw a fault e.g. ResponseRecieved in each branch as soon as the branch recieves a response. The fault has to be handled in a fault handler associated with a scope containing the parallel flow. You can leave the fault handler "empty" (no-oos) and proceed with the rest of the activities.
    The above should allow the control to proceed with the activities next to the flow.
    OR
    2) In each flow, as soon as you receive a response after receive activity, invoke a callback port type of the rest of the asynchronous calls and send a dummy callback message. This should mark the completion of the receive activities in other branches. I think correlaiton needs to be handled here.
    Please try if you have not already done so and let me know.
    Thanks-
    www.ibiztrack.com
    BPEL/ESB Training:
    http://www.ibiztrack.com/html/oracle-bpel-soa-training.html

  • Async call gets stuck with pending status

    Hi,
    I am working on Tasklayer where need to invoke Async. call, the .bpel file has Invoke activity and below that it has pick activity with branches one for OnMessage and another is also OnMessage but, this is for fault. Now, when it invokes the Async. what i see in the instance is that the OnMessage activity gets stuck in Pending status, it doesn't proceed further. Kindly let me know if any one has faced similar issue.
    Thanks & Regards,
    Sanjay

    Hi Sanjay,
    you are saying that u r calling an asyc process.
    So as an async process do not send the response back to parent through same port, you have to send the fault back to parent by invoking it(parent).
    Here you can send the fault by using existing callback port otherwise you can define separate port for fault can send through that(you have to do it in WSDL).
    So here for the first case no need to have the pick as u r getting both success and fault through same port. If you are going for separate one you have to have pick(one for success and other for faulted one)
    So as Steven said you have to have a catch and invoke to send the fault back to parent.
    Regards
    PavanKumar.M

  • BPEL Async call with wait

    I have requirement to make a bpel async call to webservice . As part of the requirement we need to wait for specified amount of time and re-request if no response is received. And finally error out after 3 attempts.
    So it is really a 'sync call' with a wait period
    Any suggestions as how this could be implemented ?

    ok set the http read timeout.If you dont recieve the response within the time set in http read timeout property it throws an error invoke the process from catch all block.
    otherwise use fault polices to retry invocation and set the http read time out property

  • Async call using ICallBack

    hi, In an Async call, there is a ICallBack interface, which is having a init(ODIInformationObj),
    handleCallBack(long pElapsedTime)
    handleFaultCallback(long pElapsedTime,Exception pException).
    can u pls help me how to invoke the handleCallBack() method, or else
    it will be invoked internally through the Thread call.
    pls suggest me to post the Message via(DirectConnection) and get back the operation information to an ODIService.
    Note:
    I have this code:
    Message xmlMessage = XMLMessageFactory.getInstance().createMessage(payload1);
    payload1="<ns1:ODIInvokerServiceResponse " + " xmlns:ns1=\"http://xmlns.oracle.com/ODIService\">\n" +
    "<ns1:odiPlan> " + pOdiPlanName + "</ns1:odiPlan>\n" +
    "<ns1:elapsedTime> " + pElapsedTime +
    " </ns1:elapsedTime>\n" +
    " </ns1:ODIInvokerServiceResponse>";
    getting Direct connection using:
    DirectConnection directconnection =
    loc.createDirectConnection(compositeDN,
    "MasterBPELProcessDirect");
    Sending Message like:
    directConnection.post(pOperation, pNm);

    You Might Try tapping the Home button and see what that does,  Do it on a Test call with one of your Relative or Friend's so they know that when you tap the button and if it happens to end the call they won't be concerned because it was a test Call..
    Hope that helps b33

  • Defining Multiple operations for async calls in OSB

    Hi,
    I have three Asynchronous BPEL processes- BPELProcessA, BPELProcessB and BPELProcessC
    I am trying to invoke BPELProcessB and BPELProcessC from BPELProcessA through an OSB Proxy service. I want to use a single proxy service to make calls to BPELProcessB and BPELProcessC from BPELProcessA . To do this I defined multiple operations in the wsdl of the proxy service. This is not working
    But I am able to implement the following
    1. If BPELProcessB and BPELProcessC are Synchronous, I am able to invoke BPELProcessB and BPELProcessC by defining multiple operations in the proxy service wsdl
    2. I am able to invoke and receive response from 1 Asynchronous BPEL process by defining 1 operation in the proxy service wsdl. I followed the approach described at [http://download.oracle.com/docs/cd/E13159_01/osb/docs10gr3/bpelpmtransport/transport.html#wp1111338]. Does this mean for each asynchronous BPEL, I need a separate pair of OSBs for each async process ( 1 for request and 1 for callback)?
    Has anyone tried invoking multiple asynchronous processes by defining multiple operations in the wsdl?
    Kindly request every to give inputs

    Hi Eric
    Below is the flow and error we are getting:
    ProcessA is calling ProcessB and ProcessC through common OSB. In OSB we have created individual business services for ProcessB and ProcessC.I am using common Proxy service for calling these two Business Services using different operations.I have created one callback business service and Proxy service for ProcessA.
    I am successfully able to call BPEL processes, ProcessB and ProcessC, but during callback client activity these two BPEL processes are failing with below error and ProcessA is going in waiting on receive activity state:
    nested exception is:ORABPEL-00000
    Exception not handled by the Collaxa Cube system.
    An unhandled exception has been thrown in the Collaxa Cube system. The exception reported is: "ORABPEL-08010
    Failed get operation definition.
    Failed to get the WSDL operation definition of "onResult" in portType "{http://xmlns.oracle.com/AsyncBPELProcess}AsyncBPELProcessCallback".
    Please verify that operation "onResult" is defined in portType "{http://xmlns.oracle.com/AsyncBPELProcess}AsyncBPELProcessCallback".
         at com.collaxa.cube.ws.wsdl.WSDLUtils.getOperation(WSDLUtils.java:216)
         at com.collaxa.cube.ws.wsdl.WSDLUtils.getOperation(WSDLUtils.java:208)
         at com.collaxa.cube.ws.wsdl.WSDLManager.isOneWayOperation(WSDLManager.java:517)
         at com.collaxa.cube.engine.core.BaseCubeProcess.getOperationType(BaseCubeProcess.java:735)
         at com.collaxa.cube.engine.delivery.DeliveryHandler.getOperationType(DeliveryHandler.java:778)
         at com.collaxa.cube.engine.delivery.DeliveryHandler.post(DeliveryHandler.java:71)
         at com.collaxa.cube.ws.WSIFInvocationHandler.invokeLocalService(WSIFInvocationHandler.java:1338)
         at com.collaxa.cube.ws.WSIFInvocationHandler.invoke(WSIFInvocationHandler.java:287)
         at com.collaxa.cube.ws.WSInvocationManager.invoke2(WSInvocationManager.java:528)
         at com.collaxa.cube.ws.WSInvocationManager.invoke(WSInvocationManager.java:248)
         at com.collaxa.cube.engine.ext.wmp.BPELInvokeWMP.__invoke(BPELInvokeWMP.java:829)
         at com.collaxa.cube.engine.ext.wmp.BPELInvokeWMP.__executeStatements(BPELInvokeWMP.java:412)
         at com.collaxa.cube.engine.ext.wmp.BPELActivityWMP.perform(BPELActivityWMP.java:199)
         at com.collaxa.cube.engine.CubeEngine.performActivity(CubeEngine.java:3714)
         at com.collaxa.cube.engine.CubeEngine.handleWorkItem(CubeEngine.java:1657)
         at com.collaxa.cube.engine.dispatch.message.instance.PerformMessageHandler.handleLocal(PerformMessageHandler.java:75)
         at com.collaxa.cube.engine.dispatch.DispatchHelper.handleLocalMessage(DispatchHelper.java:220)
         at com.collaxa.cube.engine.dispatch.DispatchHelper.sendMemory(DispatchHelper.java:317)
         at com.collaxa.cube.engine.CubeEngine.endRequest(CubeEngine.java:5787)
         at com.collaxa.cube.engine.CubeEngine.createAndInvoke(CubeEngine.java:1089)
         at com.collaxa.cube.engine.delivery.DeliveryService.handleInvoke(DeliveryService.java:589)
         at com.collaxa.cube.engine.ejb.impl.CubeDeliveryBean.handleInvoke(CubeDeliveryBean.java:421)
         at sun.reflect.GeneratedMethodAccessor75.invoke(Unknown Source)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:585)
         at com.evermind.server.ejb.interceptor.joinpoint.EJBJoinPointImpl.invoke(EJBJoinPointImpl.java:35)
         at com.evermind.server.ejb.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:119)
         at com.evermind.server.ejb.interceptor.system.DMSInterceptor.invoke(DMSInterceptor.java:52)
         at com.evermind.server.ejb.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:119)
         at com.evermind.server.ejb.interceptor.system.JAASInterceptor$1.run(JAASInterceptor.java:31)
         at java.security.AccessController.doPrivileged(Native Method)
         at javax.security.auth.Subject.doAs(Subject.java:396)
         at com.evermind.server.ThreadState.runAs(ThreadState.java:695)
         at com.evermind.server.ejb.interceptor.system.JAASInterceptor.invoke(JAASInterceptor.java:34)
         at com.evermind.server.ejb.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:119)
         at com.evermind.server.ejb.interceptor.system.TxRequiredInterceptor.invoke(TxRequiredInterceptor.java:50)
         at com.evermind.server.ejb.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:119)
         at com.evermind.server.ejb.interceptor.system.DMSInterceptor.invoke(DMSInterceptor.java:52)
         at com.evermind.server.ejb.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:119)
         at com.evermind.server.ejb.InvocationContextPool.invoke(InvocationContextPool.java:55)
         at com.evermind.server.ejb.StatelessSessionEJBObject.OC4J_invokeMethod(StatelessSessionEJBObject.java:87)
         at CubeDeliveryBean_LocalProxy_4bin6i8.handleInvoke(Unknown Source)
         at com.collaxa.cube.engine.dispatch.message.invoke.InvokeInstanceMessageHandler.handle(InvokeInstanceMessageHandler.java:37)
         at com.collaxa.cube.engine.dispatch.DispatchHelper.handleMessage(DispatchHelper.java:141)
         at com.collaxa.cube.engine.dispatch.BaseDispatchTask.run(BaseDispatchTask.java:58)
         at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:651)
         at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:676)
         at java.lang.Thread.run(Thread.java:595)
    Exception: ORABPEL-08010
    Failed get operation definition.
    Failed to get the WSDL operation definition of "onResult" in portType "{http://xmlns.oracle.com/AsyncBPELProcess}AsyncBPELProcessCallback".
    Please verify that operation "onResult" is defined in portType "{http://xmlns.oracle.com/AsyncBPELProcess}AsyncBPELProcessCallback".
    Handled As: com.collaxa.cube.CubeException

  • BPEL async calls OSB which calls BPEL async

    In this scenario, I use the bpel-10g transport with an opmn ULR to call the back-end BPEL process. The bpel-10g transport seems to be the only way to include the callback address. I'm getting an error like this:
    <fault><remoteFault xmlns="http://schemas.oracle.com/bpel/extension"><part name="summary"><summary>exception on JaxRpc invoke: HTTP transport error: javax.xml.soap.SOAPException: java.security.PrivilegedActionException: javax.xml.soap.SOAPException: Message transmission failure, response code: 500</summary>
    </part></remoteFault></fault>
    What must be done to correctly connect the back-end async BPEL process from OSB?
    Are there any tricks which must be used to connect the front-end async BPEL process to the OSB as well?
    I'm using OSB 10gR3 and BPEL 10.1.3.4.

    Hi ,
    Please provide us solution to resolve this issue..
    Any Updates or clues ...............

  • Async Call to BPEL

    I have a basic process, and trying to call it ansynchronously. The process works well when I invoke with the syncronous call, however it cannot get the input I provide ( a single string) with the asyncrounous call. For the error I see that the only difference between syncronous and the async one is the 'xmlns=""in the'most inner element of the XML (input). The namespaces are exaclty the same in both approaches, however the latter approach, which does not work, adds that namespace definition by its own. Is there a way to fix the problem?
    Siyamed

    Hi,
    There is no exception printed on the BPEL Server console. The only error is being captured by the SOAP Monitor when it throws a SOAP exception.
    However, when i tried to remove the WS Addressing information from the SOAP header, it works.
    //super( SERVICE_NAME, PORT_TYPE , OPERATION_NAME , SOAP_ACTION, STYLE, SERVICE_PARAMETERS, messageID, replyTo);
    super( SERVICE_NAME, PORT_TYPE , OPERATION_NAME , SOAP_ACTION, STYLE, SERVICE_PARAMETERS,null,null);
    I am very interested to know how you manage to invoke the process as well as handling the callback from the process. If possible could you share your codes with me.
    Also I'm quite suspicious about my BPEL and WSDL scripts. Maybe the problem lies in these 2 files only. Can anyone help to verify if there is anything i need to do for the callback portion to work?
    --------------Asyn.bpel--------------
    <process name="Async" targetNamespace="http://acm.org/samples" suppressJoinFailure="yes" xmlns:tns="http://acm.org/samples" xmlns="http://schemas.xmlsoap.org/ws/2003/03/business-process/" xmlns:bpelx="http://schemas.oracle.com/bpel/extension" xmlns:ora="http://schemas.oracle.com/xpath/extension" xmlns:EchoWS="http://192.168.16.161:9090/sp/services/EchoWS" xmlns:services="http://services.otn.com" xmlns:autoloan="http://www.autoloan.com/ns/autoloan" xmlns:AxisLoan="http://192.168.16.161:9090/sp/services/AxisLoan">
         <partnerLinks>
              <partnerLink name="client" partnerLinkType="tns:Async" myRole="AsyncProvider" partnerRole="AsyncRequester"/>
              <partnerLink name="AxisLoan" partnerRole="LoanServiceProvider" partnerLinkType="services:LoanServiceLink" myRole="LoanServiceRequester"/>
              <partnerLink name="EchoWS" partnerLinkType="EchoWS:EchoWSLink" partnerRole="EchoWSProvider"/>
         </partnerLinks>
         <variables>
              <variable name="input" messageType="tns:AsyncRequestMessage"/>
              <variable name="output" messageType="tns:AsyncResponseMessage"/>
              <variable name="in--1" messageType="services:LoanServiceRequestMessage"/>
              <variable name="out--1" messageType="services:LoanServiceResultMessage"/>
              <variable name="in" messageType="EchoWS:methodStr1Request"/>
              <variable name="out" messageType="EchoWS:methodStr1Response"/>
         </variables>
         <sequence name="main">
              <receive name="receiveInput" partnerLink="client" portType="tns:Async" operation="initiate" variable="input" createInstance="yes"/>
              <assign name="assign-1"><copy>
                        <from>
                             <loanOffer xmlns="http://www.autoloan.com/ns/autoloan">
                                  <providerName>anthonychong</providerName>
                                  <selected>True</selected>
                                  <approved>True</approved>
                                  <APR>10.0</APR>
                             </loanOffer>
                        </from>
                        <to variable="output" part="payload" query="/autoloan:loanOffer"/>
                   </copy>
              </assign>
              <invoke name="callbackClient" partnerLink="client" portType="tns:AsyncCallback" operation="onResult" inputVariable="output"/>
         </sequence>
    </process>
    ------------Async.wsdl----------------
    <?xml version="1.0"?>
    <definitions name="Async"
    targetNamespace="http://acm.org/samples"
    xmlns:tns="http://acm.org/samples"
    xmlns:plnk="http://schemas.xmlsoap.org/ws/2003/05/partner-link/"
    xmlns="http://schemas.xmlsoap.org/wsdl/"
              xmlns:s1="http://www.autoloan.com/ns/autoloan"
    >
    <types>
              <schema attributeFormDefault="qualified" elementFormDefault="qualified"
    targetNamespace="http://www.autoloan.com/ns/autoloan"
    xmlns="http://www.w3.org/2001/XMLSchema">
    <element name="loanApplication" type="s1:LoanApplicationType"/>
    <element name="loanOffer" type="s1:LoanOfferType"/>
    <complexType name="LoanOfferType">
    <sequence>
    <element name="providerName" type="string"/>
    <element name="selected" type="boolean"/>
    <element name="approved" type="boolean"/>
    <element name="APR" type="double"/>
    </sequence>
    </complexType>
    <complexType name="LoanApplicationType">
    <sequence>
    <element name="SSN" type="string"/>
    <element name="email" type="string"/>
    <element name="customerName" type="string"/>
    <element name="loanAmount" type="double"/>
    <element name="carModel" type="string"/>
    <element name="carYear" type="string"/>
    <element name="creditRating" type="int"/>
    </sequence>
    </complexType>
    </schema>
    </types>
    <message name="AsyncRequestMessage">
    <part name="payload" element="s1:loanApplication"/>
    </message>
    <message name="AsyncResponseMessage">
    <part name="payload" element="s1:loanOffer"/>
    </message>
    <portType name="Async">
    <operation name="initiate">
    <input message="tns:AsyncRequestMessage"/>
    </operation>
    </portType>
    <portType name="AsyncCallback">
    <operation name="onResult">
    <input message="tns:AsyncResponseMessage"/>
    </operation>
    </portType>
    <plnk:partnerLinkType name="Async">
    <plnk:role name="AsyncProvider">
    <plnk:portType name="tns:Async"/>
    </plnk:role>
    <plnk:role name="AsyncRequester">
    <plnk:portType name="tns:AsyncCallback"/>
    </plnk:role>
    </plnk:partnerLinkType>
    </definitions>
    Tks.
    --Anthony                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • BAPI_GOODSMVT_CREATE multiple call without commit

    Hi everybody,
    I want to create several goods movements, but only all together. Thats why I try to call up BAPI_GOODSMVT_CREATE several times and only want to commit at the end. In a test program, it works fine, but in my transaction, I get the error 'MB_GOODS_MOVEMENT... can't be called twice(something like that)'.
    Has anybody an idea?
    Thanks in advance for yr reactions
    Volker

    Hello Ravinder,
    thanks for yr answer, but I just created another test program and it obviously is not possible to call the bapi several times without commit. I don't know why in the other case it was possible but unfortunately I have no time to verify.
    Thanks to all
    BiBi
    Volker

  • Tuxedo Client using async calls... hangs sometimes!

    Hello, I've noticed a fancy behaviour on Tuxedo Client applications...
    I wrote an application which receives multiple connections on a socket and dispatches messages to a server with asynchronous calls, then receives asynchronous notifications. Of course it can send multiple async requests before getting a notification.
    It seems that when I send an async request, and then I send another async request without getting the reply to the previous one first, the system hangs...
    The call stack is quite clear... and I can see on the unix message queue an outstanding message..
    I've used the TPU_DIP method, because none of the other unsolicited flavours works:
    TPU_SIG: Hangs because malloc can be interrupted by a signal, and within the unsol handrel a tpalloc (which in turn calls malloc) is called, and a kernel spinlock is locked
    TPU_THREAD: Hangs exactly in the same way ad TPU_DIP, but on a different thread...
    Does anyone knows how to solve this HUGE issue? Thanks in advance!
    Marco Romagnuolo
    0 0x3000403abc8 in _tmmsgrcv(...) in /usr/tuxedo/bea/tuxedo8.1/lib/libtux.so#1 0x3000405e650 in _tmrcvunsol(...) in /usr/tuxedo/bea/tuxedo8.1/lib/libtux.so
    #2 0x3000405d2f8 in tpchkunsol(...) in /usr/tuxedo/bea/tuxedo8.1/lib/libtux.so
    #3 0x3000405e480 in _tmchk4unsol(...) in /usr/tuxedo/bea/tuxedo8.1/lib/libtux.so
    #4 0x30004036ee4 in _tmatmienter(...) in /usr/tuxedo/bea/tuxedo8.1/lib/libtux.so
    #5 0x30004022944 in tpallocinternal(...) in /usr/tuxedo/bea/tuxedo8.1/lib/libtux.so
    #6 0x300040226f0 in tpalloc(...) in /usr/tuxedo/bea/tuxedo8.1/lib/libtux.so

    I need asynchronous notifications for their particular behaviour: they are notified as soon as they arrive through signals ot through a thread handled by Tuxedo itself.
    Now I've changed the policy of the process to use tpgetrply, but I have to poll in order to make it work, and it is UGLY.... anyway... anything else doesn't seem to work

  • How to do Async call in OSB message flow

    I am calling a service from OSB layer synchronously and when this service gives a response, I am forming another request with this response and storing it in a variable now I want to call another service asynchronously by using this variable. Service call out is not supporting one way call.
    Please suggest a suitable way to do this.

    Use publish action. It is designed fire and forget type of use-cases
    http://download.oracle.com/docs/cd/E13159_01/osb/docs10gr3/userguide/modelingmessageflow.html
    Manoj

  • Pop up dialog async call and forget

    Hello,
    I do not really have experience with dynamic VI calls, so I would like to ask for some help.
    Here is a (screenshot only) part of my MAIN VI, where I call a pop-up dialog VI using the "dynamic call and forget" method:
    I only pass one reference into this VI, the ref of the pop-up button, so when the user closes the pop-up window, I re-enable this button on the MAIN front panel. This pop-up dialog functions as a Graph monitor, it can update its Graph using an ActionEngine which is a buffer. So please ignore the missing type defs and the ActionEngines, they are not relevant in this case. Find this pop-up dialog attached.
    Actually my application just works, I only started to get some problems since when I included the "MGI Save & Restore Settings.vi" in this pop-up dialog, in order to save Graph settings to a config file (the application will be used as a built exe). When I close the pop-up VI, I can see the Graph settings are properly saved into the *.ini file under the "Documents" folder. However, when this file exists already, and I call this pop-up VI, I get the following error (so when the MGI VI is fired with the "Restore" action at the beginning of my dialog VI):
    I have three questions:
    What I do is it OK? I mean to pop-up such dialog, is it OK to use the "call and forget" method?
    When the user closes the panel of the pop-up VI, does it stay in the memory? Do I have a memory leak, or it closes properly? (I think not...)
    I do not understand the error produced by the MGI Toolkit VI, it has something to do with the dynamic call method? I even feed it with the static VI reference of the pop-up VI itself. Before I tried the "This VI" reference constant, but getting same error.
    Edit1: hmm, maybe the MGI toolkit is not compatible with Graphs with multiple Y-axis?..I will test it...
    Solved!
    Go to Solution.
    Attachments:
    popup_Graph_dialog.vi ‏46 KB

    Sam_Sharp wrote:
    A few points I noticed:
    - Using the call and forget method for launching custom dialogues is fine and something I do quite often - you just need to make sure that your called VI will shutdown correctly when your application closes (if they leave the dialogue open and close the software, for example)
    If you have a look at the attached VI, if the user closes the FrontPanel by the "cross at top right", the VI will finishes running, yes? If this dialog is open when the user closes the top level MAIN VI, how should I check it and close the pop-up VI? I could maybe check if the dialog is open via an invoke node? So maybe the best would be not to close the VI Reference after the dynamic call, but store it in a shift register, so I can use it later...hmm, I am not sure what is the most simple thing here...
    - I usually use a Strictly Typed Static VI reference (right click the Static VI Reference) for getting the name/path and the VI Type Specifier - it makes sure that your ACBR node always matches the VI you're calling and cleans up the block diagram slightly
    I will try this.
    - The references you're passing into the MGI functions: "This VI" is definitely the right reference to use as it returns the reference to the clone/instance of the VI that's running rather than a Static VI reference which refers to the Original VI. In your case you can only have one instance of the VI running (because it is non-reentrant) so I don't think it matters here (but I'm not sure?!). I think this will fix the issues with the MGI functions.
    Hmm, me neither sure what is going on But I already used the "This VI" constant, and the error was the same. Anyway, I try again, maybe I cannot remember
    - I also suspect an issue around closing the VI reference after the ACBR node and having a non-reentrant VI but I usually use reentrant VIs and allow multiple calls so I'm not exactly sure of what happens in the non-reentrant case.
    As the first point, I will only close this ref when I quit the MAIN application.
    Thanks for the suggestions! I will post back. (i hope using bold is OK

  • Async call in OSB

    Hi,
    Our requirement is when the front end calls the proxy service, the proxy service should call the back end web service and give the response to front end service, This can be achieved.
    But the other requirement is in case if the back end service is down .. we need to keep on retrying till the back end is UP and then send the response back to front end(Or we can send the response when the front end calls again) . But the front end will not wait for the response. Front end will fire and forget. its proxy service responsibility to keep on trying for the back end service to be up and store/send the response to front end.
    Can we achieve this in OSB 11g? Or we need to go for BEPL.
    Please post the steps to achive this.

    As already being stated by @vladodias, OSB is better fit for stateless designs. If you need to keep the response until a later poll comes, you may be better off with BPEL.
    But not necessary.
    Consider this design:
    1. Front end calls OSB.
    2. OSB generates an unique token for the request and saves this request into an JMS queue. The token is stored into a header.
    3. OSB returns the token to the caller. Caller saves it locally for future poll and closes the connection.
    4. A JMS proxy transactionally reads the message from the queue (along with the token) and calls the backend service.
    5. If the backend service is down, the transaction is rolled back, and the message is returned back to the queue for retry later (retry period is configured on the queue).
    6. If the backend is up, the message is placed into a persistent storage using the token as a key. The storage is not JMS queue, because OSB proxies cannot programmatically read queues with filter, and also cannot read the queues on demand. So the store should be a database. (You cannot use disk as a store in a cluster unless the disk is also shared).
    7. Front end calls OSB with the token.
    8. OSB checks the persistent store and, if the response with the given token is found, sends it back to the the caller.
    Now, you may notice that front-end always initiates the call, i.e. there is no callbacks. I do not like callbacks in OSB designs, makes a mess when you get more than one consumer. However, you may implement it, too -- i.e in step 6, instead of persisting the message, just do an outbound call to the front-end application.
    Also, this design is always asynchronous. You may improve it by trying to do a synchronous call to backend first, and only if it is down, switch into asynchronous mode.
    P.S. If you're not familiar with using JMS/transactions with OSB, read my post: Transactions in OSB. Reliable Messaging.
    P.P.S. You can also use JMS queue as a persistent store for the responses, but then you'll have to use a Java callout that connects to the queue with a filter (by token) to extract the only message.

  • Call sync BPM from Async BPM - issue

    Hi,
    Outline: I'm trying to call a synchronous BPM from an asynchronous BPM in a PI 7.0 SP 14 system.
    When doing so i get the following error: Object CL_SWF_XI_MSG_BROKER method SEND_SYNCHRON cannot be executed.
    Now this is an oldie when searching the forums for this error message. I do however fail to see a solution to the problem.
    Note that the following notes (referred to in similar posts)
    - 710445
    - 718734
    - 830803
    are implemented since theese refer to older versions of PI.
    My scenario is very simple at present since i've startet from scratch again after getting the error. So what i do is:
    1) send async message to async BPM
    2) async BPM receives request
    3) async bpm transform request til sync_request.
    4) async BPM calls synchronous BPM
    5) sync BPM receives request and opens a async/sync bridge
    6) sync BPM maps request to response
    7) sync BPM sends response and closes async/sync bridge
    8) async BPM reveices sync_response
    9) async BPM sends sync_response to some application
    Now step 8 i never succesfully executed. Instead the error earlier described is triggered.
    For simplicity i use 1 and only 1 message type in all message interfaces. I have mapping between my synchronous interfaces outside of BPM.
    The synchronus BPM is executed just fine. The only issue is getting the reponse back to the asynchronous BPM.
    I am familiar with the following similar posts:
    - Object CL_SWF_XI_MSG_BROKER method SEND_SYNCHRON cannot be executed
    - Problem in posting the data in the syncronous mode
    but find them to be of no use.
    Hope someone can help.
    Best Regards,
    Daniel

    Daniel Hans Engsig-Karup wrote:First you do not need any bridges if it is asyn/sync kind of a scenario in the second BPM. You need a bridge when the bpm has to wait with a sync call coming in and response in an async call. Essentially your BPMs (I donno why you need 2.. but let us go with 2)
    >
    >
    > 1) send async message to async BPM
    > 2) async BPM receives request
    > 3) async bpm transform request til sync_request.
    > 4) async BPM calls synchronous BPM
    > 5) sync BPM receives request                        
    (Remove this if you are calling a sync system here) and opens a async/sync bridge
    > 6) sync BPM maps request to response
    > 7) sync BPM sends response
    Remove this and closes async/sync bridge
    > 8) async BPM reveices sync_response
    > 9) async BPM sends sync_response to some application
    >
    VJ

Maybe you are looking for

  • XP no longer shows up as a startup disk

    After upgrading to leopard today, my XP partition no longer shows up as a startup disk. I had/have my windows partition on it's own drive that was NOT created with bootcamp. I pulled my osx disk from the my mac pro and installed windows on the disk i

  • Need solution for removing Bold format in HR payslip

    Dear all, The HR pay slip is developed using pE51 & thailand country version. I am calling a standard program HTHCEDT0.   The bold is being printed from the standard program HTHCEDT0 . Iam using remuneration statement program HTHCEDT0 to print. Which

  • Lay-out tip(s) for those who dislike FF29 and want a classic (minimal) lay out

    Okay, I really really dislike the FF 29 layout and use of it. For me it makes no sense at all and find it also butt ugly. So did some searching and experimenting and thought I shared my finding so maybe others with the same opinion/feelings can benef

  • Iphone wifi anttena dammaged

    I have an iPhone 4s and recently it stopped being able to conncet to wirless internet.  I have already tourbleshooted and have determined it is not my wifi router.  All other iphones and devices in the home can connect to it like normal.  It will not

  • [SOLVED]Status of BOINC

    Any particular reason boinc-nox 7.2.42-1 in the Official repositories doesn't install boincmgr GUI manager as described in BOINC wiki? Any particular reason boinc-git in AUR (orphan) doesn't compile? Has BOINC fallen out of favor? Was thinking of giv