Can't see subprocess variables in multiinstance subprocess

Hello.
I'm trying to generate a multiinstance parallel subprocess, but when i create it i can't see the following variables:
- loopCounter
- numberOfActivities
- numberOfCompletedInstances
- numberOfInstances
- numberOfTerminatedInstances
This variables where created automatically in 11.1.1.3 when you created the subprocess as multiinstance, now i´m using 11.1.1.4 and no one of this variables is created.
Please, any help with the topic would be appreciated.
Thanks in advance.

This may not be much help for your 11.1.1.4 issue, but here's how I worked around the problem with the "loopCounter" variable not always being present in 11.1.15 when using subprocess activity with "MultiInstance" selected. I believe there are two bugs that these steps might help you work around.
Oracle BPM's subprocess activity can have two different loop properties. This means that based on an incoming array of information, work item instances are created for each item in the array.
Double click anywhere in the subprocess's grey background to bring up its properties. Click the Loop Characteristics tab.
If you want to simultaneously generate instances based on each item in incoming array, click the MultiInstance radio button. For the "Loop Characteristics" section in the dialog, set this to iterate through each item in the array coming into the subprocess. For example you might have a variable called "parts" that is the array. Use the count( ) method to determine the number of items in the array.
The "Completion Condition" portion of this dialog determines how many separate instances will be spawned by this subprocess. On the left side of the less than sign, use the loopCounter variable that is automatically created when the "MulitInstance" property was selected. On the right side of the less than sign, insert the same count( ) method you used int he "Loop Characteristics" section. This means that this subprocess will continue creating instances until the last item in the array has been hit.
Click the Arguments tab. In theory, you would think that only the item in the array being iterated through would need to be sent into the subprocess as an argument. The problem is that the "loopCounter" variable is not available to be used here. There is a bug that you have to work around. If you click on the "Use Associations" radio button and click the Edit button, in theory you should be able to build an expression that uses the "loopCounter" variable here to just pass a single object into the subprocess. There is a bug that prevents "loopCounter" from appearing when building the expression. As a result, work around the bug by passing in the entire array into the subprocess as an argument.
Add a Script activity in the subprocess to extract the individual item in the array. Use the "loopCounter" in this to set a single item in the array to used by the subprocess.
For this to work, there is one more work around that you have to do. Add a timer activity just before the Script activity you just added. Set the timer to wait one second. This means that a new instance will be created every second until all the items in the array have been run. If you do not add this timer activity, the same instance is created in the subprocess even though you think the loopCounter is iterating through the array. This means that if you do not add this timer activity, if the array has "Supervisor", "Manager", "Shipping Clerk" then all three individual work item instances spawned will all be created for the "Shipping Clerk".

