workflow-activity

While activity in WF 4 rehosted designer

时光怂恿深爱的人放手 提交于 2019-12-13 01:16:15
问题 I have written a custom activity which contains a simple ExpressionTextBox: <sapv:ExpressionTextBox HintText="List of Strings" Grid.Row ="0" Grid.Column="1" MaxWidth="150" MinWidth="150" Margin="5" OwnerActivity="{Binding Path=ModelItem}" Expression="{Binding Path=ModelItem.Test, Mode=TwoWay, Converter={StaticResource ArgumentToExpressionConverter}, ConverterParameter=In }" /> In the library, i've added Test property as follows: public InArgument<string> Test { get; set; } So, this is the

How to conditionally use InvokeMethod in an XAML Windows workflow foundation

自作多情 提交于 2019-12-12 04:32:02
问题 In windows workflow foundation sequence workflow, How to use invoke method tags to be invoked based on certain condition? For example, <Sequence> <Sequence.Variables> <Variable x:TypeArguments="x:String" Default="["this is an out param"]" Name="outParam" /> <Variable x:TypeArguments="x:Int32" Name="resultValue" /> <Variable x:TypeArguments="msi:TestClass" Default="[New TestClass()]" Name="varTestClass" /> </Sequence.Variables> <sap:WorkflowViewStateService.ViewState> <scg:Dictionary x

CRM 2011: Custom Workflow Activity Output Parameters don´t show

梦想的初衷 提交于 2019-12-12 03:57:35
问题 everyone, I'm having a problem that does not appear in the output parameter list on the right side under "Look for" underneath "Local Values", I do not understand the problem or reason for not appear, since in terms of input parameters's okay. protected override void Execute(CodeActivityContext executionContext) { ITracingService tracingService = executionContext.GetExtension<ITracingService>(); //Create the context IWorkflowContext context = executionContext.GetExtension<IWorkflowContext>();

WF 4 Rehosted Designer - get foreach InArgument Value

谁说我不能喝 提交于 2019-12-11 11:19:25
问题 After reading this article: http://blogs.msdn.com/b/tilovell/archive/2009/12/29/the-trouble-with-system-activities-foreach-and-parallelforeach.aspx I have defined the ForEachFactory as follows: public class ForEachFactory<T> : IActivityTemplateFactory { public Activity Create(DependencyObject target) { return new ForEach<T> { DisplayName = "ForEachFromFactory", Body = new ActivityAction<T> { Argument = new DelegateInArgument<T>("item") } }; } } All works well but is it possible to check how

Invoke Child Workflow Activity Asynchronously

帅比萌擦擦* 提交于 2019-12-11 05:41:51
问题 Team: I need to invoke a WF activity (XAML) from a WF service (XAMLX) asynchronously. I am already referencing the Microsoft.Activities.Extensions framework and I'm running on the Platform Update 1 for the state machine -- so if the solution is already in one of those libraries I'm ready! Now, I need to invoke that activity (XAML) asynchronously -- but it has an output parameter that needs to set a variable in the service (XAMLX). Can somebody please provide me a solution to this? Thanks! *

How do I get last persisted workflow instance Id to reload it?

笑着哭i 提交于 2019-12-11 05:29:51
问题 Lets say I have persisted self-hosted workflows (running locally IIS express) that use WorkflowApplication programmatically by using the SqlWorkflowInstanceStore object model. app.PersistableIdle = delegate(WorkflowApplicationIdleEventArgs e) { return PersistableIdleAction.Unload; }; Then, I accidentally / deliberately stopped my web application, restarted my visual studio (local development). My questions: Restarted my application, How would I retrieve last persisted application instance

Scheduling child activity that implements an interface with input parameters

泄露秘密 提交于 2019-12-10 17:26:29
问题 public sealed class Parent : NativeActivity { public Parent() { Childrens = new Collection<Activity>(); Variables = new Collection<Variable>(); _currentActivityIndex = new Variable<int>(); CurrentCustomTypeInstance= new Variable<MyCustomType>(); } [Browsable(false)] public Collection<Activity> Childrens { get; set; } protected override void Execute(NativeActivityContext context) { _currentActivityIndex.Set(context, 0); context.ScheduleActivity(FirstActivity, Callback); } private void Callback

How can I write a custom WorkFlow 4 Code Activity that includes a “Body Block”?

十年热恋 提交于 2019-12-10 09:43:37
问题 Is this possible? I know it is for MS since they have WF activity packs but I'm not sure how it's done. It would be nice to be able to have Activities with Body blocks to insert other activities, buttons, etc. If not too much trouble and/or time consuming that is. 回答1: Its easy enough if you follow a few rules. Here's an example of a NativeActivity that has a child: [Designer(typeof(MyActivityDesigner)), ContentProperty("Child")] public sealed class MyActivity : NativeActivity,

CRM 2011 Custom Workflow

风流意气都作罢 提交于 2019-12-08 07:29:11
问题 I GO THE PLUGIN WORKING, AND I HAVE UPDATED THE WORKING CODE HERE. HOPE IT HELPS!! I'm creating a workflow which has a plugin to retrieve a contact entity from a "FROM" field of an Email record. I'm trying to see if that email exists in the contact entity. The input is the "FROM" email and the output will return the Contacts entity. I have not been able to get this code working, I've received different errors or no errors, but I know its not working. Please help! Thanks in advance! using

Validate an Activity from within an ActivityDesigner?

久未见 提交于 2019-12-07 20:40:24
问题 I'd like to validate the workflow within the design surface (in this case, Visual Studio) from within one of the child Activities' designer. I'd like to prevent users from moving forward until other errors are corrected in order to simplify the design experience later down the road. The naiive implementation doesn't work: var activity = (this.ModelItem.Root.GetCurrentValue() as ActivityBuilder) .Implementation as Activity; var validationResult = ActivityValidationServices.Validate(activity);