Windows Workflow Foundation 3


RuleConditionDialog and intellisense


Hello,in my custom designer I can insert/edit condition rules througth RuleConditionDialog. In order to see the dropped activities I set the TypeProvider with all referenced assemblies and the code compile unit of the current workflow (code beside).
Unfortunately I don't see the current workflow components (typing "this.myWorkflow1.") even if the code compile unit contains all activities (fields) declarations.
How can I solve the problem ?
Thanks,Pierre
After further investigation I probably found the problem. My application implements a plugin mechanism where the activity libraries are loaded from their own subfolder. So, if the application (designer) is on the bin folder, you will have the following file system structure:
bin |-- Components                        |-- Lib1                               |- Lib1.dll                        |-- Lib2                               |- Lib2.dll
Investigating with fuslog I made in evidence the probing problem. So, I used (even if obsolete) AppDomain.AppendPrivatePath when I load the plug-ins but the problem seems to persists.
I cannot use other probing mechanism (ei. throught AppDomainSetup) since the libraries can be loaded when the application is already started.
Do you have any suggestion ?
Thanks,Pierre
Pierre,
 
There was a similar issue with code separated workflows (XOML) and the workaround was to some how cause an application idle event to fire, which causes the refresh to happen and then the components will show up correctly.
 
One action that I know causes this event to fire is to open the rule condition editor, set some valid rule and click OK button to dismiss the dialog. Next time you re-open the dialog the components will show up correctly.
 
Thanks,
Chethan
Hello Chethan,unfortunately it doesn't work. How can I help in giving more info for the investigation (I cannot share the whole project)
Thanks,Pierre
Try reproducing the error on a smaller project so that you can easily discuss it with others on the forum. Ideally start with our MSDN Library article sample and reproduce the error on that. The MSDN Library designer sample is here:
http://msdn.microsoft.com/library/en-us/dnlong/html/WFDsgnRehst.asp 
Regards,Paul
Hello Paul,ok, I create a simple activity library with a basic activity:namespace MyActivityLib{    public partial class EchoActivity : System.Workflow.ComponentModel.Activity {  public EchoActivity()  {   InitializeComponent();  }
        public static DependencyProperty MessageProperty = System.Workflow.ComponentModel.DependencyProperty.Register("Message", typeof(string), typeof(EchoActivity));
        [Description("Message to show on the console")]        [Category("Activity")]        [Browsable(true)]        [DesignerSerializationVisibility(DesignerSerializationVisibility.Visible)]        public string Message        {            get            {                return ((string)(base.GetValue(EchoActivity.MessageProperty)));            }            set            {                base.SetValue(EchoActivity.MessageProperty, value);            }        }
        protected override ActivityExecutionStatus Execute(ActivityExecutionContext executionContext)        {            MessageBox.Show("Echo: " + Message);            return ActivityExecutionStatus.Closed;        } }}
Since the activity lib must NOT be statically referenced to the host application (I am using the sample you referenced in the post), I put the dll into bin folder of the the host app. Then I added a new line to the ToolboxItems.txt:
MyActivityLib.EchoActivity, MyActivityLib
In the compileWorkflow method I added the following line
parameters.ReferencedAssemblies.Add("MyActivityLib.dll");
Ok. I put my activity into the designer, save and compile. Everything is ok. I then add an IfElseActivity and set a simple condition:
System.Environment.Username="test"
I save and close the condition box. Then I compile. I open the condition and try to write this.echoActivity1. and nothing happens. The Message property is not shown. When I force to write this.echoActivity1.Message="" I get a validation error.
Thanks,Pierre
After further investigation I probably found the problem. My application implements a plugin mechanism where the activity libraries are loaded from their own subfolder. So, if the application (designer) is on the bin folder, you will have the following file system structure:
bin |-- Components                        |-- Lib1                               |- Lib1.dll                        |-- Lib2                               |- Lib2.dll
Investigating with fuslog I made in evidence the probing problem. So, I used (even if obsolete) AppDomain.AppendPrivatePath when I load the plug-ins but the problem seems to persists.
I cannot use other probing mechanism (ei. throught AppDomainSetup) since the libraries can be loaded when the application is already started.
Do you have any suggestion ?
Thanks,Pierre

Related Links

Can SQL compact edition be used for persistence and tracking storage?
Invoking multiple web service using InvokeWebServiceActivity combined with transaction
Workflow, HandleExternalEvent and WCF
XOML Only - How to change an integer in the argument dictionary
WorkflowTheme Exception
Pass in parameters to declarative workflow
WorkflowOutline
Workflow Correlation
How do I get the singleton instance of an "InstanceContextMode.Single" from wcf plumbing?
Correlation in a state machine workflow, where each state handles N distinct events?
Batch Point For Persistence and State Machine
Conditional handle external event
Workflow with id "xxx" not found in state persistence store
Property Binding
Activity project misbehaving
Microsoft visual studio 2005 extensions for workflow foundation

Categories

MSDN
Using Forums
SharePoint
.NET Framework
Machine Translation an...
Microsoft ISV Communit...
SQL Server
Windows Embedded Compact
Orchard
Office Live Development
Microsoft Azure
Archived Forums C-D
Archived Forums SA-SM
Archived Forums Visual...
Microsoft R
Cortana
Announcements for all ...
Parallel Computing in ...
Visual Studio Editor
Test Tools in Visual S...
Visual Studio Tools fo...
Microsoft Message Queu...
Windows Desktop Optica...
Windows Imaging Compon...
Windows Desktop Pro-Au...
Windows Hardware WDK a...
Message Analyzer
Outlook for Developers
Azure Multi-Factor Aut...
Azure Backup
StorSimple
Azure Log Integration
Team Foundation Server...
The Forum of Sho
Internet Explorer Web ...
Transact-SQL
SQL Server Database En...
SQL Server Documentation
SQL Server Samples and...
SQL Server Migration
SQL Server Master Data...
SQL Server Application...
Windows Embedded 8 Sta...
Standard 2009: Tools
Standard 7: Embedded E...
Windows Embedded 8.1 I...
SQL Server 2012 Master...
Windows Live General: ...
MSDN Subscriptions Fee...
Windows File Sharing P...
Office Protocols
Microsoft Atlas APIs: ...
Microsoft Lync Client ...
Game Development with ...
Silverlight Video and ...
Reference Source Serve...
Project Standard and P...
ASMX Web Services and ...
Innovate on Office
Installing and Registe...
Microsoft Security Dev...
Network Class Library ...
POS for .NET
Parallel Programming w...
Search Server: Known B...
Search Server: Report ...
Silverlight (formerly ...
SQL Server Modeling
Surface Application De...
SyncFx - Feedback [Rea...
SQL Server 2014 Report...
SQL Server 2014 Setup ...
Team Foundation Server...
Team Foundation Server...
Tools for Windows Phon...
Visual Basic IDE
Visual Studio Async CTP
Visual Studio 2008 IDE...
Visual Studio LightSwi...
Visual Studio Tools fo...
Visual Studio UI Autom...
Visual Studio Web Perf...
Web Development in Vis...
Windows CardSpace ('In...
Windows Developer Prev...
Windows Live Data Deve...
Working with Data in W...
Building Windows Store...

Resources

Encrypt Message



code
soft
python
ios
c
html
jquery
cloud
mobile