• No results found

Assigning and Managing Permissions

In document webMethods Developer Users Guide 65 (Page 93-110)

When you lock an element, Developer obtains and locks the latest version of the element that has been saved on the webMethods Integration Server.

Elements generated by a service (including an adapter service) are not locked automatically.

C H A P T E R 4 L o c k i n g a n d U n l o c k i n g E l e m e n t s

When you select multiple elements to lock, some elements in the selection may not be available to lock because they may be system locked, locked by another user, elements to which you do not have Write access, or elements that cannot directly be locked. Developer will notify you that these elements cannot be locked and will lock the rest. When you lock an adapter notification, Developer also locks its associated

publishable document type. You cannot directly lock the publishable document type associated with an adapter notification.

When you lock a folder or package, you only lock existing, unlocked elements within it. Other users can still create new elements in that folder or package.

When you lock a Java or C/C++ service, Developer locks all other Java or C/C++ services within the folder. For details, see “Locking Java and C/C++ Services” on page 94.

You cannot lock a listener or connection element.

1 In the Navigation panel, select the elements that you want to lock.

2 On the File menu, click Lock for Edit.

If the elements were successfully locked, a green check mark appears next to their icons in the Navigation panel. If one or more of the elements could not be locked (for example, if they are system locked, locked by another user, or elements to which you do not have Write access), Developer displays a dialog box listing them. For

information about troubleshooting lock problems, see “Lock/Unlock Problems” on page 103.

Locking Java and C/C++ Services

When you lock Java and C/C++ services, there are special considerations to keep in mind.

Locking and unlocking actions on Java and C/C++ services are folder-wide. All Java and C/C++

services in a folder share the same .java and .class files on the Integration Server.

Note: Users cannot create Java and C/C++ services in a folder or package while other

users own the lock on the folder or package. These types of services require that all existing Java and C/C++ services in the folder are unlocked and the user has Write access to all Java and C/C++ services in the folder. For details, see “Locking Java and C/C++ Services” on page 94.

To lock elements

Tip! You can also lock an element that is open in the editor by right-clicking the element’s

Locking Elements

These files, located in the \code subdirectory of a package, correspond to all services (except flow services) in a folder. Therefore, when you lock a Java/C service, all Java/C services in that folder are locked.

For example, if you lock a Java service in a folder A, all Java and C/C++ services in folder A are locked by you. Similarly, if another user has locked a Java service in folder B, you cannot add, edit, move, or delete any Java or C/C++ services in folder B.

Locking actions on Java and C/C++ services are ACL dependent. If you want to lock one or

more Java or C/C++ services within a folder, you must have Write access to all Java and C/C++ services in that folder. This is because Java and C/C++ services within a folder share the same .java and .class files.

The jcode development environment operates independently of locking. If you use jcode to

develop Java services, you do not have the locking functionality that is available in the Integration Server. When you use jcode, you may compile a service that is locked by another user, overwriting that user’s changes to the service. Therefore, if you use jcode, do not use the locking features in the Integration Server.

Before you save a Java or C/C++ service, multiple corresponding files must be writable on the server. A single Java or C/C++ service corresponds to the following files:

.java .class .ndf

.frag (may not be present)

Before you save a Java or C/C++ service, all of the preceding files must be writable. Therefore, make sure that all system locks are removed from those files before saving. If you use a third-party source control application, make sure that those files are open for editing in the source control application.

Locking Templates

A template can be used with one or more services on the Integration Server. Currently, you cannot lock a template as an entity, only the service to which it is attached. Following are considerations for working with templates in a cooperative development

environment.

To create or edit a template for a service, you must have the service locked.

The template for a service can change without your knowledge. Since a template can be

attached to one or more services, keep in mind that a shared template can change without your knowledge. For example, if your template is attached to a service that another user locks and edits, that user can change your template.

C H A P T E R 4 L o c k i n g a n d U n l o c k i n g E l e m e n t s

System Locking Elements

If you are a server administrator, you can system lock an element by making its corresponding server files read-only. If you do not know the names of the files that correspond to a particular element, use the Lock Status command. For details, see

“Viewing an Element’s Corresponding Server Files” on page 102.

Typically, elements become system locked when you check them into a third-party source control application. Usually, a system lock is not reflected in webMethods Developer or the Integration Server Administrator until you reload the package in which the element resides.

Viewing the Status of Locked Elements

The lock status of an element tells you if an element is available for locking, and if not, who owns the lock and when they locked it. You can view the status of a locked element to see who owns the lock or you can view a list of all elements for which you own the lock. When viewing an element’s lock status, keep the following points in mind:

If the element has been system locked since you last reloaded the package, Developer will not show the system lock status in the Locking Status dialog box until you reload the package.

When another user unlocks an element, you must refresh the Navigation panel to reflect the updated status. Similarly, when the server administrator removes a system lock from an element, you must reload the package in which the element resides to reflect the updated status.

