4D v13.4Process page |
||
|
4D v13.4
Process page
Process page
On the Process page you can graphically view the CPU time consumed as well as various other information for each process created in the database. You can show or hide the graphical display of each process by clicking on the expansion icon to the left of the process’s name. There are also several tools available for the processes. For more information about processes in 4D, refer to the Processes section in the 4D Language Reference manual. Note for 4D Server: The Process page of the Runtime Explorer on a 4D client controls the processes of this 4D client. The Processes Page of the administration window of 4D Server controls all the processes of all the client machines connected to the server. For each process, the page provides the following information:
Each process has a unique number (in parentheses) which corresponds to the order it was created during the session underway. When the application is started, the first numbers are assigned to the processes created automatically by 4D (their number will vary according to the servers executed on startup). When you start your own process, it either appears as the next process in sequence or takes the place of a process that has been aborted. For example, suppose processes 7 and 8 are executing. If process 7 is aborted, the next process to be started becomes process 7. Note: Processes are automatically aborted upon completion. You can abort a process before it has completed using the Runtime Explorer. For more information about aborting a process, see Aborting a process. If you start a new process using New process or Execute on server, you can specify its name as a parameter to the function. The name specified in the parameter appears as the process name in the list of processes. If you do not specify a process name using a command, 4D automatically assigns the process a default name. Default names are based on the method used to start the process, as follows:
Note for 4D Server: If the name of a process begins with a dollar sign ($), it is a local process that does not have access to tables or 4D Server (see Global and Local Processes). The status of a process is the current state of its execution — what the process is actually doing. In the Runtime Explorer, the status of the process is indicated by the icon located to the left of the process name and by the text located next to the process name. The following is an explanation of each status that can appear in the Runtime Explorer window:
In managing processes, 4D divides processing time among existing processes so that no single process is executing at every moment. Thus, the process time is the total amount of execution time a process has taken (in seconds) since it started executing. Note that the process time does not reflect the total amount of time that has elapsed since the process started executing since, in reality, execution alternates between all open processes. The Runtime Explorer displays the processing time for each process. If you expand the process graph, it displays the following information: You can modify the frequency at which data should be updated —which can be every one, two, or three seconds. To do so, choose a value from the “Update frequency” menu found at the bottom of the window. The greater the update time is, the more CPU time is consumed by the Runtime Explorer process. The number of processes to graphically represent on screen also influences the CPU time consumed by the process. Note: No CPU time is consumed for a process when its graphical representation is closed. When you click in the graphical area, a vertical line appears where you clicked and a tip indicates the state of the process at that instant. By holding down the mouse button and moving it from side to side, you can view the changes in the status of the process. The Runtime Explorer allows you to control the execution of processes by pausing, resuming, or aborting a process. You can also choose to run a process in debug mode. Lastly, you can hide and redisplay its windows at any time. These operations are covered in detail in the sections below. Note: You can also delay a process for a specific period of time. For more information about delaying a process, refer to the 4D Language Reference manual. You can temporarily suspend the execution of a process by pausing it. You may want to pause a process to give other processes more execution time or to allow an event upon which the process depends to occur. For instance, suppose you start a process that prints a selection of records. You then realize that you want to modify the data in one of the records so you first pause the process, finish your modifications, and then resume the process to continue printing the records.
A process is automatically aborted upon completion. However, you may need to abort a process before it completes for debugging purposes. Processes should not be aborted for any other reason. To stop the process from continuing execution, you abort the process in the Runtime Explorer. When a process is aborted, 4D frees any locked records, cancels any transactions opened by the process but not yet validated or canceled, and frees the current selection and current record. To abort a process, select it and click the Abort button . The status of the process in the Runtime Explorer automatically changes to “aborted.” You can debug a process by monitoring its execution in the 4D debugger. To debug a process, select it and click the Trace button . If the process is being executed, the 4D Debug window appears, allowing you to debug the process by stepping through its execution and evaluating expressions such as the values of fields and variables used in the method. If the process was paused, 4D “stores” the request and displays the Debug window as soon as the execution of the process resumes. For information about using the Debug window, refer to the 4D Language Reference manual. You cannot debug the internal processes created and managed by 4D. You can make a process invisible in the Application environment by hiding it. When a process is hidden, any windows or menus created by the process are invisible to the user while it is executing. Hiding a process is useful for operations in which you open a window which you later want to close. Instead of aborting the process to close the window, you can make the window invisible to the user by hiding the process that opened it. Even though the window is hidden, the process continues to execute and complete the operation it began. To hide a process, select it and choose the Hide command in the options menu: The process is now hidden from view in the Application environment. Note that it continues to execute even though it is hidden. To display a process again, select the Show command in the options menu. The process is displayed again in the Application environment. You can make a window the frontmost window by bringing its process to the front. For instance, if the Application process is brought to the front, the Application environment is brought to the front of the screen. You can bring any user processes to the front. If you have created a window for a process, the window becomes the frontmost window on the screen. If a menu bar is attached to the window, 4D brings the menu bar to the front of the screen and makes its menus the current menus. The current menu bar is replaced by the menu bar of the process that is brought to the front. To bring a process to the front, select it and choose the Bring to Front command in the options menu: Any windows attached to the process are brought to the front of the screen. In addition, 4D displays the menu bar for the frontmost process window. |
PROPERTIES
Product: 4D |