Time-based reasoning problem

Hi.  I am currently working on a project using OPM 10.3 where the user must declare details of properties they have access to both in the UK and abroad.  Since a user can own/rent/squat in multiple properties, 'the home' has been set up as an entity.  The following data is collected about each home:
the home's location - 'within the UK' or 'outside the UK'
the date the home became available to you
the date the home was no longer available to you
the number of days you set foot in the home in that period
Within the code, I have set up a timeline to show the data entered by the user and I then use the rules to find out if certain conditions are met.  I have set up an inferred relationship for UK homes and another for homes abroad.  The following code is in my rules:
the individual has a UK home
True
the current UK home of the individual is certain and
the current UK home of the individual = “within the UK”
False
otherwise
the current UK home of the individual = TemporalFromRange(the UK homes, the date the home became available to you, the date the home was no longer available to you, the home’s location)
As soon as the user enters 2 UK homes with identical dates, 'the current UK home of the individual' instantly becomes uncertain.  All other circumstances (e.g. multiple UK homes with different dates, a single UK home) are fine
Has anyone had a similar experience?  Is this a 'feature' within OPM 10.3?  Can anyone suggest a solution/workaround?
Any help would be appreciated.

The reason it infers to uncertain is because the overlapping entity instances mean that multiple options are valid for the overlapping date ranges. Potentially it could be smarter about collapsing multiple options that were indeed the same value, but you would still have a problem if there was an overlapping UK residence and out of UK residence.
I would change the rules to something like:
the home is the current UK home of the individual if
     TemporalOnOrAfter(the date the home became available to you); and
     TemporalBefore(the date the home was no longer available to you); and
     the home's location = "within the UK"
the individual has a UK home if
     exists(the UK homes, the home is the current UK home of the individual)
Feel free to change "the home is the current UK home of the individual" to something more correct within your ontology. eg "the home is a current UK residence for the individual", etc.
Regards
Andrew

