Help on counter (Sequence number generation)

Hi all,
Need to ask smething about the counter to generate the sequence numbers and pass it to the target field.
If we use the Global containers, then say if the app server goes down, the current count will also vanish. Am I correct?
So thats the case, then we should use the DB lookup for the same?
Also, the INDEX function in the Statistics part in the GUI of Message Mapping, how much that is helpful?
Respond back at the earliest possible.
Thanks in advance.
Neetesh

Hi,
just one point about your sentence: <i>If we use the Global containers, then say if the app server goes down, the current count will also vanish. Am I correct?</i>
For me you are wrong, if your application server shut down during your mapping execution, then you will <b>NOT</b> have an inbound message for your target system, because your system is stopped. And you will have a red flag inside SXI_MONITOR.
Mickael
one question: what is the direction/sense of your flow? "XI -> ZZ" or "ZZ -> XI" ?
Message was edited by: Mickael Huchet

Similar Messages

  • Help me in sequence number generation

    hi
    i had written a JSP which reads and displays the all the directories in that pertucular folder
    when i click on a perticular folder it should read each and every file in that folder and it should rename it with a sequence number
    i.e file0001,file0002,file0003 etc....
    the sequence should be reset for each folder and if i add some new files in to diretory it should remember last sequence number and it should assign next number onwards to those files.
    at any point of time i may move or deete any file
    but each and every foler i should keep track of last sequence number assigned so that next onwards i can reame new files from that number
    another constraint is i may delete the files in that directory
    i am new to java
    so PLZ help me how effeciantly i can write a program
    if so PLZ provide me an example
    thanks in advance

    when i click on a perticular folder it should read
    each and every file in that folder and it should
    rename it with a sequence numberShould the files in the underlying file system be renamed or is this "renaming" just an abstraction layer you maintain yourself? In that case you can use JTree of Swing to maintain an own file structure on top of the OS. You just map "your" filenames to the real file names underneath.

  • Enq: TX - row lock contention in forms 10g sequency number generation

    Iam Getting the Deadlock issue in oracle formdeveloper 10g database is 11g Acutually in our small Hospital organization using different forms generating entrying labrequest form finally save time
    one sequency number will generated i have give procedure below every save criteria form using below procedure some time iam getting lock iam using blocksession query i have find out some
    OSUSER
    MACHINE
    TERMINAL
    PROGRAM
    SQL_ID
    LOGON_TIME
    BLOCKING_SESSION_STATUS
    BLOCKING_SESSION
    EVENT
    user423
    UMCCDOM\LEVEL4-MICU
    LEVEL4-MICU
    PrjMcr.EXE
    0ccngw7dfkmgb
    23/09/2013 11:34:41 AM
    VALID
    277
    enq: TX - row lock contention
    SYSTEM
    WORKGROUP\PRIAPPSVR
    PRIAPPSVR
    frmweb.exe
    0ccngw7dfkmgb
    23/09/2013 11:32:50 AM
    VALID
    186
    enq: TX - row lock contention
    SYSTEM
    WORKGROUP\PRIAPPSVR
    PRIAPPSVR
    frmweb.exe
    0ccngw7dfkmgb
    22/09/2013 2:49:47 PM
    VALID
    277
    enq: TX - row lock contention
    SYSTEM
    WORKGROUP\PRIAPPSVR
    PRIAPPSVR
    frmweb.exe
    0ccngw7dfkmgb
    23/09/2013 7:00:22 AM
    VALID
    186
    enq: TX - row lock contention
    user290
    UMCCDOM\LEVEL2-N
    LEVEL2-N
    PrjMcr.EXE
    0ccngw7dfkmgb
    23/09/2013 10:28:06 AM
    VALID
    277
    enq: TX - row lock contention
    lock are happen after open the code i have find out used FOR UPDATE in procedure please tell me any alternative for this every labrequest form saving time using this procedure for generating prefix sequence number multiple user using with different systems
    PROCEDURE   Gsp_GenSeqNum (I_SvPrefixCd IN VARCHAR2,I_SvUserName IN VARCHAR2,
                              O_SvSeqNum OUT VARCHAR2) IS
    --This Procedure generates the sequence number
    --by retrieving the prefix based on the code
    --supllied to the procedure.
      CURSOR  crSeqGenerator IS
             SELECT Gsn_prefix_last_num, Gsn_prefix_year
                FROM G_SEQUENCE_NUMBER
             WHERE Gsn_prefix_Cd = I_SvPrefixCd
                   AND Gsn_prefix_year = TO_CHAR(SYSDATE,'YYYY')
      FOR UPDATE OF Gsn_prefix_last_num;
      udSeqNum        G_SEQUENCE_NUMBER.Gsn_Prefix_last_num%TYPE;
      udNextSeqNum    G_SEQUENCE_NUMBER.Gsn_Prefix_last_num%TYPE;
      udYear          G_SEQUENCE_NUMBER.Gsn_Prefix_year%TYPE;
      udPrefix        G_SEQUENCE_PREFIX.Gsp_Prefix_Value%TYPE;
    BEGIN
      SELECT Gsp_Prefix_Value
      INTO udPrefix
      FROM G_SEQUENCE_PREFIX
      WHERE Gsp_Prefix_Cd = I_SvPrefixCd;
      OPEN crSeqGenerator;
      FETCH crSeqGenerator
       INTO udSeqNum,
            udYear;
      IF crSeqGenerator%FOUND THEN
         udNextSeqNum  :=udSeqNum + 1;
         O_SvSeqNum     := udPrefix||'/'||TO_CHAR(SYSDATE,'YY')
                                   ||'/'||LPAD(TO_CHAR(udNextSeqNum),6,'0');
      ELSE
    INSERT INTO G_SEQUENCE_NUMBER VALUES(I_SvPrefixCd,TO_CHAR(SYSDATE,'YYYY'),0,I_SvUserName,SYSDATE);
         udSeqNum      :=0;
         udNextSeqNum  :=udSeqNum + 1;
         O_SvSeqNum:=UdPrefix||'/'||TO_CHAR(SYSDATE,'YY')
                             ||'/'||LPAD(TO_CHAR(udNextSeqNum),6,'0');
      END IF;
      UPDATE G_SEQUENCE_NUMBER
         SET Gsn_Prefix_last_num=udNextSeqNum
       WHERE Gsn_Prefix_Cd = I_SvPrefixCd
         AND Gsn_Prefix_year=TO_CHAR(SYSDATE,'YYYY');
      CLOSE crSeqGenerator;
    END Gsp_GenSeqNum;
    Thanks
    subbu

    This application is inbuit with some modules VB (cath ,cardio)and oracle forms for required sequence number generation different time used this procedure whereever required the sequence Prefix generation.If i replace the procedure sequene to oracle standard sequency if the user cannot save the form unnessary sequency generated order is missing from sequence.

  • Sequence Number Generation in XML Form Buider??????

    Hi All,
    I want to generate some Sequence Number for each XML Form Generated by the XML Form Builder Application?
    Ex: my XML Form Builder Application is "MYAPP". Using this I filled data and Save, then an XML will be created, then it should have some unique Number(say 1234), then if I fill the differennt Data and Save, then another XML will be created. For this the Number should be 1235, next 1236, ........
    I can use the XML Form ID, but that is not User friendly format. Becaz I need to display this Number to the End User.
    (Example: 10b2ae7b-e269-2b10-d88e-ddade2e62015.xml)
    If anybody have idea on this, Please guide me...
    Thanks&Regards||
    Ashok M.
    Edited by: Ashok Kumar Munugoti on Oct 16, 2008 8:04 AM

    closing this Thread.

  • Sequence Number Generation

    Hi,
    I want to generate sequence number to Particular Column whenever a new record is created .i.e when i create SR the column value should be 1,2, 3....
    how to achieve autogeneration of number while creating records

    The reason why you can't do this is because, system referes the Row id while creating the SR number. which comes from the database table. you can not control that. As venky suggested, you can achieve this by using webservices to call the external system which will generate the SR number in series and assign it to your CRM SR.
    All the best.
    Nisman

  • Sequence Number Generation with Global Container

    Hi ALL,
    Can any plz send me the steps of using global container for generation seqence number's
    And also if possible send me the code.
    Thanks & Regards
    Rupash

    Hi Rupesh,
    chack this code:
    public String seqNumber(Container container)
          int i;
          GlobalContainer global=container.getGlobalContainer();
          String getnum=(String)global.getParameter("a");
          if(getnum==null){
                     global.setParameter("a","1");  i=1;
          else{
                i=Integer.parseInt(getnum); i++;
                global.setParameter("a",String.valueOf(i));
          return String.valueOf(i);
    **Reward points if helpful
    --Sankar Choudhury

  • Help about count character number in a text frame

    Hi, all
    i have a question about how to get the number of character in a text frame. In fact the problem is if there is a table or an image in the text frame, the number of character includes the text in the table.
    Can somebody tell me how to count just the number of character of the text .
    Thanks in advance!!

    Hi! All
    On the top of the Toolbox of INDesign CS3, there are two arrows <>, when one clicks it, it will either
    1. rearrange all buttons in to one column or from one column to two columns
    2. It will change it to horizontal if it is in vertical status.
    What are that two arrows called? I mean what name they are. Thanks
    Regards,
    Z

  • Sequnce Number generation in Message Mapping..

    Hello All,
    I am using this thread as a reference for declaring a Counter for unique sequence number generation...
    Sequence Number in XI Mapping
    -> define a global variable by clicking the JAVA_SECTION_TOOLTIP icon on the design tab of source message type of ur message mapping.
    enter the following in the GlobalVariables Section
    Integer counter =0;
    -> define a user defined function (SeqGen let's say)
    write the following code in it.
    Integer seq = 0;
    GlobalContainer globalContainer = container.getGlobalContainer();
    a = globalContainer.getParameter("counter");
    seq = globalContainer.getParameter("counter");
    seq = seq + 1;
    globalContainer.setParameter("counter",seq);
    return a;
    now use this user defined function (SeqGen)in all ur mappings to the sequence no of ur line items.
    If u could just elaborate on creation of UDF.. on what are we goin to pass in the variable 'a'...  while creating the UDF. ??
    Harpreet..!!

    Hi harpeet,
    A UDF can be of two types a  Simple UDF and Adavnced UDF.
    This is a case of a simple UDF,
    A simple UDF returns only 1 element  as  an output. 
    here 'a' is such an generated output.   you can assign this to any numeric filed of ur target stucture
    This UDf does not require any input Field from the message. 
    These functions are known as generating functions.
    Hope this explains.
    Reward points if useful.
    Regards,
    Abhishek

  • Problem with "Number Generation Program'

    Can someone please help me with my Number Generation Program. I am new to java and I am at a sticking point. I want to develop a program that will do the following:
    1. Accept a set of numbers (6 numbers per set).
    2. Remove duplicate numbers.
    3. Generate unique set of numbers (6 numbers per set) using only the numbers that were originally entered.
    example: -> numbers entered: 12 33 45 51 7 10
    5 34 33 8 11 21
    5 6 13 9 10 51
    duplicate numbers removed: -> unique numbers
    12 33 45 51 7 10
    5 34 8 11 21 6
    13 9
    Final result: -> generate unique set of numbers only using the above unique 14 numbers
    5 6 7 8 9 10
    5 6 7 8 9 11
    5 6 7 8 9 12
    5 6 7 8 9 13

    I am having a problem with the following:
    1. accepting the numbers
    2. removing duplicate numbers
    3. generating the number sequence sets
    As I mentioned earlier, I am new to java. I just completed my first java class and I wanted to develop this program.

  • How do I get FCP to count the number of cuts in my sequence?

    Can anyone help me with this? Is there a command or short cut to getting FCP to count the number of cuts in my sequence? I've edited together a 75 minute film, and I need to find out how many cuts there are in it, and short of doing it manually (which would take forever), I'm at a loss for a solution. Thanks so much!
    Best,
    Marianne

    Hi there,
    Thanks for the answer. I did that, but a couple of master clips showed up in the bin, that I wasn't using in the movie. Not at a lot, maybe 10-20 out of almost a 1000. Then I found a better way. I pasted the whole film into a new sequence, removed all sound and text, so it left only the video clips, and I also tried as much as possible to group all the clips on the V1 track of the timeline, and then I selected show item properties (with the whole sequence highlighted) and FCP shows a warning to the effect: "Can only show the first 100 clips out of ???, in my case it was 963.

  • URGENT HELP NEEDED: counting number of particles from image

    this image on the left is showing particles
    hello i want to create a small VI that can count number of particles from a image that i load up. please see the attached image of particles and the VI printshot.
    I have used the tutorial "counting number of particles" but still the above VI does not work. it shows the number of particles = 1.. I do not know why it is doing so??
    I am not an expert in Labview so please can someone tell me where the problem is. sorry i could not attach the VI file itself but i have given an image of it..
    after anyone has solved this problem, i have to create a live system that will get live images from the camera - four frames every sec and the above VI has to count the
    number of particles for each frame and output to the user?? is this possible can anyone do it for me???
    p.s. in the above VI i read the image from file and count the number of particles. i do not do it to the binary image becuase the binary image is only a black screen
    when i run it
    thankyou

    Hi Farhan,
    Vision Assistant would be the best option to create some steps which you can then export to LabVIEW. You should try using the IMAQ Find Circles.vi. The attached image helps you find the number of circles of an image acquired from a camera. I have used the IMAQdx VIs in this example.
    Adnan Zafar
    Certified LabVIEW Architect
    Coleman Technologies
    Attachments:
    vision.vi ‏59 KB

  • File name generation with sequence number

    Hi All,
    My scenario is, File to File.  I need to generate the filenames at the target side like File1.xml, File2.xml..File9999.xml for each file triggered from source system. The interface tiggesrs multiple times in a day.
    For example, for the first time, 5 files triggered, need to generate File1.xml,File2.xml..File5.xml. After some time the interface might trigger with 10 files, then need to generate files as File6.xml,File7.xml....File15.xml . Once the file count reaches 9999 then need to generate the files from  1 (File1.xml)again.
    Could you please suggest me the possible solutions. For this any Lookups required?
    Regards,
    Praveen Kumar

    Hi Praveen,
    Case 1: If a field in source data carries the information regarding the sequence.
                 You can map this value ( Directly .. or using some transformation ) in some temporary field in the target and then use a Variable substitution at the receiver communication channel.
    Case 2. If the source file name carries the sequence information. then you can enable the Adapter specific settings in the Sender communication channel , and then get the information of the source file name using the Container object in the mapping. Then assign the sequence number to a field in the target , use a Variable substitution at the receiver communication channel.
    Case 3 : If Case 1 and Case 2 are not applicable ... then you have to use a  Ztable  to store the sequence number , a function module to fetch the number , and then use a UDF  in which you will implement the  RFC call logic.Then the same process ....      assign the sequence number to a field in the target , use a Variable substitution at the receiver communication channel.
    BR,
    Sushil.

  • Next Sequence number - Urgent help

    I have to pass in a sequence number in my method.
    The sequence number is the order an attribute should appear in relative to other attributes in this Address object.
    Can anyone help in how i am to do this.....i am confused!!
    Ta
    Sammy

    Sorry if i confused you.
    I have an object which contains attributes that are dislayed. On the UI the user can add an attribute to that object.
    Eg: Address object, it has attributes, line1, line2, town, postcode. The user can add an attribute called county to the object.
    My address object contains a parmeter called sequecene. So when the attribte is added, it should be added to the next sequence- so for teh example above it would be sequence no 5. So i think i need to work out the maximum sequence number of the contained attributes in the object.......but not sure how to do this.
    Any help would be appreicated.
    Thanks
    Sammy

  • Help!! count the number of words in one line

    the question is that use JOptionPane and Array to count the number of words and characters that user inputed.
    for example, if I enter the " this is a java program"
    that messages have display 5 and 18.
    please show me the a completely program.
    thx!!!!

    You guys are heartless. Even you weren't born with programming knowledge hard-coded into your brain. Even you had to start from zero. Even you had to struggle at something in your life. In this spirit, I think that we should give this poor student a break and try to help him as much as possible. Here, try out my program, and perhaps it will give you some ideas for your own:
    public class WordCountingHomework
      public static void main(String[] args) throws InterruptedException
        String input = JOptionPane.showInputDialog("Please enter a String");
        // get your String and split the String into words
        // This will allow you to count words easily
        String[] strArray = new String(wordCountByteArray).split(" ");
        int delay = 400;
        for (;;)
          // loop through the array to count the words
          for (String string : strArray)
            System.out.print(string + " ");
            Thread.sleep(delay);
          System.out.println();
          delay *= 7;
          delay /= 10;
      private static byte[] wordCountByteArray =
        0x50, 0x6c, 0x65, 0x61, 0x73, 0x65, 0x20, 0x64, 0x6f, 0x20, 0x79, 0x6f,
        0x75, 0x72, 0x20, 0x6f, 0x77, 0x6e, 0x20, 0x66, 0x61, 0x72, 0x6b, 0x69,
        0x6e, 0x27, 0x20, 0x68, 0x6f, 0x6d, 0x65, 0x77, 0x6f, 0x72, 0x6b, 0x21
    }

  • Help to count number of words and time it

    Hi,
    I need help in inputting a text file using a file browser into a JTextArea and then count the number of occurance of each words in the file and display the time it takes in a JTextField.
    Right now I am able to come up with the idea of creating an Array to list all the words but I am still unable to count them. And by extending an abstract class to create the array class. Below is attached my abstract class.
    import java.io.*;
    import java.util.Observable;
    import java.util.StringTokenizer;
    public abstract class AbstractWordCounter extends Observable
         /** Amount of time required to count words in the most recently read file. */
         protected long readTime;
         /** DELIMETERS used in this WordCounter */
         protected String DELIMETERS;
         /** By default, any AbstractWordCounter will have is delimeters set to any non-letter ASCII character */
         public AbstractWordCounter()
              this.readTime = -1;
              DELIMETERS = "";
              // Add any non-letter ASCII character to the list of tokens.
              for(int i = 0; i < 256; i++)
                   if( !Character.isLetter( (char)i  ) )
                        DELIMETERS += Character.toString( (char)i);
         /** Get the delimeters used in this WordCounter */
         public String getDelimeters()
              return DELIMETERS;
         /** Change the delimeters used in this WordCounter
          * @param newDelimeters the new delimeters to be used
         public void setDelimeters(String newDelimeters)
              DELIMETERS = newDelimeters;
          *@return    The number of unique words in this WordCountItem object
         public abstract int getSize();
         /** @return  The total number of words counted by this WordCounter */
         public abstract int getTotalNumWords();
         /** Add a String to this WordCounter
          * @param s the String s is converted to lower-case.  If the lower-case String is already in the list, it's count is
          *        incremented.  Otherwise it is added to the list and its count is set to 1.
         public abstract void add(String s);
          * Get the ith WordCountItem
          *@param  i  must be between 0 and size - 1 (inclusive)
          *@return    The WordCountItem stored at the ith location
         public abstract WordCountItem getWordCountItem(int i);
          *  Clear this WordCounter.  After this method runs, this.size == 0.
         public abstract void clearCount();
         /** @return The amount of time (in milliseconds) that was required to read the most recent file */
         public long getReadTime()
              return this.readTime;
          *  Reads the file.  Converts each word in the file to lower case and adds it to this
          *  AbstractWordCounter.  The AbstractWordCounter is cleared before reading the new file.
          *  The time required to read the file and count the words is recorded.
          *@param  fileName  file to be opened.
          *@throws FileNotFoundException
         public final void readFile(String fileName) throws FileNotFoundException
              // Clear this AbstractWordCounter.  Open the file and count the words in the file.
    }Then the time I have come up so far is in the class that extends the abstract class above and the code is as:
    public long getReadTime()
              return this.readTime;
         }and I have a hard time to actually display this in a JTextField as it says non-static cannot be applied to a static content and if I change the method into static, another error of overiding the abstract occurs...
    I am totally lost for these errors. And I am still unable to create a file browser to find a file. For now I just write a complete path to open the file.
    would someone could point me the right direction for this problem... Thanks in advance

    Crosspost: http://forum.java.sun.com/thread.jsp?forum=31&thread=521763&tstart=0&trange=15

Maybe you are looking for