Change MOSS 2007 server to another Windows 2003 Domain

 

Last week I found that some emails weren't sent by sharepoint. When I created an alert I received an email saying that the alert was just created but after some change in the list no email was sent.

The same problems happened with approval workflows. The email saying the the workflow just started was sent to the document owner but the other emails for the approvers never arrived.

After digging a while in sharepoint admin I found that in the timer job definitions haven't run for some days. Even those jobs with a frequency of minutes.

I also found that the last day that they ran successfully was the day that the IT team decided to change the moss server from one domain to another 🙂

I've followed these instructions How to change service accounts and service account passwords in SharePoint Server 2007 and in Windows SharePoint Services 3.0 and every thing seems fine now. I'll wait for now…

@echo off
rem other app pools
echo *** Updating app pool passwords
"%commonprogramfiles%\Microsoft Shared\Web server extensions\12\BIN\Stsadm.exe" -o updateaccountpassword
-userlogin %1 -password %2 -noadmin
rem central admin
echo *** Updating Central Admin password
"%commonprogramfiles%\Microsoft Shared\Web server extensions\12\BIN\Stsadm.exe" -o updatefarmcredentials
-userlogin %1 -password %2
rem ssp - new
echo *** Updating ssp password for new installs
"%commonprogramfiles%\Microsoft Shared\Web server extensions\12\BIN\Stsadm.exe" -o editssp
-title "SharedServices1" -ssplogin %1 -ssppassword %2
rem ssp - upgrade
echo *** Updating ssp password for upgraded installs
"%commonprogramfiles%\Microsoft Shared\Web server extensions\12\BIN\Stsadm.exe" -o editssp
-title "Default Web Site" -ssplogin %1 -ssppassword %2
rem osearch
echo *** Updating osearch password
"%commonprogramfiles%\Microsoft Shared\Web server extensions\12\BIN\Stsadm.exe" -o osearch
-farmserviceaccount %1 -farmservicepassword %2
echo *** MANUAL UPDATE NEEDED. To update the password, visit the SSP Web application page,
click Search Settings, and then click Default Content Access Account.
rem spsearch
echo *** Updating spsearch password
"%commonprogramfiles%\Microsoft Shared\Web server extensions\12\BIN\Stsadm.exe" -o spsearch
-farmserviceaccount %1 -farmservicepassword %2
echo *** Updating spsearch content access account
"%commonprogramfiles%\Microsoft Shared\web server extensions\12\BIN\stsadm.exe" -o spsearch
–farmcontentaccessaccount %1 -farmcontentaccesspassword %2
rem restarting IIS
echo *** Doing soft restart of IIS
iisreset /noforce
echo on

Approval status, MOSS and Sharepoint Designer

I was creating a SPD workflow that checks the approval status field. When you add this condition in SPD, the designer automatically gives you a combo box with all the possible values for the approval status field: 1;#Rejected, …

This works fine if you have your site in English. In my case, I have my site in Portuguese, so the designer gives me the options in Portuguese: 1,#Rejeitado

But, when the workflow is running the actual value for the approval status that is used to check the IF condition is the English value

if 1;#Rejected equals 1;#Rejeitado then

This always returns false. The first argument is given by moss and the other is from the workflow rules built with the SPD.

To solve this bug I found a workaround. I’ve created a workflow string variable that whaen the workflow starts receives the approval status value.

Next, instead of comparing the approval status field, I compare the workflow variable with "1;Rejected". This is possible because in this case I have a text box to fill the value instead of the combo box.