Vihang's Re-hosting Workflow Designer example errors

Vihang,

I am receiving the following message when using your Re-hosting example code:

Property value is not valid.

The Service 'System.Workflow.ComponentModel.Design.IExtendedUIService' musy be installed for this operation to succeed. Ensure that this service is available.

Have you seen this before? Is there a reason I cannot view the Invoked handler in the properties windows?

I look forward to hearing from you soon.

Thanks in advance,

John P.

[498 byte] By [JohnPortnov] at [2007-12-22]
# 1

John - this may or may not be a helpful answer :) But you will find this will almost every sample out there. At some point - something in the designer is going to use a "service" that isn't installed in the designer context.

In fact the WF architecture of services and the designer services architecture are very similar in this respect.

I'd recommend implementing that interface and adding it to the services that are available in your designer.

JonFlanders at 2007-8-30 > top of Msdn Tech,Software Development for Windows Vista,Windows Workflow Foundation...
# 2

Jon,

I have already done that and am still getting the error. I can send you the code if you want to see the error for yourself?

John P.

JohnPortnov at 2007-8-30 > top of Msdn Tech,Software Development for Windows Vista,Windows Workflow Foundation...
# 3
Sure - feel free to send me the code.
JonFlanders at 2007-8-30 > top of Msdn Tech,Software Development for Windows Vista,Windows Workflow Foundation...
# 4

Jon,

What is your email address?

JP

JohnPortnov at 2007-8-30 > top of Msdn Tech,Software Development for Windows Vista,Windows Workflow Foundation...
# 6

Jon,

Thanks. I sent an email to jon.flanders@gmail.com

John P.

JohnPortnov at 2007-8-30 > top of Msdn Tech,Software Development for Windows Vista,Windows Workflow Foundation...
# 7
John - I have the code but cannot find your implementation of IExtendedUIService
JonFlanders at 2007-8-30 > top of Msdn Tech,Software Development for Windows Vista,Windows Workflow Foundation...
# 8
I did not implement it. I used the Re-hosting example that Vihang posted and updated it to be an xoml editor. The issue is with updating properties for a workflow activity (binding to some properties does not work when using the designer re-hosting code).
JohnPortnov at 2007-8-30 > top of Msdn Tech,Software Development for Windows Vista,Windows Workflow Foundation...
# 9

My point was that you *will* have to create an implemenation of that interface and put it into the context of your designer to not get that error.

JonFlanders at 2007-8-30 > top of Msdn Tech,Software Development for Windows Vista,Windows Workflow Foundation...
# 10

What is the syntax for that?

BTW: I still get the null error.

JohnPortnov at 2007-8-30 > top of Msdn Tech,Software Development for Windows Vista,Windows Workflow Foundation...
# 11

Here is a template - the implementation is up to you really, although you could just take out the exceptions and it will work and be a no-op service. I am guessing the method that is being called is NavigateToProperty. You'll have to add this as a service (I generally do this in my WorkflowLoader.Initialize).

public class ExtendedUIService : IExtendedUIService

{

#region IExtendedUIService Members

public void AddAssemblyReference(System.Reflection.AssemblyName assemblyName)

{

throw new Exception("The method or operation is not implemented.");

}

public void AddDesignerActions(DesignerAction[] actions)

{

throw new Exception("The method or operation is not implemented.");

}

public DialogResult AddWebReference(out Uri url, out Type proxyClass)

{

throw new Exception("The method or operation is not implemented.");

}

public Type GetProxyClassForUrl(Uri url)

{

throw new Exception("The method or operation is not implemented.");

}

public ITypeDescriptorContext GetSelectedPropertyContext()

{

throw new Exception("The method or operation is not implemented.");

}

public Uri GetUrlForProxyClass(Type proxyClass)

{

throw new Exception("The method or operation is not implemented.");

}

public Dictionary<string, Type> GetXsdProjectItemsInfo()

{

throw new Exception("The method or operation is not implemented.");

}

public bool NavigateToProperty(string propName)

{

throw new Exception("The method or operation is not implemented.");

}

public void RemoveDesignerActions()

{

throw new Exception("The method or operation is not implemented.");

}

public void ShowToolsOptions()

{

throw new Exception("The method or operation is not implemented.");

}

#endregion

}

JonFlanders at 2007-8-30 > top of Msdn Tech,Software Development for Windows Vista,Windows Workflow Foundation...
# 12

Jon,

I am still getting the same errors. This template causes error when running my code.

I commented out certain things in this template so that I can run the code, but I get the same errors when trying to access properties via the UI designer.

Let me know if you want to see the code with your template that is not working as expected?

Thanks in advance,

John Portnov

JohnPortnov at 2007-8-30 > top of Msdn Tech,Software Development for Windows Vista,Windows Workflow Foundation...
# 13
sure - feel free to send it to me
JonFlanders at 2007-8-30 > top of Msdn Tech,Software Development for Windows Vista,Windows Workflow Foundation...

Software Development for Windows Vista

Site Classified