webMethods

webMethods

Join this online group to communicate across IBM product users and experts by sharing advice and best practices with peers and staying up to date regarding product enhancements.

 View Only
Expand all | Collapse all

lastError/pipeline/doc1

  • 1.  lastError/pipeline/doc1

    Posted Thu April 06, 2006 05:11 PM

    Hi All,

    I wanted to set a document in sequence try block, to the ‘document’ parameter value of pub.document:documentToXMLString service in sequence catch block. To get the value of a variable var1 in the catch block we use %lastError/pipeline/var1%. How will it be done for a document?

    Thanks in advance.

    -Pauly


    #webMethods
    #Integration-Server-and-ESB
    #Flow-and-Java-services


  • 2.  RE: lastError/pipeline/doc1

    Posted Thu April 06, 2006 06:30 PM

    Pauly,

    I can’t understand what you are trying to do. Are you trying to place a copy of a document back into the pipeline in the catch block?

    Mark


    #webMethods
    #Flow-and-Java-services
    #Integration-Server-and-ESB


  • 3.  RE: lastError/pipeline/doc1

    Posted Thu April 06, 2006 06:35 PM

    Hi Mark,

    Thanks for your response. In the catch block, I need that document to be converted to an xml and attach to an email.

    -Pauly


    #webMethods
    #Integration-Server-and-ESB
    #Flow-and-Java-services


  • 4.  RE: lastError/pipeline/doc1

    Posted Thu April 06, 2006 09:01 PM


  • 5.  RE: lastError/pipeline/doc1

    Posted Thu April 06, 2006 10:07 PM

    Pauly,

    One of my clients approached this by developing a java service that would “recover” one or more variables from the lastError/pipeline.

    Basically, the java service accepts the lastError/pipeline document and one or more keys or variable names to restore. For each key, the java service gets the value from the lastError/pipeline document and inserts it back into the pipeline for the service.

    The “recovered” variables will not appear in the pipeline editor in Developer, but will exist in the pipeline and can be used in subsequent statements.

    Check PSUtilities to see if there is something helpful there.

    HTH,

    Mark


    #webMethods
    #Integration-Server-and-ESB
    #Flow-and-Java-services


  • 6.  RE: lastError/pipeline/doc1

    Posted Thu April 06, 2006 10:42 PM

    Pauly,

    Writing a java service as Mark suggested is one way of “recovering” the variables from lastError/pipeline, but if you don’t want to use a java service, you can simply achieve this by mapping.

    map [lastError/pipeline–>pipeline]
    map [pipeline/ → var]

    Here, in the second map step, create a document and indent it so that it becomes a child node inside pipeline, then map this document to whatever document you want. We are leveraging our knowledge of the fact that the ‘pipeline’ (extracted from lastError) contains the variable ‘document’ inside it at the runtime, its just that we don’t see it in the editor.

    HTH, Rohit


    #webMethods
    #Flow-and-Java-services
    #Integration-Server-and-ESB


  • 7.  RE: lastError/pipeline/doc1

    Posted Tue April 11, 2006 02:24 PM

    Hi Pauly,
    Agreed with Mark/Rohit,
    the way you are accessing variables in pipeline in catch block i.e. %lastError/pipeline/var1%
    Same way you can access the document — >
    %lastError/pipeline/document/var1%

    pipeline document in lastError contains all the data (name-value pair) till error occurs in try sequence.

    Regards,
    Puneet Saxena


    #webMethods
    #Flow-and-Java-services
    #Integration-Server-and-ESB


  • 8.  RE: lastError/pipeline/doc1

    Posted Wed April 12, 2006 05:37 PM

    Mark/Rohit/Puneet,

    Thank you so much. I did it as explained by Rohit and it worked.

    -Pauly


    #Flow-and-Java-services
    #Integration-Server-and-ESB
    #webMethods


  • 9.  RE: lastError/pipeline/doc1

    Posted Thu April 13, 2006 11:39 PM