Process and Activity rules
These rules apply when acquiring or accessing an activity or a process.
-
A program can acquire only one activity within the same unit of
work. The activity remains acquired until the next sync point. This
means, for example, that a program:
- Cannot issue both a DEFINE PROCESS and an ACQUIRE PROCESS command within the same unit of work.
- Cannot issue both an ACQUIRE PROCESS and an ACQUIRE ACTIVITYID command within the same unit of work. That is, it can acquire either a descendant activity or a root activity, not one of each.
-
If a program is executing as an activation of an activity, it
cannot:
- Acquire an activity in the same process as itself. It cannot, for example, issue ACQUIRE PROCESS for the current process.
- Use a LINK command to activate the activity that it has acquired.
-
A process of an acquired activity is accessible in the same way
as the activity itself can access it. Thus, if the acquired activity
is a descendant activity:
- The containers of the process might be read but not updated.
- The process might not be the subject of any command - such as RUN, LINK, SUSPEND, RESUME, or RESET - that directly manipulates the process or its root activity.
- The containers of the process might be both read and updated.
- The process might be the subject of commands such as RUN, LINK, SUSPEND, RESUME, or RESET. The ACQPROCESS keyword on the command identifies the subject process as the one the program that issues the command has acquired in the current unit of work.