Similar Messages

  • Can't see member variables when debugging with jrockit

    Hi all,
    I'm using WLS 8.1.4 with jrockit and trying to do remote debugging while connecting from IntelliJ Idea 4.5.4. Everything works fine except that I can't see a class's member (or instance) variables in the debugger. I can see static and local variables, step through the code, etc. If I switch to Sun's jvm that came with WLS (1.4.2 05) I can see member variables. Is there a setting to change this or is it a known issue? I'm using -Xdebug -Xrunjdwp:transport=dt_socket,server=y,address=5005,suspend=n as my startup args.
    thanks

    I just check with IntelliJ support on this issue. They say that its a known issue with IntelliJ 4.5. According the them a fix has been implemented and debugging of member variables is possible in IDEA 5.x versions.

  • Can't see good variables in Query Designer BW 7.0

    Hello,
    The technical name of our caracteristic variables in the Query Designer are prefixed by "OR_" or "SV_". I try to make a filter in this variables (for example: a user must be able to see only "SV_" variable) with the authorization objects S_RS_COMP and S_RS_COMP1. But this filter does not work, even if the ST01 trace shows me a Return Code = 4 for the test in the variable technical name.
    Have I made something wrong ? is it a bug ? (we are in BW 7.0 SPS9 with Sapgui 6.40 SP 19 and BEx SP 12).
    Thank you for your help

    Hi Paul,
    If iam not worng, are you asking about Infoobject level security in BW?
    If it is, the following are the steps need to be implemented:
    <u><b>Steps to Implement InfoObject Security (field-level security)</b></u>
    1) Make the InfoObject authorization-relevant.
    The Authorization Relevant setting for an InfoObject made in the InfoObject definition on the Business Explorer tab. The business needs will drive which InfoObjects should be relevant for security. Keep in mind that the people using SAP BWare running queries to help make strategic decisions on how to better run the business. The decision makers typically need to see more data on SAP BW than they would need to see in SAP R/3.
    2) Create a custom reporting authorization object.
    Since there are no reporting authorization objects provided for InfoObjects, you will have to create your own reporting authorization object for any InfoObject you decide to secure. This is done in transaction code RSSM. When creating your reporting authorization object, you select which fields to put in the authorization object from a list of authorization-relevant InfoObjects. Only InfoObjects that have been marked Authorization Relevant are eligible to be put in a reporting authorization object.
    3) Add your new authorization object to a role.
    Once you have created an new reporting authorization object and linked it to the appropriate InfoCube(s), users will need access to your reporting authorization object. You will need to manually insert your object into a role.
    4) Add a variable to the query.
    The reason the variable is required is sometimes unclear at first. If we want a  query to only provide results based on the division, for example, then the query itself needs the ability to filter specific division values. Before we can secure on division, the query must be  able to restrict data by division. The only way the query can restrict data dynamically is through a variable.
    5) Link the reporting authorization object to an InfoProvider.
    Linking your reporting authorization object to an InfoProvider is a very critical step. In this step, you will impact people currently executing queries for the InfoProvider that is now related to your reporting authorization object. This linkage forces your reporting authorization object to be checked when ANY query tied to the InfoProvider is executed.
    Hope it helps, please revert back if you are asking for something else.
    Please reward points if it is sueful.
    Thanks & Regards,
    Santosh

  • Debugger can't see XML variable data

    I took a small app over from Flex 2 (really simple, load
    myxml.xml from the local directory and display contents into a
    textarea field).
    var pXML:XML = new XML( event.result.myRootNode );
    textArea.text = pXML.toXMLString();
    When I hit a breakpoint in Flex 2, I am able to traverse the
    XML nodes in the Variables window and see child xml. In Flex 3, I
    only get &quot;[object Object]&quot; for my variable. I can
    see the nodes in 'event.result', and there seems to be a new
    &quot;object&quot; tree as well as the
    'node.ObjectProxy@...' in that.
    In Flex 2 the textArea shows the xml document, in Flex 3 it
    shows &quot;[object Object]&quot;
    Ideas? Much appreciated if so.

    Hi Fred,
    Did you forget to put resultFormat=&quot;e4x&quot;?

  • Can't see 'Local Variables' while debugging in Sun Studio 11

    I am debugging a C/C++ application built with Sun Studio 11 running on Solaris 10. I load the application as always, set a breakpoint and run. The debugger stops at the assigned breakpoint as expected.
    The issue is that at this point there are no local variables displayed in the local variables pane.
    I have tried restarting SS11, rebuilding, etc...
    This is the first time I have seen this happen.
    Does anyone else have an idea what is wrong?

    Does adding a particular variable to Watch view help? (it can be done by typing "display <variable>" in dbx command line).
    You can also try erasing (or better moving to a temporary location) all Sun Studio settings like this:
    mv -f ~/.sunstudio /tmpand start debugging session again.

  • Can't see Substitution variables in FR Studio

    Hi All,
    When I expand substituon Variables in FR Studio, no variables in the list. Previously it showed the list variables. Suddenly, no varibles are there. I have restarted the FR Studio, but still I am facing the same issue. What might be the reason.
    We are using Hyperion system 9.3.1
    Thanks in Advance,
    Sravan Kumar.

    Hi,
    Issue is resolved. Substituion variable values are surrounded by quotes in EAS. I removed the quotes and now working fine.
    But, if any of member name having ay special characters then I need to put quotes around the member, in that case how it will be. Any ideas please.
    Thanks & Regards,
    Sravan Kumar.

  • How can i see the code of SAP Exit for SAP Defined Variables

    Hi,
       It's very Urgent! How can i see the Source Code of SAP Provided Variables. I need to write code for User Defined Variables. please help me. It's very Urgent.
    Thanks in Advance.
    Nagesh.

    hi Nagesh,
    sample code for variable exit,
    there is 'how to' docs, can't see your email address.
      DATA: L_S_RANGE TYPE RSR_S_RANGESID.
      DATA: LOC_VAR_RANGE LIKE RRRANGEEXIT.
      CASE I_VNAM.
      WHEN 'CUMMONTH'.
        IF I_STEP = 2.                                  "after the popup
          LOOP AT I_T_VAR_RANGE INTO LOC_VAR_RANGE
                  WHERE VNAM = 'MONTH'.
            CLEAR L_S_RANGE.
            L_S_RANGE-LOW      = LOC_VAR_RANGE-LOW(4)."low value, e.g.200001
            L_S_RANGE-LOW+4(2) = '01'.
            L_S_RANGE-HIGH     = LOC_VAR_RANGE-LOW.   "high value = input
            L_S_RANGE-SIGN     = 'I'.
            L_S_RANGE-OPT      = 'BT'.
            APPEND L_S_RANGE TO E_T_RANGE.
            EXIT.
          ENDLOOP.
        ENDIF.
      ENDCASE.

  • Can't see variables when debugging

    I'm just moving up from AS2 to AS3, using CS3. After
    searching through the help, I'm finding out most of the stuff I
    need to debug with, but I can't seem to see the variables in the
    variable window.
    I've looked through the documentation, and tried touching all
    the buttons they say to touch and setting the publish settings to
    allow debugging. Nothing seems to be working.
    And, unlike AS2, the program seems to start all by itself, it
    doesn't wait till I click on the arrow to begin, and I can't get
    the step into and step through buttons to not be greyed out.
    What am I doing wrong?
    Thanks.

    Yes, unfortunately it's not too obvious what you have to do,
    which is, when the movie is testing, and with Flash (not Flash
    Player) in front, go to the Window menu and in the Debug Panels
    check the Debug Console and Variables items. It should remember
    next time, until you get a Flash crash, in which case those
    settings may reset again.
    Once you're used to the AS3 debugging, going back to the AS2
    one is mildly depressing!

  • Can not see long text description of a characteristics in portal

    Hi experts,
    I designed two queries via Query designer and published them to portal but I can not see the the long text description of "Name" attribute belongs to 0BPARTNER characteristics.
    One of the queries shows only the last name of partner in portal while it is showing full name and last name in Bex Analyzer. The other query shows only the key value in both portal and Bex Analyzer.
    I want to see long text description in both queries.
    For an additional information, I'm extracting data from CRM 5.00 to BW 7.00
    What will be the reason for this and how can I solve it?
    Can anyone help me for this issue, it's a kind of emergency situation.

    Hi,
    we have the same problem.
    We want to change <b>only</b> in the screen variable the hierarchy text (from default to long\medium text) but even if there's a possibility to do this, really it doesn't happen anything - it' s possible when you start query, in the selection screen inside every the variable there's a command "User Settings" in which manage what you want to see (I put display custom, as text, medium text).
    I try to do this also in query analizer, selecting variable (hierarchy) and enter in this (user setting), changing in display custom as text - medium text, but even if I save this settings, really doesn't happen anything.
    It seems the system isn't sensitive to this selection...
    By now, if someone has an answer, please write us!
    Thanks in advance,
    Alessandra Mirone

  • Can't see the issue in code...please help

    I have this procedure within a package. Trying to compile and can't...get errors and I can't see why...any help???
    PROCEDURE KILL_ORPH_2PHASE_COMMITS (inLocal_tran_id IN varchar2) is
      tsql            VARCHAR2(256);
      v_local_tran_id varchar2(22 byte);
    BEGIN
    IF inLocal_tran_id is not null then
        tsql := 'ROLLBACK FORCE ''' || inLocal_tran_id || '''';
        dbms_output.put_line(tsql);
        EXECUTE IMMEDIATE tsql;
        RETURN;
    END IF;
        --open cursor
        open cur_2pc;
        loop
          --fetch cursor data
          fetch cur_2pc
            into v_local_tran_id;
          exit when cur_2pc%NOTFOUND;
          tsql := 'ROLLBACK FORCE ''' || v_local_tran_id || '''';
          dbms_output.put_line(tsql);
          EXECUTE IMMEDIATE tsql;
    EXCEPTION
      WHEN OTHERS
        THEN
          dbms_transaction.purge_lost_db_entry('''' || v_local_tran_id || '''');
    END;
    END LOOP;
    CLOSE cur_2pc;
    END KILL_ORPH_2PHASE_COMMITS;Error is:
    Compilation errors for PACKAGE BODY ADMIN.ADMIN_DBA_MAIN
    Error: PLS-00103: Encountered the symbol "EXCEPTION" when expecting one of the following:
    ( begin case declare end exit for goto if loop mod null
    pragma raise return select update while with <an identifier>
    <a double-quoted delimited-identifier> <a bind variable> <<
    continue close current delete fetch lock insert open rollback
    savepoint set sql execute commit forall merge pipe purge
    Line: 40
    Text: EXCEPTION
    Error: PLS-00103: Encountered the symbol "LOOP" when expecting one of the following:
    Line: 45
    Text: END LOOP;

    The BEGIN and END are not matching..??
    From your code, it looks like...you want each statement in your loop to have it's own begin..exception..end..
    BEGIN
    IF inLocal_tran_id is not null then
        tsql := 'ROLLBACK FORCE ''' || inLocal_tran_id || '''';
        dbms_output.put_line(tsql);
        EXECUTE IMMEDIATE tsql;
        RETURN;
    END IF;
        --open cursor
        open cur_2pc;
        loop
       BEGIN----------<<<<<<<<Begin for each iteration to have it's own loop...
       ------------>>>(this is for each statement in the loop...)
         --fetch cursor data
          fetch cur_2pc
            into v_local_tran_id;
          exit when cur_2pc%NOTFOUND;
          tsql := 'ROLLBACK FORCE ''' || v_local_tran_id || '''';
          dbms_output.put_line(tsql);
          EXECUTE IMMEDIATE tsql;
    EXCEPTION
      WHEN OTHERS
        THEN
          dbms_transaction.purge_lost_db_entry('''' || v_local_tran_id || '''');
    END;
    END LOOP;
    END KILL_ORPH_2PHASE_COMMITS; ----<<<Another End for the procedure....>>>

  • I can not see the physical queries into NQQuery file

    Hi all,
    I have set the logging level for the Administrator to 4 but I can not see any query into NQuery.log file. I only can see the queries from the initialization blocks.
    Could someone please provide me some help on that?
    Thanks in advance!
    Víctor.

    Hi all,
    For all users information:
    In the repository OracleBIAnalyticsApps.rpd provided by BI Apps there is a system variable named LOGLEVEL. I have modified this variable to 7 value and then the physical queries are showed in the NQQuery.log file.
    Thanks to all for your inputs!!
    Víctor.

  • Macbook can't see time capsule through airport utility; powerbook can.

    This question probably applies to Airport Extremes as well as Time Capsules, but I happened to see it with a new TC.
    My Time Capsule came in yesterday. My plan was to bridge it into my existing network to serve 802.11n over 5ghz. I did the initial setup using a 12" powerbook and it worked fine. I set the Time Capsule in bridge mode and for 802.11n 5ghz, plugged it into my network, and reset. The light on the TC turned green and all looked like it was working. At least, until I tried to connect through my Macbook Pro.
    I installed the Airport Utility software that came with the TC, rebooted, then launched Airport Utility -- and it couldn't find any devices. It can, however, see the Airport's wireless network. After a reboot of the TC, it can also connect to the Airport's wireless network. I can get to the internet and the local network, but cannot see the Airport through Airport Utility and cannot see the Time Capsule disk. It's as if Bonjour is being blocked between my laptop and the Airport. This happens whether I'm connected to the TC wirelessly or wired.
    I've tried restoring to factory defaults and starting over (I still can't see the TC, even after a hard reset) and I've tried a hard reset of the TC (I had to, actually -- it hung during startup several times). In each case, the powerbook can see it, but the macbook can't. I'm out of things to try. If I can't get this resolved soon, I'm going to have to return the TC, since it's useless if I can't access the disk.
    I was planning on upgrading the two computers to Leopard over the weekend, then use the TC for Time Machine for both computers, but if it's not working for Tiger I'm worried that it won't work for Leopard, either.
    Is there any variable anyone knows of that blocks a computer from seeing an base station through the Airport Utility? A non-obvious firewall setting, perhaps, or something that could be blocking Bonjour? Does Airport detection even use Bonjour, or am I on the wrong track?
    Thanks

    An update: I can see the Airport configuration of the TC through my Macbook if I pick File->Configure Other... on the Airport Utility, and then put in the IP address. Which leads me to believe that it's a Bonjour issue, but I haven't figured out more than that.
    Of course, the TC is still useless for Time Machine if I can't get to the disk, so the problem remains.

  • How can I see the bitrate while playing a DVD?

    (I posted that also on the DVD Studio Pro page, but there I got an advice that points to a professional and expensive tool - Digigami's 'Mpressionist'. Maybe here someone can help me with a simpler sollution. I will post on both sides potential sollutions.)
    So, I have a DVD encoded with variable bitrate, and I want to see the bitrate while playing the movie. In QuickTime I can see only the "global" bitrate, not the one of the actual scene.
    Thanks.

    For the moment I got only that:
    - MPressionist, a very nice tool, but very expensive too;
    - MacDVDBitrateParanoia that displays the bitrate of the whole DVD as a graph, but not while the DVD plays, so I can not see the relation between complexity of a scene and the bitrate.

  • Could someone look at my code, I can't see the error myself

    Hi,
    I have been working on a small game, and have been able to make most of it run.
    However, every now and again when i try to start it, it loads the frame and graphics, but don't start the game loop.
    I think i have been starring at it too long, because i can't see WHY?
    Here is the code, i assume its something connected to the boolean "waitingForKeyPress"
    Sorry about the commentss being in danish, but its a quite simple program, so im sure it makes sense.
    public class EagleFlight extends Canvas {
         private static final long serialVersionUID = 1L;
         //Strategybuffer til page flipping, samt grafiske variable.
         private BufferStrategy strategy = null;
         //private BufferedImage backbuffer = null;     
         private ImageEntity background = null;     
         //private Graphics2D g;     
         //private BufferedImage expl;
         private BufferedImage[] explosion2;     
         private boolean gameRunning = true;
         //Lister over entiteter i spillet.
         private ArrayList<Entity> entities = new ArrayList<Entity>();
         private ArrayList<ShipEntity> shipAnimation = new ArrayList<ShipEntity>();
         //Lister over entiteter der evt skal fjernes i gameLoop.
         private ArrayList<Entity> removeList = new ArrayList<Entity>();
         private ArrayList<Entity> removeAsteroid = new ArrayList<Entity>();
         //Variable til spillerens skib.
         private ShipEntity ship, shipL, shipR, eagleM;
         private double moveSpeed = 300;
         private long lastFire = 0;
         private long firingInterval = 500;
         private String message = "";
         //Booleans til keyInput og spilkontrol.
         private boolean waitingForKeyPress = true;
         private boolean leftPressed = false;
         private boolean rightPressed = false;
         private boolean firePressed = false;
         private boolean isThrusting = false;
         private Boolean shipHit = false;
         private Boolean animation = false;
         //Klasser der bruges i spillet.
         private FXSound fxSound = null;
         private Music music;     
         int score =0;
         private int astroidCount = 0;
         //Variable til ekspoltionsanimation.
         private int v = 0, x = 0, y = 0, eksp = 0;
         //Opretter JFrame og tilf&#65533;jer JPanel.
         public EagleFlight(){
              JFrame container = new JFrame("Eagle Flight 1999");                    
              JPanel panel = (JPanel) container.getContentPane();
              panel.setPreferredSize(new Dimension(800,600));
              panel.setLayout(null);
              //Tilf&#65533;jer EagleFlight canvas til JPanel
              setBounds(0,0,800,600);
              panel.add(this);
              //S&#65533;ttes til true, s&#65533; for&#65533;get graphics har ansvaret.
              setIgnoreRepaint(true);
              //Pakker og synligg&#65533;r vinduet.
              container.pack();
              container.setResizable(false);
              container.setVisible(true);
              // Tilf&#65533;jer windows close funktion
              container.addWindowListener(new WindowAdapter() {
                   public void windowClosing(WindowEvent e) {
                        System.exit(0);
              // Tilf&#65533;jer keyListener og inputhandler.
              addKeyListener(new KeyInputHandler());
              //S&#65533;tter fokus til dette vindue-
              requestFocus();
              // Laver buffering strategy til accelerated graphics
              createBufferStrategy(2);
              strategy = getBufferStrategy();
              // Tilf&#65533;jer midlertidigt Entities, s&#65533; startsk&#65533;rmen ikke er tom.
              initEntities();
         }//End of EagleFlight().
         //Nulstiller variable og lister.
         private void startGame() {
              entities.clear();
              initEntities();          
              shipHit = false;          
              leftPressed = false;
              rightPressed = false;
              firePressed = false;
              gameRunning = true;
              music = new Music();
              music.start();
              waitingForKeyPress = false;
         }//end of startgame().
         private void initEntities() {
              //Laver 3 skibe til thrusteranimationen.
              ship = new sprite.ShipEntity(this,"eagle.png",370,430);
              shipL = new sprite.ShipEntity(this,"eagle1.png",370,430);
              shipR = new sprite.ShipEntity(this,"eagle2.png",370,430);
              shipAnimation.add(ship);
              shipAnimation.add(shipL);
              shipAnimation.add(shipR);
              //Opretter baggrundsbillede.
              new BufferedImage(800,600,BufferedImage.TYPE_INT_RGB);
              background = new ImageEntity("stars.png",0,0);
              //Klarg&#65533;r special effect lyd.
              fxSound = new FXSound();
              //Opretter eksplotionsanimation
              explosion2 = new ExplotionImages().explosion();
              //Laver en pokkers bunke asteroider og placerer dem "over" JPanel, s&#65533; de falder naturligt.
              for (int row=0;row<6;row++) {
                   for (int x=0;x<10;x++) {
                        Entity astroid = new sprite.Astroid(this,"asteroid1.png",20+(x*120),(-2800)+row*400);
                        entities.add(astroid);                                   
                        astroidCount++;
              for (int row=0;row<6;row++) {
                   for (int x=0;x<10;x++) {
                        Entity astroid = new sprite.Astroid(this,"asteroid4.png",20+(x*120),(-3800)+row*400);
                        entities.add(astroid);                                   
                        astroidCount++;
              for (int row=0;row<6;row++) {
                   for (int x=0;x<10;x++) {
                        Entity astroid = new sprite.Astroid(this,"asteroid2.png",20+(x*120),(-4800)+row*400);
                        entities.add(astroid);                                   
                        astroidCount++;
              for (int row=0;row<6;row++) {
                   for (int x=0;x<10;x++) {
                        Entity astroid = new sprite.Astroid(this,"asteroid3.png",20+(x*120),(-5800)+row*400);
                        entities.add(astroid);                                   
                        astroidCount++;
         }//end of initEntities()
         //Fjerner de entities der ikke bruges mere.
         //@param entiteten der skal fjernes.
         public void removeEntity(Entity entity)
              removeList.add(entity);               
         }//end of removeEntity().
         //Tilf&#65533;jer ramte asteroider til remove listen.
         //@param entiteten der skal tilf&#65533;jes.
         public void removeAsteroid(Entity doomed){
              removeAsteroid.add(doomed);
         }//End of removeAsteroid().
         //Udf&#65533;res n&#65533;r spilleren d&#65533;r.
         public void notifyDeath() {
              message = "All your base are belong to us!";
              shipHit = true;
              removeAsteroid.add(eagleM);
              shipAnimation.clear();          
         }//End of notifyDeath().
         //Fors&#65533;ger at affyre v&#65533;ben, hvis reload er ok og skibet ikke er ramt.
         public void tryToFire() {
              // check that we have waiting long enough to fire
              if (System.currentTimeMillis() - lastFire < firingInterval) {
                   return;
              if (!shipHit){
                   lastFire = System.currentTimeMillis();
                   ShotEntity shot = new sprite.ShotEntity(this,"shot.gif",ship.getX()+23,ship.getY()-15);
                   entities.add(shot);
                   fxSound.fxSound1();
         }//End of tryToFire().
         //Metode til at vinde spillet.
         public void notifyAlienKilled() {
              astroidCount--;
              score++;
              fxSound.fxSound3();
              if (astroidCount == 0) {
         }//End of notifyAlienKilled()
         public void gameLoop() {
              long lastLoopTime = System.currentTimeMillis();
              long timeInGame = 0;
              // I dette loop udf&#65533;res spillets grafik og logik.
              while (gameRunning) {
                   // Beregner tid for hvor meget de enkelte grafiske enheder skal flyttes
                   long delta = System.currentTimeMillis() - lastLoopTime;
                   lastLoopTime = System.currentTimeMillis();
                   timeInGame = (timeInGame + System.currentTimeMillis()/100000);
                   // Skaffer den grafiske acceleration.
                   // Tegner baggrunden.
                   Graphics2D g = (Graphics2D) strategy.getDrawGraphics();
                   background.draw(g);
                   //Cykler rundt mellem asteroider og flytter dem.
                   if (!waitingForKeyPress) {
                        for (int i=0;i<entities.size();i++) {
                             Entity entity = (Entity) entities.get(i);
                             entity.move(delta);
                        //Bev&#65533;ger de 3 skibe i sync.
                        for (int e=0;e<shipAnimation.size();e++) {
                             ShipEntity fakeeaglemove = (ShipEntity) shipAnimation.get(e);
                             fakeeaglemove.move(delta);
                   // Cykler rundt mellem entities og tegner dem.          
                   for (int i=0;i<entities.size();i++) {
                        Entity entity = (Entity) entities.get(i);
                        entity.draw(g);
                   //Tegner det skib der er i brug.
                   for (int e=0;e<shipAnimation.size();e++)
                        eagleM = (ShipEntity) shipAnimation.get(e);
                        if (leftPressed)
                        {eagleM = shipL;
                        if (rightPressed)
                        {eagleM = shipR;
                        else if ((!leftPressed) && (!rightPressed))
                        {eagleM = ship;
                        eagleM.draw(g);
                   //Brute force detection p&#65533; skibet og asteroider.               
                   try {
                        for (int c = 0; c < entities.size(); c++) {
                             for (int m = 0; m < shipAnimation.size(); m++) {
                                  Entity me = (Entity) shipAnimation.get(m);
                                  Entity him = (Entity) entities.get(c);
                                  if (me.collidesWith(him)) {
                                       //removeAlien.add(him);
                                       me.collidedWith(him);
                                       him.collidedWith(me);
                   } catch (Exception e) {
                   //Brute force detection p&#65533; skud og asteroider.
                   try {
                        for (int p = 0; p < entities.size(); p++) {
                             for (int s = p + 1; s < entities.size(); s++) {
                                  Entity me = (Entity) entities.get(p);
                                  Entity him = (Entity) entities.get(s);
                                  if (me.collidesWith(him)) {
                                       me.collidedWith(him);
                                       him.collidedWith(me);
                   } catch (Exception e) {
                   //Explotion animation.
                   for (int i=0;i<removeAsteroid.size();i++) {
                        Entity entity = (Entity) removeAsteroid.get(i);
                        explosion(entity);                                   
                   if (animation){
                        int sequence[] = { 0,1,2,3,4,5,5,4,3,2,1,0};                    
                        eksp = sequence[v];
                        g.drawImage(explosion2[eksp], x-100,y-100, null);
                   //Afslutter spillet hvis spillerens skib er ramt.
                   if (eksp == 0 || v == 12){     
                        if (shipHit){
                             animation = false;
                             waitingForKeyPress = true;
                             music.stop();                                        
                             if(isThrusting){
                                  fxSound.StopThruster();
                        animation = false;
                        v = 0;
                        eksp = 0;
                   v++;//Opdaterer image nummer for eksplotionsanimation til n&#65533;ste genneml&#65533;b.
                   // Fjerner entities der ikke er med mere.
                   entities.removeAll(removeList);
                   entities.removeAll(removeAsteroid);
                   //Nulstiller removelisterne
                   removeList.clear();                              
                   removeAsteroid.clear();
                   // Mens der ventes p&#65533; keyinput vises dette.
                   if (waitingForKeyPress) {
                        g.setColor(Color.white);
                        g.drawString(message,(800-g.getFontMetrics().stringWidth(message))/2,250);
                        g.drawString("Insert coin",(800-g.getFontMetrics().stringWidth("Insert coin"))/2,300);
                        timeInGame = 0;
                   g.setColor(Color.white);               
                   g.drawString("Score: "+score,720,595);
                   g.drawString("Time in Flight: "+timeInGame/1000000000+" Secs",5,595);
                   // Graphics ryttes op og bufferen flippes.
                   g.dispose();
                   strategy.show();
                   // Nulstiller skibets bev&#65533;gelse.
                   ship.setHorizontalMovement(0);
                   shipL.setHorizontalMovement(0);
                   shipR.setHorizontalMovement(0);
                   //Tilpasser skibets horizontale bev&#65533;gelseshastighed til input.
                   if ((leftPressed) && (!rightPressed))
                        ship.setHorizontalMovement(-moveSpeed);
                        shipL.setHorizontalMovement(-moveSpeed);
                        shipR.setHorizontalMovement(-moveSpeed);
                   else if ((rightPressed) && (!leftPressed))
                        ship.setHorizontalMovement(moveSpeed);
                        shipL.setHorizontalMovement(moveSpeed);
                        shipR.setHorizontalMovement(moveSpeed);//animationtest ship changed to eagle
                   //Affyrings sekvens
                   if (firePressed)
                        tryToFire();
                   // Lille pause til andre ting.
                   try { Thread.sleep(10); } catch (Exception m) {}
         }//End of gameLoop
         //Metode til kontrol af thrusterlyden.
         private void thrusterSound(){
              if (!isThrusting){
                   fxSound.fxSound2();               
                   isThrusting = true;
         }//End of thrusterSound
         //Metode til at inds&#65533;tte eksplotion p&#65533; den rette plads.
         //@param den ramte entitet.
         private void explosion(Entity entity){
              x = entity.getX();
              y = entity.getY();
              animation = true;
         }//End of explosion
         //Inner class der klarer input fra keybard.
         private class KeyInputHandler extends KeyAdapter {
              //S&#65533;tter t&#65533;ller til 1, s&#65533; wait for input virker.
              private int pressCount = 1;
              //@param den trykkede tast.
              public void keyPressed(KeyEvent e) {
                   // Ser f&#65533;rst om der ventes p&#65533; input til start.
                   if (waitingForKeyPress) {
                        return;
                   //Er spillet igang udf&#65533;res input
                   if (e.getKeyCode() == KeyEvent.VK_LEFT) {
                        leftPressed = true;                         
                        thrusterSound();
                   if (e.getKeyCode() == KeyEvent.VK_RIGHT) {
                        rightPressed = true;
                        thrusterSound();
                   if (e.getKeyCode() == KeyEvent.VK_SPACE) {
                        firePressed = true;
              } //End of keyPressed
              //Stopper handlingen fra input
              //@param den trykkede tast.
              public void keyReleased(KeyEvent e) {
                   // if we're waiting for an "any key" typed then we don't
                   // want to do anything with just a "released"
                   if (waitingForKeyPress) {
                        return;
                   if (e.getKeyCode() == KeyEvent.VK_LEFT) {
                        leftPressed = false;
                        fxSound.StopThruster();
                        isThrusting = false;
                   if (e.getKeyCode() == KeyEvent.VK_RIGHT) {
                        rightPressed = false;
                        fxSound.StopThruster();
                        isThrusting = false;
                   if (e.getKeyCode() == KeyEvent.VK_SPACE) {
                        firePressed = false;
              }//End of keyReleased
              //Metode til at starte spillet med any key.
              //@param den trykkede tast.
              public void keyTyped(KeyEvent e) {
                   if (waitingForKeyPress) {
                        if (pressCount == 1) {
                             // Starter spillet.
                             waitingForKeyPress = false;
                             startGame();
                             //pressCount = 0;
                        } else {
                             pressCount++;
                   // Tilf&#65533;jer esc key til at afslutte spillet.
                   if (e.getKeyChar() == 27) {
                        System.exit(0);
         }//End of KeyTyped.
         public static void main(String args[])
              EagleFlight ef = new EagleFlight();          
              ef.gameLoop();
         }//End of main.
    }//End of class EagleFlight.

    Mondariz wrote:
    It was a copy/paste job from Eclipse, not suer why it formatted like this. You need to add code tags.
    [edit: do what Darryl says... as opposed to my crap version that did not format properly either]
    As far as the tracing goes. It shouldn't be taking hours. Start by putting them in where your program starts and move on.

  • How can I transfer a variable to regexp_replace function

    Hi,
    In addition to my question from yesterday, I went up one (little) level for the next question.
    How can I transfer a variable to regexp_replace function?
    I am getting the value of the variables from from APEX Items.
    The value of item :P105_OLD_NAME should be replaced with the value from :P105_NAME APEX item.
    The projects in PROJECT_NAME field are separated by “:”
    select * from infoux_proj;
    HOSTNAME PROJECT_NAME
    host1 proj2:proj1
    host3 proj1
    host4 proj12:proj1
    host5 proj3
    host2 proj1:proj3:sunproj1
    this is my code:
    declare
    v_old_proj_list varchar(100);
    v_new_proj_list varchar(100);
    begin
    for host in (select a.hostname, project_name
    from infoux_proj a,
    (select hostname
    from PROJECT_NAMES_WITH_HOSTNAMES
    where name = :P105_OLD_NAME ) b
    where a.HOSTNAME=b.hostname)
    loop
    select project_name ,
    regexp_replace(project_name,'(^|:)(:P105_OLD_NAME)(:|$)','\1:P105_NAME \3') new_project
    into v_old_proj_list, v_new_proj_list
    from infoux_proj
    where hostname=host.hostname;
    update infoux_proj
    set project_name=v_new_proj_list
    where hostname=host.hostname;
    end loop;
    end;
    Thanks,
    Sheli

    Hi, Sheli
    Inside quotes, :p105_old_name will not be taken as a variable name. If you want to use the value of :p105_old_name in a string which its otherwise a literal, then you can concatenate the variable to the literal parts, using the || operator.
    You can do soemthing like this:
    REGEXP_REPLACE ( project_name
                , '(^|:)(' || :P105_OLD_NAME
                             || ')(:|$)'
                , '\1'       || :P105_NAME
                             || ' \3'
                )               AS new_projectI'll bet there's a much simpler way to do what you want. Instead of having two SELECTs, a cursor FOR loop and an UPDATE, you can probably do what you need to with just a single UPDATE or MERGE. It would be more efficient, too. If you'd like help, post CREATE TABLE and INSERT statements for all relevant tables and columns azs the exist before this code is run, a couple of sets of values for the bind variables, and the results you'd like to see (that is, the contents of the changed table) for each set, given the same sample data.
    Always say which version of Oracle you're using.

Maybe you are looking for

  • Keynote (and general iWork) constantly crashing

    Running Keynote 4.02 on PowerBook G4 with OS 10.4.11 and things were OK for a while but now the program crashes "unexpectedly" following a click of many of the menu tools (esp Inspector). Not using Pages or Numbers much but a check with Numbers also

  • How to use TSP with CME9.1 + SIP Phones + EM

    Hi, can anyone explain me how to use the following setup: - Cisco CME 9.1 - IPPhone 8961, 9971, 6921 all connected via SIP - Extension Mobility How can i use the Cisco TSP on my Windows 7 PC to dial via Outlook and so on? Kind regards Andre Lahl

  • Create a popup window in Swing

    Hi, I want to create a popup window that contains some buttons and text fields when the user selects a menuItem from the menuBar using Swing. What would be the best way to do this?

  • Exchange 2013 users cant connect to public folders on Exchange 2010

    Hi I recently migrated all users from exchange 2010 to 2013 and now nobody can connect to public folders.  Ive read several forums with similar issue, but none of the solutions have fixed my problem. My configuration on exchange 2013: ExternalClientA

  • Grouping and Getting SUM

    Hi All, Can you please help me in resolving this... create table status(country varchar2(10),state varchar2(10),col_type varchar2(10),university varchar2(10),dote varchar2(10),students number(4)) insert into status(country,state,col_type,university,d