Logical Delete and Relationships

Hello,
My client has a requirement where all deletes must be logical (set activeFlag = 'N').
For queries, I can set selection criteria to filer out inactive rows.
I need to be able to do the same for relationships, 1-1, 1-M, and M-M. That is, make Toplink ignore relationship targets with activeFlag ='N'.
So far I have determined that I need to amend the descriptors at run-time using a static Java method. Is this the only way to do this? Can I amend the delete, select, insert for all three types of relationships? Could you point me to an example on how to accomplish this?
Thanks.

You can use descriptor additional join expressions, mapping selection criterias, and mapping custom queries. All of these are fairly advanced features, so currently support for them is only provided through the code API, you will need to use descriptor amendment methods from the Mapping Workbench. Refer to the similar thread for more information on these.
"Hiding" records with delete status
For amending the deletes you should be able to customize the descriptor's delete SQL to instead do an update. The only mapping that will delete itself is the m-m mapping which you can customize the mapping's insert, delete and read SQL.

Similar Messages

  • Changes and Logical Delete in View Maintenance

    Hi everybody.
    I've defined a table view maintenance V_TABLE for T_TABLE, with five fields. One of them is defined as 'R' (not editable field).
    I defined an event 05 and an event 02 (for create and save) where I move SY-DATUM to the CREATED_DATE or UPDATE_DATE fields depending on it is a new record or a modification.
    But if I modify several records only one is updated.
    Besides, if the action is "delete" in the view maintenance, it must be a logical delete and move an 'X' to one of the editable fields.
    Can you help me please ?
    I can't see the action for each record in global tables.
    Event f_save  ( 02 )
      IF t_table-created_date IS INITIAL.
        t_table-created_date = sy-datum.
      ELSE.
        t_table-last_upd_date = sy-datum.
      ENDIF.
      MODIFY t_table.
    Event f_new_entry ( 05 )
      t_table-created_date = sy-datum.
    Thanks in advance,
    Liliana.

    Hello Karol, thank you for your answer.
    Now, when  I create new entries and select modify, hidden fields are updated.
    But when I select the delete option, it must be a logical delete, not physical. I must update one field with an 'X', but not delete. Can you help me with this ?
    Below is the include up now.
    FORM f_delete
    TYPES: BEGIN OF t_data.
    INCLUDE STRUCTURE /tenr/t_ppintwc.
    TYPES: action,
    END OF t_data.
    DATA: ls_total   TYPE t_data.
    DATA: lt_total   TYPE TABLE OF t_data.
    DATA: ls_extract TYPE t_data.
    DATA: lt_extract TYPE TABLE OF t_data.
    * get data from table maintenance
    lt_total[] = total[].
    lt_extract[] = extract[].
    LOOP AT lt_total INTO ls_total WHERE action = 'D'.
    IF sy-datum BETWEEN ls_total-begda AND ls_total-endda.
    ls_total-endda = sy-datum.
    IF ls_total-created_date IS INITIAL.
    ls_total-created_date = sy-datum.
    ls_total-created_time = sy-uzeit.
    ls_total-created_by = sy-uname.
    ELSE.
    ls_total-last_upd_date = sy-datum.
    ls_total-last_upd_time = sy-uzeit.
    ls_total-last_upd_by = sy-uname.
    ENDIF.
    ENDIF.
    IF sy-datum < ls_total-begda.
    ls_total-endda = ls_total-begda.
    IF ls_total-created_date IS INITIAL.
    ls_total-created_date = sy-datum.
    ls_total-created_time = sy-uzeit.
    ls_total-created_by = sy-uname.
    ELSE.
    ls_total-last_upd_date = sy-datum.
    ls_total-last_upd_time = sy-uzeit.
    ls_total-last_upd_by = sy-uname.
    ENDIF.
    ENDIF.
    MODIFY lt_total FROM ls_total.
    total[] = lt_total[].
    append ls_total to lt_extract.
    extract[] = lt_extract[].
    ENDLOOP.
    ENDFORM.                    " F_DELETE
    Thanks in advance.
    Liliana.
    Code Formatted by: Alvaro Tejada Galindo on Jan 4, 2010 3:12 PM

  • ORACLE ADF - Performing logical deletes in Oracle ADF

    [http://www.youtube.com/watch?v=zl5QjihrU0k]
    hi..
    i am currently doing a system using oracle adf framework.
    i want to do a process of withdrawing a subject that have been registered by a student, but i don't want to permanently delete the data from the database..i just want to change their GRADE to W for withdrawal process..
    so, i perform a logical deletes and its work fine to me...
    the problem is it does not catch the date of withdrawing the subject..
    i have learn this from a video that i found in youtube...
    from that video, they show me how to catch the date when performing a logical delete..but it wont work for me..
    here is the video :
    [http://www.youtube.com/watch?v=zl5QjihrU0k]
    please help me to find the solution...
    Edited by: 947202 on Jul 18, 2012 1:19 AM
    Edited by: 947202 on Jul 18, 2012 1:21 AM

    thanks for your answer...
    but i already do the steps and it works...
    the problem now is it does not catch the date...
    How to Track Created Dates Using the History Column?
    i already do the steps but still wont work for me...

  • Wait for Event FIPP - Completed Logically Deleted

    Hi WF Experts,
    We have a WF for Release of payments.
    It has 1 Fork with 2 parallel branches (both necessary).
    1 Branch has the approval process for Amount release and the other branch calling the Account assignment approval Subworkflow.
    The approval process branch has the until loop with increment counter and it picks the agents within the loop until a loop condition is reached and thereby till no more approvals required.
    The other branch, before calling the subworkflow, it checks a WAIT FOR EVENT FIPP->COMPLETED with container element FIPPID.
    Both these branches needs to be completed so that the forks gets ended and the wf comes out of the fork.
    The approval process branch is working perfectly. But in the other branch the WAIT FOR EVENT FIPP->COMPLETED  gets logically deleted and thereby, this branch does not go firther to start the Account assignment approval Subworkflow. This way the Fork with the 2 necessary branches does not end, and thereby, the WF stops here and could not go further to set release indicators (Which is a backgorund task).This will confirm the end of WF process.
    When I pass the WI ID for this Wait event in the SWIA, it shows the status as CANCELLED.
    The WF User log as a whole shows the status as COMPLETED as all the approvers has approved the release.
    Why is the Wait for Event gets logically deleted ?Please advice.
    Edited by: Sameer Anwar on Jun 12, 2011 9:17 AM
    Edited by: Sameer Anwar on Jun 12, 2011 9:21 AM

    Dear Experts,
    Any update on this . I am unable to sort this out why the Workflow is getting stopped.
    -Anwar

  • !!! Statements of Logic Deleting Files and messing with System are True !!!

    This morning I answered some guys post about Logic deleting everything in the same level as the project folder under certain circumstances. I Tried trouble shooting for him but could not recreate it.
    Then this happened to me today:
    When working in Logic 8 in Leopard all of a sudden it stopped communicating with my Unitor8 via USB. I restarted but the Unitor 8 Which I reset twice would NOT communicate with L8 anymore. It would remain in patch mode (red light lit though CPU is running)
    I've had this erratic behavior many times since the past years on many computers so it wasn't really new. All one needs to do is reinstall the Unitor Family driver.
    So I decided to do so:
    I inserted my Logic Studio DVD and opened the installer and checked ONLY the Unitor family Drivers. After completed install I restarted the Mac. Everything went fine. So I booted L8. While booting I saw my hardrives on the right side of the desktop flash once. I thought that to be strange and took closer look.
    Now my boot drive was missing from all the drives on the desktop and in the sidebar window...
    I tried to Apple+Click on a Application in the dock. The finder opened the applications folder and showed me the app I had clicked on. But I could not navigate to the root of my System Drive even via the "path" sysmbol in the toolbar. So I hit shiftappleg and entered /Volumes/MySystemVolume - it showed my volume "Grayed Out" in the finder window...
    I tried repairing the disk and permissions but nothing was wrong with my boot drive apparently besides the fact that the finder (and all other applications when wanting to open or save) could not "see" my system drive... I could launch all the apps normally that were residing on the SystemDrive in the AppFolder... So this kept getting weirder...
    So I opened my favorite application Tinkertool System and went to the Tab Files and chose the underlying tab "Attributes" which shows me Macintosh HFS and Finder Attributes... I pulled my SystemDrive onto the Drop Area and discovered something VERY amazing: The Display in Finder option had mysteriously been altered to "INVISIBLE"
    I changed it to Visible and there it was - My System Drive... Showing up in the finder...
    I made a restart to make sure everything was OK....
    After the restart the following settings had VANISHED:
    1) Pixadex = ALL ICONS (I had 230 MB) of sorted icons stored in my Application Support Folder
    2) All my Safari Book marks were gone - They were still in ~/Library/Safari - but the Bookmarks.plist was UNREADABLE even with a text editor and XML editor
    3) Numerous other applications had LOST their authorization preferences so I had to re-authorize many of my Audio Unit plug-ins...
    4) My Dock had been reset
    5) My Monitor arrangement had been reset...
    6) My date and time had been reset
    7) My energy settings had been reset.... (I had NOT zapped the P-RAM)
    Since installing Leopard 2 weeks ago - I have CAREFULLY monitored ANY activity after INSTALLING anything in order to be able to troubleshoot - and this problem definitely occurred right after installing the USB Family Drivers and launching L8....
    There was really NO HARM done other than the sweating that I did troubleshooting but if L8 is capable of doing what happened to this other guy loosing his whole folder and now doing this to me - where are the limits? When is someone going to get REAL hurt.
    Please Apple - I am sending you this post as a BUG report as well - could you PLEASE look into this as there has to be some kind of VERY dangerous MALFUNCTION within Logic or its Installers.

    Wow, I was just joking with the medication thing. I didn't actually think it was seriously a mental health issue. Sorry.
    In any case, though, if he has full access to the Mac, mental health issues or no, there's not a whole lot to do about it. If it is possible to take away administrative privileges without causing a huge fuss, then you can limit his access to certain things. However, you can't mess with privileges on a Time Machine backup (doing so breaks it), and that means he's going to have access to at least parts of the backup. Which means he can trash at least some of the backup data, and if he deletes files from the TM backup using the Finder, he'll have essentially trashed the whole backup. He might as well have the ability to delete all the files on the machine if he has the power to delete backups.
    Honestly, in this situation, he should either only be allowed to use an account with Parental Controls on, which may not be an option (I don't know how offended he would be at such a suggestion), or he should be using a different computer entirely and have no access at all to his wife's computer. Alternately, have his wife keep a backup that is hidden - ie, connect the backup drive periodically and then remove it and hide it so he can't mess with it. That will at least secure the backup.

  • Preserving SOA Logical Ports and Trust Relationships during DB Refresh

    Hi,
    I have been searching for this for a while and have not had any luck so far. I thought maybe the vast experience in this community might be able to help me.
    I am trying to preserve the SOA Logical Ports and the SMT1 Trust relationships of the target server during  DB Refresh. Is there a list of tables that we could export (Much like exporting/transporting RFC Destination)?
    Regards
    Shantanu

    Hi
    Check the here under tables if they fits to your needs
    Regards
    SRT_LP                       Logical Ports
    SRT_LP_FEAT            Logical Port Feature
    SRT_LP_OP_FEAT     Logical Port Feature (Operation-Dependent)
    SRT_LP_SXI_ADDR   Logical Ports: XI Addressing
    RSECACTB                 Table for ABAP Access Authorization for Secure Memory
    RSECTAB                    Secure Memory: Memory for Encrypted Data
    RFCTRUST                 List of existing trusting systems
    RFCSYSACL               List of permitted trusted systems for the current system

  • Capturing the row selector and perform logical delete

    Hi All ,
    I add a tabular report in one of my page .But in the MULTI_ROW_DELETE button I like to capture the checkbox (row selector) and fire a PL/SQL anonymous block where rather than performing actual row delete it will update a database field and perform some sort of logical delete .
    Now my problem is I cant able to capture that what are the rows need to be logically deleted :
    DECLARE
    vRow BINARY_INTEGER;
    BEGIN
    FOR i IN 1 .. apex_application.g_f01.COUNT
    LOOP
    vRow := apex_application.g_f01(i);
    update test123 set delete_flag='y' where col2=vRow ;
    end loop;
    end;
    Its throwing error .Can anyone help on this pls how to write the pl/sql code to perform the logical delete.
    Thanks in advance ,
    Regards,
    Debashis.

    Guys ,
    Got the solution by searhcing several of the therads from Denes...
    Create the checkbox from Form page :
    htmldb_item.checkbox(1,t.USERNAME) DeleteItem,
    and then captured it as :
    FOR i in 1..HTMLDB_APPLICATION.G_F01.count
    LOOP
    UPDATE table1 set DELETE_FLAG='Y'
    WHERE USERNAME = HTMLDB_APPLICATION.G_F01(i);
    END LOOP;
    Cheers,

  • Delete and Insert logic depends on Flag JDBC Receiver

    Hi Experts,
    My Scenario is Proxy to JDBC. Present I am uisng 2 ststements for the receiver structure one for Delete and another for Insert. When I get a message from the source system, Database will be deleted and records will be inserted. Its working great.
    Now one more new FLAG filed is added in the source structure. My requirement is when i get '0'  value in the flag filed, I want to delete the database and need to insert records. and If value '1' comes in the FLAG filed, records needs to be inserted in the database table with out deleting old records.
    How can I achive this? thanks in Adv
    Vankadoath..

    HI Puneeth,
    I am using both the Delete and Insert statements in one DT.
    Flag is a filed name which is in the source DT .  if '0' comes in this Flag then tables needs to be deleted and records needs to be Insert. If value 1comes only records needs to be Inserted.
    how to do mapping with the key filed?
    This is my Input xml
    <?xml version="1.0" encoding="utf-8" ?>
    - <n0:RedMatchDB_EmployeesQualification_MT_OB xmlns:n0="ness.com:RedMatchDB_EmployeesQualifications" xmlns:prx="urn:sap.com:proxy:DV3:/1SAI/TAS8CFD98F20F1539B552C4:701:2009/02/10">
    - <EMP_QUALIFICATION>
      <Flag>0</Flag>
      <PERNR>7106413</PERNR>
      <QGROUP_ID>40001055</QGROUP_ID>
      <RATING>0005</RATING>
      </EMP_QUALIFICATION>
    - <EMP_QUALIFICATION>
      <Flag>1</Flag>
      <PERNR>7106414</PERNR>
      <QGROUP_ID>40001109</QGROUP_ID>
      <RATING>0004</RATING>
      </EMP_QUALIFICATION>
    - <EMP_QUALIFICATION>
      <Flag>1</Flag>
      <PERNR>7106415</PERNR>
      <QGROUP_ID>40001154</QGROUP_ID>
      <RATING>0004</RATING>
      </EMP_QUALIFICATION>
      </n0:RedMatchDB_EmployeesQualification_MT_OB>
    This is the output xml deleting is nat happening only records are Inserting.
      <?xml version="1.0" encoding="UTF-8" ?>
    - <ns0:RedMatchDB_EmployeesQualification_MT_IB xmlns:ns0="ness.com:RedMatchDB_EmployeesQualifications">
    - <statementDELETE>
    - <EMP_QUALIFICATION action="DELETE">
      <table>EMP_QUALIFICATION</table>
      <access />
      <key />
      </EMP_QUALIFICATION>
      </statementDELETE>
    - <statementINSERT>
    - <EMP_QUALIFICATION action="INSERT">
      <table>EMP_QUALIFICATION</table>
    - <access>
      <EmployeeID>7106413</EmployeeID>
      <QID>40001055</QID>
      <ProficiencyID>0005</ProficiencyID>
      </access>
      </EMP_QUALIFICATION>
      </statementINSERT>
    - <statementINSERT>
    - <EMP_QUALIFICATION action="INSERT">
      <table>EMP_QUALIFICATION</table>
    - <access>
      <EmployeeID>7106414</EmployeeID>
      <QID>40001109</QID>
      <ProficiencyID>0004</ProficiencyID>
      </access>
      </EMP_QUALIFICATION>
      </statementINSERT>
    - <statementINSERT>
    - <EMP_QUALIFICATION action="INSERT">
      <table>EMP_QUALIFICATION</table>
    - <access>
      <EmployeeID>7106415</EmployeeID>
      <QID>40001154</QID>
      <ProficiencyID>0004</ProficiencyID>
      </access>
      </EMP_QUALIFICATION>
      </statementINSERT>
      </ns0:RedMatchDB_EmployeesQualification_MT_IB>

  • How to specify custom SQL in polling db adapter with logical delete option

    Hi all,
    I am writing a SOA composite app using JDeveloper SOA Suite 11.1.1.4 connecting to a SQL Server db using a polling DB Adapter with the logical delete option to send data to a BPEL process.
    I have requirements which go beyond what is supported in the JDeveloper UI for DB Adapter polling options, namely:
    * update more than one column to mark each row read, and
    * specify different SQL for the logical delete operation based on whether bpel processing of the data polled was successful or not.
    A complicating factor is that the polling involves two tables. Here is my full use-case:
    1) Polling will select data derived from two tables: e.g. 'headers' and 'details' simplified for this example:
    table: headers
    hid - primary key
    name - data label
    status - 'unprocessed', 'processed', or 'error'
    processedDate - null when data is loaded, set to current datetime when row is processed
    table: details
    hid - foreign key pointed at header.hid
    attr - data attribute name
    value - value of data attribute
    2) There is a many:1 relationship between detail and header rows through the hid columns. The db adapter polling SELECT shall return results from an outer join consisting of one header row and the associated detail rows where header.status = 'unprocessed' and header.hid = details.hid. (This is supported by the Jdeveloper UI)
    3) The polled data will be sent to be processed by a bpel process:
    3.1) If the bpel processing succeeds, the logical delete (UPDATE) operation shall set header.status = 'processed', and header.processedDate = 'getdate()'.
    3.2) If bpel processing fails (e.g. hits a data error while processing the selected data) the logical delete (UPDATE) operation shall set header.status = 'failed', header.processedDate = 'getdate()', and header.errorMsg = '{some text returned from bpel}'.
    Several parts of #3 are not supported by the JDeveloper UI: updating multiple columns to mark the row processed, using getdate() to populate a value of one of those column updates, doing different update operations based on the results of the BPEL processing of the data (success or error), and using data obtained from BPEL processing as a value of those column updates (error message).
    I have found examples which describe specifying custom SQL using the polling delete option to create a template then modifying the toplink file(s) to specify custom select and update SQL to implement a logical delete. (e.g. http://dlimiter.wordpress.com/2009/11/05/advanced-logic-in-oracle-bpel-polling-database-adapter/ and http://myexperienceswithsoa.blogspot.com/2010/06/db-adapter-polling-tricks.html). But none of them match what I've got in my project, in the first case because maybe because I'm using a higher version of JDeveloper, and in the second I think because in my case two tables are involved.
    Any suggestions would be appreciated. Thanks, John

    Hi John,
    You've raised a good scenario.
    First of all let me say that the purpose of the DB polling transaction, is to have an option to initiate a process from a DB table/view and not to update multiple fields in a table (or have other complex manipulation on the table).
    So, when choose to update a field in a record, after reading it, you are "telling" the engine not to poll this record again. Sure, i guess you can find a solution/workaround for it, but I don't think this is the way....
    The question now is what to do?
    You can have another DB adapter where you can update the data after finishing the process. In that case, after reading the data (on polling transaction) - update the header.status = 'processed' for example, and after processing the selected data update the rest of the fields.
    Hope it make some sense to you.
    Arik

  • Data Recover From Formatted Drive? What is the best program to use to get back Logic Projects and any other file type?

    I was in the process of reorganising my hard drives so I could RAID them however I managed to corrupt one drive and had to format it which meant I lost all my Logic Files and some other files. I managed to save a lot of files (mainly video files) before I had to format the drive but I need a Data Recovery service that will not alter anything on the hard drive and will put all the formatted files (regardless of the type) back for me so I can get the rest of the ones I need.
    Thanks in advance.

    What about folders and such?
    No. FS doesn't reconstruct folders. However, Data Rescue does, depending on how you use it. About the only thing in Data Rescue a Quick Scan ever seems to show you are files that are already live.
    So that leaves you with a Deep Scan, or a Deleted Files scan. The first pass of a Deep Scan will attempt to retrieve folders and files, along with their original names. The second pass only looks for file patterns. Like recognizing a Photoshop .psd file. It will recover it, but give it a nonsense name. A Deleted Files scan only results in nonsense names of recognized file types; no folders.
    What were you using File Salvage on? A hard drive?
    Yes, though you can use it on a flash drive, or any other mounted drive.
    At the moment it is estimating 289 hours remaining on a 1TB drive. Can it not go faster?
    No, both of the software mentioned are slower than molasses in January. When you delete anything in Windows, its file table entry simply tagged as deleted. So to unerase them, the tag is removed. That's why it works to quickly and easily (assuming you haven't already overwritten the data to be recovered).
    In OS X though, the whole idea of the underlying UNIX structure is all about security. It's not supposed to be easy to retrieve deleted items. When you delete items, their file table entries are erased. So the only way to find deleted items is to scour the entire drive for BOF (Beginning Of File) markers that don't have a matching starting block to anything that is in the file table.
    Another question, half the drive was empty. Will it fly over that empty space or will it sieve through it incase there was some files stored on it?
    If you use the Expert mode is FS, you can choose to do that:

  • Logical Switch and Logical Network

    Hello All...................I have Hyper-V Failover Cluster based on 5 Hosts and I am managing it with VMM 2012 R2. I was slightly confused with respect to Logical Network and Logical Switch in the Fabric Settings.  I would appreciate if someone could
    shed a little light on the difference between them.  Also, while there is a Logical Network defined by default (Name of the Virtual Switch of Hosts), there is nothing defined in the Logical Switch.  Which one is mandatory? Logical Network or Logical
    Switch? Can I delete the default Logical Network?

    Hi Nick,
    Please find below link for the whitepaper mentioned by Kristian.
    https://gallery.technet.microsoft.com/Hybrid-Cloud-with-NVGRE-aa6e1e9a
    For a complete reference please refer below series. This covers VMM 2012 SP1 but should be fine with R2 as well.
    http://blogs.technet.com/b/scvmm/archive/2013/01/08/virtual-networking-in-vmm-2012-sp1.aspx
    Logical Network is defined for easier management and used in Network Virtualization where as Logical switch is used to configure networking in multiple Hosts rather than creating individual Virtual switches in each host. If it were me I'll leave the
    default logical network as there is no harm of doing nothing in it.
    I hope this will shed some light into your situation.
    Thanks,
    Janaka
    Janaka Rangama MCT MIEEE MBCS (Please take a moment to Vote as Helpful and/or Mark as Answer, where applicable.)

  • Logical delete in database adapter

    Hello
    I was wondering if someone has solution the problem with polling database. You can specify the logical delete column and you can give values for READ, UNREAD and RESERVED states. The problem is that when for example ESB project polls some specific table and starts an instance for every new row with specified logical delete field with value UNREAD, when something unexpected happens and something goes wrong the database adapter updates the row with READ value. This is problematic if we have thousands of rows, and we would like to separate the errored rows from the successfully read rows. Is there anyway (easy) way to update those rows that went wrong to some other value than READ?
    I don't know if anyone understood me, but just for clarification here's a example:
    I have a ESB-project which poll specific database table and parses and XML from the data. After this the ESB-project sends the data to some Web Service. The database table has column CONDITION_CODE in which value 0 means unread and value 1 means read. Now if everything goes fine there is no problems. But if the Web Service is unavailable or the data is malformed, the database adapter still updates the CONDITION_CODE to 1! We have no ways (except to listen ESB_ERROR topic and implement some error handling there) to know what rows were successfully delivered and which were not...
    Hope I was able to clarify the problem... And I hope someone could be able to provide me with answer.
    Best Regards Tuomas

    Did you use the RESERVED value property? How about the transaction mechanism? Do you have global transactions? I gues you would have to use them!

  • Logical delete in a DBAdapter

    Hi,
    I am using a logical delete to poll a table. A simple logic of unproccesed records assigned to 'N', processed ones to 'Y' and locked once to 'X' doesnt seem to work. The process doesnt pickup any inserted records.
    Are any other additional settings required for this logical delete to get working.
    Thanks,
    Valli.

    When you have the table definition which has the primary key defined already, the database adapter directly takes the field and constructs a where condition(update tbl set col1="", col2="" where primarykey=#input) based on the primary key; in this case your input should have the primary key field mapped from the BPEL process!
    If you don't have a primary key defined on that you obviously have to choose one otherwise db adapter will not proceed further and rest all the is the same logic!
    You can also observe that you can't select only few fields for updation as the XML schema generated will have all the columns available in the table. You can simply assign/tranform input data to what ever the fields which require for updation and rest all will not be treated as null but they will have the same value which is already existing in the database!!
    Hope it helps!! ( You can still have a question !! how do I change my primary key if required by the business !! ) - well I have no answer for this yet !!

  • Logical Delete in DB Polling - OSB

    Hello All,
    I have a question in polling. I have a logical delete column with Read value as 'P and unread value as 'N', Unlike BPEL, OSB's polling, does not make a record to 'P' until the process completes successfully. My DB polling adapter polls the same records while the previous instance is under processing or the previous instance ended in error. Is there a way to logically delete the record immediately once the record is read?
    To avoid this scenario, I added an error handler to make the record to 'E' if the instance encountered any error. By the time the error handler kicks in and updates the record, OSB polls the record a few times. I increased my polling frequency from 5 seconds to 30 seconds, but no luck. Any clue how to handle this scenario?
    Thanks,
    Dwarak

    Is there a way to logically delete the record immediately once the record is read?Dont do any logic in db adapter proxy. Instead make the proxy to just write to a jms queue and then have your processing logic in the jms proxy service which reads off the jms queue.

  • How to hide row from table after logical delete

    Hello.
    I am using Jdeveloper 11.1.1.3.0, ADF BC and ADF Faces.
    I want to implement Logical delete in my application.
    In my Entity object I have Deleted attribute and I override the remove() method in my EntityImpl class.
        @Override
        public void remove()
           setDeleted("Y");
        }and I added this condition to my view object
    WHERE NVL(Deleted,'N') <> 'Y'in my page I have a table. this table has a column to delete each row. I dragged and drop RemoveRowWithKey action from the data control
    and set the parameter to *#{row.rowKeyStr}* .
    I what I need is this:
    when the user click the delete button I want to hide the roe from the table. I tried to re-execute the query after the delete but the row is still on the page. Why execute query does not hide the row from the screen.
    here is the code I used for delete and execute query
        public String deleteLogically()
            BindingContainer bindings = getBindings();
            OperationBinding operationBinding = bindings.getOperationBinding("removeRowWithKey");
            Object result = operationBinding.execute();
            DCBindingContainer dc=(DCBindingContainer) bindings;
            DCIteratorBinding iter=dc.findIteratorBinding("TakenMaterialsView4Iterator");
            iter.getCurrentRow().setAttribute("Deleted", "Y");
            //iter.getViewObject().executeQuery();
            iter.executeQuery();
            return null;
        }as you see I used two method iter.getViewObject().executeQuery(); and  iter.executeQuery(); but the result is same.

    Thank you Jobinesh.
    I used this method.
        @Override
        protected boolean rowQualifies(ViewRowImpl viewRowImpl)
          Object attrValue =viewRowImpl.getAttribute("Deleted"); 
            if (attrValue != null) { 
             if ("Y".equals(attrValue)) 
                return false; 
             else 
                return true; 
            return super.rowQualifies(viewRowImpl);
        }But I have one drawback for using it, and here is the case:
    If the user clicks the delete button *(no commit)* the row will be hidden in the table, but when the user click cancel changes the row is not returned since it is not returned due to the rowQualifies(ViewRowImpl viewRowImpl) (the Deleted attribute is set to "N" now).
    here is the code for delete and cancel change buttons
        public String deleteLogically()
            BindingContainer bindings = getBindings();
            OperationBinding operationBinding =
                bindings.getOperationBinding("removeRowWithKey");
            Object result = operationBinding.execute();
            DCBindingContainer dc = (DCBindingContainer)bindings;
            DCIteratorBinding iter =
                dc.findIteratorBinding("TakenMaterialsView4Iterator");
            iter.getCurrentRow().setAttribute("Deleted", "Y");
             iter.executeQuery();
            AdfFacesContext adfFacesContext = AdfFacesContext.getCurrentInstance();
            adfFacesContext.addPartialTarget(this.getTakenMaterialsTable());
            return null;
        public String cancelChanges(String iteratorName)
            System.out.println("begin cancel change");
            BindingContainer bindings =
                BindingContext.getCurrent().getCurrentBindingsEntry();
            DCBindingContainer dc = (DCBindingContainer)bindings;
            DCIteratorBinding iter =
                (DCIteratorBinding)dc.findIteratorBinding(iteratorName);
            ViewObject vo = iter.getViewObject();
            //create a secondary RowSetIterator to avoid disturbing row currency
            RowSetIterator rsi = vo.createRowSetIterator(null);
            //move the currency to the slot before the first row.
            rsi.reset();
            while (rsi.hasNext())
                    currentRow = rsi.next();
                    currentRow.setAttribute("Deleted", "N");
            rsi.closeRowSetIterator();
            iter.executeQuery();
            AdfFacesContext adfFacesContext = AdfFacesContext.getCurrentInstance();
            adfFacesContext.addPartialTarget(this.getTakenMaterialsTable());
            return null;
        }as example, if the user initially has 8 rows, then deleted 2 rows, in cancelChanges only 6 rows appears. and the deleted rows are not there??
    any suggestion?

Maybe you are looking for