Delay execution of CFML

Hi there
I manage a site that "pre-generates" pages, so that the
execution time is quicker and the demands on the server are reduced
when users come to the site.
The problem is this. I have a template that contains CFML
that looks to see the browser that the user is using. When the
pages are "pregenerated" using say IE and the user visits using
Firefox, the pages to not render properly, because the
pregeneration process inserts a reference to the stylesheet for IE,
and not Firefox (which makes sense).
I would simply like to "include" the code that determines
which stylesheet should be used in the pregenerated page so that it
is executed when the user visists the site, rather than the
pregenerated page executing that code when the page is created.
Is anyone able to assist?
Thanks for your help in advance.
Goofy

Thanks very much for your response.
The problem is, my CF code (similar to that which you have
set out below) executes when I pregenerate my page. So, if I were
pregenerating the pages using (say) IE7, the line of code "<LINK
href="ie7_style.css" rel="stylesheet" type="text/css">" would be
inserted into the page, which would then be live on the website. If
a person comes along and views the page using Firefox, Opera, IE6
or any other broswer, the IE7 css will be used, because the line
<LINK href="ie7_style.css" rel="stylesheet" type="text/css">
is already in the template.
What I want to do is insert the code (such as yours below)
into the template that server executes when the Firefox (or other)
user comes to the site.
Does this assist?
Regards
Goofy

