Build applicatio​n based on queue message handler template

I programmed an application, using QMH template in LV and made a build out of it. The build has the "main.vi" and it is always included. But, after build is complete, the application starts by clicking on my apllication.exe and immediately terminate itself !!!! any idea about why? (I have one global function ("exit" which set to false at initialize state of the application" and shared variables, but both seem not the items to be blamed !!

I recently (about two years ago) started using the QMH fairly heavily, "re-inventing" my usage of it several times (that means taking a LabVIEW Real-Time project of several hundred VIs and almost "starting over").  I've attached a Demo Snippet to illustrate some Lessons Learned.
     First, an admission -- see all of those Queue wires?  I've gotten rid of most of them by using a Queue Action Engine that handles all of the Queue actions except Dequeue.  In place of the Obtain Queue, Enqueue, and Release Queue calls, I have a Message Queue VI that takes an Enum (Obtain, Enqueue, or Release) and (optional) inputs (such as the Element to Enqueue).  The only Queue wire in my diagram is the one from the call to Enqueue Initialize to the (necessary) Dequeue Element (but I don't need the Queue wire coming out of Dequeue Element as I use my VI instead of Release Queue).  Not only don't I need a Queue wire going into the parallel Event Handling loop, but I don't need a wire going into a sub-VI that needs to "send a Message", which makes spawning asynchronous parallel loops easy.
     You'll notice my Messages are Strings, not an Enum.  I'm a little conflicted here -- I like the "error-checking" feature of Enums, but especially when designing, it is so much easier to say "Hey, I need another State here to do this" and simply name it and add it.
     The Event Handling Loop, for the most part, should do nothing except generate a message, passing the Event New Value (if needed) as the Data part of the message.  In particular, the Exit message is just another Message -- it doesn't need to be "filtered out" for special handling.
     To stop all of the loops, I use a Local Shared Variable (you could use a Global or FGV/VIG as well) -- the TimeOut case in the Event Handling Loop wires this variable to the loop Stop, and as you can see, the Exit message sets it;
     You may notice the 500 msec timeout on the Dequeue -- this allows you to catch cases where no messages come in.  Here I "do nothing".  But you'll notice that this makes my Stop code work.  The User pushes Stop, generates an Event, calls the Stop Message, sets the Stop Shared Variable to True, but that (probably) does not stop the lower loop, as the earlier False value was probably read and "connected" to the Stop indicator when the loop was entered.  200 msec later, the Event Timeout fires, sees the Stop Shared Variable = True, and stops the Event loop.  After another 300 msec, the Dequeue times out, enters the True Case and does nothing, but now the Shared Variable is True and the lower loop stops.
     You are correct that if you want to do repetitive things with this model, you need to repeatedly call the State you want to run.  It depends how much of your code you want to put into a single QMH -- it might be just as simple to have yet another parallel loop do the same thing every 100 msec, and use the State Machine to handle the User Interface (I've done it both ways, depending on circumstances).
     Have fun!
BS

Similar Messages

  • How best to decouple the UI in the LV 2012 Queued Message Handler Template?

    If you create a new "Queued Message Handler" from the new LV 2012 Template, you'll see a blue box in the "Update Display" case which says the following:
    Code Recommended - If you wish to decouple the Message Handling Loop from your user interface, consider creating User Events (like the "Stop" event in this VI) to message the Event Handling Loop whenever the user interface needs updating.
    I'd like to give this suggestion a shot but I'm struggling to find the best way to do this and still keep the code modular.  The template creates a "User Event - Stop.lvlib" with Create/Destroy/Fire SubVI's.  I would like to create a similar "User Event - Update UI.lvlib" library with similar Create/Destroy/Fire SubVI's to keep this new user event separate and modular.  The problem I'm hitting is that there can only be one Dynamic Event Terminal in the Event Structure so how do I modularlize creating user events into separate SubVIs and still maintain this one Dynamic Event Terminal?
    As a follow on question, would it be best to have one user event library per indicator that needs updating or just one single UI update user event and then pass a cluster as the message which contains the name of the control to update (to be used with a case structure) and then the data to go along with it?
    Thanks!
    Solved!
    Go to Solution.
    Attachments:
    CLD.png ‏10 KB

    Instead of having the Register Events in the "Create Methods" you could do that part outside your "create" SubVIs and then simply bundle them. Then you create your individual User Event handling. See snippet where i created a "Create User Event - Update" vi in front of the Stop.
    “A child of five could understand this. Send someone to fetch a child of five.”
    ― Groucho Marx

  • Advantages of Using Queued Message Handler vs. Standard State Machine

    Hello,
    What are the advantages of using a Queued Message Handler?  Also, why are they more powerful than using Standard State Machines?
    Thanks!

    They are really just sort of an extension of a state machine.  The general idea is that you have one loop doing a specific job.  You then use a queue to tell it how/when to do this job.  For instance, I might have a log file loop.  I will send it commands to open a file, write some data, write some more data, and finally close the file.  Each of those commands are coming from the queue.  The beauty with this setup is that anybody that can get a reference to that queue can send the command to that loop.
    So the QMH is "better" than a state machine mostly because of the decoupling of functions.  In a given application, I will have a loop for log file writing, GUI updates, reading of a DAQ, instrumenet communications, server communications, etc.  Trying to do all of that in a single loop state machine is a major pain in the rear end.  Seperating them out makes life so much easier.
    There are only two ways to tell somebody thanks: Kudos and Marked Solutions
    Unofficial Forum Rules and Guidelines

  • Where to store data (queued message handler)

    Hello,
    i'm developing an image processing application. As a template i'm using the 'queued message handler'. In my app I need to store some images, arrays, and so on in RAM. Now the question is  if i should store that data in the message loop's shift register (in a cluster) or somewhere else.
    At the moment i have hidden front panel indicators where i store all my data. This isn't good practise, is it?
    thanks alot
    MN

    nollMarvin wrote:
    Hello,
    i'm developing an image processing application. As a template i'm using the 'queued message handler'. In my app I need to store some images, arrays, and so on in RAM. Now the question is  if i should store that data in the message loop's shift register (in a cluster) or somewhere else.
    At the moment i have hidden front panel indicators where i store all my data. This isn't good practise, is it?
    thanks alot
    MN
    No that is not good practice.
    A Shift register is a much better place to store data in memory it does that without creating copies the OS must interperate for display.  (Yeah the displaying of data to a user is a different concept than having data in memory) Ben's famous Action Engine Nugget is always a good read. http://forums.ni.com/t5/LabVIEW/Community-Nugget-4-08-2007-Action-Engines/m-p/503801
    And a basic concept to LabVIEW that attending a training session (or asking questions on these forums) will help you master
    Jeff

  • I need tips about queued message handler

    Hello, I have to use, for the first time a queued message handler. I'd like to know what is the best way to share data between cases in a loop and from a loop to another, I think with local variables  isn't  the best way...
    However all the tips on the queued message handler are welcome!!!
    Thanks

    smilegv wrote:
    I'd like to know what is the best way to share data between cases in a loop
    Shift registers.  Doesn't matter if QMH, State Machine, Producer-Consumer, etc.
    smilegv wrote:
    I'd like to know what is the best way to share data ...from a loop to another
    Well, now that completely depends on what you are passing around.  Streaming data?  Use a Queue or User Event.  Last known value (ie Tag)?  Global Variables, Action Engine.
    There are only two ways to tell somebody thanks: Kudos and Marked Solutions
    Unofficial Forum Rules and Guidelines

  • Queued Message Handler Project Template

    Hello,
    Currently prepping for CLD exam.
    I was told we could use LV 2012 Professional Version.  Is it OK during exam to use Project template for Queued Message Handler to generate VIs and block diagram code?  Or must a QMH be generated from scratch?  
    I assume there will be a main VI which we must modify, but the thought was to reuse the generated template code into this VI.
    Thank you,

    You can use templates, examples etc that ships with LabVIEW. I am sure I read this somewhere, will post a link if I find it.
    Here is one tip offered by one of the experts: http://forums.ni.com/t5/Certification/Car-Wash-REV​IEW/m-p/2267688#M540
    Beginner? Try LabVIEW Basics
    Sharing bits of code? Try Snippets or LAVA Code Capture Tool
    Have you tried Quick Drop?, Visit QD Community.

  • How to treat error handling in the consumer loop in the queue message handler structure?

    Hi,
    I'd like to know how to stop the producer loop(event loop) in the QMH structure when the error happened in the consumer loop.
    I've construct a demo code by myself as the attached image, but it's a pity that I have to create a recdundant indicator "End" to trigger the value change event to stop the program. This is not a good way to do it. Could someone give me some better idea how to deal with it? Very appreciated to you sharing ideas.

    Concerning your doubts about the "traditional" implementation of this pattern, I hear you. As I have written many times before, its main benefit is that it is easy to explain in a training class. It unfortunately has a lot of drawbacks.
    Tim's suggestion about User Events, is a good one. But to use it to the best advantage, you will need to get away from having everything on one block diagram. If you think about it there is no real need for the two loops to be on the same block diagram and a lot of really good reasons for them not to be. For example, if they are in separate VIs, they can both be event driven and any communication problems between loops evaporates.
    Its also more modular, easier to maintain, more reusable, etc...
    Check the link in my signature.
    Mike...
    Certified Professional Instructor
    Certified LabVIEW Architect
    LabVIEW Champion
    "... after all, He's not a tame lion..."
    Be thinking ahead and mark your dance card for NI Week 2015 now: TS 6139 - Object Oriented First Steps

  • Did anyone tried Rejection Message Handler via Queue based method?

    Dear All,
    I am presently doing a Rejected Message Handler process and successfully implemented with File based and Web Service based. But I am not getting the clue for Queue based. We can enqueue the rejected message into queue as a JMS message via this method. But the URI format they have given is *"jdbc:oracle:thin:@<host>:<port>:<sid>#<un>/<pw>#queue"*. Format includes jdbc connection string along with queue name. For this I have created JMS module with JDBC Persistent store and created queue in it. But still I am not able to enqueue the message inside the queue. Also, is there anyway to see the queue names inside the DB. Did anyone tried this method? Could you please share the info??

    WL JMS Queue consume>BPEL1 (One way) invoke>Mediator service (one way) route> BPLE2 (one way). Also I have added transaction properties in BPEL1 and 2 + References + Services.
    Now, if there is a fault in BPEL2 the transaction should be rolled back in BPEL1 and the message should be seen in the WL queue itself. But that is not happening in my case. Everything is getting rolled back upto a point just after the >recieve activity in BPEL1 except the message is not getting rolled back to queue.There will be 2 transactions in this scenario : 1) jms queue to soa hydration store 2) soa-hydration to bpel execution.
    This is the behaviour for 1 way or async interfaces , jms adapter thread completes its transaction work after persisitng to dehydration store and another bpel system thread starts work executing the bpel code after retrieving the message off the db in a separate transaction. So the rollback you are seeing is only applicable for 2nd transaction which roll backs to the dehydration store instead of the queue.
    For synchronous interfaces, the same adapter thread will be involved for complete message processing including bpel code execution. So I think if you want to get the jms queue within the same transaction you can try set up the interfaces to be sync, even with dummy responses. This might make jms adapter thread to start a transaction --> read message off queue within the same transaction --> execute bpel code within same transaction --> complete/rollback transaction based on bpel code execution.

  • How do you build a web page to display queued messages ?

    How do you build a web page to display queued messages in all states?
    Thanks,
    Reeta
    Reeta Joseph Benoy
    EDS@XEROX
    Database Administration
    1350 Jefferson Rd
    Rochester, NY 14623

    You can build a form to a procedure in oracle portal that explores the queue with the option browse and prints de type message with htp package. I made it in this way and my applicattion works right. The procedure must loop the select count(msgid) from aq$[queuetable_name] times.

  • How to get Uniform distributed queue message counts with help of JMX

    Hi,
    Is there any way to get given queue message count, pending message counts using JMX. I can get all queue names and counts using JMX... after that i have to show only selected queue details.
    Thanks,
    -Som

    Hi,
    Following is the WLS snippet from an upcoming WLS JMS message management white paper that you can use to get the message statistics for a given destination.
    With appropriate command line parameters, this script can be used to poll and dump the statistics of any destination on a specified interval.
    Note that the WLST uses JMX API under the cover, so you can easily convert this into a pure JMX java program.
    Hope this helps.
    Kats
    WebLogic JMS Message Statistics Script for weblogic.WLST
    This script can be used for dumping message statistics of a given JMS Destination.
    Based on the arguments, the script creates can print out message statistics
    Usage: java weblogic.WLST msg_statistics.py [options]
    Options:
      username=...           username to connect to WebLogic Server       - defaults to "weblogic"
      password=...           password to connect to WebLogic Server       - defaults to "weblogic"
      url=...                Provider URL of the Administration Server    - defaults to "t3://localhost:7001"
      wlsServerName=...      WebLogic Server Name                         - defaults to "examplesServer"
      jmsServerName=...      JMS Server Name that hosts the destination   - defaults to "examplesJMSServer"
      jmsModuleName=...      JMS Module Name that defines the destination - defaults to "examples-jms"
      jmsDestinationName=... JMS Destination name to get the statistics   - defaults to "exampleQueue"
      pollingIntervalInSeconds=... Time interval between statistics dump  - defaults to "60 secs"
      redirectStdout=...     File name to redirect the stdout of WLST     - defaults to no redirect and the results wil be printed out to stdout.
      help                   Prints out this usage help
    Note that all the defaults are set based WebLogic Examples domain that is part of WebLogic Server installation.
    The "examples" server can be started from "C:/Oracle/Middleware/wlserver_10.3/samples/domains/wl_server" using startWebLogic.sh
    To try this script OOTB, start the "examples" server and run the JMS sample as described below.
    cd :/Oracle/Middleware/wlserver_10.3/samples/domains/wl_server/bin
    . ./setDomainEnv.sh
    cd $WL_HOME/samples/server/examples/src/examples/jms/queue
    javac -d . *.java
    export CLASSPATH=".;$CLASSPATH"
    java examples.jms.queue.QueueSend t3://localhost:7001
    Follow the prompts to populate the queue
    Examples:
      msg_statistics.py - Dump the message statistics of the exampleQueue for every 1 min
      msg_statistics.py user=weblogic pass=weblogic url=t3://localhost:7001
                          wlsServerName=examplesServer jmsServerName=examplesJMSServer
                    jmsModuleName=examples-jms jmsDestinationName=exampleQueue
                    pollingIntervalInSeconds=30
    For more details on JMS Message Management using WLST, see "WebLogic JMS Message Management In a Nutshell" whitepaper.
    from weblogic.jms.extensions import JMSMessageInfo
    from weblogic.messaging.kernel import Cursor
    from javax.jms import TextMessage
    from javax.jms import DeliveryMode
    from java.io import ByteArrayOutputStream
    from java.io import StringBufferInputStream
    from java.util import Properties
    from java.util import Date
    from java.lang import *
    import jarray
    import sys
    # shows_messages() definition
    def dump_statistics(wlsServerName, jmsServerName, jmsModuleName, jmsDestinationName, pollingIntervalInSeconds):
      pollingIntervalInMillis = long(pollingIntervalInSeconds) * 1000L
      domainRuntime()
      cd ('ServerRuntimes')
      spath = wlsServerName + "/JMSRuntime/" + wlsServerName +".jms"
      cd (spath)
      fullDestName=jmsServerName+'/Destinations/'+jmsModuleName +'!'+jmsDestinationName
      cdPathForDestName='JMSServers/'+ fullDestName
      cd (cdPathForDestName)
      while 1:
        print "========================================================================================================================"
        print "Messages     Messages      Messages      Messages      Bytes        Bytes        Bytes           Bytes    "
        print "Current       Pending       High          Received      Current      Pending      High            Received "
        print "Count         Count         Count         Count         Count        Count        Count           Count    "
        print "========================================================================================================================"
        s = "%8d     %8d     %8d     %8d     %8d     %8d     %8d     %d" % (cmo.getMessagesCurrentCount(), cmo.getMessagesPendingCount(), cmo.getMessagesHighCount(), cmo.getMessagesReceivedCount(), cmo.getBytesCurrentCount(), cmo.getBytesPendingCount(), cmo.getBytesHighCount(), cmo.getBytesReceivedCount())
        print s
        print ''
        Thread.sleep(long(pollingIntervalInMillis))
    # Function to handle script arguments of the variety 'n=v', where
    # arguments are placed into a dictionary of nv pairs and returned
    # to the caller
    def argsToDict(args):
      d = {}
      for arg in args:
        #print "arg: " + arg
        pair = arg.split('=', 1)
        #print "pair: " + str(pair)
        if len(pair) == 2:
          # binary argument, store as key pair
          key = pair[0]
          val = pair[1]
          d[key] = val
        else:
          # Unary argument, story with empty (non-null) key
          d[arg] = ''
      print "Arguments: " + str(d)
      return d
    # Returns the value found in the provided map, at the location
    # specified by 'key'; if no entry exists in the map for 'key',
    # the provided default is returned.
    def getValue(dict, key, default=None):
      ret = default
      if dict is not None:
        try:
          ret=dict[key]
        except KeyError:
          pass
      return ret
    # Connect to the target server specified in the provide args
    def connectIfNecessary(argsDict=None):
      # connect if necessary
      if connected == "false":
        user=getValue(argsDict, "user", "weblogic")
        passwd=getValue(argsDict, "pass", "weblogic")
        url=getValue(argsDict, "url", "t3://localhost:7001")
        print "Connecting with [" + user + "," + passwd + "," + url + "]"
        connect(user,passwd,url)
    # Retrieve a positional argument if it exists; if not,
    # the provided default is returned.
    # Params:
    # pos   The integer location in sys.argv of the parameter
    # default  The default value to return if the parameter does not exist
    # returns the value at sys.argv[pos], or the provided default if necesssary
    def getPositionalArgument(pos, default):
      value=None
      try:
        value=sys.argv[pos]
      except:
        value=default
      return value
    # Main
    argsDict = argsToDict(sys.argv)
    redirectOutputFileName = getValue(argsDict, "redirectStdout")
    if redirectOutputFileName is None:
      pass
    else:
      redirect(redirectOutputFileName, 'false')
      print "The output from this program gets written into file " + redirectOutputFileName
      sys.stdout = open(redirectOutputFileName, "w")
    isHelp = getValue(argsDict, "help")
    if isHelp is None:
      pass
    else:
      print __doc__
      exit()
    connectIfNecessary(argsDict)
    wlsServerName = getValue(argsDict, "wlsServerName", "examplesServer")
    jmsServerName = getValue(argsDict, "jmsServerName", "examplesJMSServer")
    jmsModuleName = getValue(argsDict, "jmsModuleName", "examples-jms") 
    jmsDestinationName = getValue(argsDict, "jmsDestinationName", "exampleQueue")
    pollingIntervalInSeconds = getValue(argsDict, "pollingIntervalInSeconds", "60")
    dump_statistics(wlsServerName, jmsServerName, jmsModuleName, jmsDestinationName, pollingIntervalInSeconds)
    disconnect()
    print 'End of script ...'
    exit() 

  • Queues not handling delays...

    Question:
    If the parameter that enables the Queue Monitor to handle delay intervals on queues (i.e., AQ_TM_PROCESSES) is not set to > 0, then no Queue Monitor background processes (ora_aqtm_<SID>) will be created and queues will not be able to handle delays?
    Or, to put in another way, if AQ_TM_PROCESSES = 0, setting a delay on a queue for a payload will not work correctly, correct?

    Still seems to be some debate between the developers and DBAs on whether or not AQ_TM_PROCESSES = 0 causes an issue in Oracle 10g 10.2.
    This is what the Oracle Advanced Queueing Manual says:
    ===========================================
    Prior to Oracle Database 10g, Oracle Streams AQ time manager processes were controlled by init.ora parameter AQ_TM_PROCESSES, which had to be set to nonzero to perform time monitoring on queue messages and for processing messages with delay and expiration properties specified. These processes were named QMNO-9, and the number of them could be changed using:
    ALTER SYSTEM SET AQ_TM_PROCESSES=X
    Parameter X ranged from 0 to 10. When X was set to 1 or more, that number of QMN processes were then started. If the parameter was not specified, or was set to 0, then queue monitor processes were not started.
    Beginning in Oracle Streams AQ 10g Release 1 (10.1), this was changed to a coordinator-slave architecture, where a coordinator is automatically spawned if Oracle Streams AQ or Streams is being used in the system. This process, named QMNC, dynamically spawns slaves depending on the system load. The slaves, named qXXX, do various background tasks for Oracle Streams AQ or Streams. Because the number of processes is determined automatically and tuned constantly, you no longer need set AQ_TM_PROCESSES.
    Even though it is no longer necessary to set AQ_TM_PROCESSES when Oracle Streams AQ or Streams is used, if you do specify a value, then that value is taken into account. However, the number of qXXX processes can be different from what was specified by AQ_TM_PROCESSES.
    QMNC only runs when you use queues and create new queues. It affects Streams Replication and Messaging users.
    No separate API is needed to disable or enable the background processes. This is controlled by setting AQ_TM_PROCESSES to zero or nonzero. Oracle recommends, however, that you leave the AQ_TM_PROCESSES parameter unspecified and let the system autotune.
    Note:
    If you want to disable the Queue Monitor Coordinator, then you must set AQ_TM_PROCESSES = 0 in your pfile or spfile. Oracle strongly recommends that you do NOT set AQ_TM_PROCESSES = 0. If you are using Oracle Streams, then setting this parameter to zero (which Oracle Database respects no matter what) can cause serious problems.
    ===========================================
    Seems to me that AQ_TM_PROCESSES is no longer used as before but if used, and set to 0, it can cause issues and / or turn off the Oracle Queue Monitor....
    Anybody's final vote on this matter??? Based on the manual and the responses I have heard so far, AQ_TM_PROCESSES = 0 does still matter in Oracle 10.2.

  • Receiver File adapter - 'Empty Message Handling' option to ignore not worki

    Hi,
      I am trying to create the Files in receiver based on condition.But I am gettiung error in communication channel when there is no payload. Receiver I am usuing FCC and processing tab I selected -'Empty Message Handling' option to ignore .
    one source -> Target 1 (0..1 occurance in signature tab changed, message mapping and operation mapping)
                 and Target 2 (0..1 occurance in signature tab changed)
    and I put the message type level condition. While creating first message If did not create the Message type in my maaping still my Receiver File communication channel is giving error. even thow I my receiver interface occurance is 0..1
    Right now I am in PI7.1 and SP7 is the bug for support pack do I am missing any thing. and do I need to upgrade any nwe patch. appreciate your help.
    Regards,
    Venu.

    Hi,
    here is the my requirment one source -> two target interfacess (0..1)
    If u have 2 target interfaces,then this is not suffice..... u should make it as 0..unbounded both in operation mapping and message mapping.
    But based on ur requirements posted above i guess u have only one inbound interface at a time based on some conditions....
    But,
    <messages>
    <messages1>
    based on condition first message type not created in mapping.
    <messgaes2>
    The error u r getting is because.... u want only one interface in target at a time....
    Then u should not generate Message1 also in the target.
    So avoid mapping to message1 if u want only message2.
    If both message1 and message2 are created in target means... it is triggering for two interfaces.... so avoid one message1 or message2... based on some conditions u have..
    Still nt solved do post...
    Babu

  • Receiver file adapter creates empty files, Empty-Message Handling SP19

    Hello,
    We have just upgraded the system to SP19.
    One of the new features is that it should be possible to determine how XI messages with an empty main payload are to be handled in the receiver file adapter.
    If the parameter Empty-Message Handling is set to 'Ignore' no file should be created if the main payload is empty. In our case an empty file (size 0 kb) is still created even though the main payload is empty and the flag is set to 'Ignore'.
    Has anybody experienced the same problem?
    //  Best regards  Hans

    This should work:
    Use your own adapter module that parses incoming message and checks if it has any record sets in the document. If it does not have any record sets, then set the message to empty and then give this modified message to File receiver.
    For example, see the example code below:
    Module imports..
    Audit log import..
    DOM imports/SAX imports..
    public ModuleData process(ModuleContext moduleContext, ModuleData inputModuleData) throws ModuleException {
              try {
                   // get the XI message from the environment
                   Message msg = (Message) inputModuleData.getPrincipalData();
                   AuditMessageKey amk = new AuditMessageKey(msg.getMessageId(),AuditDirection.INBOUND);
                   Audit.addAuditLogEntry(amk, AuditLogStatus.SUCCESS,"RemoveRootTag: Module called");
                   XMLPayload payLoad = msg.getDocument();
                   Document doc = parseXmlFile(payLoad.getInputStream());
                   if(doc != null){
                        if(!doc.getDocumentElement().hasChildNodes()){
                             Audit.addAuditLogEntry(amk, AuditLogStatus.SUCCESS, "Document is empty!!");
                             payLoad.setContent("".getBytes());
                             msg.setDocument(payLoad);
                   // provide the XI message for returning
                   inputModuleData.setPrincipalData(msg);
                   } catch (Exception e) {
                   // raise exception, when an error occurred
                   ModuleException me = new ModuleException(e);
                   throw me;
                   // return XI message
              return inputModuleData;
         private Document parseXmlFile(InputStream xmlpayload) {
              try {
                   DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
                   factory.setValidating(false);
                   //        Create the builder and parse the file
                   Document doc = factory.newDocumentBuilder().parse(xmlpayload);
                   return doc;
              } catch (SAXException e) {
              } catch (ParserConfigurationException e) {
              } catch(IOException e){
              return null;

  • Empty-Message Handling is not working in receievr File Adapter

    Hi All,
    I have selected "Empty-Message Handling" = 'Ignore'in Receiver File adapter, but still empty files are creating in target directory.
    Message mapping generates output based on the conditon, if the condition is 'false' mapping will generate empty file (no data is being mapped).
    Why Receiver file adapter is processing empty fiels even i set 'ignore' empty fiels in configuration (ID)?
    Hoe can i manage not to place empty fiels in target directory?
    File type is '.txt'
    Your help would be appreiciated greatly.
    Thanks,
    Rajesh

    Not sure why is it not working. Make sure the channel is activated and cache is refreshed properly. But as a workaround you may use OS script checking for size of message and deleting it or configure a BPM to avoid the file creation. Or else an adapter module as shown
    /people/gowtham.kuchipudi2/blog/2006/01/13/stop-creation-of-an-empty-file-from-file-adapter-using-module
    Regards,
    Prateek

  • Recevier adapter empty message-handling ignore

    Hi all,
    I configured file receiver adapter with file content conversion (comma separated).
    In processing parameters Empty-message handling is set to Ignore.
    Payload that is in message generated from SAP is:
      <?xml version="1.0" encoding="utf-8" ?>
         <mt_ap_invoice xmlns:prx="urn:sap.com:proxy:DES:/1SAI/TAS128FC2C2C3C8E901DC22:700:20 08/06/25" />
    There are no any data that is filling structure (structure main node is defined as 0...unbounded) and still empty file with 0 bytes is created.
    Please can you tell what is wrong in this setup as In case of empty message I don't want that file is generated?
    Regards,
    Nenad

    - open Integration Builder
    - open your file receiver adapter
    - go to tab Processing
    - change Empty Message-Handling to 'Ignore'
    Cheers,
    André

Maybe you are looking for

  • Exclamation point when i turn it on !!

    anyone can help to solve that problem? i removed all the itunes and ipod software and downloaded all the new software. but my ipod still cant resore because my computer can't read my ipod. my ipod apears on my screen and after 10 sec, it disapears!!

  • Multilingual support in AWM 11g

    Is there a multilingual support in AWM 11g? I don't see Languages folder in the AW tree.

  • Create Remote Document - error on save

    We are developing Java code to publish a content item(Publisher) into KD with the functionality of IDK. For this reason, we create a remote document with the method "IDocumentManager.createRemoteDocument" passing the next parameters:<br><br> 1.Id of

  • My iphone 4 just stopped working?

    My iphone 4 just died, even though I had 75% battery life.  Then,it won't take a charge either.  It won't sync or even turn on anymore. I am totally frustrated, since it is only 7 months old.

  • Final Cut Pro X Crashes Every Time I Select Effects Browser

    Hi, I'm a novice FCPx user that works at a non-profit, and I do some light video work.  I'm running FCPx on a MacBook Pro Retina 2.3GHz i7 with 16GB Ram, OS X 10.10.1. Every time I click on the Effects Browser, FCPx crashes.  As is to add insult,  if