Syntax
To check a file into an object, you must first have Checkin privileges. If you do, you can check in the file using the
As an example of using the Checkin Businessobject command, assume you have written procedures for assembling and disassembling a telephone. You now want to associate these procedures with the telephone object. To do that, you might write a command similar to:
In this example, it is assumed that the default format is for document files. If a default format is some other format, you would need to modify the above command to include the Format clause. Assume that the two files are standard ASCII text files. Since that is not the default format, the above command would have to be modified as:
If someone wants to access the files, the associated format will define the commands used to view, edit, and print the files. Although the format identifies how the files are to be accessed, it does not necessarily mean that access is permitted. Access is controlled by the policy. Also, editing access can be controlled by the use of exclusive editing locks (for more information, see MQL Concepts: Locking and Unlocking a Business Object). Checkin PerformanceThe first MQL checkin after a machine restart, or when the OS file cache has been invalidated, could take some time because of the need to load JVM jars and DLL files. You can prevent this behavior by keeping the necessary files loaded into the OS file cache by periodically launching a small MQL command that executes a JPO in the background. To accomplish this, follow these steps:
There are several possible ways to launch mqljvminit.js:
Unlock Clause
When an object first has files checked in, it is probably not locked. However, when files are later checked out to be updated, the object should be locked to prevent other users from editing the file’s contents. Checking in the file has the effect of updating the database with the latest version of the file. But typically, the object owner will want to maintain editing control over the file. For example, the owner could be editing a CAD file and the file is still undergoing changes. If the owner checks in the file, others can monitor the process even though they cannot make changes. After the edit is complete the owner would remove the lock. The owner would include the Unlock clause in the Checkin command. Alternatively, if access permitted, the lock could be removed with the
If locking is enforced in the object’s policy, the checkin will fail if:
When an object is locked, no files can be checked in to the object. This means that attempts to open for edit, as well as checkin, will fail. Files can be checked out of a locked object, and also opened for view. This behavior ensures that one user is not overwriting changes made by another. Client and Server Clauses
The
The default file location for checkin from the Web is the Collaboration Server. Programmers can specify
would look for the file text.txt on the server, while the following would look for it on the client:
The
yields the same results as:
Append ClauseUse the
Without the
Be aware that when you use the Append clause to check in a file, and the business object already contains a file of the same name, the file is overwritten without a prompt for verification. Store Clause
The
|