In 4th Dimension, a process is a single instance of the 4th Dimension environment. 4th Dimension is multi-process capable, therefore it is possible to have multiple instances of the 4th Dimension environment running concurrently, each performing a single task. Therefore, processes are the mechanism through which 4th Dimension is capable of performing multiple tasks concurrently, or multi-tasking.
When you launch a program, your computer creates a space in memory in which it will create the work environment that is that program. For example, some of the elements of the MS Word environment are:
As with any other program, 4th Dimension has its own characteristic elements that make up the 4Th Dimension environment. Those elements include (but not limited to):
By default, when you launch 4D, a single process is automatically created (called the User/Runtime process) that is comprised of some or all these elements, giving you one instance of the 4th Dimension environment.
However 4th Dimension provides the ability to create multiple instances of the 4Th Dimension environment, each running as its own process. Each process may have its own:
4Th Dimension's ability to support multiple processes makes it possible to do many things. For example, you can have multiple windows opened, each belonging to its own process with it's own menus, current selections of records, current record, and/methods executing. In other words, 4th Dimensions multi-process capability makes it possible for 4th Dimension to do multi-tasking.
Suppose you wanted to be able to enter records and export a selection of records at the same time. In this case, one process could display the window and form for data entry, while another process could run in the background, with no window of its own, exporting records or running a report.
Or, suppose you wanted to view and compare different selections of records, each resulting from its own search. In this case each process would run its own search, resulting in its own selection of records. These selections of records would then be displayed in their own windows, allowing you to compare the lists of records or single records side by side.
Again, a useful way to think of processes is as a work space. In fact, think of a process as a room in which a task is being performed. Lets say we have two such rooms, and each room has its own instances of the elements that comprise a room: 4 walls, a floor, a ceiling, a door, desks, chairs, computers, people working, and its own independent task. Now, sometimes the task in room B would need to be altered based upon a condition room A. In such a case, room A would have to have a way of communicating a value in a message to be read in room B. Of course, the rooms mentioned here are a metaphor for processes, and the mechanism for passing values between processes are a class of variables known as inter-process variables (see the web page on variables). So, inter-process variables provide a means for inter-process communications.
For example, suppose you have an export running in process 2, but if necessary, you want to be able to abort that export. In process 1 you might display a form with a Stop button. If the user clicks on that button, a value might be put into an inter-process variable, which when read by process 2, causes process 2 to abort executing the export.
Tech Tip: What are processes and why would you use them?
This tech tip explains the concept of processes and their use.
4D Design Reference (PDF)
Pages 611- 628: These pages cover the concept of processes, the uses of processes, the ways of creating processes, process attributes, 4D's built in tools for monitoring processes, controlling processes, and managing processes.
Processes
Introduces the concept of Processes, covering the following topics: Creating and clearing processes, Elements of a process, User processes, Processes created by 4th Dimension, Local and global processes, Record locking between processes.
Commands and Topics for Processes
These pages cover commands used for creating and working with processes.
Commands and Topics for Process (Communications)
These pages cover commands used for handling communications between processes.
Commands and Topics for Process (User Interface)
These pages cover commands used for handling the user interface when working with processes.
4D v 6.8 Getting Started
Pages 363-400: These pages cover the following topics concerning Processes:
The concept of processes, Creating processes, Variables and processes, Synchronous vs. Asynchronous operations, Interprocess communications.