コード例 #1
0
 void CreateServices() {
     _startWorkflowOnObjectChangeService =
         new StartWorkflowOnObjectChangeService(TimeSpan.FromSeconds(15));
     _objectChangedStartWorkflowService = new ObjectChangedStartWorkflowService();
     _scheduledWorkflowStartService = new ScheduledWorkflowStartService();
     _objectChangedWorkflowStartService = new ObjectChangedWorkflowStartService();
 }
コード例 #2
0
        void InvokeOnClient(ObjectChangedEventArgs objectChangedEventArgs, ObjectChangedWorkflow objectChangedWorkflow, object targetObjectKey)
        {
            Activity        activity   = ActivityXamlServices.Load(new StringReader(objectChangedWorkflow.Xaml));
            var             dictionary = StartWorkflowOnObjectChangeService.Dictionary(targetObjectKey, objectChangedEventArgs.PropertyName, objectChangedEventArgs.OldValue);
            WorkflowInvoker invoker    = new WorkflowInvoker(activity);

            invoker.Extensions.Add(Application.ObjectSpaceProvider);
            invoker.Invoke(dictionary);
        }