Creating or modifying methods

The executable invoked by the method can be stored in an external file or as content of the method object. All other programs, except Java programs, are stored on the Content Server file system or in the repository as the content of the method object.

If the program is a Java method and you want to execute it using the Java method server, install the method on host file system of the application server. Only the application server instance installed during Content Server installation can execute Java methods. Do not store the program in the repository as the content of the method object.

Creating methods requires superuser privileges.

To create or modify a method:

  1. Connect to the repository where you want to create the method and navigate to Administration > Job Management > Methods.

    The Methods list page displays.

  2. Do one of the following:

    • To create a new method, select File > New > Method.

      The Info tab on the New Method page displays. You must have superuser privileges to create a method.

    • To modify a method, select the method and then select View > Properties > Info.

      The Info tab on the Method Properties page displays.

    • To edit the method content, refer to Editing method content.

  3. Enter or modify the method information as described in Table 7.11 and the optional Table 7.12.

  4. Click OK to save your changes.

If you want to store the program as the content of the method object, you must import the content after the method is created, as described in Importing method content.

Table 7.11. Method Info tab properties

Field label

Description

Name

The method name.

Do not use the format dm_methodname to name the method. This naming convention is reserved for default Documentum objects.

Verb

The method verb, including arguments.

The method verb is the command-line name of the procedure or the name of the interpretive language that executes the program file.

You can specify a full path, a relative path, or no path for the method verb. If you do not specify a path, the server searches the directories in the search path of the user.

To store the program as the content of the method object, you must import the content after you created the method, as described in Importing method content.

Method Type

Specifies the programming language of the method. Valid values are:

  • dmbasic: The method is written in Docbasic.

  • dmawk: The method is written in dmawk.

  • java: The method is written is Java and executed on the Java Method Server.

  • program: The method is writing in a programming language, such as C or C++.

If the method is executed using Content Server or the dmbasic method server, and the executable is stored as content for the method, setting the method type to dmawk or dmbasic, directs the server to add -f in front of the filename. The server passs all arguments specified on the DO_METHOD command line to the program.

Arguments

Specifies method arguments. Click Edit to add arguments.

Method Success Codes

Specifies method success codes. Click Edit to add success codes.

Method Success Status

Specifies the valid value for current status in the completed job. If this option is selected, the current status property value of the job must match the success status value after the job completes. The property is ignored if the option is not selected.

Timeout Minimum

The minimum timeout that can be specified on the command line for this procedure. The minimum timeout value cannot be greater than the default value specified in the timeout default field.

Timeout Default

The default timeout value for the procedure. The system uses the default timeout value if no other time-out is specified on the command line.

The default timeout value is 60 seconds and cannot be greater than the value specified in the timeout maximum field.

Timeout Maximum

The maximum timeout that can be specified on the command line for this procedure. The default is 300 seconds.

Launch Direct

Specifies whether the program is executed by the system call or exec API call. When the launch direct option is selected, the server uses the exec call to execute the procedure. In this case, the method verb must be a fully qualified path name.

Launch Asynchronously

Specifies whether the server runs the method asynchronously or not.

If this option is selected and the method is launched on the application server, setting SAVE_RESPONSE on to TRUE on the command line is ignored.

If this option is select and the method is launched on the method server or Content Server and SAVE_RESULTS is set to TRUE on the command line, the method is always launched synchronously.

Run As Owner

Specifies whether to run method to run as the installation owner account, with the privileges of the installation owner. If this option is not selected, the method runs with the privileges of the method user.

This option must be selected to execute a method on the method server or application server.

Trace Launch

Specifies whether to save internal trace messages generated by the method to the session log.

Use Method Server

Specifies whether to use the dmbasic method server or Java method server to execute a dmbasic or Java method.

Restartable

Specifies whether the method can be restarted, if the Java Method Server (JMS) crashes or fails to respond.

This option is only available for non-system Java methods.

Failover Awareness

Specifies whether the method is enabled for failover, if the server is associated with more than one Java Method Server.

This option can only be configure for non-system Java methods.

Table 7.12. SysObject Info tab properties

Field label

Description

Title

A descriptive title for the method.

Subject

A subject associated with the method.

Keywords

One or more keywords that describe the method. Click Edit to add keywords.

Authors

One or more method authors. Click Edit to add authors.

Owner Name

The name of the method owner. Click Edit to select a different owner.

Version Label

The current version label of the method. Click Edit to change the version label.

Checkout Date

The date when the method was checked out last.

Checked Out by

The name of the user who checked out the method.

Created

The date and time when the method was created.

Creator Name

The name of the user who created the method.

Modified

The date and time when the method was last modified.

Modified By

The name of the user who last modified the method.

Accessed

The time and date when the method was last accessed.