CreateInsert And Commit Programmtically

dear all
how i can
programmtic CreateInsert action And Commit  action into one commandButton.
h

Hi,
You can CretaeInsert and Commit using bindings as follows
BindingContainer bindings = getBindings();
OperationBinding operationBinding = null;
//access the ADF commit operation in an Operation binding and
//execute it
operationBinding = bindings.getOperationBinding("CreateInsert");//
Object result = operationBinding.execute();
if (!operationBinding.getErrors().isEmpty()) {
//don’t continue in the case of an error
return null;
}For Commit,Same code as above just change above CreateInsert to Commit as follows
operationBinding = bindings.getOperationBinding("Commit");//Access bindings
public BindingContainer getBindings() {
        return BindingContext.getCurrent().getCurrentBindingsEntry();
}

Similar Messages

  • Problem in Creating new row & inserting data using CreateInsert and Commit

    Hello All,
    I have created a page there are few input text and i want to insert the data into a database table. I have created an Application Module I am using CreateInsert and Commit operation but there is one problem.
    At first it created a row in database after that it is not creating the new row instead it is updating the same row with the new values.
    In bindings of my jspx page I have created two binding for action (1) CreateInsert for the VO of that Application Module (2) Commit operation of that Application Module.
    Here is the code snippet of my application:
    BindingContainer bindings = getBindings();
    OperationBinding operationBinding = bindings.getOperationBinding("CreateInsert");
    Object result = operationBinding.execute();
    *if (!operationBinding.getErrors().isEmpty()) {*
    return null;
    OperationBinding operationBinding1 = bindings.getOperationBinding("Commit");
    Object result1 = operationBinding1.execute();
    *if (!operationBinding1.getErrors().isEmpty()) {*
    return null;
    I have tried using Execute+Commit and Insert+Commit case also in every case it is updating the same row and not inserting a new row.
    Is there anything I am missing?
    Please Help.

    hi user,
    i dono. why are trying with codes. adf provides zero lines codes.
    a wonderful drag and drop functionality provide by the framework.
    while double click the button the codes are  registered in your bean
        public String cb6_action() {
            BindingContainer bindings = getBindings();
            OperationBinding operationBinding = bindings.getOperationBinding("CreateInsert");
            Object result = operationBinding.execute();
            if (!operationBinding.getErrors().isEmpty()) {
                return null;
            return null;
        public String cb8_action() {
            BindingContainer bindings = getBindings();
            OperationBinding operationBinding = bindings.getOperationBinding("Commit");
            Object result = operationBinding.execute();
            if (!operationBinding.getErrors().isEmpty()) {
                return null;
            return null;
        public String cb7_action() {
            BindingContainer bindings = getBindings();
            OperationBinding operationBinding = bindings.getOperationBinding("Delete");
            Object result = operationBinding.execute();
            if (!operationBinding.getErrors().isEmpty()) {
                return null;
            return null;
        public String cb14_action() {
            BindingContainer bindings = getBindings();
            OperationBinding operationBinding =
                bindings.getOperationBinding("Delete4");   // some different here. after deleting usually do commit
            OperationBinding operationBinding1 =  
                bindings.getOperationBinding("Commit");    // so here commit operation.
            Object result = operationBinding.execute();
            Object result1 = operationBinding1.execute();
            if (!operationBinding.getErrors().isEmpty()) {
                return null;
            if (!operationBinding1.getErrors().isEmpty()) {
                //add error handling here
                return null;
            return null;
        }if am not understud correctly. please some more explanation need.

  • CreateInsert and Commit in one operation

    Is there a way to CreateInsert and Commit in one operation? I just want the user to click one button to create a new record.

    Hi..
    You can try as this scenario one way is without bean class also you can with bean any way i will explain how do you do without bean
    Refresh your Data Control and say you have ViewObject name sampleVO and Application Module as AM.
    Drag and drop CreateInsert as ADF Button(DataControl --> AM -->sampleVo --> Operations --> CreateInsert),To fill data for newly created row Drag and Drop sampleVO as ADF - Form(DataControl --> AM--> sampleVo).Now want to commit this form to database for that purpose you can use Commit Operation in your Application Module Drag and Drop Commit as ADF Button(DataControl --> AM --> Operations -->Commit).Now you can successfully inserted data to DataBase using CreateInsert and Commit.

  • Create and commit does not work

    Hi,
    I have a Creation form in which I have a auto-suggest box(using ajax) and a ediable table.
    I have Create button and Commit button dragged from the Data Control Palette.
    But they dont work?
    Is it becoz of the Ajax which i have kept?
    Also Can anyone suggest a doc which explains what happens actually when a create/commit button is clicked.

    Hi,
    the create and commit buttons execute method bindings (operations if using ADF BC) on the binding layer.
    Not sure if this has to do with you Ajax implementation because this is what only you can tell from looking at your code. Change the "create" binding in the pageDef file to reference "CreateInsert" if using ADF Business Components. This will create a new row.
    Note that the commit button is disabled until a change has been submitted
    Frank

  • ADF CreateInsert and Iterator refresh control

    Hi
    JDEV Version : 11.1.1.6
    I have a scenario where i have dragged and dropped updatable EMPLOYEESVIEW as a form on my page with fields EMP_ID (Invisible on JSPX page)and EMP_NAME.
    and have buttons called ADD EMPLOYEE and SAVE.
    I enter the Value to EMP_NAME input Text box and Click on "ADD EMPLOYEE" button
    On click of  ADD EMPLOYEE button i m Setting the value of EMP_ID through java method and invoking  createInsert Operation like this.
    And i Have set Immediate property of CreateInsert button as True also "ADD EMPLOYEE" button has immediate Property set to true, since i want to show User entered EMP_NAME text on the screen bcos i need to give use an option to Edit.
                BindingContainer bindings =
                    BindingContext.getCurrent().getCurrentBindingsEntry();
      BindingContext bctxtree = BindingContext.getCurrent();
                  BindingContainer bindingtree = bctxtree.getCurrentBindingsEntry();
                  List attributelisttree = (List)bindingtree.getAttributeBindings();
                  Iterator itrtree = attributelisttree.iterator();
                                 while (itrtree.hasNext()) {
                                         AttributeBinding attrbind = (AttributeBinding)itrtree.next();
                       String label = attrbind.getName();
                                         System.out.println("lable"+label);
                       if(label.equalsIgnoreCase("EMP_ID")) {
                                           Boolean flag =
                              attrbind.processNewInputValue(variable);
                           attrbind.setInputValue(empid);
                           fetchVal=(Object)attrbind.getInputValue();
                            System.out.println(""+fetchVal);
    here i m invoking the Operation CreateInsert and Though I would have inserted the value of EMP_ID programmatically as soon as i click on CreaetInsert/ Invoke CreateInsert Operation the Binding EMP_ID becomes Empty.
    Because of which when i say "Commit" It throws me an error saying "Null cannot be inserted into EMP_ID since its primary Key"
    How to retain the Value of EMP_ID binding?
    Is it anything to do with the refresh condition which i m suppose to set for EMPLOYESSVIEWITERATOR????
    Help
    Thanks

    This is the java class
        public String onClick(ActionEvent aet) {
                            variable= (getting empid)
                    DCBindingContainer bindingsImplafter= (DCBindingContainer) bindings;
                                                            DCIteratorBinding dciterafter = null;
                    dciterafter.getRowAtRangeIndex(0).setAttribute("IntegrationId", variable);
                           dciterafter.getRowAtRangeIndex(1).getAttribute("EMP_ID"));
    dciterafter.getRowAtRangeIndex(0).getAttribute("EMP_ID"));
          dciterafter.getRowAtRangeIndex(0).getAttribute("EMP_NAME"));
    dciterafter.getRowAtRangeIndex(1).getAttribute("EMPNAME"));
                    RichCommandButton t = (RichCommandButton)genericUtility.findComponentInRoot("createinsertbutton1");
                         ActionEvent actionEvent = new ActionEvent(t);
                         System.out.println("  ActionEvent actionEvent = new ActionEvent(component);");
                         actionEvent.queue();
            return null;
    Tried setting the getCurrentRow too!!
    my jspx page:
        <af:panelFormLayout id="pfl1">
        <af:inputText value="#{bindings.EMP_ID.inputValue}"
                            label="#{bindings.EMP_ID.hints.label}"
                            required="#{bindings.EMP_ID.hints.mandatory}"
                            columns="#{bindings.EMP_ID.hints.displayWidth}"
                            maximumLength="#{bindings.EMP_ID.hints.precision}"
                            shortDesc="#{bindings.EMP_ID.hints.tooltip}"
                            id="it44">
                <f:validator binding="#{bindings.EMP_ID.validator}"/>
              </af:inputText> 
              <af:inputText value="#{bindings.EMP_NAME.inputValue}"
                            label="#{bindings.EMP_NAME.hints.label}"
                            required="#{bindings.EMP_NAME.hints.mandatory}"
                            columns="#{bindings.EMP_NAME.hints.displayWidth}"
                            maximumLength="#{bindings.EMP_NAME.hints.precision}"
                            shortDesc="#{bindings.EMP_NAME.hints.tooltip}"
                            id="it4" >
                <f:validator binding="#{bindings.EMP_NAME.validator}"/>
              </af:inputText>
    </panelFormLayout>
      <af:commandButton actionListener="#{bindings.CreateInsert.execute}"
                                text="CreateInsert"
                                disabled="#{!bindings.CreateInsert.enabled}"
                                id="cb1ci" immediate="true"  visible="false"/>
                                     <af:commandButton actionListener="#{bindings.Commit.execute}"
                              text="Commit" disabled="#{!bindings.Commit.enabled}"
                              id="cb2" />
           <af:commandButton text="+ Click to Add" id="cb1"  actionListener="#{javaclassname.onClick}"  immediate="true">
    On click of "+ Click to Add" button i m setting integration id and i click the button createInsert pro grammatically and in the front page if i call commit it says null value cannot be inserted into INTEGRATION ID.
            dciterafter.getRowAtRangeIndex(1).getAttribute("EMP_ID")); gives me null hence the EMP ID in the jspx page hold empty value in the front end too.
    How to handle this?

  • Problem with sqlldr and commit

    Hi,
    i have a problem with sqlldr and commit.
    I have a simple table with one colum [ col_id number(6) not null ]. The column "col_id" is primary key in the table. I have one file with 100.000 records ( number from 0 to 99.999 ).
    I want load the file in the table with sqlldr ( sql*loader ) but i want commit only if all records are loaded. If one record is discarded i want discarded all record of file.
    The proble is that in coventional path the commit is on 64 row but if i want the same records of file isn't possible and in direct path sqlldr disable primary key :(
    There are a solutions?
    Thanks
    I'm for the bad English

    This is my table:
    DROP TABLE TEST_SQLLOADER;
    CREATE TABLE TEST_SQLLOADER
    (     COL_ID NUMBER NOT NULL,
         CONSTRAINT TEST_SQLLOADER_PK PRIMARY KEY (COL_ID)
    This is my ctlfile ( test_sql_loader.ctl )
    OPTIONS
    DIRECT=false
    ,DISCARDMAX=1
    ,ERRORS=0
    ,ROWS=100000
    load data
    infile './test_sql_loader.csv'
    append
    into table TEST_SQLLOADER
    fields terminated by "," optionally enclosed by '"'
    ( col_id )
    test_sql_loader.csv
    0
    1
    2
    3
    99999
    i run sqlloader
    sqlldr xxx/yyy@orcl control=test_sql_loader.ctl log=test_sql_loader.log
    output on the screen
    Commit point reached - logical record count 92256
    Commit point reached - logical record count 93248
    Commit point reached - logical record count 94240
    Commit point reached - logical record count 95232
    Commit point reached - logical record count 96224
    Commit point reached - logical record count 97216
    Commit point reached - logical record count 98208
    Commit point reached - logical record count 99200
    Commit point reached - logical record count 100000
    Logfile
    SQL*Loader: Release 11.2.0.1.0 - Production on Sat Oct 3 14:50:17 2009
    Copyright (c) 1982, 2009, Oracle and/or its affiliates. All rights reserved.
    Control File: test_sql_loader.ctl
    Data File: ./test_sql_loader.csv
    Bad File: test_sql_loader.bad
    Discard File: none specified
    (Allow all discards)
    Number to load: ALL
    Number to skip: 0
    Errors allowed: 0
    Bind array: 100000 rows, maximum of 256000 bytes
    Continuation: none specified
    Path used: Conventional
    Table TEST_SQLLOADER, loaded from every logical record.
    Insert option in effect for this table: APPEND
    Column Name Position Len Term Encl Datatype
    COL_ID FIRST * , O(") CHARACTER
    value used for ROWS parameter changed from 100000 to 992
    Table TEST_SQLLOADER:
    100000 Rows successfully loaded.
    0 Rows not loaded due to data errors.
    0 Rows not loaded because all WHEN clauses were failed.
    0 Rows not loaded because all fields were null.
    Space allocated for bind array: 255936 bytes(992 rows)
    Read buffer bytes: 1048576
    Total logical records skipped: 0
    Total logical records read: 100000
    Total logical records rejected: 0
    Total logical records discarded: 0
    Run began on Sat Oct 03 14:50:17 2009
    Run ended on Sat Oct 03 14:50:18 2009
    Elapsed time was: 00:00:01.09
    CPU time was: 00:00:00.06
    The commit is on 992 row
    if i have error on 993 record i have commit on first 992 row :(
    Edited by: inter1908 on 3-ott-2009 15.00

  • Need to Return immediately and commit the App Module on a different thread

    I have an action that I want to return fast (immediately) but the server processing takes longer than acceptable. The results of the operation don't matter to the page submitting it and I want it to be able to navigate away even if the operation is not complete. I want to either be able to send a non-blocking server event from the browser or on the server side start a new thread that performs the operation allowing the original thread to return immediately. The new thread would need access to an Application Module in order to commit data. How would I go about accomplishing this?
    Some thoughts
    I've tried creating a ConcurrentLinkedQueue and putting the DataControl on the que, then in the other thread I pull it off the que, process and commit the data. This works unless the page is navigated away from. Then calling dc.getApplicationModule(); returns null.
    I thought about using createRootApplicationModule in the new thread (since the new thread has no context) but don't know how that would work
    This is the code in the run method of the new thread. In this example, I'm adding data to the app module in the original thread and committing the data in a new thread.
    (like I said, it works most of the time.)
    Object[] req = (Object[])que.poll();
    DCDataControl dc = (DCDataControl)req[0];
    try{
    ApplicationModule am = dc.getApplicationModule();
    if (am != null){
    am.getTransaction().commit();
    } else{
    System.out.println("AM:null unable to commit ");
    } catch (Exception e){
    e.printStackTrace();
    finally{
    if (dc!= null){ dc.resetState();} // release app module
    }

    Thanks for the replies. I am aware of the inherent risks of running a separate thread within a managed container.
    The use case is a performance logging operation. We have a internal web app used by a network of franchises with over 1000 users. We log response time and performances statistics to the database. When the user clicks to navigate or commit data, the response time that the user experiences is logged after the page has fully rendered either through a PPR or a full submit. This is done by submitting ADFCustomEvent from javascript on the page after rendering is complete.. The event sends up the time difference from when the user first clicked to when the page was fully rendered. This information is then merged with logged events stored on the users Session that shows the name and response time of every query that was executed during the previous request. Depending on the page this could be up to half dozen to a dozen or more queries. The logging operation as experienced by the browser is generally fast (<200ms) but sometimes can be as long as a second or more when the database gets busy. A half second is too long as makes the app appear sluggish if the user can't type or click immediately after the page has finished rendering. The logged data is aggregated so we know exactly how much of the page load was due to a slow browser/network, how much was database time, webservice call time, etc... If it's due to a slow database we can drill down and see which query is the culprit. These performance metrics are critical to operations and are charted throughout the day so we know exactly what our users are experiencing. All of our users use a custom firefox client that we control. Using this logging framework we were able to determine that upgrading to a Firefox 4.0 based client cut browser render time by more than half a second on average. We can also tell what type of hardware the user is running so can place the blame for poor performance where appropriate. We have determined that pages render considerably faster on Windows 7 than on Windows 98 with the same hardware. We are moving the logging tables off of our exadata database to a separate box to remove that load from the application database. Since we expect the other database not to perform as well we don't want it to affect the user experience, hence the need to log asynchronously. I would like to put the data on a queue and have a background daemon process read from the queue and commit to the database. I would like the daemon thread to be able to use BC components. I would prefer not to resort to using a web service because of the inherent overhead. The logging operation is not a long operation but is of high frequency so should be as streamlined as possible. The load is spread over 6 servers with 4 JVM's each (24 weblogic instances). I know it's possible to use BC components from a plain Servlet (which runs on it's own thread) so what I want is to have something like a servlet thread that loops forever processing my logging queue.
    One other method I am investigating is using my own non-blocking ajax call that callls a servlet to perform the logging. I will need to pull out the timestamp contained within a client side ADF component along with the pages ctrl-state variable that is included with every ADF request as it uses this as the key to get to the data on the session. ADF really needs a non-blocking ADFCustomEvent for this type of request. (send and don't care about the response)
    The client component with the server listener looks like this
    <af:outputText value="#{pageFlowScope.perfClientTS}" visible="false"
    id="perfClientTSField" clientComponent="true">
    <af:serverListener type="logPerfData" method="#{perfLog.logPerfDataAction}"/>
    </af:outputText>
    The script that queues the ajax call after the page loads looks like this
    AdfCustomEvent.queue(perfClientTSField, "logPerfData", {
    typeId : typeId,
    subTypeId : subTypeId,
    responseTime1 : new String(responseTime1),
    responseTime2 : new String(responseTime2),
    openedVia: via
    true);
    I also tried calling the noResponseExpected() method on the event before queuing it but it still blocked the UI and caused an additional side effect in that the client sent two ajax requests instead of one. It somehow thought something on the client side needed to be synced with the server.
    email me and I can send a doc with more details about how our performance logging framework works.
    Edited by: Don Kleppinger on Mar 14, 2012 2:52 PM

  • Lock and Commit work in INBOUND IDOC

    Hi Experts,
    Problem is about lock and commit work
    i need to receive idoc for Good receipt for purchase order.
    For one Purchase Order i can receive many good receipt Idoc at the same time and when first came in Lock the Purchase Order and further idoc came after give Errors becouse purchase Order is lock.
    Problem is not the serialization (the sequence is correct), but is the lock.
    Any idea on how to fix this issue? (maybe there is some std settings??)
    Cheers
    Boris

    Hello Guys
    the packetsize is already set to 1 but the problem still again..... and where i can find this setting   "in Customizing choose Engineering Change Management ® Define statuses for master record". ?
    Any way i try in function module in inbound to check the lock object with this sample code:
          DO 30 TIMES.
            CALL FUNCTION 'ENQUEUE_EMEKKOS'
             EXPORTING
               mode_ekko            = 'S'
               mandt                = sy-mandt
               ebeln                = goodsmvt_item-po_number
               _scope               = '2'
             EXCEPTIONS
               foreign_lock         = 1
               system_failure       = 2
               OTHERS               = 3.
            IF sy-subrc <> 0.
              WAIT UP TO 1 SECONDS.
            ELSE.
              EXIT.
            ENDIF.
          ENDDO.
    but also with this....problem syill again...
    thanks
    Boris

  • Issue with Transporting Trans and Comm Structure

    Hi Experts,
    Recently we moved an Infosource ( with Transfer structure and Comm stucture) from D to Q. After movement we checked teh Transport log and we see a warning that says
    " R3TRROUT458SEFRDF2PUBJRIZGZAOPSNB not found, object also deleted in target system"
    From teh object name it appears like a routine. But how do we know the actual name of the routine so that we can see in find out and compare betwn systems.
    Thanks
    DVMC

    Hi,
    If you want to find the objects using only technical name, use the table TADIR.
    In your case execute this table and give the technical name
    '458SEFRDF2PUBJRIZGZAOPSNB' (Removed R3TR and ROUT).
    Then you can get the routine details.
    Regards,
    Vivek V

  • JClient: after INSERT and COMMIT does not show the primary textfield value

    1. In my JClient master-detail form: When I insert a new record, enter data, and commit the changes... the master-panel's primarykey textfield is BLANK, when it should show the new auto-incremented number from the MySQL database. I have to close and open the form again to refresh that field again.
    2. In order to properly save new records in the detail-panel, I have to insert and save the above master-panel first. Is this the way JCLient handle master-detail forms?
    Thanks.

    Hi. Thanks for sharing your advice.
    Re my problem,
    if we have to refresh data by requery,i suggest you should use the way below:
    private JUNavigationBar navBar = new JUNavigationBar(true,false,true,false,true);
    navBar.setModel(JUNavigationBar.createPanelBinding(panelBinding, navBar));
    // after insert ,call this method
    navBar.doAction(navBar.BUTTON_EXECUTE);Tried this out but my textfield still won't get refreshed. Here is the code I came up with:
        private JUNavigationBar navBar = new JUNavigationBar() {
                public void doAction(int button) {
                    if (button == JUNavigationBar.BUTTON_INSERT) {
                        super.doAction(button);
                        navBar.doAction(navBar.BUTTON_EXECUTE);
                        return;
                    super.doAction(button);
            };Re your problem,
    I am developing application with JDev + MySQL,encounted another problem,
    how can i get the primary key supported by auto_increment column after insert?
    i constructed a vo whose sql statement is
    select last_insert_id() as last_id to get the value of auto_increment column.
    i found it can't get the right value unless commit the transaction.
    Would u please tell me your way?Based on what I experienced, we dont have to do the SELECT statement above. MySQL does auto-increment the primarykey but the JClient form just cant show it immediately, unless we close and re-open the form.
    What did I do to refresh the primarykey during insert? Please note that I got this solution accidentally coz I'm still a newbie in Java.
    A user want to add a record:
    1. He presses the Insert button.
    2. He enters data into a component (ex. textfield)
    3. The component's action-performed event is fired, and the following code is run:
            DCJboDataControl dc = (DCJboDataControl)panelBinding.getDataControl();
            ApplicationModule am = dc.getApplicationModule();
            Transaction tr = am.getTransaction();
            dc.commitTransaction();
            ViewObject vo = am.findViewObject("TblaccountsView1");
            vo.executeQuery();
            vo.last();It simply commits the transaction, goes to last (new) transaction, and lets the user continue his data encoding.
    Hope it helps and I hope theres an even better way to do this.

  • Discounts and Commissions in SAP

    Hi,
    I have situations where I have to issue a Sales order with a Discount field so: Total Gross Before Discount less Total Discount and also to include Commission as a seperate field.
    Total Gross Before Discount -
    Total Discount
    Total After Discount  -
    Total Commission
    Net Amount
    Is there a way where I can set this up? I am using SAP Business One 2007
    Thanks.

    Hi,
    I am trying to find the best possible solution to have discounts and commissions included on the same screen for the Sales Order.
    Any suggestions pls?

  • Delete and Commit

    Hello,
    I drag and dropped delete operation and commit on top of the delete button(bind to existing button) However delete is disabled always.
    How can I acheive delete and commit in button?
    Thanks in advance

    The simplest way is to:
    (1) Create a custom method on your application module
    (2) Publish that method on the application module's client interface
    (3) Drop the custom method as a button onto your form.
    When you click the button created in step 3, it invokes the code in your application module method automatically.
    Assuming you are wanting to delete the current row from a view object instance named "EmpView" in your application module's data model, your method would look like this:
    public void deleteCurrentEmpAndCommit() {
      Row empRow = getEmpView().getCurrentRow();
      if (empRow != null) {
        empRow.remove();
        getDBTransaction().commit();
    }I believe you requested a pre-release of the ADF Developer's Guide for Forms/4GL Developers from me. The steps to create and publish custom methods on an application module are covered in sections:
    8.3, "Adding a Custom Service Method"
    8.4,"Publishing Custom Service Methods to Clients"
    10.3.3, "How the Data Model and Service Methods Appear in the Data Control Palette"

  • Begin and Commit Transactions

    I would like to use the begin and commit transaction in stored procedures in T-SQL. I wanted to know if I can put it around a few statements at once and so if there is an error in one of them none of the above statements will save and the procedure will
    terminate. Will this work with just a begin transaction before all the statements and a commit transaction at the end of all the statements and if there is an error nothing will save, or is there more to it?
    thank you
    Debra has a question

    Add also SET XACT_ABORT ON statement in your procedure.
    I suggest you to read this very interesting article Structured
    Error Handling Mechanism in SQL Server 2012, it should tell you everything you need to know.
    For every expert, there is an equal and opposite expert. - Becker's Law
    My blog
    My TechNet articles

  • Problem when doing update and commit at the same time...

    I want to "fusion" the update and commit event... I thought that if I added a jbo:Commit at the end of the update event,
    it would work. But, I get back an error message when running, and since this time, I can throw my project to trash:
    even if I get back to the previous version of my project ( the one that used to work ), I still have the message. The only
    solution for me is to shut down Jdeveloper, send to trashbin the project and to get back it from a saved backup...
    Has someone a way to fix it, please ?
    Regards,
    David

    Hi David,
    Could you please provide more details:
    1. What error message do you receive when running? Can you provide a stacktrace?
    2. What does the corrupt JSP page look like? Can you include the source for the page in your post?
    3. What error message(s) does the IDE provide when you try to reopen the project?
    Thanks,
    JR

  • External Task - prepared and commit method

    Hey guys,
    I have a problem with External Task. I don't know how make a prepared and commit method for use with J2EE Application Server.
    Anyone have an example?
    tks

    I am having some issue with the Externhal Task prepare and commit method,
    Actually I am ponting the interactive activity to external Task and in the external task i am getting instanceID , participantId and activity as query paramenters.Using those query paramemeters i am initalizing the ProcessServiceSession and then making call to prepareActivate Method as below.
    I am getting query string instnaceId value like " %2FScorecardChallenge%23Default-1.0%2F4%2F0 " .
    And I tried to call the IntsnaceID method InstanceId.getProcessId(instanceId), but this getProcessId method gives Null value.
    Is there any idea why i am getting the Null processID value for the instanceIdString " %2FScorecardChallenge%23Default-1.0%2F4%2F0 ".
    My sampel code looks like below ....
    String instanceId = this.getRequest().getParameter("instanceId");
                   String activity = this.getRequest().getParameter("activity");
                   String participantId = this.getRequest().getParameter("participantId");
                   this.getRequest().setAttribute("activity",activity);
                   this.getRequest().setAttribute("isFromBpm","true");
                   try
                        System.out.println("########### BPM params" + instanceId + " : " + activity + " : " +participantId);
                        ProcessServiceSession bpmSession = ConnectPAPI.createSession(participantId,this.getRequest().getRemoteHost());
                   String pid=InstanceId.getProcessId(instanceId);
                   System.out.println("Process ID value "+ pid);
                   System.out.println("Instance ID value "+ InstanceId.getInstanceId(instanceId));
                   System.out.println("Instance ID value "+ InstanceId.getInstanceIn(instanceId));
                        if(bpmSession != null)
                        {  try{
                                                                               Arguments args = bpmSession.activityPrepare(activity,instanceId,Arguments.create());
                                       Map argument =(Map) args.getArguments();
                                       Iterator it = argument.entrySet().iterator();
                                       while (it.hasNext()) {
                                       Map.Entry pairs = (Map.Entry)it.next();
                                       String key = (String)pairs.getKey();
                                       Object value = pairs.getValue();
                                       System.out.println("########### BPM args" + key + " : " + value + " : " );
    But my problem here is I am getting null pointer exception like below ( I found that null pointer exception is coming because processID ivelue is null).
    Stack Trace is output :
    Process ID value null
    Instance ID value %2FScorecardChallenge%23Default-1.0%2F4%2F0
    Instance ID value -1
    bpmSesssion instance details abstract class fuego.papi.ProcessServiceSesion
    bpmSesssion instance is not null
    java.lang.NullPointerException
         at fuego.directory.DirDeployedProcess.isConsolidatedId(DirDeployedProcess.java:114)
         at fuego.papi.impl.ProcessServiceSessionImpl.getProcessControl(ProcessServiceSessionImpl.java:2328)
         at fuego.papi.impl.ProcessServiceSessionImpl.processGetInstance(ProcessServiceSessionImpl.java:1926)
         at fuego.papi.impl.ProcessServiceSessionImpl.activityPrepare(ProcessServiceSessionImpl.java:1128)
         at com.rollsroyce.gsp.poc.samplePOC.SamplePOCController.begin(SamplePOCController.java:57)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:585)
         at org.apache.beehive.netui.pageflow.FlowController.invokeActionMethod(FlowController.java:879)
         at org.apache.beehive.netui.pageflow.FlowController.getActionMethodForward(FlowController.java:809)
         at org.apache.beehive.netui.pageflow.FlowController.internalExecute(FlowController.java:478)
         at org.apache.beehive.netui.pageflow.PageFlowController.internalExecute(PageFlowController.java:306)
         at org.apache.beehive.netui.pageflow.FlowController.execute(FlowController.java:336)
         at org.apache.beehive.netui.pageflow.internal.FlowControllerAction.execute(FlowControllerAction.java:52)
         at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:431)
         at org.apache.beehive.netui.pageflow.PageFlowRequestProcessor.access$201(PageFlowRequestProcessor.java:97)
         at org.apache.beehive.netui.pageflow.PageFlowRequestProcessor$ActionRunner.execute(PageFlowRequestProcessor.java:2044)
         at org.apache.beehive.netui.pageflow.interceptor.action.internal.ActionInterceptors$WrapActionInterceptorChain.continueChain(ActionInterceptors.java:64)
         at org.apache.beehive.netui.pageflow.interceptor.action.ActionInterceptor.wrapAction(ActionInterceptor.java:184)
         at org.apache.beehive.netui.pageflow.interceptor.action.internal.ActionInterceptors$WrapActionInterceptorChain.invoke(ActionInterceptors.java:50)
         at org.apache.beehive.netui.pageflow.interceptor.action.internal.ActionInterceptors$WrapActionInterceptorChain.continueChain(ActionInterceptors.java:58)
         at org.apache.beehive.netui.pageflow.interceptor.action.internal.ActionInterceptors.wrapAction(ActionInterceptors.java:87)
         at org.apache.beehive.netui.pageflow.PageFlowRequestProcessor.processActionPerform(PageFlowRequestProcessor.java:2116)
         at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:236)
         at org.apache.beehive.netui.pageflow.PageFlowRequestProcessor.processInternal(PageFlowRequestProcessor.java:556)
         at org.apache.beehive.netui.pageflow.PageFlowRequestProcessor.process(PageFlowRequestProcessor.java:853)
         at org.apache.beehive.netui.pageflow.AutoRegisterActionServlet.process(AutoRegisterActionServlet.java:631)
         at org.apache.beehive.netui.pageflow.PageFlowActionServlet.process(PageFlowActionServlet.java:158)
         at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:414)
    Please help me , is any knows the problem.........................................

Maybe you are looking for