Beispiel #1
0
        public virtual void ApplyDispatchBehavior
            (ServiceDescription serviceDescription,
            ServiceHostBase serviceHostBase)
        {
            WorkflowServiceHost workflowServiceHost
                = serviceHostBase as WorkflowServiceHost;

            if (null != workflowServiceHost)
            {
                PersistAssignment persist
                    = new PersistAssignment(_connectionString);
                workflowServiceHost.WorkflowExtensions.Add(persist);
            }
        }
Beispiel #2
0
        protected override void Execute(CodeActivityContext context)
        {
            Assignment a = Assignment.Get(context);

            a.Status        = "Completed";
            a.DateCompleted = DateTime.Now;

            PersistAssignment persist = context.GetExtension <PersistAssignment>();

            persist.AddAssignment(context.WorkflowInstanceId, a, "Update");

            // Store the request in the OutArgument
            Assignment.Set(context, a);
        }
        protected override void Execute(CodeActivityContext context)
        {
            // Create an Assignment class and populate its properties
            Assignment a = new Assignment();

            a.WorkflowID   = context.WorkflowInstanceId;
            a.LeadID       = LeadID.Get(context);
            a.DateAssigned = DateTime.Now;
            a.AssignedTo   = AssignedTo.Get(context);
            a.Status       = "Assigned";
            a.DateDue      = DateTime.Now + TimeSpan.FromDays(5);

            PersistAssignment persist = context.GetExtension <PersistAssignment>();

            persist.AddAssignment(context.WorkflowInstanceId, a, "Insert");

            // Store the request in the OutArgument
            Assignment.Set(context, a);
        }
 public virtual void ApplyDispatchBehavior
     (ServiceDescription serviceDescription,
         ServiceHostBase serviceHostBase)
 {
     WorkflowServiceHost workflowServiceHost
         = serviceHostBase as WorkflowServiceHost;
     if (null != workflowServiceHost)
     {
         PersistAssignment persist
             = new PersistAssignment(_connectionString);
         workflowServiceHost.WorkflowExtensions.Add(persist);
     }
 }