Similar Messages

  • How to delay execution?

    I have several loops. I need to delay each round of execution in those loops by a specified time interval. This is quite easy in C,C++ where we just use delay() function as one statement inside the loop. Is there any equivalence in Java?
    The solution of using Timer is not acceptable, as it makes the things too complicated compared to just using one function.
    I'd appreciate for the better solution.
    Thank you.

    Hi Raju,
    Are you familiar with the "sleep()" method in class "java.lang.Thread"?
    Here is a link to the javadoc:
    http://java.sun.com/j2se/1.4.1/docs/api/java/lang/Thread.html#sleep(long)
    Is this what you were looking for?
    Hope it helps.
    Good Luck,
    Avi.

  • Stored Procedure delay execution

    Good Afternoon,
    I am trying to execute 4 separate stored procedures, however I want to put a 10 second delay in between executing each procedure. The stored procedures are called SP_1, SP_2 etc.. Is there a really simple way of doing this with a SQL script?.
    Thanks in advance.
    Steve

    use WAITFOR DELAY '00:00:10' option put this for every sp.
    example :
    create PROCEDURE dbo.testtotal
    AS
    exec test1;
    WAITFOR DELAY '00:00:10'
    exec test2;
    WAITFOR DELAY '00:00:10'
    exec test3
    WAITFOR DELAY '00:00:10'
    exec test4
    GO
    Pls mark as answer if this helpful to you

  • Delaying execution until a specified time

    All,
    I am developing a web application using Java servlets (no JSPs). What I have been trying to accomplish is to pass a date in a specified format to a servlet, have the servlet parse the date, and then upon that specified date complete its actions. The passing of the date and parsing works fine, and I can actually get the difference between the specified date and the current date and execute a Thread.currentThread().sleep(difference), but this only seems logical for dateTimes that are fairly close to the current dateTime. This method would obviously not be useful if one wanted to send a date three months from now to this servlet. My question therefore is, Is there a better way to accomplish this?

    Thank you so much for your reply, and I am sorry that this reply has taken me so long. I believe that this will work, but it essentially has the same issue of as I am facing in that it would not be very useful in scheduling a task three months from any given date, because internally it uses the Object.wait(long) method for a given Thread. This would mean, if i am thinking correctly, that my servlet would have to be executed in a browser that would need to be open constantly until execution (three months)? If this is not the case, then please correct me. OItherwise, I may have to take this particular functionality out of a servlet and place it in a stand alone app.

  • LPX Delayed Execution of Actions

    Sorry if this has been mentioned before, I so, I could not find it as a topic...
    I'm finding that once there are a few tracks and plugins active there is a delay in Logic Pro x's responsiveness.
    Grab some tracks and shift them on the timeline and I see a spinning ball and then Logic will exceute this task only after a delay.
    Same with simple scissor snips or pressing a key command for a different zoom mode.
    I've not seen this type of behaviour in any other DAW.
    Is this normal or a bug to be fixed in the next update?

    The printf output is probably just being delayed until the application exits -- most likely it's being buffered, and when the application exits the buffer is being flushed.
    To see if the C function is getting executed properly, have it return a specific value that you can display or check in your Java code.
    Otherwise, you could try flushing stdout immediately after calling printf.

  • Delaying execution of an onPress function

    mc.onPress=function(){interval=setInterval(myFunction(this),delay)};
    In this code myFunction(this) executes immediately
    irrespective the delay
    value.
    How do I set it to execute with a delay?

    I guess having this on EnterFrame might slow down the game
    setInterval should be less of a burden
    "t-juice-t" <[email protected]> wrote in
    message
    news:e2ei4a$bkj$[email protected]..
    > Well, I'm not that great at ActionScript, so a bunch of
    this has gone
    right
    > over my head, but if I wanted to delay the function from
    occuring, I
    would,
    > rather than actually delaying it, delay all of my
    internal functions:
    >
    > Button:
    > on(press) {
    > _root.my_movie_clip.switched = true;
    > }
    >
    > Movie Clip:
    > onClipEvent(load) {
    > timer = 0;
    > }
    > onClipEvent(enterFrame) {
    > if(switched == true) {
    > timer = timer + 1;
    > if(timer >= 5) {
    > timer = 0;
    > (function that you would have put on button)
    > }
    > }
    > }
    >
    > Again, this is but a simple way to do it, as I'm not
    very accomplished at
    > ActionScript yet, and I assume that it will not hold up
    to some of the
    things
    > that you need to do, but it's something
    >

  • Delay execution time

    Hi Guys,
    I have two jsp page that load inside iFrames. One page sets a session variable that the other needs to read. The problem i am having is that the second jsp page sometimes renders before the the first one causing an error.
    I have tried the following:
    <%
    //page 1
    session.setAttribute("theUser", userID);
    //page 2
    if(session.getAttribute("theUser") == null)
    response.setHeader("Cache-Control","no-store"); //HTTP 1.1
    response.setHeader("Cache-Control","no-cache"); //HTTP 1.1
    response.setHeader("Pragma","no-cache"); //HTTP 1.0
    response.setDateHeader ("Expires", 0); //prevents caching at the proxy server
    %>
    <META HTTP-EQUIV="Refresh" CONTENT="3">
    <%
    %>The above code sometimes works and sometimes it just loops forever. Is there a better way to get this accomplished?
    Thanks!

    You could use JavaScript. In the frameset page set the fame displaying the second jsp to a dummy url or url of a blank html page. Then in the first jsp page put on th ebottom of the page a script to set the location of the other frame to your second jsp page. This way the second jsp will not be called until the first page has loaded.

  • How to schedule a workflow for recurring executions: The solution

    Scheduling a workflow for recurring execution has been long awaited in WFA, perhaps from 2.0 time. The following document shows how to get it done. I've also explained the logic behind it. It’s very simple to use, meets every requirement which one can have from a scheduler and of course highly flexible. Let's go!! The Real stuff. What is this? Is this actually a scheduler? No. This is actually a command in your workflow, but a special 'magical' command. This 'magical' command logic is built using the answers for the following questions: Can a workflow be scheduled for a delayed execution in a future time? Yes, but only one execution instance. If you want the next execution, execute the workflow again providing the same set of inputs and the execution date/time.During workflow execution, can a command inside a workflow get to know what is the  name of the workflow? YesDuring workflow execution, can the command know what is the job execution id? YesIs there any programmatic interface available to know what are the user input provided or a particular job execution? YesCan a command inside a workflow trigger another workflow? Yes.Can a command inside the same workflow trigger itself? Absolutely yes. I've ticked all boxes needed to build such a solution. The solution is to make the workflow a smart workflow, so smart that it can schedule itself for the next execution. It no longer needs any other task scheduler to tigger it. WFA provides a large set of REST APIs for other 3rd part SW integration. But I  also can make  good use of these APIs to make smart workflows. I have always believed that WFA should not only be seen as a framework for automating Storage boxes or server, but just about any task( inside a computer of course) which is done manually. WFA is an awesome product indeed.  So this is a command called "Workflow Scheduler" which  you can put in your workflow as another command. Prerequisites: You need PowerShell 3.0 on your WFA server. I certainly could have done it for PoSH2.0 as well, but life for web interfaces  using PowerShell is so much easier with Posh3.0. Posh3.0 is a big jump from 2.0. WFA is fully supported to work on Posh3.0. Its available by default in Win2012, Win2008 can be upgraded, Win2003 users can't use it. Add credentials of a WFA Admin/Architect in you WFA itself with Name/IP: localhost Match: ExactType: OtherName/IP: localhostUsername: <WFA Admin/Architect Username>Password: <User Password>   3.  Minimum WFA version 2.2. This is only needed for Importing the dar. I've provided the command code in text too. The command code is the real deal. How to use it? If you have a workflow which you want for recurring executions, just add this command "Workflow Scheduler" in it. The command takes parameters for the workflow execution intervals. For example minsInterval for executing this workflow every x minutes, or daysInterval for executing the workflow etc.Now just like a normal workflow execution execute this workflow deciding what is the trigger time. Example: Suppose you want the execution every day at 10:00 PM.So provide daysInterval = 1 And execute the workflow for a delayed execution at 10:00 PM. You can pick the day to start as you wish. The workflow will execute at 10:00 PM and when this execution reaches our magical command "workflow scheduler", this command will trigger the same workflow  with same set of inputs for the next execution at 10:00 PM tomorrow. And so on an so forth. I’ve attached a very simple example workflow here to help you understand. An Example of a workflow scheduled for recurring execution Daily at 11:30 PM starting 10-March-2015     How to stop/suspend this recurring execution? Easy. You just abort the next scheduled job execution in Execution=> Execution Status. The cycle will stop. How to resume it? Easy again. Just resume the same aborted job. The cycle restarts. Can I change the schedule execution time? Yes. After aborting the current execution, you can resume the same workflow at a new time. Execution interval can't be modified as you can't change the command parameters. But the recurring execution now can occur at a new time. Where or which position to place this “workflow scheduler” command in your workflow? At the beginning ? At the end? Or somewhere in the middle. This completely depends on your choice. See some below cases. You don't want the next job execution scheduling to happen if any of the commands in my current workflow execution fails: Put command “workflow scheduler” in the end. It will trigger the schedule of the next job execution only when all real original commands of your workflow have passed. else not.     You want continuous job executions irrespective of the workflow command failures: Put it in the beginning. It will trigger the schedule for next execution before any of the actual command begin executing.     You want an approval before the next execution job is scheduled: Add an approval point before the comamnd.           So it’s all left to you.      Can an operator decide the execution schedule? Yes, but which workflows will be available to him/her for this recurring execution will have to be decided by the designer. This is a good thing to have as it serves for access control in a way. The Architect/Admin can now restrict which workflow can be put for recurring executions. Operators can’t execute just any workflow available to him for automatic recurring execution. And the workflow designer can also choose which scheduling parameter is to be made a variable for the operator. For example the designer want the operator to schedule a given workflow only for weeks Interval and not months or days i.e. he/she can only chose to schedule for weekly, biweekly etc. executions and  nothing else. For this the designer can define a User-Input variable only for weeksInterval parameter. It’s Done. You want workflow execution to be scheduled either for daily or once in 2 days but not any other. You can restrict this. Or he/she wants to give full freedom to the operator make his/her own decision about scheduling, he defined user-input variable for all scheduling parameters. The workflow designer wants weekly schedule but the day should not be a weekday: You can even do this. Is this flexible enough for my requirements? I’ve attached the very command code. You can modify the command as per your requirements. Suppose you want daily execution of a certain workflow at 10:00 PM but skip a day of execution if the day is a Monday. Modify the code check for the day and add another day if it’s a Monday. Its posh code and highly readable. So you can see how this can be used in a  variety of ways. This is the beauty of a programmatic solution. Its highly flexible, it allows users to design solution based on their requirements. Flexibility is the heart & soul of WFA. Thats why I like it. I have a workflow but I don't want to modify it by adding a new command in it. Can I still use this solution? Yes but with WFA 3.0 on wards. WFA3.0 allows to create modular workflows. Create a parent workflow with you actual workflow as a child workflow in it. Add our “workflow scheduler” command too. So now you don't need to touch your existing workflow. I've attached a workflow example here.   Have fun!! sinhaa  

    Providing a new version 1.1.0 of the command "WFA Schedular" Changes made: Added conditional String Representation based on the Scheduling parameter provided. Provided check for the right number of parameters passed into the command.Added a new parameter "Expiry Date" to automatically stop the recurring execution upon expiry.Check for Posh3.0 version in code.Have Fun!! sinhaa Below example for:Schedule a workflow for recurring execution every alternate day i.e. once in 2 days at 10:30 PM starting 06-Jul-2015 (Today's date is 02-Jul-2015) . The recurring workflow execution  should expire on 31-Dec-2015 and stop.  

  • Where to find undefined symbol delay and drv_usectohz

    Hello,
    i use WS6U1 on Solaris 5.8 and i try to use the kernel function delay (example see "man delay").
    I get 2 undefined symbols "delay" and "drv_usectohz", but i don't know which lib-file to include.
    Can anybody help ?
    kind regards
    Frank

    Hi,
    From the man page of "delay " it appears that:
    Kernel Functions for Drivers delay(9F)
    NAME
    delay - delay execution for a specified number of clock
    ticks
    SYNOPSIS
    #include <sys/ddi.h>
    void delay(clock_t ticks);
    The above include should help you to find the symbols.
    Hope path settings are set correctly. The header file "ddi.h" having these symbols is in /usr/include/sys. Can you reconfirm same at your end.
    HTH.
    Thanks,
    Santosh

  • Flash freezes in Firefox when I scroll the mouse wheel over a drop down list or text field (possibly others as well).

    Whenever I scroll in a drop down menu in Flash in Firefox (for example, I move the mouse wheel just one detent), it just continues scrolling on its own all the way to the bottom of the list and freezes all interaction for about 10 seconds.  It's really bizarre.
    If I start click and dragging things, nothing happens, and then all of the sudden everything catches up and moves.  As an experienced programmer, I can say that it looks like some kind of queuing of keyboard/mouse events with delayed execution.   Has anyone else encountered this issue?
    I found something from 2008 that sounds similar, although I am not using the sIFR they mentioned: sIFR mouse wheel scrolling freeze in Firefox - Stack Overflow
    Seems to be a Firefox-specific issue, although it also seems to be something that has just recently started occurring since updating Firefox.
    UPDATE:  I was checking my Firefox version in Help > About Firefox, and it showed version 33, but also had a pending update so I restarted Firefox.  The problem was no longer occurring at that point.  When I checked the version again, it said 33.0.2, but it also said "applying update", with another pending restart. I restarted Firefox again.  It's now stable at version 33.1.  So perhaps it was a problem with that particular version, or even a temporary issue with that running browser instance.

    Hi James,
    Thank you for sharing your solution with us. It will help other users with a similar issue.
    Thanks,
    Preran

  • Doubt in call function

    Hi,
    Call Function 'FM' starting new task task-name
    Exporting
    What does this statement does.

    Hi
    chk this out
    CALL FUNCTION STARTING NEW TASK
    Variant 2
    CALL FUNCTION func ...STARTING NEW TASK task name.
    Extras:
    1. ... DESTINATION dest
    2. ... DESTINATION IN GROUP group name
    3. ... DESTINATION IN GROUP DEFAULT
    4. ... PERFORMING form ON END OF TASK
    5. ... EXPORTING  p1 = f1    ... pn = fn
    6. ... TABLES     p1 = itab1 ... pn = itabn
    7. ... EXCEPTIONS syst_except = rc MESSAGE mess
    Effect
    Starts the function module func asynchronously in a new session. In contrast to normal function module calls, the calling program resumes processing as soon as the function module is started in the target system. It does not wait until the function module has finished. Using CALL SCREEN, the called function module can, for example, display a screen and thus interact with the user. Note that taskname must be a valid string of at least 2 characters, preferably fewer than 8 characters. You cannot use either ' ' or SPACE as tasknames.
    Notes
    Note that under certain circumstances, an RFC may cause a database commit. For this reason, do not insert an RFC between two OpenSQL statements that open and close a database cursor (such as SELECT...ENDSELECT).
    This variant applies only from R/3 Release 3.0, so both the client system and the server system must have Release 3.0 at least.
    With this variant, the called function module must also be flagged in the Function Builder as externally callable, even if it is executed locally (without the addition Destination).
    There can be no function call to the destination 'BACK' in the called function module (for more information about the destination 'BACK', see CALL FUNCTION func DESTINATION dest).
    This variant does not allow you to execute external programs that you access from a TCP/IP-type detination asynchronously. (See the Transaction Tools -> Administration, Administration -> Network -> RFC destinations for maintaining destinations).
    Neither does this variant allow you to display images such as lists or screens in a separate window during RFC communication using a SAProuter.
    From Release 4.0 onwards, you can carry out a new, stricter system load check on RFC destinations. (In RFC destination maintenance of an R/3 connection, choose Destination -> ARFC-Optionen). Before the function module is executed, the system checks that the destination has sufficient resources available. If not, the system delays execution of the function module for a given period of time. The algorithm used to determine the system load on the target machine is the same as that used for an asynchronous RFC with the DESTINATION IN GROUP addition. Note that this option is only available for target systems from Release 3.1H onwards. This procedure is active as default.
    In principle, parallel processing makes sense whenever application servers have the necessary resources. In this case, the application servers must be configured with at least 3 dialog work processes.
    A program that is run in the background and uses RFC parallel processing requires at least 1 dialog work process per application server (because parallel processing takes place in a dialog work process).
    If the instance profile parameter 'auth/rfc_authority_check' is set to 1, the system automatically performs an RFC authorization check. The authorization check refers to the relevant function group for the function module to be called. If no authorization is found, a runtime error occurs. You can check the authorization in advance with the function module AUTHORITY_CHECK_RFC. If the RFC communication takes places in one system and in the same user context (that is, the same client and User ID) the system does not perform an RFC authority check. For more information, see: RFC Authorization Concept.
    When you are using asynchronous RFC to implement parallel windows, all these windows are closed if the caller session is the only session and terminates.
    Note that asynchronous tasks that have been started are not necessarily closed when the calling program ends.
    See also RFC Logons to the Target System (Remote Logon).
    Addition 1
    ... DESTINATION dest
    Effect
    Executes the function module externally as a Remote Function Call (RFC); dest can be a literal or a variable. The R/3 System where the function module is executed depends on the specified destination. Externally callable function modules must be flagged as such in the Function Builder (of the target system).
    Note
    If the destination is not explicitly specified, the system uses the default destination 'NONE'.
    Note
    If, during a Remote Function Call, an error occurs in the target system, details of the error message are passed back to the calling system in the following system fields: SY-MSGNO, SY-MSGID, SY-MSGTY, SY-MSGV1, SY-MSGV2, SY-MSGV3, and SY-MSGV4. These fields are initialized before every RFC. If a short dump or a type X message occurs, the short text of the dump is transferred to the caller, and the contents of SY-MSGID, SY-MSGTY, SY-MSGNO, and SY-MSGV1 assigned by the system.
    In RFC-enabled function modules, no ABAP statements are allowed that would end the RFC connection (for example, either LEAVE or SUBMIT without the AND RETURN addition).
    Note
    Note that a database commit occurs at each Remote Function Call (RFC). Consequently, you cannot use Remote Function Calls between pairs of statements that open and close a database cursor (such as SELECT ... ENDSELECT).
    Addition 2
    ... DESTINATION IN GROUP group name
    Addition 3
    ... DESTINATION IN GROUP DEFAULT
    Effect
    You use this addition to perform parallel execution of function modules (asynchronous calls) on a predefined group of R/3 System application servers.
    You use addition 2 (DESTINATION IN GROUP group name) to perform parallel execution of function modules on a predefined group of application servers. To maintain the RFC groups, choose Tools -> Administration -> Administration ->Network -> RFC destinations -> RFC -> RFC groups. The application programmer is responsible for the availability of RFC groups in the production system. In this case the group name variable must be of the type RZLLITAB-CLASSNAME
    You use addition 3 (DESTINATION IN GROUP DEFAULT) to perform parallel execution of function modules (asynchronous calls) on all currently available R/3 System application servers. However, instead of this variant, you are recommended to use an RFC group with appropriate resources for parallel processing of asynchronous calls (at least for performance reasons). Please note that the addition DESTINATION IN GROUP ' ' has the same effect as the addition DESTINATION IN GROUP DEFAULT.
    When you first call a function module with these additions, the system initializes the specified RFC group (unless the group has already been explicitly identified).
    To obtain current information about resources (that is, the resources available to process function modules), you can also initialize the RFC group explicitly in the program using the function module SPBT_INITIALIZE. You must perform this action before the first function module call.
    In both cases, the system first ascertains the currently available resources (work processes) on the available application servers (either a group of servers or all servers). By checking the current system load of each application server, the system determines how many work processes are available to execute asynchronous calls.
    After ascertaining the available resources, the asynchronous call is executed to one of the
    destinations. If no resources are available at that particular time, the system executes the
    exception routine RESOURCE_FAILURE (see the addition EXCEPTIONS). In the case of
    an asynchronous function module call, this exception must be handled by the application
    program (see example).
    No resources are made available by the system if resource availability limits are exceeded:
    Notes
    To be taken into consideration for RFC parallel processing, an application server must have at least 3 free dialog processes.
    The system triggers the exception RESOURCE_FAILURE only for asynchronous RFCs with the additions DESTINATION IN GROUP group name and DESTINATION IN GROUP DEFAULT.
    At present, only one RFC group per program environment is supported for parallel execution of asynchronous calls. Using both the additions DESTINATION IN GROUP group name and DESTINATION IN GROUP DEFAULT in a program is thus not allowed.
    To find out which destination was automatically selected, call the function module SPBT_GET_PP_DESTINATION immediately after the function module call with the two additions. This returns the selected RFC destination.
    If you want to delete an application server from the list of the configured RFC group at runtime (for example, when the application server is not accessible for technical reasons), use the function module SPBT_DO_NOT_USE_SERVER.
    Addition 4
    ... PERFORMING form ON END OF TASK
    While the parameters for receiving results (that is IMPORTING and TABLES parameters) are specified directly as additions in the case of "conventional" function modules (see variant 2), these are logged in the FORM routine form when making an asynchronous call (see RECEIVE).
    Notes
    If a function module returns no result, and you are not interested in error messages that arise when executing the function module, this addition (... PERFORMING form ON END OF TASK) can be omitted.
    If you want to handle the error messages that arise when executing the asynchronous function module call, you must use this addition. Also, when receiving the results in the FORM routine (see RECEIVE), you must react accordingly to the system exceptions SYSTEM_FAILURE and COMMUNICATION_FAILURE.
    With asynchronous RFC, the task name uniquely identifies the asynchronous connection and thus the context called.
    If several asynchronous function modules are executed consecutively to the same destination, you must assign a different task name to each.
    A calling program that starts an asynchronous RFC with the PERFORMING form ON END OF TASK addition cannot switch roll areas or change to an internal mode. This is because the asynchronous function module call reply cannot be passed on to the relevant program. You can perform a roll area switch with SUBMIT or CALL TRANSACTION.
    If a calling program makes asynchronous calls, finishes, and then expects responses, it cannot receive these responses.
    To wait for the reply to a started asynchronous function module, use the WAIT command with the addition PERFORMING form ON END OF TASK. Here, WAIT must be in the same program context (mode).
    Note that executing asynchronous calls is subject to a roll area change.That is, subroutines performed to receive asynchronous calls can take place while other asynchronous calls are being made. Thus as a developer you must ensure that subroutines can be executed at any time. You must not make assumptions about the implicit processing sequence.
    Addition 5
    ... EXPORTING p1 = f1 ... pn = fn
    Effect
    Passes values of fields and field strings from the calling program to the function module. In the function module, the formal parameters are defined as import parameters.
    Addition 6
    ... TABLES p1 = itab1 ... pn = itabn
    Effect
    Passes references to internal tables.
    Addition 7
    ... EXCEPTIONS syst_except = rc MESSAGE mess
    Effect
    While any exceptions arising in the called function module are handled by the second
    addition (see the FORM subroutine RETURN_INFO), this addition can handle two special
    system exceptions, (as with function module calls with the DESTINATION addition):
    SYSTEM_FAILURE
    is triggered, if a system crash occurs on the receiving side.
    COMMUNICATION_FAILURE
    is triggered if there is a connection or communication problem.
    In both cases, you can get a description of the error with the optional ... MESSAGE messaddition
    Note
    In principle, you should always react to these two system exceptions, whether you are making an asynchronous function module call or receiving results.
    Examples
    Calling a transaction in a seperate session.
    DATA: MSG_TEXT(80) TYPE C. "Message text
    Asynchronous call to Transaction SM59 -->
    Create a new session
    CALL FUNCTION 'ABAP4_CALL_TRANSACTION' STARTING NEW TASK 'TEST'
      DESTINATION 'NONE'
      EXPORTING
          TCODE = 'SM59'
      EXCEPTIONS
        COMMUNICATION_FAILURE = 1 MESSAGE MSG_TEXT
        SYSTEM_FAILURE        = 2 MESSAGE MSG_TEXT.
      IF SY-SUBRC NE 0.
        WRITE: MSG_TEXT.
      ELSE.
        WRITE: 'O.K.'.
      ENDIF.
    Using RFC groups to parallelize function module calls(RFC parallel processing)
    TYPES: BEGIN OF TASKLIST_TYPE,
             TASKNAME(4) TYPE C, "Verwaltung der Tasks
             RFCDEST     LIKE RFCSI-RFCDEST,
          END OF TASKLIST_TYPE.
    DATA: INFO LIKE RFCSI, C,  "Message text
          JOBS TYPE I VALUE 10,  "Number of parallel jobs
          SND_JOBS TYPE I VALUE 1,  "Sent jobs
          RCV_JOBS TYPE I VALUE 1,  "Received replies
          EXCP_FLAG(1) TYPE C,  "Number of RESOURCE_FAILUREs
          TASKNAME(4) TYPE N VALUE '0001',  "Task name administration
          TASKLIST TYPE TABLE OF TASKLIST_TYPE,
          WA_TASKLIST TYPE TASKLIST_TYPE.
    DO.
      CALL FUNCTION 'RFC_SYSTEM_INFO'
           STARTING NEW TASK TASKNAME DESTINATION IN GROUP DEFAULT
           PERFORMING RETURN_INFO ON END OF TASK
           EXCEPTIONS
             COMMUNICATION_FAILURE = 1
             SYSTEM_FAILURE        = 2
             RESOURCE_FAILURE      = 3.
      CASE SY-SUBRC.
        WHEN 0.
    Administration of asynchronous tasks
            WA_TASKLIST-TASKNAME = TASKNAME.
            CLEAR WA_TASKLIST-RFCDEST.
            APPEND WA_TASKLIST TO TASKLIST.
            WRITE: /  'Started Task: ', WA_TASKLIST-TASKNAME COLOR 2.
          TASKNAME = TASKNAME + 1.
          SND_JOBS = SND_JOBS + 1.
          JOBS     = JOBS - 1.  "Number of existing jobs
          IF JOBS = 0.
            EXIT.  "Job processing finished
          ENDIF.
        WHEN 1 OR 2.
    Handling of communication and system failure
        WHEN 3.  "No resources available at present
    Receive reply to asynchronous RFC calls
          IF EXCP_FLAG = SPACE.
             EXCP_FLAG = 'X'.
    First attempt for RESOURCE_FAILURE handling
             WAIT UNTIL RCV_JOBS >= SND_JOBS UP TO '0.01' SECONDS.
          ELSE.
    Second attempt for RESOURCE_FAILURE handling
             WAIT UNTIL RCV_JOBS >= SND_JOBS UP TO '0.1' SECONDS.
          ENDIF.
          IF SY-SUBRC = 0.
            CLEAR EXCP_FLAG.  "Reset flag
          ELSE.  "No replies
            "Endless loop handling
          ENDIF.
        ENDCASE.
    ENDDO.
    Receive remaining asynchronous replies
    WAIT UNTIL RCV_JOBS >= SND_JOBS.
    LOOP AT TASKLIST INTO WA_TASKLIST.
        WRITE:/   'Received Task:', WA_TASKLIST-TASKNAME COLOR 1,
              30  'Destination: ', WA_TASKLIST-RFCDEST COLOR 1.
    ENDLOOP.
    FORM RETURN_INFO USING TASKNAME.
      RECEIVE RESULTS FROM FUNCTION 'RFC_SYSTEM_INFO'
        IMPORTING RFCSI_EXPORT = INFO
        EXCEPTIONS
          COMMUNICATION_FAILURE = 1
          SYSTEM_FAILURE        = 2.
      RCV_JOBS = RCV_JOBS + 1.  "Receiving data
        IF SY-SUBRC NE 0.
    Handling communication and system failure
       ELSE.
         READ TABLE TASKLIST WITH KEY TASKNAME = TASKNAME
                    INTO WA_TASKLIST.
         IF SY-SUBRC = 0. "Daten registrieren
           WA_TASKLIST-RFCDEST = INFO-RFCDEST.
           MODIFY TASKLIST INDEX SY-TABIX FROM WA_TASKLIST.
         ENDIF.
       ENDIF.
    ENDFORM.
    plz reward if useful

  • Select project file (to open editor), Run Script - XCode Organizer

    Hi,
    I'm new to AppleScript, but I'm trying to automate a number of login processes. I have most of my needs worked out, but there are still a couple of loose ends which will save me substantial time if I can get them running. I'm not finding documentation of such processes, so maybe I'm barking up an empty tree. Is this possible; and were can I find the necessary documentation:
    1.
    I have a Ruby project maintained in the XCode Organizer. I'm striking out on blind tries. What I need to do is equivalent to selecting a document *in the organizer*. It has to have the same effect as manually negotiating the file/directory tree, because selection of the file further enables running an Action Script in the Organizer, the name of which is "START MONGREL SERVER."
    I have opened the target document, application_controller.rb, in the conventional manner you might open a document, but this has only opened the document in a separate editor window. This doesn't suffice, because it is the selection of a project document which makes the related Action Script available for further running.
    How then might I do this?
    2.
    After this file is selected, I need to run the action script, "START MONGREL SERVER." How likewise can I do this?
    3.
    Thirdly, is it possible to wait until threads invoked by previous script statements are finished? If so, how? Otherwise, can we insert a "wait" statement of some kind to delay execution of further instructions? If so, how?
    Much thanks in advance,
    m

    Hi,
    ODP doesnt have anything built in to run sql scripts. You'd likely need to parse the script yourself and execute the commands one by one, or you could shell out and run the script via sqlplus.
    Hope it helps,
    Greg

  • Text not initialized, even though Application.creationComplete...?

    (I know OOP from Java, but am somewhat new to ActionScript.)
    I have a MXML application with this attribute:
    <mx:Application
    ...creationComplete="myMethod(...)"...>
    In the Application, I have an <mx:Text> (which sits
    inside an <mx:VBox>, which is inside an <mx:ViewStack>,
    etc.).
    When myMethod(...) is called upon creationComplete, I cannot
    get the <mx:Text> by reference: it is null! The problem: the
    container VBox.initialized is false.
    If I wait a few seconds and click a button that calls
    myMethod(...), then the VBox has had time to initialize.
    I don't know if this is a bug -- it seems that
    creationComplete shouldn't be called until all children of
    Application have been initialized. Or perhaps Flex 3 uses "lazy
    initialization"? Anyway...
    MY PROBLEM: I want to delay execution of myMethod(...) until
    the VBox is initialized.
    How to do this? In Java, I would do something like, "while
    (myText.initialized == false) try {Thread.sleep(500);}..."
    Any ideas how to wait for (or force) full initialization?

    "iamoj" <[email protected]> wrote in message
    news:g6ok6k$ekg$[email protected]..
    > (I know OOP from Java, but am somewhat new to
    ActionScript.)
    >
    > I have a MXML application with this attribute:
    > <mx:Application
    ...creationComplete="myMethod(...)"...>
    >
    > In the Application, I have an <mx:Text> (which
    sits inside an <mx:VBox>,
    > which is inside an <mx:ViewStack>, etc.).
    >
    > When myMethod(...) is called upon creationComplete, I
    cannot get the
    > <mx:Text>
    > by reference: it is null! The problem: the container
    VBox.initialized is
    > false.
    >
    > If I wait a few seconds and click a button that calls
    myMethod(...), then
    > the
    > VBox has had time to initialize.
    >
    > I don't know if this is a bug -- it seems that
    creationComplete shouldn't
    > be
    > called until all children of Application have been
    initialized. Or perhaps
    > Flex
    > 3 uses "lazy initialization"? Anyway...
    >
    > MY PROBLEM: I want to delay execution of myMethod(...)
    until the VBox is
    > initialized.
    >
    > How to do this? In Java, I would do something like,
    "while
    > (myText.initialized
    > == false) try {Thread.sleep(500);}..."
    >
    > Any ideas how to wait for (or force) full
    initialization?
    >
    You could call the method on creationComplete of the VBox...
    Or, depending on what is going on, you may need to override
    commitProperties
    or updateDisplayList and call it in one of those places.
    HTH;
    Amy

  • Repost: Use Page-scope expressions in Value expressions

    Dear Adam Winer and expert group,
    I woud like to repost my problem. I had posted this in an earlier thread today. The issue that I would
    like to raise is regarding being able to use page-scoped beans in value expressions. I am trying to
    port some screens from Struts to JSF. Struts allows you to assign page-scoped beans to its input
    components. Adam Winer, you have been very helpful to me. I hope this issue can be solved.
    Thanks,
    Ajay
    Dear Adam Winer,
    I must admit that I am not able to understand your post properly. It is certainly because I have not
    properly understood the JSF architecture properly as yet.
    JSF automatically shows model bean values in the browser, and takes user input back into the model bean.
    But it would be nice to have the following scenario to work out....
    1. The JSP assigns the (initial) value to the JSF component.
    2. This value is displayed in the browser.
    3. When the user submits the form, the value goes to the model bean.
    Your post seems to indicate that the above is not possible. Could there not be any architectural
    workaround to make this possible ?
    Your post also seems to indicate that it is not possible to use an action from within a <c:forEach>.
    The following could also be perhaps ok (if it doesnt cause some other problem).
    <h:input_text initValue="#{pageScopeBean.someValue}" value="#{someBean.someValue}"><f:parameter initValue="#{status.count}" value="#{DataTable.selectedIndex}" />
    Perhaps, the expert team can come up with some brilliant solution. I am really keen.
    Ajay
    P.S ("Delayed execution", "Immediate execution", "does not exist on subsequent requests" are presently
    Greek and Latin to me.)
    No, that's not really possible, and it's not because
    we didn't try!
    "#{}" syntax means "evaluate this later". It has to
    mean that, for lots of reasons, including the need to
    evaluate these values on subsequent requests, and to
    evaluate these values repeatedly when a repeater
    component (like data_table) renders its output.
    Obviously, pageScope.status.count won't exist on
    subsequent requests, so that bit is hopeless. But it
    won't necessarily even work in the middle of the page,
    because there's no guarantee that the value of that
    <f:parameter> will only be used during the execution
    of <c:forEach>.
    We'd considered adding support for both delayed
    execution - "#{}" - and immediate execution - "${}" on
    JSF attributes, which would enable an example like
    this, but decided not to, for two reasons. First, it
    would be very confusing. Second, it actually opened a
    small security hole to do so that can't be solved
    without changes to the JSP EL architecture.
    -- Adam Winer (EG member)

    Dear Adam Winer,
    I read your post again and understood what you mean by "delayed execution" and "immediate execution".
    I am sorry, I think I read your post too quickly and hence didnt compherehend it.
    Please let me know if you think an alternative syntax such as
    <h:input_text initValue="#{pageScopeBean.someValue}" value="#{myBean.someValue}"/>Perhaps, this is not so different from the "#{}" and "${}" syntax that was discussed in the expert group.
    I am trying to imagine why a security loop-hole could be caused. If Struts doesnt have any problem
    getting values from a page-scoped bean, why does JSF have the problem ?
    Thanks for your help.
    Ajay
    We'd considered adding support for both delayed
    execution - "#{}" - and immediate execution - "${}" on
    JSF attributes, which would enable an example like
    this, but decided not to, for two reasons. First, it
    would be very confusing. Second, it actually opened a
    small security hole to do so that can't be solved
    without changes to the JSP EL architecture.

  • OCM, the Balanced Scorecard, and Fostering Collaboration

    Many organizations try to implement a management methodology, like the Balanced Scorecard, in order to improve performance and meet the shifting needs of the marketplace.
    When developing a scorecard, the organization identifies what it believes are the key performance indicators that are driving the business. And while it is easy enough to formulate a plan with shared goals and teamwork, realizing and executing on that plan can be more challenging.
    During every step of this process, from communicating the goals, to identifying KPIs, to executing on the strategy, requires attention to change management.
    How does an organization move toward a unified set of objectives when that means getting collaboration between departments and functions that typically compete for attention, turf, and resources?
    Do you have any examples of how Organizational Change Management was effectively used to better the cooperation and interaction between departments? Were there any good lessons learned?
    Bob

    Hi Bob,
    We have used the "Portfolio" approach effectively to address the competing needs of various departmernts,functions.
    A portfolio of the plans / initiatives under progress with the details in terms of money,Time etc is drawn and discussed in the workshop of the stake holders.The dependencies are also identified and discussed in detail.This is signed-off.
    Based on the above it is easy to draw a heat map in terms of sensitivity and significance.This largely helps in bringing under control the competing departments etc.
    If still the problem exists or in case of a tie,we can apply other constraints like money-cost of capital-,pay back period,skill set requirement, higher ROI relevant to a particular plan etc.
    If we apply the yard stick logically in terms of the "value creation",the job of change management  is half done.
    In practice i have seen the delayed execution of the plans,the quality problems,the delayed collection of cash,bad relationship with the client really upset our plan.There should be a good governance in these areas.In a portfolio of "Resource constrained projects" the above will have a telling effect.
    Lesson learned:
    The Managers who fight for priority on logical reasoning in fact do good to the firm.They bring in the scenarios -often real time-and potray the effect.On the other hand the pliable Managers accept to every thing resulting in to missed oppurtunities, abnormal idleness in terms of idle time,idle resources,thus allow changes to happen at a very high price.In the process they inflict an irreversible damage.
    Often the "good will" considerations prevail,meaning,even if the project is ranked last in the portfolio,if the customer is powerful or is potentially important from a future point of view,then these low ranked projects pierce thro' the filter at the cost of the  "good ones" to the detriment of the organization.The significant side effect is,the performing departments get demoralized,frustrated with the poor allocation of the resources,delay etc.This sets a domino,which may threaten the very "business continuity".Resource buffering is essential to counter these.
    In Change Management "For every Prize,there is a Price".This has to be examined from the value perspective.otherwise we are lost.
    My 0.1%.
    Reagrds.
    Ramesh
    Edited by: Ramesh Ramaswamy on Jul 28, 2008 1:49 PM

Maybe you are looking for