wcf - Setting internal properties in composite WF4 Activities at design time -


i want create composite windows workflow activity (under .net 4) contains predefined receiveandsendreply activity. of properties predefined, others (particularly servicecontractname) need set in designer.

i implement activity template (the same way receiveandsendreply implemented), rather not. if later change template, i'd have update created workflows manually. template permit other developers change properties should fixed.

is there way xaml activity? have not found way assign argument value property of embedded activity. if not, technique suggest?

i haven't done using composite xaml activity , getting errors when try doing through nativeactivity no problem. see example code below.

public class myreceiveandsendreply : nativeactivity {     private receive _receive;     private sendreply _sendreply;      public string servicecontractname { get; set; }     public string operationname { get; set; }      protected override bool caninduceidle     {         { return true; }     }      protected override void cachemetadata(nativeactivitymetadata metadata)     {         _receive = _receive ?? new receive();         _sendreply = _sendreply ?? new sendreply();         _receive.cancreateinstance = true;         metadata.addimplementationchild(_receive);         metadata.addimplementationchild(_sendreply);          _receive.servicecontractname = servicecontractname;         _receive.operationname = operationname;          var args = new receiveparameterscontent();         args.parameters["firstname"] = new outargument<string>();         _receive.content = args;          _sendreply.request = _receive;          var results = new sendparameterscontent();         results.parameters["greeting"] = new inargument<string>("hello there");         _sendreply.content = results;          base.cachemetadata(metadata);     }      protected override void execute(nativeactivitycontext context)     {         context.scheduleactivity(_receive, receivecompleted);      }      private void receivecompleted(nativeactivitycontext context, activityinstance completedinstance)     {         context.scheduleactivity(_sendreply);     } } 

Comments

Popular posts from this blog

asp.net - repeatedly call AddImageUrl(url) to assemble pdf document -

java - Android recognize cell phone with keyboard or not? -

iphone - How would you achieve a LED Scrolling effect? -