You are here: Discussion Register  |  Login
 
Discussion Forums
 
ForumForumGateway Web Ser...Gateway Web Ser...ProfilesProfilesHow do I manually unlock a Profile?How do I manually unlock a Profile?
Previous Previous
 
Next Next
New Post
 6/25/2009 11:14 PM
 
 Modified By Kevin Lenahan  on 6/27/2009 12:06:34 AM

While working with a Profile, it is locked in the system using a logical locking scheme to prevent multiple users from opening the Profile and changing it at the same time. Profile locking is generally performed by the system, in the background without any need for additional consideration when programming.

Method calls that indicate the typical end of session with a Profile, will automatically release the lock, for instance Profile.TransmitProfile. Other methods that are typically part of a series of calls on a specific Profile, for instance Profile.AddServiceToProfile, will leave the Profile locked for a period of time (five minutes by default) from the end of the call, until an automatically releasing method is called, or until the lock is manually released using Profile.UnlockProfile. If it is common for users on the site to try and access these Profiles at the same time they are being accessed through Gateway Web Services, then it is good practice to call Profile.UnlockProfile to ensure that the lock has been released.
For example, if finished working with Profile # 2009010112345600 then call Profile.UnlockProfile. 
Here is an example of how you would unlock the profile:
 
/* Get a reference to the web service */
using (GatewaySample.net.clearstar.gateway.profile.Profile gwProfile = new GatewaySample.net.clearstar.gateway.profile.Profile())
{
/* Release the lock on the Profile. */
XmlNode nodeProfile = gwProfile.UnlockProfile("myUserName", "myPassword", myBOID, "myCustID", "2009010112345600");
}
 
XML Response:
 
                <UnlockProfile xmlns="">
<ErrorStatus>
<Code>0</Code><Type></Type><Message></Message>
</ErrorStatus>
<Profile>
<sProfNo>2009010112345600</sProfNo>
<bUnlocked>true</bUnlocked>
</Profile>
</UnlockProfile>

 

Additional information is provided in the documentation and more example code is provided in the Gateway Sample application.

Previous Previous
 
Next Next
ForumForumGateway Web Ser...Gateway Web Ser...ProfilesProfilesHow do I manually unlock a Profile?How do I manually unlock a Profile?

 

Privacy Statement  |  Terms Of Use
Copyright 2011 by ClearStar, Inc.