A revision represents
the executable code of a module. A module might contain zero or more
revisions. More than one revision of a given module can be executed
concurrently by different callers, or at different times by the same
caller. Passing in zero for a revision number gets the latest revision
of the specified module.
For example, caller
A might rely on specific behavior in revision 3 of module X. You might
set up caller B to always use the latest version of module X. To
execute the desired code, caller A would specify the ID of module
X and revision 3:
revision = 3;
rc = tk.execute(userCtx, moduleX, revision, methodName, args);
Caller B would specify
the same module ID and revision zero:
revision = 0;
rc = tk.execute(userCtx, moduleX, revision, methodName, args);
Revision numbers are
monotonically increasing values starting at 1. Revisions can be created
and deleted. However, revision numbers are never reused. This behavior
prevents the code of a revision from unexpectedly changing out from
under a caller. Once a revision has been deleted, attempts to execute
or query that revision receive a result code indicating the revision
was not found.