Topic
4 replies Latest Post - ‏2013-01-29T14:15:20Z by kenhygh
SystemAdmin
SystemAdmin
6772 Posts
ACCEPTED ANSWER

Pinned topic Transaction Id for request generated by Results Asynchronous

‏2013-01-24T08:10:24Z |
I have a particular scenario where I have to receive a request from client and send back response immediately as an acknowledgement. In the response rule back to the client I fire off a new request to Datapower using Results Asynchronous. I can easily get the transaction id for the current transaction. What I also need is the transaction id of the new request in this response rule to be sent back with the acknowledgement.
Updated on 2013-01-29T14:15:20Z at 2013-01-29T14:15:20Z by kenhygh
  • kenhygh
    kenhygh
    1308 Posts
    ACCEPTED ANSWER

    Re: Transaction Id for request generated by Results Asynchronous

    ‏2013-01-24T10:57:45Z  in response to SystemAdmin
    I don't think you're going to get a transaction ID for a transaction that has not yet started.

    If you need some kind of identifier that follows a request through various services, the typical solution is to inject a header of some sort. I often use DataPower's generate-uuid() function to create a UUID, then put it in a header. Downstream services and systems can then output that header in their logs for traceability.

    Ken
    • SystemAdmin
      SystemAdmin
      6772 Posts
      ACCEPTED ANSWER

      Re: Transaction Id for request generated by Results Asynchronous

      ‏2013-01-29T13:44:37Z  in response to kenhygh




      server ----> Results Async ----> Transformation -----> Client






      The processing rule for the response contains the above in the sequence as shown. I hope to get the transaction Id since I am firing off the new request in the Results Async block before generating the acknowledgement in the Transformation block. Is there a chance if this is the case? :)
      • kenhygh
        kenhygh
        1308 Posts
        ACCEPTED ANSWER

        Re: Transaction Id for request generated by Results Asynchronous

        ‏2013-01-29T14:15:20Z  in response to SystemAdmin
        Get the current transaction id, no problem. Get the transaction id of the transaction called by the results async, no way.

        Ken
  • msiebler
    msiebler
    140 Posts
    ACCEPTED ANSWER

    Re: Transaction Id for request generated by Results Asynchronous

    ‏2013-01-24T10:57:55Z  in response to SystemAdmin
    There isn't a way to get that; so I am not sure if this is the best way to solve your problem.
    Also; be careful when using async actions; it is an easy way to make the DataPower box run OoM (outofmemory)
    You need to use SLM to manage the number of total concurrent async actions