1 In the Navigation panel, select the element for which you want to view the status.

2 On the File menu, click Lock Status. The following dialog box appears if the element is locked by someone else. A similar dialog appears if the element is system locked or locked by you.

Important! Before you system lock an element, always verify that it is not locked by a user

on the Integration Server. If an element becomes system locked while a user is editing it, the user will not know until he or she tries to save changes to the element. If this occurs, make the element’s corresponding files writable on the server. After this is done, the user can save his or her changes to the element.

Locking Elements

Locking Status dialog box

On the Tools menu, click My Locked Elements. The My Locked Elements dialog box appears.

My Locked Elements dialog box

You can unlock individual elements from this dialog box by pressing the CTRL key as you click each element and then clicking Unlock. You can unlock all elements by clicking Unlock

All. For more information about unlocking elements, see “Unlocking Elements” on page 98.

Copying, Moving, or Deleting Locked Elements

You can copy a locked element to another folder or package. However, you cannot move, rename, or delete an element unless it is locked by you or unlocked.

C H A P T E R 4 L o c k i n g a n d U n l o c k i n g E l e m e n t s

Unlocking Elements

After you edit an element and save changes to the server, you should unlock it to make it available to other users. There are several ways to unlock elements, depending on whether you are a member of the Developers ACL or the Administrators ACL. If you are a developer, you can unlock elements in Developer. If you are an administrator, you can unlock elements in the Integration Server Administrator as well as in Developer.

Unlocking Elements Using Developer

You must explicitly unlock elements. Disconnecting from the server does not unlock your element(s), since your locks are maintained from session to session.

When unlocking elements, keep the following points in mind:

When you unlock a single Java or C service, Developer unlocks all other Java or C services within the folder. For details, see “Locking Java and C/C++ Services” on page 94.

If a Java or C service in a folder has unsaved changes, you will not be able to unlock other Java or C services within that folder. Save the changes and then unlock the services.

When you unlock an adapter notification, Developer also unlocks its associated publishable document type. You cannot directly unlock the publishable document type associated with an adapter notification.

You cannot unlock a listener or connection element.

.

1 In the Navigation panel, select the elements that you want to unlock.

2 On the File menu, click Unlock.

3 If the elements you want to unlock contain unsaved changes, Developer alerts you that the elements cannot be unlocked until you save the changes. Click OK to close the alert dialog box. Then, save the changes and repeat the unlock action.

4 If one of the elements you selected to unlock is a publishable document type associated with an adapter notification, and you did not also select the adapter notification, Developer alerts you that the elements cannot be unlocked. Click OK to close the alert dialog box. Then, reselect the elements (including the appropriate adapter notifications) and repeat the unlock action.

The Navigation panel refreshes and the green check mark next to the element disappears.

To unlock elements using Developer

Unlocking Elements

Unlocking an Element Using the Integration Server

Administrator

1 In the Integration Server Administrator, under Packages, click Management.

2 Click View Locked Elements. The following screen appears, showing all elements that have user locks and system locks.

Locked Elements screen

3 Click Unlock Elements. The following screen appears.

Tip! You can also unlock elements using the following techniques:

- To unlock an element that is open in the editor, right-click the element’s tab or title bar and then click Unlock.

- To unlock all elements to which you own the lock, use the ToolsMy Locked Elements command.

Important! Be cautious when you remove user locks to prevent a user from losing changes.

If you unlock an element while a user is editing it, the user will not know until he or she tries to save changes to the element and the action fails. Always confirm with the user before removing his or her lock on an element.

To unlock an element using the Integration Server Administrator

“localhost” means the machine on which the server is running

C H A P T E R 4 L o c k i n g a n d U n l o c k i n g E l e m e n t s

Unlock Selected Elements screen

Locked by System. Lists elements whose corresponding files are marked read-only

on the server file system. You cannot remove a system lock via the Server Administrator. On the server’s file system, you must make the element’s files writable and reload the package. For details, see “Unlocking a System Locked Element” on page 101.

Locked by Current User. Lists elements that are locked by you, the server

administrator (or the username with which you logged on to the Integration Server Administrator). Before you unlock an item, make sure that you have saved all changes to the server.

Locked by Other Users. Lists elements that are locked by other users on the server.

Before you remove a user’s lock, make sure that the user has saved all changes to the server. If not, the user will lose all changes that they made to the element since they last saved it to the server.

4 Select the elements that you want to unlock (after informing users if necessary) and click Unlock Selected Elements.

Developers using webMethods Developer should refresh their Navigation panel to update their view of the lock status of all elements.

Important! If you receive a “failed to unlock” message, it means that the server files for a

locked element were deleted from the server. Use the Sync to Name Space command to update the Integration Server Administrator’s view of locked elements.

Unlocking Elements

