Instance Variable size

Hi
I have a question regarding size of normal instance variable.
It has been mentioned in the Studio 5.7 doc that the total size of all the instance variable for a project should not exceed 2Mb.
Question is that if it exceeds more than 2Mb than what would be its effects. Is there any exception thrown if size exceeds above 2Mb.
Also how can this be prevented as actual size can only be calculated at runtime.
Thanks in advance.

The instance size exceeding the setting you have inside your Engine will cause errors to start appearing in the log file. The effect is that your engine's performance will degrade. Once you start getting Error messages, they are usually sent via email to the admin you specify in the Engine's settings.
A few ways to keep the size of the instance variables down is to:
1) change the category of large instance variables to "Separated" from "Normal". This means that they are not stored as part of then instance's BLOB stored in the PPROCINSTANCE Engine database. They are then only read from the Engine's separated instance variable table when they are needed in the activity's logic or updated only when modified in the activity. Separated instance variables are not calculated as part of the overall size of the instance.. Large binary variables not marked as Separated will quickly run you over your instance size limit.
2) Similarly, we sometimes treat the process instance variables as a database of record. Avoid this mentaility if possible. It's often better to have an external database to store information about things going on in the process. If you rely on the Engine tables for this for very large objects they are not easily retrieved by outside applicaitons because they are stored as a single BLOB. If outside applications access the Engine's database, it's another sure fire way to further degrade engine performance. Many times it' is better to store the id of a customer in the process and then to use that id to retrieve customer insformation from the cutomer's external database table. Once an instance has reached the End activity in a process, it sits there the number of days you specified in an Engine setting. Once it exceeds this number of days in the End activity, the instance data information is either purged or moved to the archive database. Don't make this number of days in the End activity too long (default is 15) as this will increase the sized of the number of rows on the table and degrade performance.
Hope this helps,
Dan

