Adding a new instance of a movieclip

Hi,
I want to add a new instance of a MovieClip named chair_mc in my .as file but am not sure where to place it. I also want to bring in two other MovieClip symbols but am not sure where to place this. This is the code:
package
import flash.display.MovieClip;
import flash.events.MouseEvent;
public class officescene extends MovieClip
public var chair_mc:clip;
public function officescene():void {
  chair_mc = new clip();
  this.addChild(chair_mc);
  chair_mc.buttonMode = true;
          chair_mc.x=10;
          chair_mc.y=10;
  chair_mc.addEventListener(MouseEvent.MOUSE_DOWN, mouseDownHandler);
  chair_mc.addEventListener(MouseEvent.MOUSE_UP, mouseReleasedHandler);
private function mouseDownHandler(event:MouseEvent):void {
         chair_mc.startDrag();
private function mouseReleasedHandler(event:MouseEvent):void {
         chair_mc.stopDrag();
Thanks!

package {
import flash.display.MovieClip;
import flash.events.MouseEvent;
public class birdsmove extends MovieClip
public var bird01_mc:Clip1;
public var bird02_mc:Clip2;
public var bird03_mc:Clip3;
public var bird04_mc:Clip4;
public var bird05_mc:Clip5;
public var bird06_mc:Clip6;
public var bird07_mc:Clip7;
public function birdsmove()
bird01_mc = new Clip1;
addChild(bird01_mc);
bird01_mc.buttonMode = true;
bird01_mc.x=100;
bird01_mc.y=100;
bird01_mc.addEventListener(MouseEvent.MOUSE_DOWN, mouseDownHandler);
bird01_mc.addEventListener(MouseEvent.MOUSE_UP, mouseReleasedHandler);
bird02_mc = new Clip2;
addChild(bird02_mc);
bird02_mc.buttonMode = true;
bird02_mc.x=200;
bird02_mc.y=50;
bird02_mc.addEventListener(MouseEvent.MOUSE_DOWN, mouseDownHandler);
bird02_mc.addEventListener(MouseEvent.MOUSE_UP, mouseReleasedHandler);
bird03_mc = new Clip3;
addChild(bird03_mc);
bird03_mc.buttonMode = true;
bird03_mc.x=100;
bird03_mc.y=100;
bird03_mc.addEventListener(MouseEvent.MOUSE_DOWN, mouseDownHandler);
bird03_mc.addEventListener(MouseEvent.MOUSE_UP, mouseReleasedHandler);
bird04_mc = new Clip4;
addChild(bird04_mc);
bird04_mc.buttonMode = true;
bird04_mc.x=200;
bird04_mc.y=200;
bird04_mc.addEventListener(MouseEvent.MOUSE_DOWN, mouseDownHandler);
bird04_mc.addEventListener(MouseEvent.MOUSE_UP, mouseReleasedHandler);
bird05_mc = new Clip5;
this.addChild(bird05_mc);
bird05_mc.buttonMode = true;
bird05_mc.x=300;
bird05_mc.y=300;
bird05_mc.addEventListener(MouseEvent.MOUSE_DOWN, mouseDownHandler);
bird05_mc.addEventListener(MouseEvent.MOUSE_UP, mouseReleasedHandler);
bird06_mc = new Clip6;
addChild(bird06_mc);
bird06_mc.buttonMode = true;
bird06_mc.x=400;
bird06_mc.y=350;
bird06_mc.addEventListener(MouseEvent.MOUSE_DOWN, mouseDownHandler);
bird06_mc.addEventListener(MouseEvent.MOUSE_UP, mouseReleasedHandler);
bird07_mc = new Clip7;
addChild(bird07_mc);
bird07_mc.buttonMode = true;
bird07_mc.x=100;
bird07_mc.y=350;
bird07_mc.addEventListener(MouseEvent.MOUSE_DOWN, mouseDownHandler);
bird07_mc.addEventListener(MouseEvent.MOUSE_UP, mouseReleasedHandler);
public function mouseDownHandler(event:MouseEvent):void
bird01_mc.startDrag();
bird02_mc.startDrag();
bird03_mc.startDrag();
bird04_mc.startDrag();
bird05_mc.startDrag();
bird06_mc.startDrag();
bird07_mc.startDrag();
public function mouseReleasedHandler(event:MouseEvent):void
bird01_mc.stopDrag();
bird02_mc.stopDrag();
bird03_mc.stopDrag();
bird04_mc.stopDrag();
bird05_mc.stopDrag();
bird06_mc.stopDrag();
bird07_mc.stopDrag();

Similar Messages

  • DBCA error adding a new instance to a RAC.

    Hi all,
    I'm facing the following problem:
    I'm running Oracle Clusterware & RAC 11.2.0.2 over Solaris SPARC 64.
    I've two servers for a RAC. I recently added one new server.
    addNode.sh works fine, and I want to add a new instance with dbca. Everything seems to be fine, but when I want to select my database to add the instance dbca runs into the following error:
    "Connection to the database cannot be established because the listener could be down. Please make sure that the service is registered with a listener and the listener is up.
    Connection to the database failed. Please sure that service "node01-vip:1521:rac1" is registered with the listener, username system has SYSDBA privilege, password is correct and then try again".
    My RAC Database is up and running, I run the following command with cluvfy to check database configuration readiness (what should be accomplish, because is running!)
    -bash-3.00$ cluvfy stage -pre dbcfg -n node01,node02,node03 -d /u01/app/oracle/product/11.2.0/db_1
    Performing pre-checks for database configuration
    Checking node reachability...
    Node reachability check passed from node "node03"
    Checking user equivalence...
    User equivalence check passed for user "oracle"
    Checking node connectivity...
    Checking hosts config file...
    Verification of the hosts config file successful
    Check: Node connectivity for interface "bge0"
    Node connectivity passed for interface "bge0"
    Check: Node connectivity for interface "bge1"
    Node connectivity passed for interface "bge1"
    Node connectivity check passed
    (Log too long, I truncated it)
    Checking CRS integrity...
    CRS integrity check passed
    Checking node application existence...
    Checking existence of VIP node application (required)
    VIP node application check passed
    Checking existence of NETWORK node application (required)
    NETWORK node application check passed
    Checking existence of GSD node application (optional)
    GSD node application is offline on nodes "node03,node02,node01"
    Checking existence of ONS node application (optional)
    ONS node application check passed
    Time zone consistency check passed
    Pre-check for database configuration was successful.
    And....
    bash-3.00$ ps -fu oracle | grep inherit
    oracle 21888 1 0 19:48:20 ? 0:00 /u01/oracle/11.2.0/grid/bin/tnslsnr LISTENER_SCAN1 -inherit
    oracle 22079 1 0 19:48:51 ? 0:00 /u01/oracle/11.2.0/grid/bin/tnslsnr LISTENER -inherit
    oracle 28817 26726 0 20:30:26 pts/1 0:00 grep inherit
    -bash-3.00$ srvctl config listener -l LISTENER
    Name: LISTENER
    Network: 1, Owner: oracle
    Home: <CRS home>
    End points: TCP:1521
    what can I do?
    Am I doing something wrong?
    Thanks in advance!!

    Hi,
    I am facing the same problem when adding new instance on new node, even when i try with silent mode. Can you please elobrate more how did you fix the problem ?
    [oragmaxt@adpltcod01 ~]$ dbca -silent -addInstance -nodeList adpltcod01,adpltcod02,adpltcod03 -gdbName gmaxt.adweag.local -instanceName gmaxt3 -sysDBAUserName sys -sysDBAPassword f1rewa11
    Look at the log file "/oragmaxt/app/oragmaxt/cfgtoollogs/dbca/gmaxt0.log" for further details.
    [oragmaxt@adpltcod01 ~]$ vi /oragmaxt/app/oragmaxt/cfgtoollogs/dbca/gmaxt0.log
    Connection to the database cannot be established because the listener could be down. Please make sure that the service is registered with a listener and the listener is up.
    Connection to the database failed. Please make sure that service "adpltcod01-vip:1521:gmaxt1" is registered with the listener, user name "sys" has SYSDBA privilege, password is correct and then try again.
    Regards

  • EP6 SP2 - Adding a new Dialog Instance

    Hi,
    I have two physical hosts. Host A was installed with State Controller, Dispatcher A and Server A.  Recently, I have added a new Host B with Dispatcher B and Server B.  Host A is the Central instance while Host B is the new Dialog instance.  When I startup the node Server B in Host B, it was trying to synchronise the files with Host A but it ran into an error during synchronization. In node Server B, it was complaining of some error during startup with the go.bat.  The error was :
    Start synchronizing application irj. More details about the synchronization can
    be found in INFO log files.
    Application irj was locally stopped.
    [com.sapportals.portal.prt.dispatcher.Dispatcher@10b0fd, 12/27/04 4:50:54 PM SGT
    , System_Thread_12] Exiting main initialization procedure because of exception:
    java.lang.NoClassDefFoundError: com/sap/portal/prt/sapj2ee/bridge/IAccessor
            at com.sapportals.portal.prt.runtime.Portal.getLogger(Portal.java:402)
            at com.sapportals.portal.prt.runtime.Portal.init(Portal.java:283)
            at com.sapportals.portal.prt.core.PortalCoreInitializer.coreInit(PortalC
    oreInitializer.java:54)
            at com.sapportals.portal.prt.dispatcher.PortalInitializer.<init>(PortalI
    nitializer.java:129)
            at com.sapportals.portal.prt.dispatcher.Dispatcher$doSetupPortalInitiali
    zer.run(Dispatcher.java:160)
            at java.security.AccessController.doPrivileged(Native Method)
            at com.sapportals.portal.prt.dispatcher.Dispatcher.initDispatcher(Dispat
    cher.java:358)
            at com.sapportals.portal.prt.dispatcher.Dispatcher.access$000(Dispatcher
    .java:40)
            at com.sapportals.portal.prt.dispatcher.Dispatcher$InitRunner.run(Dispat
    cher.java:113)
            at com.sapportals.portal.prt.dispatcher.Dispatcher.init(Dispatcher.java:
    391)
            at com.inqmy.services.servlets_jsp.server.ServletContextFacade.init(Serv
    letContextFacade.java:3338)
            at com.inqmy.services.servlets_jsp.server.ServletContextFacade.init(Serv
    letContextFacade.java:2596)
            at com.inqmy.services.servlets_jsp.server.ServletsAndJspImpl.deploy(Serv
    letsAndJspImpl.java:520)
            at com.inqmy.services.servlets_jsp.server.WebContainer.commitDeploy(WebC
    ontainer.java:258)
            at com.inqmy.services.deploy.server.DeployServiceImpl.synchronizeLocal(D
    eployServiceImpl.java:4441)
            at com.inqmy.services.deploy.server.DeployServiceImpl.synchronizeLocal(D
    eployServiceImpl.java:4370)
            at com.inqmy.services.deploy.server.DeployServiceImpl.synchronizeApplica
    tions(DeployServiceImpl.java:4293)
            at com.inqmy.services.deploy.server.DeployServiceImpl.makeSynchronizatio
    n(DeployServiceImpl.java:3943)
            at com.inqmy.services.deploy.server.DeployServiceImpl.afterContainerStar
    t(DeployServiceImpl.java:3935)
            at com.inqmy.core.service.context.event.ContainerEventListenerWrapper.ru
    n(ContainerEventListenerWrapper.java:146)
            at com.inqmy.core.thread.impl0.ActionObject.run(ActionObject.java:46)
            at java.security.AccessController.doPrivileged(Native Method)
            at com.inqmy.core.thread.impl0.SingleThread.run(SingleThread.java:148)
    WARNING: Dispatcher could not be set up:
    javax.servlet.UnavailableException: Initialization of Dispatcher failed
    javax.servlet.UnavailableException: Initialization of Dispatcher failed
            at com.sapportals.portal.prt.dispatcher.Dispatcher.initDispatcher(Dispat
    cher.java:370)
            at com.sapportals.portal.prt.dispatcher.Dispatcher.access$000(Dispatcher
    .java:40)
            at com.sapportals.portal.prt.dispatcher.Dispatcher$InitRunner.run(Dispat
    cher.java:113)
            at com.sapportals.portal.prt.dispatcher.Dispatcher.init(Dispatcher.java:
    391)
            at com.inqmy.services.servlets_jsp.server.ServletContextFacade.init(Serv
    letContextFacade.java:3338)
            at com.inqmy.services.servlets_jsp.server.ServletContextFacade.init(Serv
    letContextFacade.java:2596)
            at com.inqmy.services.servlets_jsp.server.ServletsAndJspImpl.deploy(Serv
    letsAndJspImpl.java:520)
            at com.inqmy.services.servlets_jsp.server.WebContainer.commitDeploy(WebC
    ontainer.java:258)
            at com.inqmy.services.deploy.server.DeployServiceImpl.synchronizeLocal(D
    eployServiceImpl.java:4441)
            at com.inqmy.services.deploy.server.DeployServiceImpl.synchronizeLocal(D
    eployServiceImpl.java:4370)
            at com.inqmy.services.deploy.server.DeployServiceImpl.synchronizeApplica
    tions(DeployServiceImpl.java:4293)
            at com.inqmy.services.deploy.server.DeployServiceImpl.makeSynchronizatio
    n(DeployServiceImpl.java:3943)
            at com.inqmy.services.deploy.server.DeployServiceImpl.afterContainerStar
    t(DeployServiceImpl.java:3935)
            at com.inqmy.core.service.context.event.ContainerEventListenerWrapper.ru
    n(ContainerEventListenerWrapper.java:146)
            at com.inqmy.core.thread.impl0.ActionObject.run(ActionObject.java:46)
            at java.security.AccessController.doPrivileged(Native Method)
            at com.inqmy.core.thread.impl0.SingleThread.run(SingleThread.java:148)
      Synchronization of missing application [irj] successfully completed.
    Start synchronizing application MetaMatrix. More details about the synchronizati
    on can be found in INFO log files.
      Error : Background synchronization of application [MetaMatrix] did not succeed
    , because : java.rmi.RemoteException: Error occured while synchronizing applicat
    ion [MetaMatrix]. Committing deploy to container - EJBContainer failed.com.inqmy
    .services.deploy.container.DeploymentException: ID020230 Cannot load bean <com.m
    etamatrix.metadata.server.serverapi.MetadataServerAPIHome>, because Exception oc
    cured in object instantiation: java.lang.NoClassDefFoundError: com/metamatrix/ap
    i/exception/MetaMatrixComponentException; nested exception is:
            com.inqmy.services.deploy.container.DeploymentException: ID020230 Cannot
    load bean <com.metamatrix.metadata.server.serverapi.MetadataServerAPIHome>, bec
    ause Exception occured in object instantiation: java.lang.NoClassDefFoundError:
    com/metamatrix/api/exception/MetaMatrixComponentException
    Any help would be appreciated...
    Thanks.
    regards,
    Mike

    Hi..
    Do you plan have load balancing setup..then you can go for installating another dialog webas java for your existing portal..
    youcan get the installation document at service.sap.com
    https://websmp103.sap-ag.de/instguides..
    see the webas java installation
    You can install another webas java and connect to you existinfg portal as dialog instance...
    Thanks
    Gopal
    (avoid points if it is useful)

  • Adding a new field to a Z table

    We have a Z table on which we have created a datasource. We have created a virtual cube on this datasource and queries are built on this cube. This setup is present on Dev, Quality and Prod environment.
    Now we have added a new field to the Z table in Dev. We will be creating a new Infoobject for this new field and will be adding it in the Virtual Infoprovider and also in the queries.
    1. Do we need to replicate the datasource so that newly added field is visible to the datasource? If no, is there any way?
    2. When I have to transport this to Quality and Prod, do I have to capture all the components and objects (Table,Datasoure,Virtual Cube Queries)? If no, what should I capture in the transport request?

    Hi,
    First, you have to regenerate the datasource in order to add the field:
    1) Log on to source system (where Z table is stored) and go to transaction RSA6.
    2) Select the root node and click Expand (icon with '+' sign).
    3) Search for your datasource (you can use the binoculars icon).
    4) Click on Change.
    5) Verify that the field appears on the list.  Make sure that "Hide field" and "Field only known on client exit" options are not marked for this field.
    6) Click on Save.
    7) Select "Datasource" -> "Generate" (CTRL+S) menu option.
    8) Use RSA3 transaction in order to verify the new field appears on test extractions.
    Then, to replicate the datasource in BI:
    1) Log on to SAP BI and go to RSA1 transaction.
    2) Go to "Modeling" -> "DataSources" section.
    3) Search for your datasource and right click on it.  Select "Replicate metadata" from context menu.
    4) Add the new InfoObject to the VirtualProvider.
    5) Update the transformation which joins the DataSource to the VirtualProvider.
    As far as transport requests are concerned, even though it requires more work, it is a good practice to group objects in different transport requests according to their type:
    In the source System (R3 for instance):
    1) One transport request with the table.
    2) One transport request with the datasource and its structure.
    In BI:
    1) One transport order with the datasource replica.
    2) One transport order with the new InfoObject(s).
    3) One transport order with the modified VirtualProvider.
    4) One transport order with the modified transformations from the datasource towards the VirtualProvider.
    5) One transport order with the Queries and their elements.
    I hope this helps you.
    Regards,
    Maximiliano

  • Copy the data from first line while dynamically adding a new line in table

    Hi,
    1. There is a table
    2. An add button adds a new line to the table using 'AddInstance'
    3. A record is entered in the first line
    4. When the add button is clicked it adds a new line and along with it copies the data entered in the first line
    My question is how to copy the data from the first line and show it in the new line added. This is required so that user can use most of the common values in the first line.
    Thanks,
    Nikhil

    You can use the following Java Script in the Click event of the button.
    // Get the number of rows in the table
    var nrows = xfa.resolveNodes("page.table.DATA[*]").length;
    // Add a new instance(row) to the table
    page.table.addInstance.instanceManager(1);
    xfa.form.recalculate(1);
    // Copy the values from the first line to the newly created row
    page.table.DATA\[ nrows \].field1.rawValue = page.table.DATA\[ 0 \].field1.rawValue;
    ..........field2
    ..........field3
    Thanks,
    Chandra Indukuri

  • Adding a new server in the menu of SAP GUI 640

    Hello Everybody,
    While adding a new server to the menu of SAP GUI 640 using Server Tab after entering all details like :
    1] SAP System ID
    2] Hostname where message server is running
    3] SAP ROUTER :None
    After filling all the above details and after pressing the Generate List Button I am getting the following error .Please help me to know why this error is coming and suggest a solutio for adding a new server to my SAP GUI 640.But I am able to add a new server using User defined tab but I want to add a new server using Server tab.
    Below is error details which I am getting:
    Error:service'sapmsSBX'unknown
    Wed Jan 09 06:41:13 2008
    Release 640
    Component NI(network interface),version 37
    rc=-3,module ninti.c,line 463
    Detail NiPGetServByName: service 'sapmsSBX' not found.
    Thanks and Regards,
    Ashish Thakkar.

    Hi,
    check etc/services for sapmsSBX entry. If missing - add it (i.e. sapmsSBX      36XX/tcp - where XX is your instance no.)
    Add an extra [Enter] after last line of etc/services.
    Regs,
    FS

  • Checking for a value in a field within a subform before allowing a user to add a new Instance

    Form setup:
    Page name = Page1
    1st Subform within Page1 = Info (set to flowed)
    Objects within Info subform: Name (textfield) and Email (textfield)
    I also have a 2nd subform within Page 1 which contains an add instance button
    What I'm trying to do:
    1. The user needs to enter their Name and Email address then click "Add Instance button" to create a new instance of the Info subform :  _Info.addInstance(1);
    2. If the user fails to enter an email address, I want there to be a mesage box that infos the user that an email address is required before he/she can create a new instance. Note: It would also be nice if the cursor is Set to foucs on the email field within that particular subform instance.
    3. As long as the user tries to continue adding an instance, he/she will be denied if they do not enter an email in that instance
    4. If the user includes an email address in that instance, then the script will create add a new isntance
    5. The process should continue in this manner for each each click of the add instance button
    I presume there nees to be a loop and perhaps a somExpression scipt, but I'm not sure.
    Here's what i have so far (see below)....The script works for the first instance on the page, but it doesn't prevent new instances from being created when the email field in that "current instance" is empty. I want it to prevent the user from adding new instances if the email field is balnk in that "current instance". So, I guess I'm not sure how ot test a field in the current instance in a repeating subform.
    var vName = Info.somExpression + ".email";
        var vEmail = xfa.resolveNode(vName).rawValue;
        if(vEmail == null)
    xfa.host.messageBox("PLease enter an email address.");
    else{
    Form._Info.addInstance(1);
            var i = Form._Info.count - 1;
            xfa.host.setFocus(xfa.resolveNode("Info[" + i + "].Name")); //This set's the focus of the cursor in the Name field of the newly created subform
    Please advise, and thank you in advance!!!!!!

    Hi,
    I think you can acheive what you want just by adding "lastRow.presence = "hidden";" when you do the addInstance, so it now looks like;
    var lastRow = Form.resolveNode("Info["+(_Info.count - 1)+"]"); // Get last row
    if (lastRow.Email.isNull) // If email field empty
        xfa.host.messageBox("Please enter an email address.");
    else
        lastRow.presence = "hidden";
            var newRow = _Info.addInstance();
        xfa.host.setFocus(newRow.Name.somExpression); // set focus to Name field on the row just added
    So whenever you add a row the previous one is hidden?
    For your second issue, if you could have another button on your form, you could ask the user for a password and if they enter it correctly then show for the Info subforms, so;
    var response = app.response({ cQuestion: "Do you want to see all respones?",
                                  cTitle: "Unlock Form",
                                  bPassword: true,
                                  cLabel: "Please enter the password:" });
    if (response === "Password")
        var infoSubforms = Form.resolveNodes("Info[*]");
        for (var i = 0; i < infoSubforms.length; i++)
                    var infoSubform = infoSubforms.item(i);
            infoSubform.presence = "visible";
    You would want to password protect your template as well (in Form ... Form Properties ... PDF Security) so people couldn't just open the form and look at the password.
    Probably the simplest approach.
    Hope this helps
    Bruce

  • Adding a standalone instance to a farm

    We have 2 application servers running 10g.
    The first server I have created a farm (new file based repository). I have added that servers instance to the farm.
    What I want to do is add the other application server instance to the farm.
    When I issue this command either manually or through iasconsole, I get this error:
    Command: dcmctl joinFarm -r myrephost.mydomain.com:7100
    ADMN-202501
    Base Exception:
    The exception 202001, has occurred in the cache layer of the persistence manager on the Oracle Application Server Instance "myrephostInstance.myrephost.mydomain.com",
    "An exception has occurred while accessing DCM repository. Please refer to the accompanying base exception for more details.
    Resolution:
    check the details of the base exception.
    Base Exception:
    The exception 202504, has occurred in the cache layer of the persistence manager
    "No network connection to [192.168.2.8:7152, pos=2, uid=0, name=, pri=0]".
    Now I'm executing this command from the standalone instance that I want to be added to the farm. The ip is 192.168.2.8. The machines are on the same switch, so there is network connectivity because I can ssh, smb, etc. I guess the real question is, how does it pick port 7152? I know my dcmCache.xml states the following:
    <port lower="7120" upper="7179"/>
    So I guess it just picks a port in between? I cannot telnet from my repository machine to the machine i want to add to the farm via any of those ports. I dont see anything from "netstat -natp" running except dcm-daemon on port 7100.
    I cannot find one single person that has this issue based on forums, yahoo, google, etc. Anyone know where I can look for more guidance?
    Thanks so much

    I guess a way around this..and a really better approach is to create a database-based repository. Although, my oracle database doesnt have a dcm schema. Does anyone know if i can export a file-based repository to a database-based repository or how would i go about created a database-based repository for the first time ?

  • Cannot find new instances in the workspace

    I use BPM Standalone 10g and Studio 10g.
    I create a process without a global creation activity and deploy as well as publish it in the BPM Standalone.
    The process just has one activity named Interactivejcooper. Its main task is set to Method.
    I also create a JAVA PAPI to create new instances of this process. It can create new instances.
    However, I cannot find all new instances created by PAPI in the workspace.
    The following code is in the PAPI.
    --------------------code------------------------
    package piic;
    import fuego.lang.ConnectionPassport;
    import java.util.Properties;
    import fuego.papi.Arguments;
    import fuego.papi.CommunicationException;
    import fuego.papi.InstanceInfo;
    import fuego.papi.ProcessService;
    import fuego.papi.ProcessServiceSession;
    import fuego.papi.OperationException;
    import java.util.Properties;
    public class Class1 {
    public Class1() {
    public static void main(String[] args) throws CommunicationException, OperationException {
    Class1 class1 = new Class1();
    Properties configuration = new Properties();
    configuration.setProperty(ProcessService.DIRECTORY_ID, "default");
    configuration.setProperty(ProcessService.DIRECTORY_PROPERTIES_FILE, "D:\\BPM_HOME_standalone\\webapps\\papiws\\WEB-INF\\directory.xml");
    configuration.setProperty(ProcessService.WORKING_FOLDER, "/tmp");
    ProcessService processService = ProcessService.create(configuration);
    ConnectionPassport passport = processService.createPassport("jcooper");
    passport.setPassword("welcome1");
    passport.fillPassport();
    ProcessServiceSession session = processService.createSession(passport, "localhost");
    for (String processId : session.processesGetIds()) { 
    System.out.println("\n ProcessID: " + processId);
    String processId = "/Processwithoutglobalstart";
    String argumentName = "MyArgument";
    Object argumentValue = new Object();
    Arguments arguments = Arguments.create();
    arguments.putArgument(argumentName, argumentValue);
    session.processCreateInstance(processId, arguments);
    System.out.println("49-----------");
    for (String processId2 : session.processesGetIds()) { 
    System.out.println("\n ProcessID: " + processId2);
    for (InstanceInfo instance : session.processGetInstances(processId2)) {
    System.out.println(" instance.getId()-> " + instance.getId());
    System.out.println(" activity.getActivityId()-> " +instance.getActivityId());
    System.out.println(" activity.getActivityName()-> " +instance.getActivityName());
    session.close();
    processService.close();
    ----------------------println----------------------------------
    E:\Jdeveloper10131_20090318\jdk\bin\javaw.exe -client -classpath E:\Jdeveloper10131_20090318\jdev\mywork\PAPInewInstancewithoutCreation\Project1\classes;D:\BPM_HOME_standalone\client\papi\lib\b1util.jar;D:\BPM_HOME_standalone\client\papi\lib\b1oracle.jar;D:\BPM_HOME_standalone\client\papi\lib\b1base.jar;D:\BPM_HOME_standalone\client\papi\lib\fuegopapi-client.jar piic.Class1
    Creating connector [fuego:SQL]
    Creating ProcessService with id 'oracle/2009-03-31 18:08:47+08:00'.
    Creating local folder: /tmp\system\Schema3387192-1796619082\catalogs
    Loading catalogs from local folder: /tmp\system\Schema3387192-1796619082\catalogs
    0 jars found locally.
    [CatalogMgrCache] =======================
    Registering CatalogMgr [oracle/2009-03-31 18:08:47+08:00] ...CatalogManagerCache 1465214:
    Managers:
    Counters:
    [CatalogMgrCache] =======================
    CatalogMgr [oracle/2009-03-31 18:08:47+08:00] REGISTERED!CatalogManagerCache 1465214:
    Managers:
    {oracle/2009-03-31 18:08:47+08:00=fuego.util.LocalCatalogManager@1d0d124}
    Counters:
    ProcessService 'oracle/2009-03-31 18:08:47+08:00' created successfully.
    ProcessID: /InvokeJava2#Default-1.0
    ProcessID: /Process#Default-1.0
    ProcessID: /ProcessB#Default-1.0
    ProcessID: /Processwithoutglobalstart#Default-1.0
    ProcessID: /Testprocess#Default-1.0
    Unreachable Engine Tolerance (seconds):
    by default: 0
    to be used: 0
    This papi client will not cache exceptions which imply that an engine could not be reached.
    Adding local catalog for project: 163
    Processing the synchronization information, instance '163:247:0' was created.
    49-----------
    ProcessID: /InvokeJava2#Default-1.0
    instance.getId()-> /InvokeJava2#Default-1.0/242/0
    Adding local catalog for project: 162
    activity.getActivityId()-> /InvokeJava2#Default-1.0/tojava
    activity.getActivityName()-> tojava
    ProcessID: /Process#Default-1.0
    ProcessID: /ProcessB#Default-1.0
    ProcessID: /Processwithoutglobalstart#Default-1.0
    instance.getId()-> /Processwithoutglobalstart#Default-1.0/243/0
    activity.getActivityId()-> /Processwithoutglobalstart#Default-1.0/Interactivejcooper
    activity.getActivityName()-> Interactivejcooper
    instance.getId()-> /Processwithoutglobalstart#Default-1.0/244/0
    activity.getActivityId()-> /Processwithoutglobalstart#Default-1.0/Interactivejcooper
    activity.getActivityName()-> Interactivejcooper
    instance.getId()-> /Processwithoutglobalstart#Default-1.0/247/0
    Session 'jcooper7676692326836000001' has been closed.
    activity.getActivityId()-> /Processwithoutglobalstart#Default-1.0/Interactivejcooper
    activity.getActivityName()-> Interactivejcooper
    instance.getId()-> /Processwithoutglobalstart#Default-1.0/246/0
    activity.getActivityId()-> /Processwithoutglobalstart#Default-1.0/Interactivejcooper
    activity.getActivityName()-> Interactivejcooper
    instance.getId()-> /Processwithoutglobalstart#Default-1.0/245/0
    activity.getActivityId()-> /Processwithoutglobalstart#Default-1.0/Interactivejcooper
    activity.getActivityName()-> Interactivejcooper
    ProcessID: /Testprocess#Default-1.0
    [CatalogMgrCache] =======================
    Unregistering CatalogMgr [oracle/2009-03-31 18:08:47+08:00] ...CatalogManagerCache 1465214:
    Managers:
    {oracle/2009-03-31 18:08:47+08:00=fuego.util.LocalCatalogManager@1d0d124}
    Counters:
    {oracle/2009-03-31 18:08:47+08:00=1}
    [CatalogLoaderMgr] unregisterCatalogMgr freeing resources of LocalCatalogManager
    [CatalogMgrCache] =======================
    CatalogMgr [oracle/2009-03-31 18:08:47+08:00] UNREGISTERED!CatalogManagerCache 1465214:
    Managers:
    Counters:
    Process exited with exit code 0.

    I don't know what happens. It works after I restart BPM studio in 2 hours.

  • Setting focus to new instance of a field...need help.

    Hi there,
    I have a flowed form which consists of multiple subforms. I have one subform which is basically one textfield that is set to a min of 1 and a max of 5.
    These are to correspond to fields in our system of record that have 5 fields for company long name with a 36 character field limit.
    I've got the limits set up just fine and I have added simple script to add a new instance when the user exits the field.
    The focus goes to the next field set in the tab order but what I want is the focus set on the new instance of field created but I have not been able to find an example of how to do that.
    Any suggestions would be greatly appreciated. Thanks!

    Well,
    I've been reading and trying various things but cant get anything to work like I want it to.
    The sample provided works for 2 iterations but mine has to do this for up to 5 instances. I have not been able to figure out how to get this to work.
    Anyone have any additional suggestions?
    btw...here is my modified version. ES2 is whay I'm using.
    Long_Title.occur.max = "5";
    var oSubform = xfa.resolveNode("Long_Title");
    var oNewInstance = oSubform.instanceManager.addInstance(1); // I think you probably managed this first part better than here
    xfa.form.recalculate(1); // I THINK THIS IS IMPORTANT
    var count = (this.Long_Title.nodes.length)
    var testIndex = oNewInstance.Account_Long_Title.index;
    xfa.host.messageBox("Text Field Index in new Subform: " + count); // TextField1 will conserve index 0 because it is the only textfield in the new Sub1
    var NEW_TEXTFIELD = xfa.resolveNode("Long_Title[1].Account_Long_Title[0]"); // However, Sub1 gets index 1 because it is not alone any more
    xfa.host.setFocus(NEW_TEXTFIELD); // This actually sets focus on the newly created instance of TextField1 (actually Sub1 instance)

  • Best practice for creating a bulk of new instances

    Hi,
    My customer has a requirement to create a bulk of 30,000 new instances by scanning a database table (an export from a billing system) which contains a list of a call center tasks (interactive) to be performed. They will be executed throughout the month.
    What is the best way to do it? If the answer is "this is a worst practice" that's a good answer too, but the question is how do I provide a solution to their needs.
    When the process was executed as is we ran into the maximum limit of 1,000. Configuring the automatic item queue removed the 1,000 limit exception but caused JTA timeout and other exceptions against the engine database.
    It seems to me that some sort of division into bulks of a few hundred instances should be the way to do it instead of just exploding the engine with so many instances. Am I right? If so, how would be the best way to code it? If not, any other suggestions?
    Any recommendations would be highly appreciated.
    Thanks,
    ~ronen

    Hi,
    Know how you feel.
    Others are sure to have other ideas, but here are a thoughts:
    1) You might also want to consider only creating 995 in a single transactional boundary at a time. Once 995 have been created, end the transaction so it will commit. You could then fire another transaction that creates another 995. Keep doing this in separate transactions until all have been created. Sure you know many ways you could keep track of where each group of 995 ended and where your next group of 995 should begin, but a common technique is to keep track of the last row processed in a separate database.
    2) Sure you've thought of this, but consider running this from a Global Automatic that is scheduled to run at a time when everyone's gone home. The last thing you want is to get complaints from the end users about performance. Their interaction will be degraded and your creations will take longer.
    3) If you can, be especially conservative about your instance size when creating instances in a batch. Avoid adding attachments and binary variables as they are being created (both of these can potentially be huge). Get rid of the incoming argument variables that you do not need right away in the process. Many times you can look up the additional information downstream when needed later in the process.
    4) Note what is happening immediately downstream of your Begin activity in the process. If for example, you have more than one automatic activity that immediately follow the Begin, consider either turning all the automatic activities it a procedure (one transaction) or set your process to "Greedy" execution. If you have a Multiple activity immediately after the Begin, you might be creating 10x the number of instances (e.g. your Multiple's logic creates 10 copies). If the is the case, you might want to throttle back the number of instances created in one transaction even further.
    Hope this helps,
    Dan

  • Creating a new instance of a class within a superclass

    I have a class with 2 subclasses and in the top classs I have a method that needs to create a new instance of whihc ever class called it.
    Example:
    class Parent
         void method()
              addToQueue( new whatever type of event is calling this function )
    class Child1 extends Parent
    class Child2 extends Parent
    }What I mean is , if Child1 calls the method then a new Child1 gets added to the queue but if Child 2 calls method a new Child 2 gets added to the queue. Is this possible?
    Thanks.

    try
    void method()
    addToQueue(this.getClass().newInstance());
    }Is this what you want ?Won't that always add an object of type Parent?
    no if we invoke this method on the child object...
    we currently dun know how op going to implement the addToQueue()
    so... just making my guess this method will always add to same queue shared among
    Parent and it's childs......

  • Cluster cannot be added to this instance - Performance Manager

    Hi, I installed an instance of Performance Manager and added two clusters to it. For whatever reason I had to ditch the Performance Manager VM and re-deploy it. Now that I have a new instance, I cannot add the clusters to it. Yes, I should have removed them before I destroyed the first instance, but I didn't. How can I tell the clusters that they are no longer being managed by the old instance of Performance Manager? The documentation says to ignore the warning, but alas that is not possible, it will not let you add them. Error: Cluster <xxx> is currently managed by the following instance of OnCommand Performance Manager: URL:                       https://<xxx.xxx.com>:443System ID:          <uuid-here> Managing a cluster with multiple instances of the same application will impact the performance of the cluster. You must remove cluster <xxx> from the instance of OnCommand Performance Manager above before adding it to this instance of OnCommand Performance Manager. Thanks  

    Huge!   This was bugging me for two weeks -- thanks for documenting the fix.   Lukeitdavisllp wrote:
    Hi, I installed an instance of Performance Manager and added two clusters to it. For whatever reason I had to ditch the Performance Manager VM and re-deploy it. Now that I have a new instance, I cannot add the clusters to it. Yes, I should have removed them before I destroyed the first instance, but I didn't. How can I tell the clusters that they are no longer being managed by the old instance of Performance Manager? The documentation says to ignore the warning, but alas that is not possible, it will not let you add them. Error: Cluster <xxx> is currently managed by the following instance of OnCommand Performance Manager: URL:                       https://<xxx.xxx.com>:443System ID:          <uuid-here> Managing a cluster with multiple instances of the same application will impact the performance of the cluster. You must remove cluster <xxx> from the instance of OnCommand Performance Manager above before adding it to this instance of OnCommand Performance Manager. Thanks   

  • New Instance of class

    I have two classes. In one class I have created a new instance of the other class as follows:
    class1{
    class2 c2 = new class2(this);
    However in class2 I now want to create a new instance of class1 but I cant do this as I go into an infinite loop right. What can I do???

    In class1 I have a JTable, with a number of colums and
    each row containing data pertaining to a record. In
    class2 I have a text area, comboboxes, and other such
    gui items. class1 extends JFrame. class2 extends
    JPanel. When the user selects a row the gui created in
    class2 is added to the frame in class1 (south of
    JTable)
    Each time the user selects a different row, the
    appropriate data (data from the row selected)is
    displayed in the gui items in class2 - hence the need
    for a new instance of class2 in class1.
    However when the user presses the save button in the
    class 2 gui I wish the data to be updated in the
    class1 JTable - hence the need for a new instance of
    class1 in class2. I can see the need for class2 to have a reference to the instance of class1. But it does not sound like you need or want to create a new instance of class1. class1 is a JFrame. If you pass a reference to class1 in the constructor of class2, then class2 can use the reference to the class1 instance to add, remove or otherwise update class1.

  • New instance of an ANE

    Is it possible to have more than one instance of an ane running?
    It seems that ExtensionContext.createExtensionContext just links to the first initialized extension. Is it possible to have it not do that?

    First create the symbol as a movieclip.  Then right click the object in the library and select the Linkage option.  In the panel that opens select the option to export for actionscript and then assign a Class name for the symbol... lets say you name it ImageMC (caps are usually used for starting class names).  Flash will provide an indication that it can't find a class and it will create one when you compile.
    To add a new instance of the symbol to the stage you use...
    var imgMC:ImageMC = new ImageMC();
    imgMC.x = ???;
    imgMC.y = ???;
    addChild(imgMC);
    where the x and y values (???) will be determined based on whatever information you have available regarding where the ball was when it hit the wall.

Maybe you are looking for