Unlocking a System Locked Element

If you are a server administrator, you can remove a system lock from an element using the server’s file system. After you remove the system lock, you must reload the package in which the element resides to reflect the element’s updated status. If you use Developer, you must refresh the Navigation panel (after the package is reloaded) to reflect the element’s updated status.

If you use a third-party source control application: Removing a system lock from an element

may cause a conflict, since many source control applications make files read-only after they have been checked in to an archive. Verify that the file properties are appropriate in the source control application before you remove a system lock.

1 If you do not know the names of the server files that correspond to the element, use the Lock Status command in Developer. For details, see “Viewing an Element’s Corresponding Server Files” on page 102.

2 On the server’s file system, remove the read-only properties from the files that correspond to the element to make the files writable.

3 Reload the package on the Integration Server that contains the element. The updated status is reflected in the Integration Server Administrator. Refresh the Navigation panel in Developer to view the updated status.

To remove a system lock from an element

Important! If you accidentally applied a system lock to an element that was already locked

by another user, remove the system lock but DO NOT have the user reload the package in webMethods Developer. (Reloading the package in Developer will discard their edits.) The user can then save the element without losing the changes he or she made to it while you had the element system-locked.

C H A P T E R 4 L o c k i n g a n d U n l o c k i n g E l e m e n t s

Viewing an Element’s Corresponding Server Files

You can view the names of the server files associated with every webMethods element. This is convenient when an element is system locked and you need to convey the element’s file names to the server administrator.

1 In the Navigation panel, select the elements for which you want to view the server file names.

2 On the File menu, click Lock Status.

The following dialog box shows the server files associated with a flow service named ApplyCreditMemo. These server files are system locked (that is, they are not writable on the server).

Viewing server files for element ‘ApplyCreditMemo’

Automatically Unlocking Elements After Saving

You can choose to automatically unlock flow services, IS document types, and

specifications after you save changes to them. This prevents you from forgetting to unlock them; however, it may not be the best option if you save periodically while editing an element.

1 On the Tools menu, click Options. The Options dialog box appears.

2 Click General.

3 Under Navigation Panel, select the Automatically unlock upon save check box.

4 Click OK.

To view server files for an element

Note: After a server administrator removes a system lock from an element, you must

reload the package in which the element resides to reflect the unlocked status.

To

Troubleshooting

Troubleshooting

This section addresses common problems that may arise when implementing cooperative development with webMethods components.

Lock/Unlock Problems

The Lock for Edit and Unlock commands are disabled.

Possible causes are:

The Integration Server to which you are connected may have the

watt.server.ns.lockingMode property configured to “no locking” or “system locking only.” For details, contact your server administrator.

You have selected multiple elements to lock or unlock and your selection contains of one or more of the following:

A server

A folder or package and its contents A package and any other element An adapter notification record

When I try to lock an element, I get an exception message.

The element may be locked by someone else, system-locked (marked read-only on the server), or you may not have Write access. Refresh the Navigation panel. If a lock is not shown but you still cannot lock the element, reload the package. In addition, make sure that you are a member of the ACL assigned for Write access to the element by checking the element’s Permissions property in the Properties panel.

I can’t unlock a Java or C service.

If there is another Java or C service that is locked by another user or system locked in the same folder, then you cannot unlock any Java or C services in that folder. This is because those services share the same .java and .class files on the Integration Server.

I can’t unlock elements since I changed my username.

You can only unlock elements that you have locked with your current username for the session. If you have changed usernames, log back in to the server with your old username and then unlock the elements.

If the administrator has deleted your username, contact him or her to unlock the elements on the server. You can assist the administrator by using the Lock Status command to identify the names of the system-locked files on the server that need to be unlocked.

Another user unlocked an element, but it still shows as locked in my Navigation panel.

If it is a Java or C service, reload the package in the Navigation panel. If it is any other element, use the Refresh command to refresh the Navigation panel.

C H A P T E R 4 L o c k i n g a n d U n l o c k i n g E l e m e n t s

I receive an “element failed to unlock” message when I try to unlock elements in the Integration Server Administrator.

This indicates that the server files for the locked element were deleted from the server. You need to update the Integration Server Administrator’s list of unlocked elements by clicking Sync to Name Space on the Unlock Selected Elements screen. The Sync to Name

Space command runs automatically when the server is started or restarted.

Package Management Problems

I can’t preserve locking information when I replicate and publish a package.

This is expected behavior and is part of the feature’s design. You can, however, preserve system locks (read-only file attributes).

When I disable a package, it does not preserve locking information.

This is expected behavior and prevents conflicts if another package with the same folder and element names gets installed.

Save Problems

When I try to save an element that I have locked, I get an exception message.

During the time that you had the lock, the element became system-locked, its ACL status

In document webMethods Developer Users Guide 65 (Page 93-110)

Related documents