Similar Messages

  • Binding a JavaFX variable to a Java class instance variable

    Hi,
    I am pretty new to JavaFX but have been developing in Java for many years. I am trying to develop a JavaFX webservice client. What I am doing is creating a basic scene that displays the data values that I am polling with a Java class that extends Thread. The Java class is reading temperature and voltage from a remote server and storing the response in an instance variable. I would like to bind a JavaFx variable to the Java class instance variable so that I can display the values whenever they change.
    var conn: WebserviceConnection; // Java class that extends Thread
    var response: WebserviceResponse;
    try {
    conn = new WebserviceConnection("some_url");
    conn.start();
    Thread.sleep(10000);
    } catch (e:Exception) {
    e.printStackTrace();
    def bindTemp = bind conn.getResponse().getTemperature();
    def bindVolt = bind conn.getResponse().getVoltage();
    The WebserviceConnection class is opening a socket connection and reading some data in a separate thread. A regular socket connection is used because the server is not using HTTP.
    When I run the application, the bindTemp and bindVolt are not updated whenever new data values are received.
    Am I missing something with how bind works? Can I do what I want to do with 'bind'. I basically want to run a separate thread to retrieve data and want my UI to be updated when the data changes.
    Is there a better way to do this than the way I am trying to do it?
    Thanks for any help in advance.
    -Richard

    Hi,
    If you don't want to constantly poll for value change, you can use the observer design pattern, but you need to modify the classes that serve the values to javafx.
    Heres a simple example:
    The Thread which updates a value in every second:
    // TimeServer.java
    public class TimeServer extends Thread {
        private boolean interrupted = false;
        public ValueObject valueObject = new ValueObject();
        @Override
        public void run() {
            while (!interrupted) {
                try {
                    valueObject.setValue(Long.toString(System.currentTimeMillis()));
                    sleep(1000);
                } catch (InterruptedException ex) {
                    interrupted = true;
    }The ValueObject class which contains the values we want to bind in javafx:
    // ValueObject.java
    import java.util.Observable;
    public class ValueObject extends Observable {
        private String value;
        public String getValue() {
            return this.value;
        public void setValue(String value) {
            this.value = value;
            fireNotify();
        private void fireNotify() {
            setChanged();
            notifyObservers();
    }We also need an adapter class in JFX so we can use bind:
    // ValueObjectAdapter.fx
    import java.util.Observer;
    import java.util.Observable;
    public class ValueObjectAdapter extends Observer {
        public-read var value : String;
        public var valueObject : ValueObject
            on replace { valueObject.addObserver(this)}
        override function update(observable: Observable, arg: Object) {
             // We need to run every code in the JFX EDT
             // do not change if the update method can be called outside the Event Dispatch Thread!
             FX.deferAction(
                 function(): Void {
                    value = valueObject.getValue();
    }And finally the main JFX code which displays the canging value:
    // Main.fx
    import javafx.stage.Stage;
    import javafx.scene.Scene;
    import javafx.scene.text.Text;
    import javafx.scene.text.Font;
    import threadbindfx.TimeServer;
    var timeServer : TimeServer;
    var valueObjectAdapter : ValueObjectAdapter = new ValueObjectAdapter();
    timeServer = new TimeServer();
    valueObjectAdapter.valueObject = timeServer.valueObject;
    timeServer.start();
    Stage {
        title: "Time Application"
        width: 250
        height: 80
        scene: Scene {
            content: Text {
                font : Font {
                    size : 24
                x : 10, y : 30
                content: bind valueObjectAdapter.value;
    }This approach uses less cpu time than constant polling, and changes aren't dependent on the polling interval.
    However this cannot be applied to code which you cannot change obviously.
    I hope this helps.

  • Copying Arrays - Instance Variables - Multiple Animations

    Hi All!
    Thanks so much, in advance, as always, for your assistance!
    So, here's a site I'm working on:
    http://www.mediamackenzie.com/cmix/cmix10.html
    I have 3 quick questions:
    - I tried, when I first started making this site, to load all of the artwork images into an array and then copy the array before resizing them for their specific functions (being seen as thumbnails or as full size pics.) Unfortunately, I ran into the well known issue of Array cloning only creating a pointer to the same group of items. I tried the newArray = oldArray.slice() trick, but it didn't seem to work. Finally, I just loaded the images twice into two separate arrays, and it works, but I hate this solution. Anyone got a better one?
    - I'm trying to maintain some sort of connection between the two sets of Arrays so that, for example, when someone clicks on Thumbnail 15, Fullsize Image 15 will open up but I couldn't find anything that worked. Renaming the Instance Name dynamically didn't seem to work and adding an Instance Variable dynamically doesn't seem possible either as I can't make the Class I am working with (Sprite, in this case) dynamic ahead of time. I'm sure there's a simple method for this. Any suggestions?
    - Lastly, notice how when the site opens up, the different animations seem to interfere with each other and slow each other down (they also seem to get interference from the time taken to load the image Arrays.) Anyone got any high level suggestions for how to avoid this?
    Thanks So Much!
    and Be Well
    Graham

    I'm still stuck, but close, I think. The URL: http://www.mediamackenzie.com/cmix/cmix11.html
    Here is the code from frame 1 of my Gallery MovieClip (an instance of which is created dynamically in the main timeline):
    stop();
    import fl.transitions.Tween;
    import fl.transitions.easing.*;
    var idealH = 120;
    var idealW = idealH + 50;
    var loadH = 300;
    var loadW = loadH * 2;
    var thumb = 0;
    var loadNum = 0;
    var thumby:Sprite;
    var darkStage:Sprite;
    var loadSprite:Sprite;
    var thumbArray:Array = new Array();
    var loadArray:Array = new Array();
    var bigLoad:Loader;
    var reSized:Boolean = false;
    this[thumb] = new Loader();
    this[thumb].contentLoaderInfo.addEventListener(Event.COMPLETE, thumbComplete);
    this[thumb].load(new URLRequest("images/0.png"));
    thumbArray.push(this[thumb]);
    function thumbComplete(e:Event):void {
        trace("thumbComplete");
        thumb++;
        this[thumb] = new Loader();
        this[thumb].load(new URLRequest("images/" + thumb + ".png"));
        thumbArray.push(this[thumb]);
        this[thumb].contentLoaderInfo.addEventListener(Event.COMPLETE, thumbComplete);
        this[thumb].contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, thumbError);
    function thumbError(e:IOErrorEvent):void {
        trace("thumbError");
        thumb = 0;
        thumbArray.pop();
        loadArray = thumbArray.slice();
        gotoAndStop(2);
    Now, here is the code from frame 2:
    //stop();
    addArrows();
    thumbResize();
    loadResize();
    function thumbResize():void {
    trace("thumbResize");
        for (var batch = 0; batch < Math.ceil(thumbArray.length / 8); batch++) {
            trace("batch " + batch);
            var batchSprite: Sprite = new Sprite();
            batchSprite.x = (batchSprite.x + (idealW / 1.5) + (batch * 800));
            //batchSprite.mouseEnabled = false;
            addChild(batchSprite);
            for (var row = 0; row < 2; row++) {
                trace("     row " + row);
                for (var col = 0; col < 4; col++) {
                    trace("          col " + col);
                    trace("               thumb " + thumb);
                    //If the width of the image is greater than the ideal width, OR the height is greater than the ideal height...
                    if ( thumbArray[thumb].content.width > idealW || thumbArray[thumb].content.height > idealH) {
                        //And if the width of the image is greater than the height, apply Scaler 1...
                        if ( thumbArray[thumb].content.width > thumbArray[thumb].content.height ) {
                            //Scaler 1 is the ratio of the ideal width to the image width
                            var scaler1 = idealW / thumbArray[thumb].content.width;
                            trace("               scaler1 = " + scaler1);
                            //Apply Scaler 1 to both the width and height of the image
                            thumbArray[thumb].content.scaleX = thumbArray[thumb].content.scaleY = scaler1;
                            trace("               image width:" + thumbArray[thumb].content.width);
                            trace("               image height:" + thumbArray[thumb].content.height);
                            //Otherwise, apply Scaler 2
                        } else {
                            //Scaler 2 is the ratio of the ideal width to the image height
                            var scaler2 = idealW / thumbArray[thumb].content.height;
                            trace("               scaler2 = " + scaler2);
                            //Apply Scaler 2 to both the width and height of the image
                            thumbArray[thumb].content.scaleX = thumbArray[thumb].content.scaleY = scaler2;
                            trace("               image width:" + thumbArray[thumb].content.width);
                            trace("               image height:" + thumbArray[thumb].content.height);
                        //Otherwise... (that is, the image width and height are in both cases less than the ideal)
                    } else {
                        //And if the width of the image is greater than the heigh, apply Scaler 3
                        if ( thumbArray[thumb].content.width > thumbArray[thumb].content.height ) {
                            //Scaler 3 is the ratio of the ideal width to the image width
                            var scaler3 = idealW / thumbArray[thumb].content.width;
                            trace("               scaler3 = " + scaler3);
                            //Apply Scaler 3 to both the width and height of the image
                            thumbArray[thumb].content.scaleX = thumbArray[thumb].content.scaleY = scaler3;
                            trace("               image width:" + thumbArray[thumb].content.width);
                            trace("               image height:" + thumbArray[thumb].content.height);
                        } else {
                            //Scaler 4 is the ratio of the ideal width to the image height
                            var scaler4 = idealW / thumbArray[thumb].content.height;
                            trace("               scaler4 = " + scaler4);
                            //Apply Scaler 4 to both the width and height of the image
                            thumbArray[thumb].content.scaleX = thumbArray[thumb].content.scaleY = scaler4;
                            trace("               image width:" + thumbArray[thumb].content.width);
                            trace("               image height:" + thumbArray[thumb].content.height);
                    thumbArray[thumb].content.x = - (thumbArray[thumb].content.width / 2);
                    thumbArray[thumb].content.y = - (thumbArray[thumb].content.height / 2);
                    thumby = new Sprite();
                    thumby.addChild(thumbArray[thumb]);
                    thumby.y = (row * (idealW + (idealW / 8)));
                    thumby.x = (col * (idealW + (idealW / 8)));
                    thumby.buttonMode = true;
                    thumby.useHandCursor = true;
                    thumby.addEventListener(MouseEvent.CLICK, enLarge);
                    batchSprite.addChild(thumby);
                    thumb++;
    function loadResize():void {
        trace("loadResize");
        for (var ex = 0; ex < loadArray.length; ex++) {
            //If the width of the image is greater than the ideal width, OR the height is greater than the ideal height...
            if ( loadArray[loadNum].content.width > loadW || loadArray[loadNum].content.height > loadH) {
                //And if the width of the image is greater than the height, apply Scaler 1...
                if ( loadArray[loadNum].content.width > loadArray[loadNum].content.height ) {
                    //Scaler 1 is the ratio of the ideal width to the image width
                    var scaler1 = loadW / loadArray[loadNum].content.width;
                    //Apply Scaler 1 to both the width and height of the image
                    loadArray[loadNum].content.scaleX = loadArray[loadNum].content.scaleY = scaler1;
                    //Otherwise, apply Scaler 2
                } else {
                    //Scaler 2 is the ratio of the ideal width to the image height
                    var scaler2 = loadW / loadArray[loadNum].content.height;
                    //Apply Scaler 2 to both the width and height of the image
                    loadArray[loadNum].content.scaleX = loadArray[loadNum].content.scaleY = scaler2;
                //Otherwise... (that is, the image width and height are in both cases less than the ideal)
            } else {
                //And if the width of the image is greater than the heigh, apply Scaler 3
                if ( loadArray[loadNum].content.width > loadArray[loadNum].content.height ) {
                    //Scaler 3 is the ratio of the ideal width to the image width
                    var scaler3 = loadW / loadArray[loadNum].content.width;
                    //Apply Scaler 3 to both the width and height of the image
                    loadArray[loadNum].content.scaleX = loadArray[loadNum].content.scaleY = scaler3;
                } else {
                    //Scaler 4 is the ratio of the ideal width to the image height
                    var scaler4 = loadW / loadArray[loadNum].content.height;
                    //Apply Scaler 4 to both the width and height of the image
                    loadArray[loadNum].content.scaleX = loadArray[loadNum].content.scaleY = scaler4;
            loadArray[loadNum].content.x = - (loadArray[loadNum].content.width / 2);
            loadArray[loadNum].content.y = - (loadArray[loadNum].content.height / 2);
            loadNum++;
    function addArrows():void {
        trace("addArrows");
        var batches =  Math.ceil(thumbArray.length / 8);
        var m = 0;
        trace("batches = " + batches);
        if (batches > 1) {
            for (var k = 1; k < batches; k++) {
                var triW = 20;
                var startX = (((800 - triW) * k) + (triW * m));
                var startY = (idealW / 2);
                var tri:Sprite = new Sprite();
                tri.graphics.beginFill(0xFFFFFF);
                tri.graphics.moveTo(startX, startY);
                tri.graphics.lineTo(startX, (startY + triW));
                tri.graphics.lineTo((startX + triW), (startY + (triW/2)));
                tri.graphics.lineTo(startX, startY);
                tri.graphics.endFill();
                tri.buttonMode = true;
                tri.useHandCursor = true;
                tri.addEventListener(MouseEvent.CLICK, moveLeft);
                addChild(tri);
                var tri2:Sprite = new Sprite();
                var startX2 = (startX + (triW * 2));
                tri2.graphics.beginFill(0xFFFFFF);
                tri2.graphics.moveTo(startX2, startY);
                tri2.graphics.lineTo(startX2, (startY + triW));
                tri2.graphics.lineTo((startX2 - triW), (startY + (triW / 2)));
                tri2.graphics.lineTo(startX2, startY);
                tri2.graphics.endFill();
                tri2.buttonMode = true;
                tri2.useHandCursor = true;
                tri2.addEventListener(MouseEvent.CLICK, moveRight);
                addChild(tri2);
                m++;
    function moveLeft(event:MouseEvent):void {
        var leftTween:Tween = new Tween(this, "x", Regular.easeOut, this.x, (this.x - 800), .5, true);
    function moveRight(event:MouseEvent):void {
        var rightTween:Tween = new Tween(this, "x", Regular.easeOut, this.x, (this.x + 800), .5, true);
    function enLarge(event:MouseEvent):void {
        darkStage = new Sprite();
        darkStage.graphics.beginFill(0x000000, .75);
        darkStage.graphics.drawRect(0, 0, stage.stageWidth, stage.stageHeight);
        darkStage.addEventListener(MouseEvent.CLICK, reMove);
        darkStage.buttonMode = true;
        darkStage.useHandCursor = true;
        parent.addChild(darkStage);
        var nmbr = thumbArray.indexOf(event.currentTarget);
        bigLoad = new Loader();
        bigLoad = loadArray[nmbr];
        trace("bigLoad: " + bigLoad);
        loadSprite = new Sprite();
        loadSprite.addChild(bigLoad);
        loadSprite.x = (stage.stageWidth / 2);
        loadSprite.y = (stage.stageHeight / 2);
        loadSprite.addEventListener(MouseEvent.CLICK, reMove);
        loadSprite.buttonMode = true;
        loadSprite.useHandCursor = true;
        parent.addChild(loadSprite);
    function reMove(event:MouseEvent):void {
        parent.removeChild(darkStage);
        parent.removeChild(loadSprite);
    The function enLarge is the source of the issue (I want the enlarged image to show up and it's not.)
    Please help if you can!
    Thanks,
    Graham

  • Need a little help with instance variables

    I'm still pretty new to this, but what I have here is some instance
    variables that I need to constuct a record from. This keeps track of a
    sorting process. In the public Sortable getRecord() method is where
    I need to construct that record, which is where I'm lost.
    I look at the tutorials on this site but still can't seem to find what I'm looking for.
    What's giving me so much trouble is that I have variables of different types
    and I can't out how to group them togther without getting some wierd error.
    public class SortableSpy implements Sortable {
        public Sortable a; // Sortable is an interface that this class inplements
        public int swaps;
        public int compares;
        public SortEvent events [];
        public int nevents;
        public SortableSpy(Sortable arr) {
                a = arr;              // These are
                swaps = 0;
                compares = 0;  // the variables I need
                nevents = 0;
                events = new SortEvent[1000];  // to use
        public Sortable getRecord() {
             // and this is where I need the record to be constructed
           // then another class will call this record which will keep track
          // of compares and swaps
              return ;
         Thanks for any help anybody can give me

    Why do you have a field that's the same type
    (implements the same interface) as the class itself?
    This is possible, of course, but what are you hoping
    to achieve by doing so?The interface was pre set-up by my professer. Here is the interface
    public interface Sortable  extends Stringable {
        public int size(); // Number of objects to sort
        public boolean inOrder(int i, int j); // are objs i and j in order?
        public void swap(int i, int j); // Swap objects at i and j
        public Stringable getS(int i);  // For debugging - make an
                                      // object being sorted stringable
    }>
    Your code would be easier to read, both for the
    person grading your homework and for anyone who wants
    to help you here, if you chose variable names that
    have meaning. "a" doesn't qualify.What "a" is suppose to be is an object that is sortable. So when I use a sorting
    algorithim it will sort "a". This part was also setup by my proffeser.
    >
    Where do you expect to get all the data that will go
    into those fields?I should've put the entire class here before, instead of just the constuctor
    here it is:
    public class SortableSpy implements Sortable {
        public int t;
        public Sortable a;
        public int swaps;
        public int compares;
        public SortEvent events [];
        public int nevents;
        public SortableSpy(Sortable arr) {
                a = arr;
                swaps = 0;
                compares = 0;
                nevents = 0;
                events = new SortEvent[1000];
        public Sortable getRecord() {
              return a;
         // ** construct a SortRecord from the instance variables
        public String brief() { // or here
                return "Number Of Events" + this.hashCode() + " (" + nevents + ")";
        public String verbose( ) {
              return "Number Of Compares" + this.hashCode() + " (" + compares + ")" +
              "Number Of swaps" + " (" + swaps + ")";
        public boolean inOrder(int i, int j) {
            compares++;
            SortEvent ev = new SortEvent();
            ev.i = i;
            ev.j = j;
            ev.e = EventType.Compare;
            events[nevents] = ev;
            nevents++;
         return a.inOrder(i,j);
        public void swap(int i, int j) {
                int temp = i;
                i = j;
                j = temp;
        public int size() { return nevents;};
        public enum EventType {compare, swap;
         public static Event Compare;}
        private class si implements Stringable {
                private int i;
                public si (int j) { i = j; };
                public String brief() { return " " + i;}
                public String verbose() { return this.brief();}
        public Stringable getS(int i) {
                return  a;
    }>
    getRecord may be better named "createRecord", if I
    understand what you're trying to do (I may not). But
    it sounds like this name may have been specified by
    your professor.
    Yeah get record is supose to return the number of times an
    algorithm swaps and compares objects during the sorting process
    sort of like spying in, as he described
    I get the impression that you've misunderstood a
    homework assignment.Unfortunaty I'm starting to think so myself, but thanks to both of you guys
    for the help you've giving me so far.

  • Fixed and variable sizes

    hi,
    i have a dought. What exactly the fixed and variable sizes represent in oracle.
    regards,
    kishore.

    hi kishore, seems you are using forums very well these days... :-)
    Part of the SGA contains general information about the state of the database and the instance, which the background processes need to access; this is called the fixed SGA. No user data is stored here. The SGA also includes information communicated between processes, such as locking information.
    more info on fixed size
    http://www.google.co.in/search?hl=en&q=fixed+size+in+sga&meta=&aq=0&oq=fixed+size+

  • What are FIXED SIZE and VARIABLE SIZE

    Hi what FIXED SIZE and VARIABLE SIZE stands for when starting oracle instance?
    thanks in advance

    read this
    http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:365088445659
    Aman....

  • Instance Retrieval Size

    I need to increase the Instance Retrieval Size to 500000.
    However, BPM warms that the maximum Instance Retrieval Size is 50000.
    If it needs to be increase to larger than 50000, how to do it?
    I am using BPM Enterprise 10.3.1 for WebLogic, Weblogic 10.3.0, and Oracle 11g.
    Edited by: YE on Dec 15, 2009 10:01 AM

    Your question is vary vague. Are you referring to Instance Size, or Instance Retrieval...
    BPM doesn't handle 50,000 instances very well... So they put that as the limit... I recommend keeping that number much lower (5k?)...
    If you're talking about Instance size, and your instances are are over 50mb... you really need to refactor the code, and eliminate (or nullify) instance variables, consider separated variables (Dan has plenty of forum posts on separated variables). Instance size should always be kept to a minimum, and unless specifically needed, should be lower than 64kb....
    HTH...

  • Are Instance Variables like Session Vairables?

    Hi All!
    I am curious to know in what form are the instance variables & attachments getting saved internally. e.g. xml form , cookies etc
    Just want to figure out if we use lot many instance variables will it make the session very heavy or are they stored in some kind of xml files.

    Actually the instance size limit is configurable. This limit only applies to the 'Normal' instance variables - which are serialized to the Engine's DB as a blob.
    If you need to store large amounts of data (more than 16->32kb) you can use Separated instance variables that are serialized differently.
    You can always increase the instance size limit, but this will limit the number of concurrent running instances the engine will support.
    Attachments are serialized to the engine's DB.
    - Tim

  • Variable Size Error.

    Hi Experts,
    I am using a variable to get the error message and use that in sending mail, but when i ran the scenario its error out saying,
    "ORA-12899: value too large for column".
    My assumption is when the error message exceed more than 200 characters its error out. So my question is how to increase the size of the variable size?
    Please help..
    Thanks

    Hi G,
    Thanks for your reply,
    Datatype : AlphaNumeric
    Action: Historize (I tried Not Persistance, last value also).
    please let me know if you need anything.

  • Variable size item problem in BOM

    hi all,
    We have semi-finished material with componets as variable size items (item cat. R)
    Now in the variable size tem data, Size 1 = 1,406 MM, Size 2 = 1,220 MM. Numner is 1 ST, formaula place is blank.
    Qty Var-Sz Item is calculated by system is 3.957 M2. On what basis this value is calculated?
    In the component material we have maintained a componenet scrap quantity as 15%.
    BOM ratio of header : component = 1NOS : 1 ST
    Again when we create a production order for the header, for 1 NOS header quantity component qty becomes 2.
    For 2 NOS of header qty, component becomes 3 like this.
    Why this happens..
    Regards,
    Srijit.

    Thread closed

  • Parsing XML and Storing values in instance variable

    hi,
    i'm new to XML.
    here i'm trying to parse an XML and store their element data to the instance variable.
    in my main method i'm tried to print the instance variable. but it shows "" (ie it print nothing ).
    i know the reason, its becas of the the endElement() event generated and it invokes the characters() and assigns "" to the instance variable.
    my main perspective is to store the element data in instance variable.
    thanks in advance.
    praks
    import java.io.*;
    import java.net.*;
    import java.util.*;
    import javax.xml.parsers.*;
    import org.xml.sax.*;
    import org.xml.sax.helpers.*;
    public class mysax extends DefaultHandler
         String ctelement;
         CharArrayWriter contents;
         String vname1,vrcbreg1,vaddress1,vcountry1,vtelephone1,vfax1;
         String vname,vrcbreg,vaddress,vcountry,vtelephone,vfax;
         public mysax()
              vname1 = null;
              vrcbreg1 = null;
              vaddress1 = null;
              vcountry1 = null;
              vtelephone1 = null;
              vfax1 = null;
              contents= new CharArrayWriter();
         public void doparse(String url) throws Exception
              SAXParserFactory spf = SAXParserFactory.newInstance();
    SAXParser sp = spf.newSAXParser();
    ParserAdapter pa = new ParserAdapter(sp.getParser());
    pa.setContentHandler(this);
    pa.parse(url);          
         public void startElement(String namespace,String localName,String qName,Attributes atts)
              ctelement = localName;     
         public void endElement(String uri,String localName,String qName) throws SAXException
         public void characters(char[] ch,int start, int length) throws SAXException
              try
                   if(ctelement.equals("name"))
                        vname = new String (ch,start,length);
                        System.out.println("The method "+vname1);
              }catch (Exception e)
                   System.out.println("The exception "+e);
         public static void main(String args[])
              try
              mysax ms = new mysax();
              ms.doparse(args[0]);
              System.out.println("the contents name "+ms.vname1);
              catch(Exception e)
                   System.out.println("this is exception at main" +e);
    my XML looks like
    <coyprofile_result>
    <company>     
    <name>abcTech</name>
    <rcbreg>123456789</rcbreg>
    <address>Singapore</address>
    <country>sg</country>
    <telephone>123456</telephone>
    <fax>123155</fax>
    </company>
    </coyprofile_result>

    I believe that the problem has to do with the value you assign to ctelement. You are assigning the value of localName to ctElement, however for the element: <name>...</name> the localname is empty string i.e. "", but qName equals "name". Because you are assigning empty string to ctElement, when you do the comparison in characters of ctElement to "name" it will always be false. So in startElement change it to ctElement = qName; Try it and see if it works. I have produced similar programs and it works for me.
    Hope this helps.

  • How to use an BPM Instance Variable in JSP page

    Hi All,
    I am using the JSP Presentation, but i don't know how to use an Instance variable in JSP page, that instance already declared in the process. And Can u explain the syntax that to include the JS file into jsp page
    Regards
    Vasu.
    Edited by bpmvasu at 04/03/2007 10:43 PM

    Hi Mariano,
    I'm using JSP presentation too. In "Interactive Component Call" active i'm using "Use JSP presentation", but i only can define one instance variable, i need to add more instance variables. In "Advanced" option of this task, i have the argument mapping .. but i don't understand how to use it.
    I have a instance variable called "genders" of the type String[Int] (Associative Array) and i'm mapping this instance variable in "Arguments Show In" option of the advanced option of JSP presentation. In JSP presentation i have the code:
    <select <f:fieldName att="person.gender"/>>
                   <c:forEach var="gender" begin="0" items="${genders}" varStatus="status">
                        <c:choose>
                             <c:when test="${person.gender == gender}">
                                  <option value="<c:out value="${gender}"/>" selected="true"><c:out value="${gender}"/></option>
                             </c:when>
                             <c:otherwise>
                                  <option value="<c:out value="${gender}"/>"><c:out value="${gender}"/></option>
                             </c:otherwise>
                        </c:choose>
                   </c:forEach>
              </select>And in my screenflow i have the code:
    genders[0] = "Male"
    genders[1] = "Female"But when i run my application, i have the error: "The task could not be successfully executed. Reason: 'java.lang.ClassCastException: java.lang.Integer'."
    What's the problem?

  • How to change value of instance variable and local variable at run time?

    As we can change value at run time using debug mode of Eclipse. I want to do this by using a standalone prgram from where I can change the value of a variable at runtime.
    Suppose I have a class, say employee like -
    class employee {
    public String name;
    employee(String name){
    this.name = name;
    public int showSalary(){
    int salary = 10000;
    return salary;
    public String showName()
    return name;
    i want to change the value of instance variable "name" and local variable "salary" from a stand alone program?
    My standalone program will not use employee class; i mean not creating any instance or extending it. This is being used by any other calss in project.
    Can someone tell me how to change these value?
    Please help
    Regards,
    Sujeet Sharma

    This is the tutorial You should interest in. According to 'name' field of the class, it's value can be change with reflection. I'm not sure if local variable ('salary') can be changed - rather not.

  • Variable size item:

    Hi
    Company procures copper sheet of certain thickness with different sizes. Stock keeping dimension is KG. Material master has alternative unit of measure and conversion factor for KG and cubic centimeter. Design department will enter this sheet dimension like 15005003 in BOM and it will correctly calculate KG with formula entered.
    My problem is shop floor person will come to know the dimension and KG relation but how store person will come to know what size he has to cut and issue against production order. As while issuing goods he can only see quantity in KG and not in cubic centimeters ?
    Surendra

    SDBSAP ,
    If its unanswered why you flaged it answered .......?
    and solution to your problem in standard sap is not possible.
    You need to go for development, logic can be , for all variable size items from a BOM you need to pick size 1 size 2 and size 3 to print on issue slip . It will give exact dimension to your storage person to issue the correct dimension sheet to shop floor.
    Regards
    Ritesh

  • Variable size items.

    Hi, im a PP consultant from bombay, i had a query regarding a client who is inti\o wooden frame manufacturing it is a strictly discrete industry and the client specifications vary with almost every request. at the moment the client is creating a new mat master for every new product thus causing the master materials to run into 50-60 thousand currently. i want to know if i can use variable size items to reduce the number of materials defined as all of the materials are from standard sized planks. stock is required to be maintained for all components individually.

    Hi,
    "If you want different-sized sections of a material (raw material) to be represented by one material number in BOM items, you use this item category."
    Ans lies in the your last statement(stock is required to be maintained for all components individually)You cannot go for variable size item as you need to maintain stock individually
    Revert if you have further query
    Reward points if useful
    Regards,
    SVP

Maybe you are looking for

  • Works only with Workshop

    Hi, I have done some updates which work fine with Workshop, but when I try to deploy the application, I get : Errors found in E:\upload_RE7\PortalApplication\Portail\WEB-INF\src\com\xxxxxxx\xxxxxx\common\Constants.java: Error at line 3 column 8: Desc

  • FW400 and FW800

    Hi. Okay, so recently I got a FW400 PCMCIA card to give me a dedicated buss for running FW400 devices off of, so that I could utilise the full potential of my FW800 external hard drive on the internal buss. But, I've noticed that, when the FW400 PCMC

  • Dual Network cards

    I have a G4 and want to add a NIC to ftp from a private network. If I don't disable the onboard ethernet port it doesn't work, how can I have both cards working where one card does only internet ant the other does ftp from an assigned IP network

  • Anchors/links within pages

    I really need to link from one iWeb page to an anchor inside another, but can't figure out how or if this can be done. To see what I mean, go here: http://web.mac.com/wildwing1/Recipes/Index.html What I want to do is make an anchor on each of the rec

  • Oversaturation problems when opening in RAW

    I'm just learning about color profiles and management right now, and can't figure out the cause/solution to this problem. Here is a screen shot of one image as it appears in Bridge - the one on the left is from the camera import, the one on the right