Want to get rid of Google Ads, click here.
+ Reply to Thread
Results 1 to 3 of 3

Thread: Retrieve Rejection messages

  1. #1

    Question Retrieve Rejection messages

    Has anybody tried to do something similar:

    - I read XML input files and need to insert them in ServiceCenter
    - Some of these documents can not be processed because the data does not fit our functional requirements. I use the "PifRejectDocument" to reject the documents, but then the rejection messaghe gets written in the Connect-it logging.
    - I would like to be able to retrieve this rejection message without having to read the "hughe" CIT log file, so that in my original scenario i can use it to build a reply (xml) to be send to the creator of the xml file.

    Thank you

  2. #2
    Senior Member
    Join Date
    Apr 2006
    Location
    Poland
    Posts
    680

    Default

    The easiest way is to use EventFeedback look here:
    http://www.sc-resources.net/showthread.php?t=3545

    but it needs to write to eventin.

    There is an other possibility (might not work as I did not test it):
    - use global functions
    - create a mapping which uses the same source but writes to your file
    - if you need to do "PifRejectDocument" then set the global variable and some other in which you will store the id of the wrong document as well as its data
    - check for that global variable whether it is set or not in other mapping.

    It might not work - be warned.


    Well, at the end I think the best way is to use well configured monitors.

    regards
    Artur

  3. #3
    Senior Member
    Join Date
    Apr 2006
    Location
    Poland
    Posts
    680

    Default writing to your own log

    Hi,

    although I am not so old, but my memory seems to be not so good as it was years ago
    I knew I used to write to my own log - which is the solution to your problem.
    By accident I have found the good example in out of the box scenario.

    So every time you want to reject a document, you can write to your own log.
    At the end you can process it - even with ConnectIt

    Dim cmdStr as String
    Dim cmdFileStr as String

    cmdStr = [PROG_PATH] & "/common/bin/rds_agg.bat"
    cmdFileStr = [PROG_PATH] & "/logs/cit_cmd.log"
    open cmdFileStr For append As #2
    Print #2, "[PROG_PATH]= " & [PROG_PATH] & Chr(10)
    Print #2, "cmdStr= " & cmdStr & Chr(10)
    close #2

    retval = cmdStr

    Probably it is better to replace #2 with something like #220
    File handle number 2 might be not available.

    This is just example - but showing how to do it.
    Modify it to suit your needs.

    Regards
    Artur

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

     

Bookmarks

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts