IBM webMethods Hybrid Integration

IBM webMethods Hybrid Integration

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

Manipulating two doctypes at same time

  • 1.  Manipulating two doctypes at same time

    Posted Wed March 13, 2002 04:55 PM

    X-Application Version: 3.1.1
    Tamino Version : 3.1.1
    Platform : Win2k
    WebContainer : Tomcat 3.3a
    JDK Version : 1.3.1_02


    Hi all,

    I need to create another document, as a log, when the user create a new document using the JSP environment.

    The “log” document is in the same collection.

    How can I do this?

    Frederico


    #Tamino
    #webMethods
    #API-Management


  • 2.  RE: Manipulating two doctypes at same time

    Posted Wed March 13, 2002 09:34 PM

    Hello Frederico,

    you could try the following:

    • register the second schema in the web.xml configuration file (see documentation, chapter “Extended Tutorial Using Multiple Schemas”
    • use a document name for your “main” document (if not, current is implicitly used)
    • on the create page of the main document you need to create the second document using <bdm:directcommand type=“create” schema=“theLogSchema” document=“logDocument”/>.
    • in the commit action you need to include both documents in one transaction.
      Use <bdm:action type=“commit” form=“form1” document=“logDocument,mainDocument”>…link …</bdm:action>
    • you could use the JSP Logging facility (introduced with X-Application 3.1.2) to check on runtime for created documents, their document names, …

    Check the

    • Documentation chapter “Working with Multiple Document Instances in one Application” => “Creating Multiple Documents” for the creation of multiple documents
    • Invoice example (xappdir/examples/jsp/invoice/modify.jsp) for the commit action of multiple documents

    Tell me, if you don´t succeed (or if you succeed :wink: )

    Regards, Harald


    #webMethods
    #Tamino
    #API-Management


  • 3.  RE: Manipulating two doctypes at same time

    Posted Thu March 14, 2002 05:47 PM

    Thank you very much, Harald.
    Everything is working fine.

    Best regards,
    Frederico


    #webMethods
    #Tamino
    #API-Management


  • 4.  RE: Manipulating two doctypes at same time

    Posted Fri March 15, 2002 08:57 PM

    Hi again,

    When I try to create a “log” document at same time delete a “main” document the “log” elements are stored empty.

    There is a <bdm:directcommand type=“create” schema=“log” document=“documentoLog”/> in delete.jsp.

    In create.jsp and modify.jsp everything is ok.

    Frederico


    #webMethods
    #API-Management
    #Tamino


  • 5.  RE: Manipulating two doctypes at same time

    Posted Sat March 16, 2002 11:17 PM

    Hi Frederico,

    where do the values of the log document come from in case of create/modify?

    If you create a document e.g. via directcommand the document is expected to be empty.
    X-Application’s create command creates a new document and adds the mandatory structure of the document (== non optional elements) automatically .

    If you need to copy some data from the main document to the log document I see some possiblities:
    1. Use Javascript and 2 hidden fields
    2. Use JSP Code and X-Application´s Java API
    3. Encapsulate solution 2 in your own tag

    If you need some hints on these solutions I could give more details.

    Regards, Harald


    #API-Management
    #webMethods
    #Tamino


  • 6.  RE: Manipulating two doctypes at same time

    Posted Tue March 19, 2002 01:28 PM

    Hi Harald,

    I’m using possibilities 1 and 2 in create, modify and delete pages.
    All of them are creating a new “log document”.

    In create and modify everything is ok, but on delete the “log document” created is empty.

    Any idea?
    Frederico


    #API-Management
    #Tamino
    #webMethods


  • 7.  RE: Manipulating two doctypes at same time

    Posted Tue March 19, 2002 02:21 PM

    Hi Frederico,

    is it possible to post two jsp pages, e.g. modify.jsp and delete.jsp?
    You could zip them together and attach the zip file to a post reply.

    We could check, if we encounter any difference in the pages.

    Regards, Harald


    #webMethods
    #API-Management
    #Tamino


  • 8.  RE: Manipulating two doctypes at same time

    Posted Thu March 21, 2002 05:42 PM


  • 9.  RE: Manipulating two doctypes at same time

    Posted Fri March 22, 2002 12:00 PM

    Hello Frederico,

    the form is not submitted in the delete page. That meands the data is not sent in the request.

    I´ve attached a page delete.jsp that works within the /examples/jsp/invoice example. Just replace the existing delete.jsp.

    I´ve tested it with X-Application 3.1.2 and the default value fix.

    Changes done in this page:
    31:
    67: <a onMouseOut=“MM_nbGroup(‘out’);” ommit the href attribute

    156-161: directcommand and edit fields.

    Note: V3.1.2 checks that directcommand is placed inside a context tag. So you need to put the directcommand inside the form tag.

    Please check the jsp tag reference documentation xapplication_312/documentation/XApplication/jspref.htm#jsp1act for more information on that.

    Regards, Harald
    delete.zip (1.83 KB)


    #Tamino
    #webMethods
    #API-Management


  • 10.  RE: Manipulating two doctypes at same time

    Posted Fri March 22, 2002 01:37 PM

    Thank you very much, Harald.

    That’s work fine.

    Regards, Frederico


    #Tamino
    #webMethods
    #API-Management