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

How to change the sendemail activity property at run time?
Question on Queue Management
Load rules in the Designer Rehosting demo
IExtendedUIService must be installed
Does WF support transactions?
After wf receives external event, the host never sees any more tracking events
How to implement Unit test in a Sequential workflow
data exchange between workflow activities
While() activity a cpu hog
Share large data between workflow and application
General questions about WWF
InvokeWebService vs InvokeWorkflow
Database monitor activity???
Print WWF documentation
going to persistence, inside workflow runtime
Resuming Host-Runtime and Checking for Needed Services

Categories

MSDN
Using Forums
Game Development
Windows Desktop Develo...
Apps for Office and Sh...
Microsoft Research
Bing Maps
Unified Communications
Archived Forums W
Archived Forums X-Z
Maps In Windows
Visual C#
Parallel Computing in ...
Promote Your App
Application Security f...
Hardware Development B...
Excel for Developers
Outlook for Developers
SharePoint Legacy Vers...
Azure SQL Database
Azure Active Directory
Azure Batch
Azure Log Analytics
Azure Logic Apps
Azure IoT Hub
Azure Functions
Azure Data Lake Analyt...
Azure Log Integration
Team Foundation Server...
Software Modeling Tools
BizTalk Server General
ADO.NET DataSet
XML, System.Xml, MSXML...
The Forum of Sho
ISV Open Discussions
SyncFx - General [Read...
Microsoft Robotics - D...
SQL Server High Availa...
SQL Server Migration
SQL Server PowerPivot ...
SQL Server Distributed...
SQL Server Data Tools
Standard 2009: Tools
Standard 7: Misc
SQL Server 2012 High A...
SQL Server 2012 PowerP...
Windows Forms General
Windows Forms Designer
Server Virtualization
Dynamics 365 for Custo...
Orchard –Discussions
App Linking
Microsoft Automatic Gr...
Microsoft Lync Persist...
Microsoft Lync Client ...
Programming Silverligh...
Performance Profiling ...
MVVM / ViewModel Patte...
Windows Performance To...
Retired SharePoint Exc...
Retired SharePoint Ent...
Retired SharePoint Soc...
Project Online General...
.NET Framework 4 Relea...
.NET Remoting and Runt...
Architecture Events
Building Windows Store...
AppFabric Caching
Core Coding Experience...
Feedback for Visual Ba...
Game Technologies: Dir...
HD DVD Interactivity A...
Git, Mercurial and Dro...
LightSwitch in Visual ...
Microsoft Security Dev...
Microsoft Unified Comm...
Parallel Computing Gen...
Parallel Computing Pla...
Performance Counters f...
Sharepoint Development...
SQL Server 2014 Report...
Team Foundation Server...
Tools for Windows Phon...
UI Design for Windows ...
Tailoring your Windows...
Visual Basic 2008 (Pre...
Visual Basic Interop a...
Visual Basic Power Packs
Visual C# Language
Windows Live Data Deve...
Windows SideShow Devel...
Windows Workflow Found...
Building Windows Store...
Building Windows Store...
Building Windows Store...
Tools for Windows Stor...
Expression Blend for W...
XNA Framework

Resources

Encrypt Message



code
soft
python
ios
c
html
jquery
cloud
mobile