Similar Messages

  • Time Based WF - Problem

    I have a requirement to send escalation emails based on customer agreed SLA's. The SLAs like No Activity on SR for # of Days. The email should be sent to SR Owner, his manager, director and so on based on Customer Tier.
    Problem :
    If a New SR was created 07/08 @ 10:00 . There should fire a WF that is waiting for 1 day. Now assume that there is a acivity gets added to the SR @ 14:00 . Now the waiting period should reset and start counting 1 day wait from 14:00 and should cancel out 10:00 WF.
    Has anyone tried this through TimeBased WFs ?
    Thanks

    Hi Danny,
    We had a very similar problem to what you're facing. What ended up being the problem for us was that the server in our portal cluster that we had configured to run the 'Check Valid From' and 'Check Valid To' was removed for the cluster for maintenance purposes. No new documents that had been added were getting their lifetimes set.
    Our solution was to add another cluster server into the list of 'CM Systems' for those two scheduler tasks. To find this, navigate to:
    System Admin -> System Config -> KM -> Content Management -> Global Services -> Scheduler Tasks
    The two jobs that you should be interested in here are:
    Check Valid From
    Check Valid To
    Hope this helps!
    -StephenS

  • ***URGENT*** Time Based Work Flow ERROR/PROBLEM

    Knowing that the PRE() function doesn't work smoothly with the wait function. We went ahead and added it in the conditions statement and disabled the reeval check box, but the problem is it appears that it is still checking the condition. Anyone have this problem or possible solution?
    Edited by: 783027 on Jul 26, 2010 3:49 PM

    See answer to your previous post.
              Jai wrote:
              > Hi ,, I am trying to use time based delivery of message in WLServer7.0. After going
              > through the various posts I figured this is the snippet required to send time-based
              > messages. But i havent had any luck on it as yet. Can someone please point out
              > where am I going wrong in this or send a snippet of code which does this.
              >
              > here is snippet of code ....
              >
              > /*initialization */
              >
              > qconfactory = (QueueConnectionFactory) ctx.lookup(JMS_FACTORY);
              > qcon = qconfactory.createQueueConnection();
              > qsession=qcon.createQueueSession (false,Session.AUTO_ACKNOWLEDGE);
              > queue = (Queue) ctx.lookup (QUEUE);
              > qsender = qsession.createSender(queue);
              > msg = qsession.createTextMessage();
              > qcon.start();
              >
              > /* actual bit which does sending */
              > Date later = new Date();
              > long now = System.currentTimeMillis();
              > GregorianCalendar cal = new GregorianCalendar();
              > cal.getTime().toLocaleString();
              > System.out.println("The current time is: " + cal.getTime().toLocaleString());
              > now += 10*1000; later.setTime(now); cal.setTime(later);
              >
              > msg.setText(message);
              > ((WLMessage)msg).setJMSDeliveryTime(cal.getTime().getTime()); ((weblogic.jms.extensions.WLMessageProducer)
              > qsender).setTimeToDeliver(cal.getTime().getTime());
              > qsender.send(msg);
              >
              > Many Many thanks for your swift response ...
              

  • Problem with time based rman recovery

    Hi and happy boxing day:
    I am following by the letter the instructions in Sybex FundamentalsII book p.348 regarding an rman time based recovery. Here is the syntax:
    RMAN> run {
    2> allocate channel ch1 type disk;
    3> set until time 'DEC 26 2007 10:30:00';
    4> restore database;
    5> recover database;
    6> sql 'alter database open resetlogs';
    7> }
    and here is the error:
    allocated channel: ch1
    channel ch1: sid=11 devtype=DISK
    executing command: SET until clause
    released channel: ch1
    RMAN-00571: ===========================================================
    RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
    RMAN-00571: ===========================================================
    RMAN-03002: failure of set command at 12/26/2007 11:06:45
    ORA-01858: a non-numeric character was found where a numeric was expected
    Is this a format issue? Any tips please!
    Thanks,
    DA

    You can only register a database once if you are using a recovery catalog, so whoever or whatever told you to re-register is simply getting their terminology in a knot!
    There **is** a sort-of "re-register" command which does sometimes need to be issued after a resetlogs: it's called a RESET command. See http://tinyurl.com/29t5lr for details. A "reset" is, effectively, a "re-register".
    One of the details you will see is that you only need to do a manual reset if it was **you** that issued a resetlogs, outside of RMAN. If you get RMAN to do the resetlogs, however, then there's no need to also issue the reset command, because RMAN already knows about it (and has already updated its own metadata accordingly).
    The other thing you'll notice from the documentation is that if you aren't using a recovery catalog then the concept of issuing a reset is entirely redundant. That's because you can't recover to a prior incarnation of the database without a catalog: it's one of the main reasons for wanting to run in catalog mode in the first place. No catalog = no ability to step through incarnations = no need to inform RMAN that you're in a new incarnation.

  • Problem in Time Based Publishing Content

    Hi every1,
      Im working with Time based publishing.
    Using xml form builder i created 3 contents means 3 xmls.
    Then i created one iView for reading the contents (KM Navigation iView) and i setup the properties like
    layout set, layout set mode, root folder of contents.
    After creation of iView i checked in the preview all 3 contents visible in my iView.
      Now i want to show time based content in that iView.
    Contents displayed as per time based
    for that i enabled time based publishing and life time of particular content(xml)by using the given way
    Time dependant publishing in Km. I clicked on the right hand side of the name of my folder-> go to details -> Settings -> Lifetime. there you have to enable the time dependant publishing. Then i opened the folder and click on the rt hand side of the document-> properties -> lifetime, here give the time span of the document.
    After life time setup , again i seen in the iView for reading the contents (previous created) in the preview
    again all 3 contents displayed including life time expired content also.
       Please give me solution for this, or any more configurations required.
    Note :
    I required to display the contents in between time applicable only ( from time and until time).
    Thanks in advaince
    Vasu

    I have waited more than 3 hours for settings to apply.
    But i couldn't find any changes.
    any other solution?
    Thanks
    Vasu

  • Sales orders in TDMS company/time based reduction  are outside the scope

    Guys,
    I have had some issues with TDMS wheras it didn't handle company codes without plants very well. That was fixed by SAP. But I have another problem now. If I do a company code and time based reduction, It doesn't seem to affect my sales orders in VBAK/VBUK as I would have expected. I was hoping it would only copy sales orders across that have a plant which is assigned to a company code that was specified in the company code based reduction scenario. That doesn't seem to be the case.
    VBAK is now about one third of the size of the original table (number of records). But I see no logic behind the reduction. I can clearly see plenty of sales documents that have a time stamp way back from what I specified in my copy procedure and I can see others that have plant entries that should have been excluded from the copy as they do belong to different company codes than the ones I specified.
    I was under the impression that TDMS would sort out the correct sales orders for me but somehow that doesn't seem to be happening. I have to investigate further as to what exactly it did bring across but just by looking at what's in the target system I can see plenty of "wrong" entries in there either with a date outside the scope or with a plant outside the scope.
    I can also see that at least the first 10'000 entries in VBAK in the target system have a valid from and to date of 00.00.0000 which could explain why the time based reduction didn't work?
    Did you have similar experiences with your copies? Do I have to do a more detailed reduction such as specifying tables/fields and values?
    Thanks for any suggestions
    Stefan
    Edited by: Stefan Sinzig on Oct 3, 2011 4:57 AM

    The reduction itself is not based on the date when the order was created but the logic enhances it to invoices and offers, basically the complete update process.
    If you see data that definitely shouldn't be there I'd open an OSS call and let the support check what's wrong.
    Markus

  • Error in computing time based on TimeZones on a server

    I have a piece of code that generates timestamps based on US TimeZones such as Pacific, Central and Eastern. I get correct results when I run this code locally (EST) but get results an hour off when I run the same code on a server running in US central time. See the results below and the code that I run.
    Results from running the code on Dev Server:
    ts: 2007-11-05 10:39:03.19 ���� ������� (Default time)
    tsEST: 2007-11-05 10:39:03.019� ������� (EST based on TimeZone String America/New_York, should be 11:39)
    tsCST: 2007-11-05 09:39:03.019� ������� (Central time based on TimeZone String US/Central, should be 10:39)
    tsPST: 2007-11-05 07:39:03.019� ������� (Pacific time based on TimeZone String America/Los_Angeles, should be 8:39)
    Results from running the same code on Local machine:
    tsEST: 2007-11-05 11:39:01.272� (Eastern Time based on TimeZone String America/New_York)
    tsCST: 2007-11-05 10:39:01.272� (Central time based on TimeZone String US/Central)
    tsPST: 2007-11-05 08:39:01.272� (Pacific time based on TimeZone String America/Los_Angeles)
    Below is the code that I ran.
         Timestamp ts = new Timestamp(Calendar.getInstance().getTime().getTime());
    DateFormat df1 = new SimpleDateFormat( "yyyy-MM-dd HH:mm:ss.SS" );
    GregorianCalendar cal1 = new GregorianCalendar();
    Timestamp tsNow = new Timestamp(cal1.getTimeInMillis());
    TimeZone tsEST = TimeZone.getTimeZone("America/New_York");
    String inPattern = "yyyy-MM-dd HH:mm:ss.SS";
    DateFormat df = new SimpleDateFormat(inPattern);
    df.setTimeZone(tsEST);
    Date date = df.parse(tsNow.toString());
    df.setTimeZone(tsEST);
    ts = new Timestamp( df1.parse( df.format(date) ).getTime() );
    System.out.println("tsEST: " + ts.toString());
    DateFormat df2 = new SimpleDateFormat(inPattern);
    TimeZone tsCST = TimeZone.getTimeZone("US/Central");
    df2.setTimeZone(tsCST);
    ts = new Timestamp( df1.parse( df2.format(date) ).getTime() );
    System.out.println("tsCST: " + ts.toString());
    TimeZone tsPST = TimeZone.getTimeZone("America/Los_Angeles");
    df.setTimeZone(tsPST);
    ts = new Timestamp( df1.parse( df.format(date) ).getTime() );
    System.out.println("tsPST: " + ts.toString());

    Actually, I did try a complete removal and re-install with the same results. On the desktop machine on which the Ctime client is working, Ctime was installed on an earlier system version and was working before the upgrade to the current system. The client continued to work. This at least indicates an initial setup problem on 10.2.4 and may indeed relate to the product not yet being ready for the latest system.

  • Time-based publishing stopped working

    Hi,
    We currently have a problem with time-based publishing in KM. Since a few days ago, documents stopped becoming visible once they reach their "valid from" date. We have not been able to publish documents with TBP since then on that system.
    These errors keep appearing in the knowledgemanagement.#.log files, which seem related to this issue :
    #1.5#C000AC10005900130000012D00000B3400040F325EE040B8#1142608921379#com.sapportals.wcm.WcmException#irj#com.sapportals.wcm.WcmException.WcmException(62)#System#0#####ThreadPool.Worker1##0#0#Error##Plain###application property service not found com.sapportals.wcm.repository.service.timebasedpublish.wcm.TimebasedPublishException: application property service not found
         at com.sapportals.wcm.repository.service.timebasedpublish.wcm.TimebasedPublishServiceManager.getApplicationPropertyService(TimebasedPublishServiceManager.java:589)
         at com.sapportals.wcm.repository.service.timebasedpublish.wcm.TimebasedPublishServiceManager.setValidEventSent(TimebasedPublishServiceManager.java:540)
         at com.sapportals.wcm.repository.service.timebasedpublish.wcm.TimebasedPublishServiceManager.handleVisibleResources(TimebasedPublishServiceManager.java:327)
         at com.sapportals.wcm.repository.service.timebasedpublish.wcm.CheckValidFromSchedulerTask.run(CheckValidFromSchedulerTask.java:65)
         at com.sapportals.wcm.service.scheduler.SchedulerEntry.run(SchedulerEntry.java:128)
         at com.sapportals.wcm.service.scheduler.crt.PoolWorker.run(PoolWorker.java:107)
         at java.lang.Thread.run(Thread.java:479)
    The KMC version is SP2 with Patch level 29 hotfix 1, and is running on Windows Server 2003 with an Oracle database. We have opened an OSS message but while we are waiting I thought I would post this here in case anyone ever experienced this.
    Best regards,
    Olivier

    Hi,
    1.  Have you checked that tbl service continue assigned to your repository ?
    2. If you create a new repository and assign these service, does it work ?
    Enables users to define a time frame during which documents are published (visible).
    Note that the time-dependent publishing service requires the application property service.
    This service cannot be configured.
    Patricio.

  • Time Based publishing on taxonomy

    Hi there,
    we have built a news application where everyone can post it's own news items. Location of the user is a personal folder created by using a userhome filter. The folder has time based publishing activated, the lifetime can be entered in the edit form or directly on the news item through 'details'.
    To display all items for all users, a taxonomy is used. However, the lifetime is ignored and all items are visible to all users.
    I have activated the tbp service on the /taxonomies repository, as well as enabled 'lifetime' on my 'news' subfolder (everyone has read permissions on this one). Unfortunately, still all items are visible to all users.
    Is TBP possible on a taxonomy?
    Thanks,
    Kevin

    Hi Kevin,
    we have kind of the same scenario here.
    We have a KM Folder where editors are editing news. This folder has a taxonomy to display different views on this news folder. TBP is activated in the folder.
    It works like that:
    Endusers only see valid news in the taxonomy folders. BUT editors are seeing even the expired ones, nevertheless that they only have Read permissions in the Taxonomy and /taxdata repository. So it seems to us that the "Full control" permission from the Source KM Folder is kind of overwriting the Read only permission in the Taxonomy. (Maybe you have the same problem)
    Our solution might be that we are programming a "KM Resource List Filter" to filter out the unwanted expired news out of the taxonomy folder for the editors as well.
    Cheers
    Christoph

  • Converting Report Builder time-based metrics in Excel

    I am having trouble with my time-based metrics (avg. time spent) when I pull it in using Report Builder. Excel seems to take it out of the HH:MM:SS format and makes it a number. So when I run a report with the Avg Time Spent metric in the Adobe Interface, the correct format is displayed but when I run it with Report Builder a random number is displayed. I can't seem to convert it to the correct time. Can anyone help?

    Hi
    I've just resolved a similar problem in Visual Studio whereby I had created a matrix with several columns and wanted to show each column as an overall percentage of each row.
    It wasn't in sharepoint, but it may give you an idea of where to look to help you resolve this issue?
    Basically, you have to tell the formula which set of data you want to add together to use as the number to do the divison by:
    For example:
              |Column1| Column 2 | Column 3 |
    Row 1  |     10    |     10       |     10       |
    Row 2  |     10    |      10      |     20       |
    If we assume we want to add the numbers in row 1 and show them as a percentage, we would expect to see 33% across all columns.  In row 2, we would expect to see 25%, 25% and 50%.  The formula to do this is:
    Sum(Field)/Sum(Field,"RowGroupName")
    It works in Visual Studio in a report matrix - hope it helps point you in the right direction for Sharepoint?
    Regards
    Kaz

  • TDMS - time based reduction - receiver system deletion

    Experts,
    I'm doing a time based reduction.  I'm on the step "Start Deletion of Data in Receiver System".  It's been running for over 18hours.
    But I don't see any jobs running in SM66 on the Central/Control or Sender or Reciever systems.
    When I click on the "Task" button, I see it has completed 8,444 of 12,246  sub activites.  There are 3,802 not yet started.
    We're on all the latest levels of DMIS and ECC.
    Any ideas?
    Thanks
    NICK

    Ashley and Niraj,
    Hey, I'm all for tips/tricks so don't worry about messing up my thread.
    I completely shut down the central/control system via stopsap and restarted.  Still it was in "running" status but no jobs were running on sender/rec or central/control.
    So I tried the trouble-shooting but it was un-clear to me what to do.
    I ended up highlighting the phase I reference earlier, then doing "execute" again.  The status changes from the "truck" to a green flag and I started to see jobs run again on the receiver system.  Again they have stopped, but I see another job scheduled to run in a few minutes....It's just weird, I didn't run into this on my last time-based copy.
    I'll post a few things I've learned to increase performance:
    RDISP/MAX_WP_RUNTIME = 0
    At LEAST 25 WP and 25 BCK procs
    rec/client = OFF
    RDISP/BTCTIME = 60
    RUN STATS regularly
    TAKE OUT OF ARCHIVELOG MODE
    Read/Impl these notes:
    Read theseu2026Update these parameters
    o TD05X_FILL_VBUK_1 Note 1058864
    o TD05X_FILL_VBUK_2 Note 1054584
    o TD05X_FILL_BKPF Note 1044518
    o TD05X_FILL_EBAN Note 1054583
    o TD05X_FILL_EQUI Note 1037712
    Set these oracle index on rec system:
    Table: QMIH
      fields: MANDT, BEQUI
    Table: PRPR
      fields: MANDT, EQUNR
    Table: VBFA
      fields: MANDT, VBELN, VBELV, POSNV
    set parameter u2018P_CLUu2019 to u2018Yu2019 in the following
    activities before you start the activities for filling internal header tables:
    TD05X_FILL_BKPF
    TD05X_FILL_CE
    TD05X_FILL_EKKO
    TD05X_FILL_VBUK
    TD05X_FILL_VBUK_1
    TD05X_FILL_VBUK_2
    TD05X_FILL_VSRESB
    TD05X_FILL_WBRK_1
    run TCODE CNVMBTACTPAR, specify the project number to do this
    IMPORTANT TCODEs
    CNV_MBT_TDMS_MY  Main TDMS starting point     
    CNVMBTMON  Process Monitor (must know your project number)
    DTLMON  MWB transfer monitor
    CNVMBTACTPAR  activity parameters
    CNVMBTACTDEF  MBT PCL activity maint
    CNVMBTTWB  TDMS workbench to develop scrambling rules
    CNV_TDMS_HCM_SCRAM  run in SENDER system for scrambling functionality
    Reports
    CNV_MBT_PACKAGE_REORG  to reorganize TDMS projects..aka delete
    CNV_MBT_DTL_FUGR_DELETE  deletes function groups associated with old projects
    Tables
    CNVMBTUSEDMTIDS   lists obsolete MTIDs
    IMPORTANT NOTES
    Note 894307 - TDMS: Tips, tricks, general problems, error tracing
    Note 1405597 - All relevant notes for TDMS Service Pack 12 and above
    Note 1402704 - TDMS Composite Note : Support Package Independent
    Note 890797 - SAP TDMS - required and recommended system settings
    Note 894904 - TDMS: Problems during deletion of data in receiver system
    Note 916763 - TDMS performance "composite SAP note"
    Note 1003051 - TDMS 3.0 corrections - Composite SAP Note
    Note 1159279 - Objects that are transferred with TDMS
    Note 939823 - TDMS: General questionnaire for problem specification
    Note 897100 - TDMS: Generating profiles for TDMS user roles
    Note 1068059 - To obtain the optimal deletion method for tables (receiver)
    Note 970531 - Installation and delta upgrade of DMIS 2006_1
    Note 970532 - Installation of DMIS Content 2006_1
    Note 1231203 - TDMS release strategy (Add-on: DMIS, DMIS_CNT, DMIS_EXT...)
    Note 1244346 - Support Packages for TDMS (add-on DMIS, DMIS_CNT, ...)
    I'm doing this for an ECC system running ecc 6.0 EHP6 by the way.
    Still any help with my issue on the delete would be helpful. but post tips I don't kwnow about
    NICK

  • Check time based publishing from Java

    Hello all,
    How can I check whether a resource is valid with respect to time based publishing from Java?
    I had a look at the IResource JavaDoc, hoping that there would be an isTimeBasedValid() (or thereabouts) method, but there isn't.
    So obviously I must simply check the valid from and valid untill properties against 'todays' date/time. The problem is that I don't know the name of these properties. I imagine that they are in the namespace 'IWcmConst.SAP_WCM_NAMESPACE' but as far as the name goes, I'm stuck. I had a look at the IWcmConst JavaDoc, since I know that other properties have constant values there, such as displayname and description etc, but I can't see constants for valid from and valid untill.
    As per, any help is greatly appreciated.
    Patrick.

    > Hello all,
    >
    > How can I check whether a resource is valid with
    > respect to time based publishing from Java?
    >
    > I had a look at the IResource JavaDoc, hoping that
    > there would be an isTimeBasedValid() (or thereabouts)
    > method, but there isn't.
    That's because it's not part of the core API.
    > So obviously I must simply check the valid from and
    > valid untill properties against 'todays' date/time.
    > The problem is that I don't know the name of these
    > properties. I imagine that they are in the namespace
    > 'IWcmConst.SAP_WCM_NAMESPACE' but as far as the name
    > goes, I'm stuck. I had a look at the IWcmConst
    > JavaDoc, since I know that other properties have
    > constant values there, such as displayname and
    > description etc, but I can't see constants for valid
    > from and valid untill.
    >
    > As per, any help is greatly appreciated.
    As far as I can tell, properties used by the TBP service should be considered an implementation detail. To obtain the information you need, you'll first have to get an instance of the currently running TBP service, and then use it's methods to obtain the dates (see <http://media.sdn.sap.com/html/submitted_docs/60_sp2_javadocs/km/com/sapportals/wcm/repository/service/timebasedpublish/ITimebasedPublishServiceManager.html>).
    Best regards, Julian

  • Need help on Implementing timer based JTable update events

    greetings,
    i am writing a trap receiver that placed the entries in a jtable, and i am having a problem where the entires can arrive so fast they swamp the event thread. the solution i believe is to write a custom model that calls the table update events on timer based intervals. i have made an attempt at this, but cannot get it to work. has anyone done this, or possibly tell me where i have gon off the tracks?
    thanks in advance,
    here is my class:
    import javax.swing.event.TableModelEvent;
    import javax.swing.table.DefaultTableModel;
    public class TimerUpdateTableModel extends DefaultTableModel implements Runnable{
         Thread runner;
           int rowCtr = 0;
         public TimerUpdateTableModel(int initialDelay) {
             Thread runner = new Thread(this);
             runner.start();
         public void fireTableDataChanged(){
              //super.fireTableDataChanged();
         public void fireTableStructureChanged(){
              //super.fireTableStructureChanged();
         public void fireTableRowsInserted2(int firstRow,
                int lastRow){
              //super.fireTableRowsInserted(firstRow, lastRow);
         public void fireTableRowsInserted(int firstRow,
                int lastRow){
              //super.fireTableRowsInserted(firstRow, lastRow);
         public void fireTableRowsUpdated(int firstRow,
                int lastRow){
              //super.fireTableRowsUpdated(firstRow, lastRow);
         public void fireTableRowsDeleted(int firstRow,
                int lastRow){
              //super.fireTableRowsDeleted(firstRow, lastRow);
         public void fireTableCellUpdated(int row,
                int column){
              //super.fireTableCellUpdated(row, column);
         public void fireTableChanged(TableModelEvent e){
              //super.fireTableChanged(e);
         public void run() {
              while (true) {
                   try{
                        rowCtr = TimerUpdateTableModel.this.getRowCount();
                        System.out.println(rowCtr + "    " + (TimerUpdateTableModel.this.getRowCount() - 1));
                        //super.fireTableRowsInserted(0, TimerUpdateTableModel.this.getRowCount() - 1);
                        //super.fireTableDataChanged();
                        int nRowCount = getRowCount();
                        super.fireTableChanged (new TableModelEvent (TimerUpdateTableModel.this, 0,
                            nRowCount - 1,
                            TableModelEvent.ALL_COLUMNS,
                            TableModelEvent.UPDATE));
                   }catch(Exception e){
                        e.printStackTrace();
                   try {
                        Thread.sleep(5000);
                   } catch (InterruptedException ie) {
                   }catch(Exception e){
                        e.printStackTrace();
                   System.out.println("done");
    }

    i am having a problem where the entires can arrive so fast they swamp the event thread
    super.fireTableChanged Well, if you are using the above code every time you receive an update, then I suspect you would be having problems. The fireTableChange() event is an expensive method. It means you need to recreate the TableColumnModel and repaint the entire table every time.
    You should simply be using method like model.addRow(...), model.setValueAt(...) to make updates to the table.

  • How to calculate elapsed time based on user input

    I'm not sure what to do next in this program. Basically, I'm not sure exactly how to get the time to output accurately, as in what forumla I should be using.
    This is the question:
    What comes 13 hours after 4 o'clock? Create an ElaspedTimeCalculator application that prompts the user for a starting hour, whether it is am or pm, and the number of elapsed hours. The application then displays the time after that many hours have passed. Application output should look similar to:
    Enter the starting hour: 7
    Enter am or pm: pm
    Enter the number of elapsed hours: 10
    The time is: 5:00 amHere's the code I have so far:
    import java.util.Scanner;
    public class ElapsedTimeCalculator
         public static void main(String[] args)
              int starting_hour;
              int starting_minutes; /*This is added in case the user wants to add minutes as well.*/
              String am_or_pm;
              int elapsed_hours;
              int elasped_minutes;
              int time_hours;
              int time_minutes;
              System.out.println("Welcome. This application will give you the time based on your input.");
              System.out.println(" ");
              Scanner input = new Scanner(System.in);
              System.out.print("Enter the starting hour: ");
              starting_hour = input.nextDouble();
              System.out.print("Enter the starting minutes: ");
              starting_minutes = input.nextDouble();
              System.out.print("Enter either 'am' or pm': ");
              am_or_pm = input.nextString();
              System.out.print("Enter the number of elapsed hours: ");
              elapsed_hours = input.nextDouble();
              input.close();
              time_hours =
              time_minutes = 
              if(am_or_pm = "am" || am_or_pm = "a.m." || am_or_pm = "AM" || am_or_pm = "A.M.")
                   System.out.println("The time is " + time_hours + ":" + time_minutes + "am");
              if(am_or_pm = "pm" || am_or_pm = "p.m." || am_or_pm = "PM" || am_or_pm = "P.M.")
                   System.out.println("The time is " + time_hours + ":" + time_minutes + "pm");
    }To calculate time_hours should I just calculate this by adding the elapsed hour to the starting hour? I doubt it will be accurate for all situations.
    Same for the time_minutes For example, if the starting minutes and the elapsed minutes were 50, it would be greater than 60. Also, not sure if it makes sense to separate hours and minutes like this, it's not required to in the question. I initally thought it would be easier to approach like this instead of allowing the user to input a double for the starting hour. ex. 5.7
    I get the feeling that this is extremely simple, but nonetheless, I'm stuck, so any help would be appreciated.

    Well thanks to both of you. I did a little reading up on the modulus operator and coupled it with some logic (although, truthfully, I'm not really using to there actually being an application for the remainder of a division operation, since it's never really used very much in any of my Math courses) and the hours portion works perfectly now:
    import java.util.Scanner;
    public class ElapsedTimeCalculator
         public static void main(String[] args)
              int starting_hour;
              //int starting_minutes; /*This is added in case the user wants to add minutes as well.*/
              String am_or_pm;
              int elapsed_hours;
              //int elasped_minutes;
              System.out.println("Welcome. This application will give you the time based on your input.");
              System.out.println(" ");
              Scanner input = new Scanner(System.in);
              System.out.print("Enter the starting hour: ");
              starting_hour = input.nextInt();
              //System.out.print("Enter the starting minutes: ");
              //starting_minutes = input.nextInt();
              System.out.print("Enter either 'am' or pm': ");
              am_or_pm = input.next();
              System.out.print("Enter the number of elapsed hours: ");
              elapsed_hours = input.nextInt();
              input.close();
              int time_hours = 0;
              //int time_minutes;
              String meridien;
              if(am_or_pm.equals("am"))
                   time_hours = (starting_hour + elapsed_hours) % 24;
                   //time_minutes = (starting_minutes + elapsed_minutes) % 60;
              else if(am_or_pm.equals("am"))
                   time_hours = (starting_hour + elapsed_hours) % 24;
                   //time_minutes = (starting_minutes + elapsed_minutes) % 60;
              else if(am_or_pm.equals("AM"))
                   time_hours = (starting_hour + elapsed_hours) % 24;
                   //time_minutes = (starting_minutes + elapsed_minutes) % 60;
              else if(am_or_pm.equals("A.M."))
                   time_hours = (starting_hour + elapsed_hours) % 24;
                   //time_minutes = (starting_minutes + elapsed_minutes) % 60;
              else if(am_or_pm.equals("pm"))
                   time_hours = (starting_hour + elapsed_hours + 12) % 24;
                   //time_minutes = (starting_minutes + elapsed_minutes) % 60;
              else if(am_or_pm.equals("p.m."))
                   time_hours = (starting_hour + elapsed_hours + 12) % 24;
                   //time_minutes = (starting_minutes + elapsed_minutes) % 60;
              else if(am_or_pm.equals("PM"))
                   time_hours = (starting_hour + elapsed_hours + 12) % 24;
                   //time_minutes = (starting_minutes + elapsed_minutes) % 60;
              else if(am_or_pm.equals("P.M."))
                   time_hours = (starting_hour + elapsed_hours + 12) % 24;
                   //time_minutes = (starting_minutes + elapsed_minutes) % 60;
              if(time_hours < 12)
                   meridien = "A.M.";
                   System.out.println("The time is: " + time_hours + ":00 " + meridien);
              else if(time_hours > 12)
                   meridien = "P.M.";
                   System.out.println("The time is: " + time_hours + ":00 " + meridien);
    }Now the only thing is the minutes. My teacher did say she wants the user to have the option to input minutes also if he/she desires, so I do need it. However, the only problem is that if say the user inputs a "starting minute" of 14 for example, and 66 minutes elapsing, then (14 + 66) int/ 60 = 1r20 but using the modulus operator would only give me 20. So how will I be able to add any extra hours if it is necessary?

  • Revenue Recognition :- Type A : Time Based Revenue Recognition in Contract

    Hello,
    I am facing a peculiar problem while creating the contract relevant for Revenue Recognition Type A : Time Based Revenue Recognition in Contract.
    The Item category setting I am using is as follows:-
    1.     Rev. recognition : A : Time-related revenue recognition
    2.     Acc. period start : B : Proposal based on billing plan start date
    3.     Revenue Dist. : A : Total Val.: Linear and Correction Value Linearly Distributed
    I have already done the necessary activation of Revenue Recognition.
    Done the account determination for following :-
    1.     Revenue account determination (VKOA)
    2.     Deferred revenue (VKOA)
    3.     Unbilled receivables (OVUR) 
    Still when I am trying to save the contract the document goes into Incompletion asking for "GL account for item 10"
    Where as in account determination analysis the system has already showing the
    1.     Revenue account
    2.     Deferred revenue account
    Kindly guide further.
    Thanks & Regards,
    Amrish Purohit

    Hi
    you can overcome this issue of G/l account missing while saving the document is by assigning the Account key of that condition type in
    img-> sales and Disrtibution->account assignment /Costing->revenue account determination-->defina and assign account keys
    here you have to assign the account keys you are using for that condition type in pricing procedure against the same conditiontype in the accurals field.
    this will solve your problem

Maybe you are looking for

  • Classifiction View in material master --- ausp

    Hi all, I am using the BAPI_MATERIAL_SAVEDATA to create or save the material. In that i dont know how to create or update the classification view which concerns the ausp table. Any one help me how to update the Classifiction view. Anyother bapi has t

  • Have down loaded acrobat xi trial and won't install

    have downloaded trial of acrobat pro xi ,it has downloaded 100% down load complete message is up and the blue line is complete now it just sits there and has program has not come up anywhere on the computer. how do i install this (mac maverick )

  • HR_INFOTYPE_OPERATION - 'MOD' Operation

    I am using HR_INFOTYPE_OPERATION FM for changing a infotype depending on the user input. This FM does not change the record with modify operation (MOD). Error while trying modify operation is as shown below: "Infotype does not exist" The infotype doe

  • Help? Web service crashes whenever I check "enable SSL"

    Whenever I try to enable SSL for one of my virtual domains, Server admin reports "A service has encountered an error" and disables web service for that virtual domain. Everything was working fine (ftp, webdav, websites, mail). So my final step was to

  • New Field not Showing up in Report, part II.

    I had this issue with another report, and I was told that I hadn't brought my new field down all the way through to the final Select.  With this report, I thought I had done just that, but the new field is still not showing up.  I have pasted the cod