Can a EDQ Process perform looping ?

Hello,
I want to create a looping process in EDQ. Here is the scenario..
Reader based on a snapshot/data store.
1. Process reads one record at a time from Reader.
2. For each record,
      a. Call an external web-service (inserts the record in CRMOD, and returns Row-Id)**,
      b. Writes the record + CRMOD.Row_ID to a Writer (CSV file),
      c. Return to Reader and pick up the next record,
    Until No more records.
**I have already created the custom script processor for the CRMOD web-service and it works.
Is this type of flow even possible in EDQ ?
Thanks in advance.
Deepak Gopal.
eVerge, LLC.

Hi Nick,
Thanks for your response. Yes I have written a process. The process has two processors. I have attached the dxi.
1. Reader - Reads 100 records from snapshot (based on csv file)
2. Script Processor - takes input (four fields), calls CRMOD query web service and performs query on the four fields, returns CRMOD data.
The problem is, EDQ is flooding CRMOD and maxing out the concurrent session limit - 100 records get to CRMOD so quickly that they end up being too many concurrent sessions in CRMOD, which has limit of 5 concurrent sessions for this particular account.
So my thought was - Don't process next record in EDQ until the current transaction has completed (so we maintain only one concurrent session in CRMOD).
Here is my script..
addLibrary("http");
function GetValue(content, name) {
  var value = "";
  var startPos = content.indexOf("<" + name + ">");
  if (startPos > -1) {
   var endPos = content.indexOf("</" + name + ">", startPos);
value = content.substring(startPos + name.length + 2, endPos);
  return value;
try {
var result = new Array();
var inputFN = input1[0];
var inputMN = input1[1];
var inputLN = input1[2];
var inputEmail = input1[3];
var inputTitle = input1[4];
var url = "https://secure-slsomxuda.crmondemand.com/Services/Integration";
var xmlHttp = new XMLHttpRequest();
xmlHttp.open("POST", url, false); ---------------------- false = synchronous session ------------------------------
var request = "<?xml version='1.0' encoding='UTF-8' ?>" +
           " <soapenv:Envelope xmlns:soapenv='http://schemas.xmlsoap.org/soap/envelope/' xmlns:con='urn:crmondemand/ws/contact/' xmlns:con1='urn:/crmondemand/xml/contact'>" +
    " <soapenv:Header>" +
       " <wsse:Security xmlns:wsse='http://schemas.xmlsoap.org/ws/2002/04/secext'>" +
            " <wsse:UsernameToken>" +
               " <wsse:Username>xxx</wsse:Username>" +
               " <wsse:Password Type='wsse:PasswordText'>xxx</wsse:Password>" +
            " </wsse:UsernameToken>" +
       " </wsse:Security>" +
    " </soapenv:Header>" +
    " <soapenv:Body>" +
       "<con:ContactWS_ContactQueryPage_Input>" +
          "<con1:ListOfContact>" +
             "<con1:Contact>" +
                       "<con1:ContactId></con1:ContactId>" +
                "<con1:ContactEmail>='" + inputEmail + "'</con1:ContactEmail>" +
                "<con1:ContactFirstName>='" + inputFN + "'</con1:ContactFirstName>" +
                "<con1:JobTitle>='" + inputTitle + "'</con1:JobTitle>" +
                "<con1:ContactLastName>= '" + inputLN + "'</con1:ContactLastName>" +
                "<con1:MiddleName>='" + inputMN + "'</con1:MiddleName>" +
              "</con1:Contact>" +
          "</con1:ListOfContact>" +
       "</con:ContactWS_ContactQueryPage_Input>" +
    "</soapenv:Body>" +
"</soapenv:Envelope>";
    xmlHttp.setRequestHeader("SOAPAction", "\"document/urn:crmondemand/ws/contact/:ContactQueryPage\"");
    xmlHttp.send(request);
    var response = "" + xmlHttp.responseXML;
    var result = new String();
    var startPos = response.indexOf("<Contact>");
    while (startPos > -1)
       var endPos = response.indexOf("</Contact>", startPos);
       var record = response.substring(startPos, endPos);
       var conid = GetValue(record, "ContactId");
       result = conid;
       startPos = response.indexOf("<Contact>", endPos);
     if (startPos = response.indexOf("SBL-ODU-01003") > -1)
            { result = "Session Limit Reached";}
catch (e) {
    result = "Error: " + e.toString();
output1 = result;
Thanks,
Deepak.

Similar Messages

  • Improving ODM Process Performance

    Hi Everyone,
    I'm running several workflow on sqldeveloper data miner tools to create my model. My Data is around 3 million rows, to monitor the process I look to oracle enterprise manager.
    From what I've seen in oracle enterprise manage most of process ODM from my modelling didn't get parallel and sometimes my process not finished more than a day.
    Any tips/suggestion how we can improve ODM Process Performance ? By enable parallelism on each process/query maybe ?
    Thanks

    Ensure that any input table used in modeling or scoring has a PARALLEL attribute set properly. Since minig algorithms are usually CPU bound try to utilize whatevet CPU power you have. Following might be a good starting point:
    ALTER TABLE myminingtable PARALLEL <Number of Physical Cores on your Hardware>;

  • Synch Process Performance issues.

    Hi,
    I have a BPEL process that reads a file and then for each transaction within the file it calls a Synch BPEL process that processes it. The Synchronous process takes about 2 min. So say, if there are 25 transations in the file, it takes about 50 min to complete the entire processing. Earlier the Synch process was Asynch process but we had problems when all the records were processed at once that caused data duplication issues. Hence we made changes to make it a Synch process but then performace is become a problem.
    Can we improve the performance in anyway?
    Otherwise, if I make changes just have one process and move the entire logic of Synch process to the main one and process each record in a while loop, will that have better perfrmance than the above.
    Need suggestions. Thanks!
    -Prapoorna

    We are on 10.1.3.4. So can't try on 10.1.3.5.
    And we are using a specific schema.
    Regarding the duplication, this is an EDI BPEL Process, so what was happening was, when we get the file and if the customer mentioned in the file does not exist in our system (Oracle db), then within the BPEL process we call the db adapter to call a custom procedure that creates the Customer. Because the process was Asynch earlier, if there are 4 transactions in the file, the Asynch process used to get invoked 4 times all at the same time and then we would see 2 or 3 customers created in the system with the same name and then a couple of instances would fail in the console when it is trying to find out if the customer already exists because the query returns multiple rows. Thats when I thought that may be I have to make the process wait until the 1st record is completely processed that will create the customer record if it does not exist and then when the 2nd record is processed it will not create the customer again as it is already created. Hence I made it a Synch process.
    As I said earleir, do you think I can merge these two process (the one that reads the file and calls the Synch process for each record) into one process with a while loop... Will that work faster. appreicate if you cna give me suggestions on what my options are.
    Thanks
    -Prapoorna

  • (268625273) Q WSI-29 Can you give any performance benchmarks for WLS web services?

    Q<WSI-29> Can you give any performance benchmarks for WLS web services?
    A<WSI-29>: It is very difficult to quantify performance aspects of web services
    since they depend on so many variables including but not limited to: backend system
    processing by stateless session beans and message driven beans, size of XML SOAP
    message sent, system hardware (CPU speed, parallel processing, RAM speed) and
    system software (JVM type and version of WebLogic server). However, let me point
    out that the EJB backend processing of requests both have the best possible scalability
    within the EJB2.0 specification (both stateless session and message driven beans
    can be pooled) and servlets have a proven scalable track record. Thus it should
    be possible to scale your web service deployment to meet demand. The overhead
    in processing XML within the servlet can be significant depending on the size
    of XML data (either as a parameter or a return type). While WLS6.1 does not have
    any features to address this performance concern, WLS7.0 will feature Serializer
    and Deserializer classes which can be dedicated to the XML to Java and Java to
    XML translation (they can also be automatically be generated from a DTD, XML Schema
    or regular JavaBean).
    It is true that web services are not the fastest way to process client requests
    but BEA is committed to making WebLogic server the fastest possible service provider.
    Adam

    see http://www.oracle.com/support/products/oas/sparc30/html/ows08811.html

  • Process Performance monitoring Java API

    Hi,
    I am looking for java API's which can help me monitor performance stats like CPU utilization, memory utilization etc on a windows platform. I did get a handle on few APIs to measure memory utilization but somehow monitoring the CPU seems to be a problem. My requirement is to measure CPU and memory for a particular process and not for the entire system. Any pointers on this front would be of great help.
    Thanks
    Bhavin

    I don't see any great free libraries that you can just drop in and make this happen.
    There's an interesting looking product called "SIGAR" that seems to speak directly to what you want to do here.
    Or this might be a great opportunity for you to play with JNI and some C++... awesome! ;-)

  • Multiple DSA (Process Product Data ) in EDQ Process

    Hi,
    I am using multiple DSA in my EDQ process and when i run the web service to insert the data in different tables i get Processor not valid in real time.
    Please help
    Thanks,
    Mohammed Faraz

    Hi Mike,
    I am performing two different task in one EDQ Process.
    1. Matched source data must be inserted in different tables which is EDQP process.
    2  Partially Matched source data will add some additional information from the golden records and inserted in database tables.
    These two outputs i am getting merged and trying to insert in database. If i run my web service only by keeping one active Product Data Processor for any one of the above mentioned tasks its working but if more than one Product Data Processor is active then i get PROCESSOR NOT VALID IN REAL TIME error. Please help. Thanks for reply

  • Increase Apply Process Performance

    Dear All,
    I want to know how can I increase Apply Process Performance in Oracle Streams Setup.
    I use Windows 2003 and Oracle 10g R2

    Check metalink Note:335516.1
    HTH...

  • GL COSOLIDATION PROCESS PERFORMANCE

    제품 : FIN_GL
    작성날짜 : 2002-11-07
    GL COSOLIDATION PROCESS PERFORMANCE
    ===================================
    GL의 Consolidation 작업시 발생할수 있는 Performance문제
    PURPOSE
    느린 GL Consolidation작업
    Explanation
    Consolidation은 크게 두가지의 방법으로 mapping rule을 정의할수 있다.
    1. Segment Mapping Rule
    특정 Segment는 어떤 Account로 바뀌어져야 한다는 Rule이다.
    Segment단위로 작업을 진행하기 때문에 Performance에는 크게 영향을
    주지 않기 때문에 가능한 Segment Rule로 Consolidation을
    진행할것을 권고한다.
    2. Account Mapping Rule
    만약 특정 Account 범위는 Segment Rule로 표현할수 없는 Account로
    Mapping을 원한다면 Account Rule을 사용하여 특정 범위의 Account를
    Conversion한다.
    주의) Account Mapping Rule을 사용할때는 가능한 작은 범위의 Rule을
    사용할것을 권고한다.
    특히 Segment Mapping Rule과 Account Mapping Rule을 동시에
    사용하지 않을것은 오라클은 권고한다.
    GL concurrent Debugging(Bulletin#17744)을 사용하여 GL consolidation
    작업의 시간을 측정해 본결과 Account Mapping 에서 작업 시간이 크게
    지연될 경우 GL_INTERFACE table의 GL_INTERFACE_N2가
    반드시 아래와 같은지 확인 한다.
    1. request_id
    2. je_header_id
    3. status
    4. code_combination_id
    Example
    Reference Documents
    Bug No: 2632310

    Thanks for the reply Roger. I have a solution.. and it's very quick (and i'm in a hurry so apologies if this doesn't read well..)
    Extra info first. My FLEX_VALUE column == SEGMENT2 values.
    In GL_SECURITY_PKG there is a query on a table called GL_BIS_SEGVAL_INT. This contains the segment_column_name, segment_value and parent_segment that my apps user can see.
    So, i'm looking for SEGMENT2 values from this table...
    select * from GL_BIS_SEGVAL_INT where SEGMENT_COLUMN_NAME = 'SEGMENT2'
    i join my original query to this query and.. bingo, i have what i need!
    SELECT
    MY_TABLE.FLEX_VALUE,
    GL_BIS_SEGVAL_INT.SEGMENT_COLUMN_NAME,
    GL_BIS_SEGVAL_INT.SEGMENT_VALUE,
    GL_BIS_SEGVAL_INT.PARENT_SEGMENT
    FROM
    MY_TABLE MY_TABLE,
    GL_BIS_SEGVAL_INT GL_BIS_SEGVAL_INT
    WHERE
    GL_BIS_SEGVAL_INT.SEGMENT_VALUE = MY_TABLE.FLEX_VALUE
    AND
    GL_BIS_SEGVAL_INT.SEGMENT_COLUMN_NAME = 'SEGMENT2'
    returns only the flex_value/segment2 values my apps user has access to.
    regards,
    Joss.
    Edited by: Joss Leaver on Sep 9, 2010 7:19 PM
    Edited by: Joss Leaver on Sep 9, 2010 7:20 PM

  • Difference between ARIS Process Performance Manager and SAP BI

    Hi All,
    I am searching for an answer on the following question: when the business purpose is to measure performance of E.g. a call center process. Can the Process Performance Manager from ARIS replace SAP BI.
    Regards,
    Marcel

    Hi Marcel,
    If I can add to the comment of Ajay,
    I think that when your goal is to measure the performance of a Process and analyze root cause of performance problems, Process Performance Manager is best suited.
    Even if SAP BI could do it as well, I think that SAP BI is best suited for data analysis like financial reports, Market studies ...
    I think that the baseline is that SAP BI is a broader BI solution but ARIS PPM is best suited for process performance than SAP BI.

  • Can I put Read inside loop?

    Hi Folks
    Can I put Read inside loop?
    Performance wise is it acceptable?
    Regards,
    Sreeram

    Hi
    there is no problem to put READ statement inside the LOOP
    its a better way to put
    to avoid SELECT in a LOOP
    see this example
    i had used that in my program
    in the performance point of view it is a good method
    LOOP AT IT_SOBID INTO WA_SOBID." where otype eq s_otype and objid eq s_objid.
        READ TABLE IT_HRP1026 WITH KEY OBJID = WA_SOBID-SOBID OTYPE = WA_SOBID-SCLAS INTO WA_HRP1026.
        IF SY-SUBRC EQ 0.
          READ TABLE IT_HRP1000 WITH KEY OBJID = WA_SOBID-SOBID INTO WA_HRP1000.
          WA_OUTPUT-OBJID = WA_HRP1026-OBJID.
          WA_OUTPUT-BEGDA = WA_SOBID-BEGDA.
          WA_OUTPUT-ENDDA = WA_SOBID-ENDDA.
          WA_OUTPUT-AEDTM = WA_HRP1026-AEDTM.
          WA_OUTPUT-UNAME = WA_HRP1026-UNAME.
          WA_OUTPUT-STEXT = WA_HRP1000-STEXT.
          READ TABLE IT_REASON WITH KEY CANCR = WA_HRP1026-CANCR INTO WA_REASON.
          WA_OUTPUT-CANCRT = WA_REASON-CANCRT.
          CLEAR WA_REASON-CANCRT.
          READ TABLE IT_LOCATION1 WITH KEY OBJID = WA_HRP1026-OBJID INTO WA_LOCATION1..
          READ TABLE IT_LSTEXT WITH KEY OBJID = WA_LOCATION1-SOBID OTYPE = 'F' INTO WA_LSTEXT.
                 WA_OUTPUT-LSTEXT = WA_LSTEXT-LSTEXT.
                 CLEAR WA_LSTEXT-LSTEXT.
          APPEND WA_OUTPUT TO IT_OUTPUT.
          CLEAR WA_OUTPUT.
          CLEAR WA_OUTPUT-CANCRT.
        ENDIF.
      ENDLOOP.
    <b>Reward if usefull</b>

  • Can we put subroutines within loops?

    q]     Can we put subroutines within loops?- i mean not the PERFORM Statement  but the FORMENDFORM statement

    Hi
    If your question means .. calling Performs within Loops ?
    Then its possible..
    LOOP.
    PERFORM P1. ( THIS IS OK )
    ENDLOOP.
    But this is not correct..
    LOOP.
    FORM P1.
    ENDFORM.
    ENDLOOP.
    Thanks
    Hope it Helps.
    Praveen

  • How can I repeat a for loop, once it's terms has been fulfilled???

    Well.. I've posted 2 different exceptions about this game today, but I managed to fix them all by myself, but now I'm facing another problem, which is NOT an error, but just a regular question.. HOW CAN I REPEAT A FOR LOOP ONCE IT HAS FULFILLED IT'S TERMS OF RUNNING?!
    I've been trying many different things, AND, the 'continue' statement too, and I honestly think that what it takes IS a continue statement, BUT I don't know how to use it so that it does what I want it too.. -.-'
    Anyway.. Enought chit-chat. I have a nice functional game running that maximum allows 3 apples in the air in the same time.. But now my question is: How can I make it create 3 more appels once the 3 first onces has either been catched or fallen out the screen..?
    Here's my COMPLETE sourcecode, so if you know just a little bit of Java you should be able to figure it out, and hopefully you'll be able to tell me what to do now, to make it repeat my for loop:
    Main.java:
    import java.applet.*;
    import java.awt.*;
    @SuppressWarnings("serial")
    public class Main extends Applet implements Runnable
         private Image buffering_image;
         private Graphics buffering_graphics;
         private int max_apples = 3;
         private int score = 0;
         private GameObject player;
         private GameObject[] apple = new GameObject[max_apples];
         private boolean move_left = false;
         private boolean move_right = false;
        public void init()
            load_content();
            setBackground(Color.BLACK);
         public void run()
              while(true)
                   if(move_left)
                        player.player_x -= player.movement_speed;
                   else if(move_right)
                        player.player_x += player.movement_speed;
                   for(int i = 0; i < max_apples; i++)
                       apple.apple_y += apple[i].falling_speed;
                   repaint();
                   prevent();
                   collision();
              try
              Thread.sleep(20);
              catch(InterruptedException ie)
              System.out.println(ie);
         private void prevent()
              if(player.player_x <= 0)
              player.player_x = 0;     
              else if(player.player_x >= 925)
              player.player_x = 925;     
         private void load_content()
         MediaTracker media = new MediaTracker(this);
         player = new GameObject(getImage(getCodeBase(), "Sprites/player.gif"));
         media.addImage(player.sprite, 0);
         for(int i = 0; i < max_apples; i++)
         apple[i] = new GameObject(getImage(getCodeBase(), "Sprites/apple.jpg"));
         try
         media.waitForAll();     
         catch(Exception e)
              System.out.println(e);
         public boolean collision()
              for(int i = 0; i < max_apples; i++)
              Rectangle apple_rect = new Rectangle(apple[i].apple_x, apple[i].apple_y,
    apple[i].sprite.getWidth(this),
    apple[i].sprite.getHeight(this));
              Rectangle player_rect = new Rectangle(player.player_x, player.player_y,
    player.sprite.getWidth(this),
    player.sprite.getHeight(this));
              if(apple_rect.intersects(player_rect))
                   if(apple[i].alive)
                   score++;
                   apple[i].alive = false;
                   if(!apple[i].alive)
                   apple[i].alive = false;     
         return true;
    public void update(Graphics g)
    if(buffering_image == null)
    buffering_image = createImage(getSize().width, getSize().height);
    buffering_graphics = buffering_image.getGraphics();
    buffering_graphics.setColor(getBackground());
    buffering_graphics.fillRect(0, 0, getSize().width, getSize().height);
    buffering_graphics.setColor(getForeground());
    paint(buffering_graphics);
    g.drawImage(buffering_image, 0, 0, this);
    public boolean keyDown(Event e, int i)
         i = e.key;
    if(i == 1006)
    move_left = true;
    else if(i == 1007)
         move_right = true;
              return true;     
    public boolean keyUp(Event e, int i)
         i = e.key;
    if(i == 1006)
    move_left = false;
    else if(i == 1007)
         move_right = false;
    return true;
    public void paint(Graphics g)
    g.drawImage(player.sprite, player.player_x, player.player_y, this);
    for(int i = 0; i < max_apples; i++)
         if(apple[i].alive)
              g.drawImage(apple[i].sprite, apple[i].apple_x, apple[i].apple_y, this);
    g.setColor(Color.RED);
    g.drawString("Score: " + score, 425, 100);
    public void start()
    Thread thread = new Thread(this);
    thread.start();
    @SuppressWarnings("deprecation")
         public void stop()
         Thread thread = new Thread(this);
    thread.stop();
    GameObject.java:import java.awt.*;
    import java.util.*;
    public class GameObject
    public Image sprite;
    public Random random = new Random();
    public int player_x;
    public int player_y;
    public int movement_speed = 15;
    public int falling_speed;
    public int apple_x;
    public int apple_y;
    public boolean alive;
    public GameObject(Image loaded_image)
         player_x = 425;
         player_y = 725;
         sprite = loaded_image;
         falling_speed = random.nextInt(10) + 1;
         apple_x = random.nextInt(920) + 1;
         apple_y = random.nextInt(100) + 1;
         alive = true;
    And now all I need is you to answer my question! =)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

    package forums;
    import java.util.Random;
    import javax.swing.Timer;
    import javax.imageio.ImageIO;
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    import java.io.*;
    public class VimsiesRetardedAppleGamePanel extends JPanel implements KeyListener
      private static final long serialVersionUID = 1L;
      private static final int WIDTH = 800;
      private static final int HEIGHT = 600;
      private static final int MAX_APPLES = 3;
      private static final Random RANDOM = new Random();
      private int score = 0;
      private Player player;
      private Apple[] apples = new Apple[MAX_APPLES];
      private boolean moveLeft = false;
      private boolean moveRight = false;
      abstract class Sprite
        public final Image image;
        public int x;
        public int y;
        public boolean isAlive = true;
        public Sprite(String imageFilename, int x, int y) {
          try {
            this.image = ImageIO.read(new File(imageFilename));
          } catch (IOException e) {
            e.printStackTrace();
            throw new RuntimeException("Bailing out: Can't load images!");
          this.x = x;
          this.y = y;
          this.isAlive = true;
        public Rectangle getRectangle() {
          return new Rectangle(x, y, image.getWidth(null), image.getHeight(null));
      class Player extends Sprite
        public static final int SPEED = 15;
        public Player() {
          super("C:/Java/home/src/images/player.jpg", WIDTH/2, 0);
          y = HEIGHT-image.getHeight(null)-30;
      class Apple extends Sprite
        public int fallingSpeed;
        public Apple() {
          super("C:/Java/home/src/images/apple.jpg", 0, 0);
          reset();
        public void reset() {
          this.x = RANDOM.nextInt(WIDTH-image.getWidth(null));
          this.y = RANDOM.nextInt(300);
          this.fallingSpeed = RANDOM.nextInt(8) + 3;
          this.isAlive = true;
      private final Timer timer = new Timer(200,
        new ActionListener() {
          public void actionPerformed(ActionEvent e) {
            repaint();
      public VimsiesRetardedAppleGamePanel() {
        this.player = new Player();
        for(int i=0; i<MAX_APPLES; i++) {
          apples[i] = new Apple();
        setBackground(Color.BLACK);
        setFocusable(true); // required to generate key listener events.
        addKeyListener(this);
        timer.setInitialDelay(1000);
        timer.start();
      public void keyPressed(KeyEvent e)  {
        if (e.getKeyCode() == e.VK_LEFT) {
          moveLeft = true;
          moveRight = false;
        } else if (e.getKeyCode() == e.VK_RIGHT) {
          moveRight = true;
          moveLeft = false;
      public void keyReleased(KeyEvent e) {
        moveRight = false;
        moveLeft = false;
      public void keyTyped(KeyEvent e) {
        // do nothing
      public void paintComponent(Graphics g) {
        super.paintComponent(g);
        //System.err.println("DEBUG: moveLeft="+moveLeft+", moveRight="+moveRight);
        if ( moveLeft ) {
          player.x -= player.SPEED;
          if (player.x < 0) {
            player.x = 0;
        } else if ( moveRight ) {
          player.x += player.SPEED;
          if (player.x > getWidth()) {
            player.x = getWidth();
        //System.err.println("DEBUG: player.x="+player.x);
        Rectangle playerRect = player.getRectangle();
        for ( Apple apple : apples ) {
          apple.y += apple.fallingSpeed;
          Rectangle appleRect = apple.getRectangle();
          if ( appleRect.intersects(playerRect) ) {
            if ( apple.isAlive ) {
              score++;
              apple.isAlive = false;
        g.drawImage(player.image, player.x, player.y, this);
        for( Apple apple : apples ) {
          if ( apple.isAlive ) {
            g.drawImage(apple.image, apple.x, apple.y, this);
        g.setColor(Color.RED);
        g.drawString("Score: " + score, WIDTH/2-30, 10);
      private static void createAndShowGUI() {
        JFrame frame = new JFrame("Vimsies Retarded Apple Game");
        frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        frame.getContentPane().add(new VimsiesRetardedAppleGamePanel());
        frame.pack();
        frame.setSize(WIDTH, HEIGHT);
        frame.setLocationRelativeTo(null);
        frame.setVisible(true);
      public static void main(String[] args) {
        SwingUtilities.invokeLater(
          new Runnable() {
            public void run() {
              createAndShowGUI();
    }Hey Vimsie, try resetting a dead apple and see what happens.

  • Working in Logic 9, how do I use a drum loop WITH ITS PRESET EFFECTS? I can drag and drop the loop but it plays dry in timeline. thanks

    Working in Logic 9, how do I use a drum loop WITH ITS PRESET EFFECTS? I can drag and drop the loop but it plays dry in timeline. thanks

    Here's the short-cut solution:
    Green Apple tracks are MIDI files (so to speak). If you drag one from the loop browser (Capitol C Orchestral hit, as you mentioned in this exable) directly into the arrange page it creates the MIDI file and the instrument to play it back on.
    HOWEVER.If you create and audio track first, THEN drag the green Apple loop onto that track, the loop will get "bounced" with the reverb in tact and you'll have the exact sound that you heard in the preview.
    Make sense?

  • Can we create our own loops? Basic question.

    Hi,
    Can we create our own loops in Logic Pro. I see in all the tutorials. They are either taking input from external instruments OR use existing apple loops.
    I have tried FL studio demo to create our own loops. But there is no trial version for Logic Pro. Need your inputs before I purchase it.
    Thank you.
    Anji

    Yes you can!
    It is as simple as selecting a Region (optional trimming recommended) and choose the Export command.
    A Dialog window opens up that lets you enter the metadata
    Apple had its separate "Apple Loop Utility" app (now only available in the developer package) that allowed you to create loops in a standalone app. The built-in loop capability in Logic uses part of that engine.
    Hope that helps
    Edgar Rothermich
    http://DingDingMusic.com/Manuals/
    'I may receive some form of compensation, financial or otherwise, from my recommendation or link.'

  • How can I get my ES2 loops to play correctly? I keep getting the message that the audio is not found when I drag the loops from my audio browser even though they play fine in the preview.

    How can I get my ES2 loops to play correctly? I keep getting the message that the audio is not found when I drag the loops from my audio browser even though they play fine in the preview.

    It's exactly as I stated. Whenever I try to drag these kinds of loops (ESX24 / software instrument loops? the ones marked in green with the white music note next to them) from the loop browser into the timeline a message comes up saying Audio Not Found for that loop.  And a new track is created automatically when loops are dragged into the timeline, so I'm not creating some other random / synth instrument track so I'm not sure  what the deal is... But perhaps I'll try creating a software instrument track first and then drag the loop into that track and see what happens - maybe there's something with the default settings that automatically creates audio tracks whenever loops are imported?

Maybe you are looking for

  • Issue in Creation of new Value Field in CO-PA

    Hi, I have a query in CO-PA Value Field Linking. In my Development Client, 1. Created a New Value Field (No Transport Request Generated) 2. Linked to the above to new Conditon type created in SD. (Tranport request was generated) i.e. in Flow of Actua

  • Export to camera crashes iMovie 06

    We've been running 10.3.9 and iMovie 05 sucessfully for a while now, but after upgrading to 10.4.4, iMovie 06 and Quicktime 7 we started getting numberous problems with iMovie. I'm not sure if this is 100% iMovies fault or some combination of the upg

  • In authorware .avi files are jumping (when paused) to one frame ahead on mouseover.

    Dear All, I had prepared the CBT in a Authorware application (version 7.02) and published it. The .avi files are playing well in my system (OS=Win XP) and same CBT file in some of the Win XP systems it is not playing well. i,e. when the movie is play

  • Table with routing operation status

    Hi everyone, I would be very grateful if someone could tell me which table should I access in order to know, for a certain production order, which operations have been already confirmed. Thanks in advance and best regards. Ben.

  • Itunes charging twice for same songs

    My old 4g iphone speakers broke and the apple store replaced it with a new iphone but the music from my old iphone isnt on the new phone. How do i get my old music back? Or do I have to pay for the songs again?