Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

9.7.1 builder question

Status
Not open for further replies.

tmorsi

Programmer
Sep 22, 2008
18
US
hi

i am trying to debug some scripts within builder while upgrading to 9.7.1; i'm start debugging but when i get to a method (.UpdateUser()) and trying to step into the method it gives me a source not found;

when i click on the script to open it (UpdateUser) it comes up blank;

any ideas how to fix this or what is going on ?
thanks
 
I would guess that the UpDateUser was a function that was orphanned in thos ospace based on a dpendent module.The new install may not have it hence it can't do it.That was my USD).02.If it was a core function orpahnned I would have guessed otherwise

Well, if I called the wrong number, why did you answer the phone?
James Thurber, New Yorker cartoon caption, June 5, 1937
Certified OT Developer,Livelink ECM Champion 2008
 

yea i see what you are saying;

i'm not sure what custom module is over-writing the default script. The old 9.5 modules are installed in the 9.7 instance.

i guess my next question would be (i'm new to LL builder) is how does one specify that a certain script overwrite or is called in place of LL's default script ?

the code starts in ospace: webuser->UserRequestHandler->SaveUser:execute

function Dynamic Execute( Dynamic ctxIn, Dynamic ctxOut, Record r )

Object prgCtx = .PrgSession()
String nTab = .fDefaultTabName

// Either create a new user or update an existing user.

if Str.CmpI( r.ufunc, 'DELETE' ) == 0
echo( "Deleting user" )
.DeleteUser( prgCtx, r )
else
if ( r.userID == 0 )
.AddUser( prgCtx, r )
else
.UpdateUser( prgCtx, r )
nTab = r.ntab
end
end


so when i enter debug mode when i get to the line (.UpdateUser) and try to step into it; i get 'no source found' in the debug window.
if i go to the script (UpdateUser) in the webuser module the file is blank. but if i unlock the webuser module and open the same script (UpdateUser) the file just contains an echo statement.


thnks for all the help too
 
PLEASE DO NOT UNLOCK CORE OSCRIPT OT MODULES.YOU NOW HAVE A UNUSABLE MODULE CODE BASE.COPY THE MODULES JUST THE ONES FROM A WORKING MODULE.THE UPDATE USER HAS A LOT OF CODE IN THE OT IMPLEMENTATION AS UNDER FROM MY 9.7.1.IT IS NOT BLANK
Code:
function void UpdateUser( Object prgCtx, Record r )
	
	Assoc		loginInfo
	Assoc		result
	Assoc		exAttrs
	Assoc		expireDateAssoc
	Date		pwdExpireDate
	Integer		privs
	Record		userRec
	Dynamic		password
	Boolean		allowPwdExpire
	
	Boolean		ok = TRUE
	Object		uapiCtx = prgCtx.USession()
	
	
	// set local password field (if password is specified)
	
	if r.set_password
		password = r.password
	end
	
	if r.neverexpire_pw
		allowPwdExpire = false
	else
		allowPwdExpire = true
	end
	
	// Make sure the password fields match.
	
	if r.set_password && ( r.password != r.verify_password )
	
		.fError = [Web_ErrMsg2.PasswordsDontMatch]
	
	// Assemble the extended attributes.
	
	elseif !.CheckExAttributes( r, exAttrs )		
		
	// Update the user.  This should take care of extended attribute data,
	// login name change, and privilege changes.
	
	else
		pwdExpireDate = r.PasswordExpire
		
		if ( IsDefined( pwdExpireDate ) )
		
			// Wack any time portion and subtract 1 second -- this means the password will be expired
			// on the first second of the given day.
		
			pwdExpireDate = pwdExpireDate - Date.TimeInteger( pwdExpireDate ) - 1
		end

	
		expireDateAssoc.Date = pwdExpireDate
		
		result = $LLIApi.UsersPkg.UserUpdate(\
										uapiCtx,\
										r.userID,\
										r.loginName,\
										UNDEFINED,\
										$LLIApi.UsersPkg.PrivsAssocToMask( r ),\
										exAttrs,\
										UNDEFINED,\
										password,\
										this, \
										UNDEFINED, \
										expireDateAssoc, \
										r.GroupID, \
										allowPwdExpire )
		
		// check for errors
			
		if .CheckError( result )
			if ( !$Kernel.SystemPreferences.GetPrefBoolean( "general", "encodeCookies", true ) )
		
				//	Adjust the cookie if the modified user is the current user. 
				
				if ( ( uapiCtx.fUserID == r.userID ) && ( r.set_password ) )
					.fExtraHeaders = .SetLLCookie( password )
				end
			end
		end
	end
end

Well, if I called the wrong number, why did you answer the phone?
James Thurber, New Yorker cartoon caption, June 5, 1937
Certified OT Developer,Livelink ECM Champion 2008
 

i see; i didn't think unlocking a core module would throw things out of whack;

you said: YOU NOW HAVE A UNUSABLE MODULE CODE BASE

why is it unusable now ?
So unlocking and relocking a core module renders it unusable ?
i basically assumed something went wrong with the 9.7.1 installation & will need to be re-installed anyways. this isn't the first 'no source found' for a script has occurred.

but it is no worries; we are only testing/trying to learn what is going on
 
tmorsi, AppNair correctly points out that there are issues when you unlock a core OSpace - this usually removes all overrides and patches and just shows the core original code - so this can cause serious issues.

It is possible that you have a suspect installation, but it is also possible that there have been several changes between 95 and 971 and your modules are conflicting with this, so you need to tread carefully to resolve them.

If you are lacking experience in developing with OScript and Builder, it may be better to get someone else to assist in the upgrade, either from OpenText or from another knowledgeable source such as an OT Partner etc who can assist in more detail with your issue.

I would also recommend that you attend the OT training on the SDK kit ASAP as this will greatly aid you in your work at present.

Greg Griffiths
Livelink Certified Developer & ECM Global Star Champion 2005 & 2006
 
The first thing that they tell you at builder class is to stay away from unlocking OT core modules.As you know the core modules have been compiled at OT using a standard compiler version of C++ that we developers lack.Opening a core ospace re-compiles the objects with the C++ compiler native to your install or comes bundled with the builder module.I do not know the mecahnism so that is my logical guess why it corrupts everything.You don't need to unlock to see how the code progresses because you can step thru it anyways.all of us has done this at some time so just copy the modules form a pristine install and you should be fine.

My $0.02 addition to Greg's

Well, if I called the wrong number, why did you answer the phone?
James Thurber, New Yorker cartoon caption, June 5, 1937
Certified OT Developer,Livelink ECM Champion 2008
 
thanks;
that makes sense; opening a core module would recompile everything; haha our team lacks a core builder developer so we'll have to learn it the hard way of trial and error.

most likely opening and closing has corrupted things as well;

thanks for the advice, i'm reading up on all of the tutorials as well;
 
tmorsi,
As mentioned above I'd recommend someone from your organization getting on the Builder training so that you have a good understanding of the SDK and how it works.

It may also be worth hiring in someone from OT or elsewhere (e.g. AppNair / Myself) to assist, even if just a final review, of the modules.

Greg Griffiths
Livelink Certified Developer & ECM Global Star Champion 2005 & 2006
 
thanks; sounds good;
we might just take you & appNair up on that;
if things get more hectic i'll be in contact with u

thanks again for both of yours' help
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top