Time duration for Process.waitFor() to wait.

Can we specify the time duration for the Process.waitFor() after which it resumes?
          Runtime rt=Runtime.getRuntime();
          Process ps=rt.exec("some command");
          ps.waitFor();
Like here if rt.exec() is taking a lot of time to execute, the ps should wait for a certain period of time for rt to execute and if rt doesnt complete within the specified time then ps should resume.

I don't know exactly what you are doing but what about: wait(long timeout);

Similar Messages

  • Report to display Average time taken for processing payments".

    Hi,
    I have been asked to develop a report for "Report to display Average time taken for processing payments".
    Could any one guide me technically what are the different tables i need to take to generate the report. Treat this is very urgent. Pls provide sample code too....
    Thanks in advance....

    Given below is the set up for credit card payment processing:
    Set Up Credit Control Areas:
    Define Credit Control Area
    Transaction: OB45 
    Tables: T014
    Action: Define a credit control area and its associated currency.  The Update Group should be ‘00012’.  This entry is required so the sales order will calculate the value to authorize
    Assign Company Code to Credit Control Area
    Transaction: OB38
    Tables: T001
    Action: Assign a default credit control area for each company code
    Define Permitted Credit Control Area for a Company
    Code
    Transaction: 
    Tables: T001CM
    Action: For each company code enter every credit control area that can be used
    Identify Credit Price
    Transaction: V/08
    Tables: T683S
    Action: Towards the end of the pricing procedure, after all pricing and tax determination, create a subtotal line to store the value of the price plus any sales tax.  Make the following entries:
    Sub to:  “A”
    Reqt:  “2”
    AltCTy:  “4”
    Automatic Credit Checking
    Transaction: OVA8
    Tables: T691F
    Action: Select each combination of credit control areas, risk categories and document types for which credit checking should be bypassed.  You need to mark the field “no Credit Check” with the valid number for sales documents.
    Set Up Payment Guarantees
    Define Forms of Payment Guarantee
    Transaction: OVFD
    Tables: T691K
    Action: R/3 is delivered with form “02” defined for payment cards.  Other than the descriptor, the only other entry should be “3” in the column labeled “PymtGuaCat”
    Define Payment Guarantee Procedure
    Transaction: 
    Tables: T691M/T691O
    Action: Define a procedure and a description. 
    Forms of Payment Guarantee and make the following entries Sequential Number  “1” 
    Payment Guarantee Form “02”
    Routine Number   “0”    Routine Number can be used to validate payment card presence.
    Define Customer Payment Guarantee Flag
    Transaction: 
    Tables: T691P
    Action: Define a flag to be stored in table. 
    Create Customer Payment Guarantee = “Payment Card Payment Cards (All Customers can use Payment Cards)”.
    Define Sales Document Payment Guarantee Flag
    Transaction: 
    Tables: T691R
    Action: Define the flag that will be associated with sales document types that are relevant for payment cards
    Assign Sales Document Payment Guarantee Flag
    Transaction: 
    Tables: TVAK
    Action: Assign the document flag type the sales documents types that are relevant for payment cards.
    Determine Payment Guarantee Procedure
    Transaction: OVFJ
    Tables: T691U
    Action: Combine the Customer flag and the sales document flag to derive the payment guarantee procedure
    Payment Card Configuration
    Define Card Types
    Transaction: 
    Tables: TVCIN
    Action: Create the different card types plus the routine that validates the card for length and prefix (etc…) 
    Visa , Mastercard, American Express, and Discover 
    Create the following entries for each payment card 
    AMEX  American Express ZCCARD_CHECK_AMEX Month
    DC  Discover Card  ZCCARD_CHECK_DC  Month*****
    MC  Mastercard  ZCCARD_CHECK_MC  Month
    VISA  Visa   ZCCARD_CHECK_VISA  Month
    The Routines can be created based on the original routines delivered by SAP. 
    *****SAP does not deliver a card check for Discover Card. We created our own routine.
    Define Card Categories
    Transaction: 
    Tables: TVCTY
    Action: Define the card category to determine if a
    payment card is a credit card or a procurement card.
    Create the following two entries
    Cat Description  One Card  Additional Data
    CC Credit Cards  No-check  No-check
    PC Procurement Cards No-check  Check
    Determine Card Categories
    Transaction: 
    Tables: TVCTD
    Action: For each card category map the account number range to a card category.  Multiple ranges are possible for each card category or a masking technique can be used.  Get the card number ranges from user community.  Below is just a sample of what I am aware are the different types of cards. 
    Visa Credit  Expires in 7 days. 
        400000   405500
        405505   405549
        405555   415927
        415929   424603
        424606   427532
        427534   428799
        428900   471699
        471700   499999
    Visa Procurement  Expires in 7 days.
        405501   405504
        405550   405554
        415928   415928
        424604   424605
        427533   427533
        428800   428899
    Mastercard Credit Expires in 30 days
        500000   540499
        540600   554999
        557000   599999
    Mastercard Procurement Expires in 30 days
        540500   540599
        555000   556999
    American Express Credit Expires in 30 days
        340000   349999
        370000   379999
    Discover Card Credit Expires in 30 days
        601100   601199
    Set Sales Documents to accept Payment Card Information Transaction: 
    Tables: TVAK
    Action: Review the listing of Sales Document types and enter “03” in the column labeled “PT” for each type which can accept a payment card
    Configuration for Authorization Request
    Maintain Authorization Requirements
    Transaction: OV9A
    Tables: TFRM
    Action: Define and activate the abap requirement that determines when an authorization is sent.  Note that the following tables are available to be used in the abap requirement (VBAK, VBAP, VBKD, VBUK, and VBUP).
    Define Checking Group
    Transaction: 
    Tables: CCPGA
    Action: Define a checking group and enter the
    description.  Then follow the below guidelines for the remaining fields to be filled.
    AuthReq Routine 901 is set here.
    PreAu  If checked R/3 will request an authorization for a .01 and the authorization will be flagged as such. (Insight does not use pre-authorization check).
    A horizon This is the days in the future SAP will use to determine the value to authorize
    (Insight does not use auth horizon period).
    Valid  You will get warning message if the payment card is expiring within 30 days of order entry date. 
    Assign Checking Group to Sales Document
    Transaction: 
    Tables: TVAK
    Action: Assign the checking group to the sales order types relevant for payment cards
    Define Authorization Validity Periods
    Transaction: 
    Tables: TVCIN
    Action: For each card type enter the authorization validity period in days.
    AMEX American Express 30
    DC Discover card  30
    MC Master card  30
    VISA Visa   7
    Configuration for clearing houses
    Create new General Ledger Accounts
    Transaction: FS01
    Tables: 
    Action: Two General Ledger accounts need to be created for each payment card type.  One for A/R reconciliation purposes and one for credit card clearing.
    Maintain Condition Types
    Transaction: OV85
    Tables: T685
    Action: Define a condition type for account determination and assign it to access sequence “A001”
    Define account determination procedure
    Transaction: OV86
    Tables: T683 / T683S
    Action: Define procedure name and select the procedure for control.  Enter the condition type defined in the previous step.
    Assign account determination procedure
    Transaction: 
    Tables:
    Action: Determine which billing type we are using for payment card process.
    Authorization and Settlement Control
    Transaction: 
    Tables: TCCAA
    Action: Define the general ledger accounts for reconciliation and clearing and assign the function modules for authorization and settlement along with the proper RFC destinations for each.
    Enter Merchant ID’s
    Transaction: 
    Tables: TCCM
    Action: Create the merchant id’s that the company uses to process payment cards
    Assign merchant id’s
    Transaction: 
    Tables: TCCAA
    Action: Enter the merchant id’s with each clearinghouse account

  • How can I make Process.waitFor() just wait for a limited period?

    For example,
    Process prc=Runtime.getRuntime().exec(cmd);
    prc.waitFor(some seconds);
    if(prc.exitValue() != 0){
    // the subprocess hadn't terminated normally in some seconds,
    // so just forcilly kill it.
    prc.destroy();
    Is there any way to do this?

    waitFor does not have a timeout parameter, but you can start a Timer or thread to interrupt your waiting thread when the timeout expires. Then, waitFor will end, throwing an InterruptedException that you can catch.

  • Ideal Time Duration for Payroll International Implementation

    Hi Experts,
    Can anybody please guide me :
    What is the ideal duration for Payoll International implementation along with statutory requirement.
    What are the pre requisites for this.
    What all additional activities required to be done which were excusive to International Payroll.
    Please guide .
    Thanks.

    Hi,
    International payroll with statutory would differ based on the complexity involved in the country norms and pay policies tobe implemented in the schema level.
    Realization effort would definitely will be based on the country specific RICEF and PCR modifications to be performed. Else, the project estimation can be made based on any other country implementation for other phases in ASAP.
    some of the notes to be kept as a checklist for any payroll implementation are-
    1) Clear pay related requirements to be implemented are signed off
    2) Testing scenarios identified by the Users, functional consultants as a workshop session
    3) Parallel runs of atleast two cycle to be incorporated in the plan for implementation
    4) Statutory forms are well designed and tested per the latest SAP release notes
    5) Payroll users are trained and tested with the payroll processes
    6) FI configurations are well defined with the respective accounts to be considered for various wage types
    7) Test some of the end to end scenario for various cities and districts related calculations and different EGs from hiring and processing time, payrollt, posting to payroll and posting to finance
    8) Finalising on check print format and consolidated inputs with appropriate testing
    9) Bank transfer file to be well tested
    10) Reviewing the remuneration statement as pay slips in Portal (PDF format) should be configured and tested

  • Time duration for deadline

    Dear Experts,
    I learnt that,
    negative duration for deadline can be used if we define reference date/time via an expression.
    Can you please tell me,
    1.What is negative duration.
    2. What is the purpose of defining negative duration.
    3.How to mention it using an expression in deadline
    KR,
    Bharath

    1.What is negative duration.
    Negative duration is if the workitem creation date is lets say today and you had selected type as expression and passed todays
    date but not time then it would set the time either 00:00:01 of request start and latest start and 23:59:59 for request end and latest end.
    Which  can be before time or after time..
    2. What is the purpose of defining negative duration.
    for certain cases you dont want the request start to be incorporated even though you had activated it then you can send the back time of the workitem creation which brings the workitem to ready state instead of waiting state.
    3.How to mention it using an expression in deadline
    " as said... mention the time as 00:00:01 or 23:59:59 based on the requirement.
    Hope my understandings helps you...!
    Regards
    Narin.

  • Record time duration for fax in vxml

    I am going to get the time duration used for fax sending in vxml:
    <transfer name="mycall" destexpr="'fax://' + phone_num" bridge="false" connecttimeout="120s" maxtime="180s" cisco-longpound="true" cisco-mailtoaddress="'xxxx'" >
    <catch event="telephone.disconnect.transfer">
    <assign name="mydur" expr="mycall$.duration"/>
    <goto next="#timeCount"/>
    </catch>
    </transfer>
    <var name="startTime" expr="new Date();"/>
    <var name="endTime"/>
    <form id="timeCount">
    <block>
    <assign name="document.startTime" expr="startTime.getTime();"/>
    <assign name="document.startTime" expr="Number(startTime);"/>
    <assign name="document.endTime" expr="new Date();"/>
    <assign name="document.endTime" expr="endTime.getTime();"/>
    <assign name="document.endTime" expr="Number(endTime);"/>
    <assign name="mydur" expr="document.endTime - document.startTime;"/>
    </block>
    </form>
    But mycall$.duration is 0 after transferring fax.
    And even if I use codes to count time duration, the duration, mydur, is about the same regardless of the number of pages sent.
    Is it possible to use vxml to record time duration of fax?
    Thank you!

    Paste the following Config:
    sh ver
    sh run
    debug of one call demonstrating the problem :
    debug voip ivr all
    debug vxml all

  • Incorrect time duration for songs

    I just added a few mp3s to my iTunes (8.1.1) library, and while the songs are around 3-4 minutes long each, the time duration listed is more than 25 minutes for each of the songs. The songs play fine, and they stop at the proper point (3-4 minutes in), the length is just listed wrong... how can I fix this? It's messing with my total time count, and it's just rather annoying altogether. Thanks for any help!

    Welcome to the forums
    One thing you could do, is set the correct Stop time for the track (in Get Info), and the track will stop playing at the correct point.
    If you want to make the total time correct also, then :
    1. set the correct Stop time (above)
    2. convert the MP3 (iTunes Preferences / Importing) to another format, or to MP3 again (you will lose a little quality I'm afraid)
    The converted track will now have the correct Stop time AND length.

  • LO Extraction approx time duration for PO Items (2lis_02_itm)

    Hi All,
    We are supposed to use 2lis_02_itm which is a purchase order line items data and this has to be initialized in our organization as previously there were no one using it. But, as we have to use LO extraction for PO item, we have been trying to prepare the cut over plan on how many hours approximately do we need to complete the extraction.
    As there should not be any postings during the LO extraction for PO items, we need to request to down the system for that duration. So, we are trying to estimate the time required from the start till the end of extraction. The data that we have is around in 1.3 Million records in PO header table.
    We tried to extract to the setup table in a LVT system and it took 39 hours to complete.
    I would like to know, on any of your experience, how long will it take and how much was the data load for your case.
    I need your expertise advice on this and is there any way we can initialize the system without downing the system during extraction?
    Appreciate your replies .
    Thanks in advance.

    Hi,
      There is no way for us to predict the run time, since it varies from system to system according to memory and other conditions.
    Also the header table is not a real indication of your runtime, you need to look at the line items (EKPO table). This is because any LO set-up program, always fills the lines items and these have the most data.
    This is what I suggest.
    1) Take dumps of the document ranges in the EKPO table.
    2) Split above document ranges into even chunks. For eg doc# 1 -100 contains 500 items. Doc # 101 -150 contains 500 items. The items should be more or less the same number.
    3) Take a subset of these, say 1000 records and do a set-up run without blocking the documents( there is a check box in the program). Schedule the setup as a background job. In this way, you get the exact runtime of the program for a 1000 records.You can then predict the run time for the ranges mentioned in step 2.
    4) You then need to create parallel jobs, each job contains a different document range( this is because setup tables can be filled in parallel). By optimizing the number of items and then number of parallel jobs you can get a small a time as possible and minimize the downtime.
    5) Once the jobs have completed, you can run an init w/o data transfer and then unlock the system. You can then do repair  fulls while the system is up, since the repairs would be done from the setup tables. Once all the loads are completed, you can begin running your delta ( This would already have started being captured, the moment you ran the setup w/o data transfer.
    Regards.

  • Is there a way to find the Time Duration for applying a Patch?

    Dear Legends,
    Is there a way to find the Installation or Applying time can be gauged for a PATCH, so that it will be useful to provide the DOWNTIME of the server.
    Thanks in Advance
    Regards,
    Karthik singh

    karthiksingh_dba wrote:
    Dear Legends,
    Is there a way to find the Installation or Applying time can be gauged for a PATCH, so that it will be useful to provide the DOWNTIME of the server.
    Thanks in Advance
    Regards,
    Karthik singhNot until you test the patch and install it yourself on one of the instances. Once you apply the patch, you can check the patch log file or the patch analysis report or AD_BUGS table.
    https://forums.oracle.com/forums/search.jspa?threadID=&q=Patch+AND+Analysis+AND+Report&objID=c3&dateRange=all&userID=&numResults=15&rankBy=10001
    You can run the patch with apply=n but this will let you to test the patch before applying it only.
    http://docs.oracle.com/cd/E18727_01/doc.121/e12148/T531058T531065.htm#adptpptpbai
    http://docs.oracle.com/cd/E18727_01/doc.121/e12148/T531058T531062.htm#adptpaucla
    Thanks,
    Hussein

  • Time-Out for Process with Correlation - Avoiding blocked Queues

    Hello,
    I have the following requirement, it would be great if you could share your opinions and knowledge on it:
    If have an integration process which opens a correlation and sends out an asynchronous request message. The response normally arrives after 10 minutes and is correlated to the process using a correlationID that has been activated by the request message. Additionally there is a deadline branch which terminates the process after 1 hour.
    So far this works fine.
    However there might be some very rare cases where a response is delayed (e.g. if there is maintenace work on partner side). So it could be the case that a response arrives a day later when the process instance is already terminated:
    My questions are now:
    1. How can I avoid that the inbound queue is blocked with the response message that cannot find an active correlation?
    2. Best thing would be to store the response message on the file system in case no more active correlations are open.
    So basically the logic could be:
    If message arrives, check whether process instance with corresponding correlation is active, if yes then send to process, if no send to file receiver.
    Is this possible?

    Thread closed - no solution so far.

  • New itunes update put the time duration for playlists at hours. How can I change it back?

    Normally you would click on the time and it would toggle between hours and MM:SS format. Now it just stays as hours. Apple is just making it super hard to burn CD's at times just under 80 minutes.

    Delete them and then download them from the desired Apple ID.
    (98978)

  • Process chain time duration

    Hi Expert's
    I ran a process chain which is containing two infopackages.I need to make note of the time duration exactly taken to complete the process with this process chains .Can you people guide me  where can I see the time duration for this process chains.
    Thanx in Advance.
    Vassu.

    while u r viewing the log for the process chain..right click on the selected process..click on 'display messages'..
    it will show up 3 tabs..
    one of the tabs shows the sm37 job log..
    u can note the duration from there..b/w job started step and job completed step..
    Vishvesh

  • Recommendations on wait durations for UWL iView

    Hi All,
    I am looking to tune the wait durations in the workflow UWL iView in a 7.02 NetWeaver Portal.  These are the following durations and their default settings ...
    Wait duration before calling provider on loading preview: 2
    Wait duration before calling providers on loading of UWL: 20
    Wait duration for UI refresh while waiting for update: 15
    I have looked at the SAP help on these attributes as per here ... http://help.sap.com/saphelp_nw04s/helpdata/en/0a/ad68c125ae496f8c04a25090bd2e3c/content.htm
    I noticed another forum thread whereby someone suggested values of 2,4,3 respectively.  I am unclear however of the effect (if detrimental) of setting some of these to zero.  In particular, I am looking to tune down the last parameter 'Wait duration for UI refresh while waiting for update' to the lowest reasonable number (eg 3 seconds?).  I am wondering what others in the community have set their parameters to and what logic was used to derive their settings? 
    Rgds
    John

    Hello John,
    The following is a very good knowledge based article which covers your exact query. In relation to reducing the parameter
    Wait duration for UI refresh... it is not sensible to reduce this to a very low value because the UWL UI will flicker with the refresh. If this is occuring every 2/3 seconds it will be very annoying for end-users.
    KBA #1577547 UWL Performance Tips and Considerations
    Thanks and best regards,
    Carl Connolly
    Senior Support Consultant - Netweaver Web Application Server
    AGS Primary Support, Global Support Centre Ireland
    Universal Work List troubleshooting guide:
    https://www.sdn.sap.com/irj/scn/wiki?path=/display/bpx/uwl+faq

  • No of questions in sccm 2012 70-243 exam and the time duration

    how many question in sccm 70-243 exam and time duration for the exam

    Hi,
    I can hardly remember but according to Daniel it was 3 hours and 60 questions.
    http://www.danielclasson.com/passed-the-70-243-administering-and-deploying-system-center-2012-configuration-manager-exam/
    Regards,
    Jörgen
    -- My System Center blog ccmexec.com -- Twitter
    @ccmexec

  • How to show the processing time taken for a BPEL process in BAM report.

    Hi All,
    I have the data as below in the Data object. I would like to show the time taken for each order to complete in the report.
    instance Id     order Id     product Name     product Code     price     status     instance Time      updaterName
    1360010     ord004     Guitar     prod003     2000     requested     9/22/2008 12:12:11 PM     Invoke_InsertSalesOrder
    1360010     ord004     Guitar     prod003     2000     Approved     9/22/2008 12:15:11 PM     Invoke_OrderStatusUpdate
    This data comes from simple BPEL process where sensors are configured at the start and end of BPEL process. Also have a human task activity in between to create the time difference.
    In Enterprise link design studio, I tried to calculate the time difference using expression calculator and store it as calculated field. But that doesn't seems to work because when I execute the plan, second sensor data reaches only after human approval whereas first sensor data would be waiting for calculation and ultimately nothing comes into data object.
    How and where the calculation be done to show the processing time in the report. Please someone throw some light on this.
    Regards
    Jude.
    Edited by: user600726 on Sep 30, 2008 1:30 AM

    I would suggest modifying your data object so that the data can all be in a single row and use the sensor at the end of the process to upsert (update) the row created by the sensor at the start of the process. The time difference between two fields in the same row is then an easy calculation on a BAM report -- No EL plan should be needed.

Maybe you are looking for