Monday, February 14, 2011

Can't Access Microsoft.com

 

My work desktop just crashed, so I reinstalled the Window XP OS. For some reason, I am not able to access any site under microsoft.com. The sites on other domain names can be loaded fine.

It turned out that, the solution is to turn off a Windows Service call 'DNS Client'. See picture below.

image

Friday, February 4, 2011

AgilePoint Configuration List Column Names Corruption - $Resources:Column_xxxx

One of my clients run into this issue. The error 'No config item was found for category 'AgilePoint' and key 'ServerUrl'.' is found at the event viewer of the SharePoint machine (See detail error message below). Upon further inspection at the AgilePoint Configuration List, some of the column names in the list appear to be "$Resources:Column_xxxx" instead of the correct display names. See screen shot below.

This is due to the content files of the AgilePoint Configuration List feature are not copied properly during upgrade or deployment of the feature. Running the stsadm command of copyappbincontent shall fix this issue.

stsadm –o copyappbincontent

image

Event Viewer Log:

Event Type:        Error

Event Source:    Utility.GetAPWorkflowService()

Event Category:                None

Event ID:              0

Date:                     1/25/2011

Time:                     11:52:48 PM

User:                     N/A

Computer:          CORPSP03

Description:

Message: No config item was found for category 'AgilePoint' and key 'ServerUrl'.

StackTrace:    at Ascentn.SharePoint.SettingsList.AgilePointSettingsManager.GetValue(String application, String key, Guid siteId, Boolean bIgnoreErrors)

   at Ascentn.SharePoint.SettingsList.AgilePointSettingsManager.GetValue(String application, String key, Guid siteId)

   at Ascentn.SharePoint.Common.SPUtil.GetWorkflowService(Guid siteid)

Source: Ascentn.SharePoint.SettingsList

DETAILS:

System.Exception: No config item was found for category 'AgilePoint' and key 'ServerUrl'.

   at Ascentn.SharePoint.SettingsList.AgilePointSettingsManager.GetValue(String application, String key, Guid siteId, Boolean bIgnoreErrors)

   at Ascentn.SharePoint.SettingsList.AgilePointSettingsManager.GetValue(String application, String key, Guid siteId)

   at Ascentn.SharePoint.Common.SPUtil.GetWorkflowService(Guid siteid)

For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp

Thursday, February 3, 2011

WCF AgilePart

The WCF AgilePart is an out of the box shape available in the Premier stencil. It allows you to make a call to a WCF service in of the steps (activities) in your workflow.

The documentation of this AgilePart is available as part of the Envision Online Help.

The WCF AgilePart is working fine against Authenticated WCF Service. The following scenarios are tested:

1. Anonymous WCF Service : SUCCESS . WCF AgilePoint Server call Works fine.

2. Windows Authenticated WCF Service with custom credentials : SUCCESS. WCF AgilePoint Server call Works fine.

3. Windows Authenticated WCF Service with AgilePoint System User : Partially Success.  In runtime the AgilePoint System user works fine, but in design time somehow the WFSystem.GetSystemUserCredential() does not return the proper credential object, I can not see the domain & password while design time debugging, but in runtime WFSystem.GetSystemUserCredential() returns proper credentials.

It turned out that, this is expected behavior. At design time you cannot use AgilePoint System User credentials since that is available only on the server. For design time, a specific credential has to be set. This is how even WSE works.

 

Tuesday, February 1, 2011

Send Mail with Attachments - Manage Code C# Shape

 

This is an example on how to use the Manage Code C# Shape in the Advance stencil to send email with attachment.

Insert below code snippet in the code editor of the Manager Code C# Shape in Envision. You may obtain the example of vsd file here.

In this example, the attachment file is located under the virtual directory of AgilePoint Server, which AgilePoint Server has no problem to access the file. If you want to use other location, make use AgilePoint Server Application Pool has enough privilege to access the location of your attachments.

using System;
using System.Collections;
using System.Data;
using System.Xml;
using System.Net;
using System.IO;
using System.Text;
using Ascentn.Workflow.Base;

namespace ManagedCode
{
public class CSharpCodeSnippet
{
// Invoke method is this class's entry point
public void Invoke(
WFProcessInstance pi,
WFAutomaticWorkItem w,
IWFAPI api,
NameValue[] parameters)
{
    string emailAddress = WFSystem.SysAdmEMailAddress;
               string attachment = WFSystem.HomeDirectory + "\\License.en-US.RTF";
               IWFActivityInstance ai = api.GetActivityInst(w.ActivityInstID);
               api.SendMail(
                   pi,
                   ai,
         emailAddress,
          null,
          string.Format("Request for Approval - {0}", pi.ProcInstName),
"You are assigned with this task, please review and approve within two days.",
          attachment);
}
}
}

 
image 

Debugging:

Make use of AgilePoint Server log located at [AgilePointVirtualDirectory]\AgilePointServer\log for debugging. For example, if your attachment file is missing, you can find error log below in AgilePoint Server log.

7/1/2009 09:49:36 >>> Send Mail, attaching file does not exists, file='C:\AgilePoint\AgilePointServer\License.RTF', ID='2AD5BB44AE5B42DF94F6492BF744C2A2'