Search

Search:

Namespace:

Search Result
.
    Event ReceiveSomeData(ByVal sender As Object, ByVal e As ReceiveSomeDataEventArgs)
.
    Public Event ReceiveSomeData(ByVal sender As Object, ByVal e As ReceiveSomeDataEventArgs) Implements IDemoDataExchange.ReceiveSomeData
.
        Dim args As New ReceiveSomeDataEventArgs(state.instanceId, reply)
.

Public Class ReceiveSomeDataEventArgs

.
    Inherits ExternalDataEventArgs
.
    Private Sub WebServiceInvoking(ByVal sender As System.Object, ByVal e As System.Workflow.Activities.InvokeWebServiceEventArgs)
.

The main advantage of a CodeCondition is that developers are more familiar with code so it may feel more natural for them. Another advantage is that complex logic may be harder to build using the rule editor than using the code editor. One confusing thing of the CodeCondition is that the result is not returned from the function but is set as the Result property on the ConditionalEventArgs property.

.
    Implements IEventActivity, IActivityEventListener(Of QueueEventArgs)
.
    Public Sub OnEvent(ByVal sender As Object, ByVal e As QueueEventArgs) Implements IActivityEventListener(Of QueueEventArgs).OnEvent
.
    Public Sub Subscribe(ByVal parentContext As ActivityExecutionContext, ByVal parentEventHandler As IActivityEventListener(Of QueueEventArgs)) Implements IEventActivity.Subscribe
.
    Public Sub Unsubscribe(ByVal parentContext As ActivityExecutionContext, ByVal parentEventHandler As IActivityEventListener(Of QueueEventArgs)) Implements IEventActivity.Unsubscribe
.
    Private Sub InternalSubscribe(ByVal executionContext As ActivityExecutionContext, ByVal eventHandler As IActivityEventListener(Of QueueEventArgs), ByVal eventActivityMode As Boolean)
.

private void codeActivity1_ExecuteCode(object sender, EventArgs e)

.

private void checkSalesAmount(object sender, ConditionalEventArgs e)

.

A host can subscribe to the workflow runtime's WorkflowSuspended event and retrieve the error message using the Error property of the WorkflowSuspendedEventArgs parameter. Another property of this parameter is the WorkflowInstance property. A host can recommence execution using the Resume method of the WorkflowInstance class, or bring about a sad, but early ending with the Terminate method.

.

The Terminate activity has an Error property of type string. A host can subscribe to the runtime's WorkflowTerminated event and examine the error. The event handler will receive a parameter of type WorkflowTerminatedEventArgs, and the runtime will wrap the error message into a WorkflowTerminatedException, which is available through the event argument's Exception property.

.

private void delayActivity1_InitializeTimeoutDuration(object sender, EventArgs e)

.
    event EventHandler<UploadCompletedEventArgs> UploadCompleted;
.
  object sender, EventArgs e)
.
        Dim e As New SetStateEventArgs(TargetStateName)
.
Summary
EventArgs is the base class for classes containing event data.
.

One frequent reason for this error is that the EventArgs class or any other type in the event, including sender, used is not marked as serializable. In this case you will find an InnerException with the text "EventArgs not serializable".

.

Even though the text complains about the EventArgs it could just as well be the sender parameter is is causing the problem. As this paramters is not used most of the time passing Nothing instead of Me is often enough to solve the problem.

.
Summary
.

Public Class ReceiveSomeDataEventArgs

.
    Inherits ExternalDataEventArgs
.
    Event ReceiveSomeData(ByVal sender As Object, ByVal e As ReceiveSomeDataEventArgs)
.
    Public Event ReceiveSomeData(ByVal sender As Object, ByVal e As ReceiveSomeDataEventArgs) Implements IDemoDataExchange.ReceiveSomeData
.
        Dim args As New ReceiveSomeDataEventArgs(state.instanceId, reply)
.

Public Class ReceiveSomeDataEventArgs

.
    Inherits ExternalDataEventArgs
.

private void codeActivity1_ExecuteCode(object sender, EventArgs e)

.

private void checkSalesAmount(object sender, ConditionalEventArgs e)

.

A host can subscribe to the workflow runtime's WorkflowSuspended event and retrieve the error message using the Error property of the WorkflowSuspendedEventArgs parameter. Another property of this parameter is the WorkflowInstance property. A host can recommence execution using the Resume method of the WorkflowInstance class, or bring about a sad, but early ending with the Terminate method.

.

The Terminate activity has an Error property of type string. A host can subscribe to the runtime's WorkflowTerminated event and examine the error. The event handler will receive a parameter of type WorkflowTerminatedEventArgs, and the runtime will wrap the error message into a WorkflowTerminatedException, which is available through the event argument's Exception property.

.

private void delayActivity1_InitializeTimeoutDuration(object sender, EventArgs e)

.
    event EventHandler<UploadCompletedEventArgs> UploadCompleted;
.
  object sender, EventArgs e)
.

The wca.exe tool provides the command-line parameters /collapseArgs and /includeSender to determine how the HandleExternalEventActivity subclass properties appear. The /collapseArgs parameter causes a single E property of the EventArgs type to be generated instead of the default, which generates one property on the activity for each public property and field of the EventArgs. The /includeSender parameter includes a Sender property on the activity of type object, which is populated by the sender parameter of the event handler.

.

The interface consists of a single member, the OnEvent with the QueueEventArgs type paramater.

.
    Implements IActivityEventListener(Of QueueEventArgs)
.
    Public Sub OnEvent(ByVal sender As Object, ByVal e As QueueEventArgs) Implements IActivityEventListener(Of QueueEventArgs).OnEvent
.

Implements the IEventActivity and IActivityEventListener with QueueEventArgs interfaces.

.

private void codeActivity1_ExecuteCode(object sender, EventArgs e)

.
Summary
Property of the ConditionalEventArgs used to communicate the result of a CodeCondition.
.

The StateWorkflow is the more fluid of the two. Basically the workflow is in a given state and waiting for events to move it into another state. This new target state can be every other state in the workflow. Normally this happens because an event is raised and the current state, or one of its parents knows how to handle the event and does so to trigger a state change. The workflow itself actually has another way, the SetStateQueue queue with a SetStateEventArgs argument to indicate the target state, which can be used to activate any other state, even if there is no event that has the new state as target. This makes state workflows very much like real live. After all how often are we not faced with issues that are not supposed to happen in the normal flow of things?

.
Summary
EventArgs derived class used to switch a StateWorkflow into a specific state.
.
        workflowRuntime.WorkflowIdled += new EventHandler<WorkflowEventArgs>(workflowRuntime_WorkflowIdled);
.

static void workflowRuntime_WorkflowIdled(object sender, WorkflowEventArgs e)

.

Amongst the more useful functions is the SetState function that can be used to force the workflow into a specific state using the qualified name of the StateActivity. This is a wrapper round the SetStateQueue WorkflowQueue and the SetStateEventArgs class.

.

A StateWorkflow is one of the two basic workflow models included with WindowsWorkflowFoundation, the other being a SequentialWorkflow. A StateWorkflow is basically an implementation of a FiniteStateMachine. The main advantage of a StateWorkflow is that the workflow can switch between states at will, either because of a SetStateActivity in an event handler or explicitly by using the SetStateQueue queue with a SetStateEventArgs argument indicating the target state.

.
            queue.QueueItemAvailable += new EventHandler<QueueEventArgs>(queue_QueueItemAvailable);
.
    void queue_QueueItemAvailable(object sender, QueueEventArgs e)
.
        queue.QueueItemAvailable += delegate(object sender, QueueEventArgs e) { };
.
    QueueEventArgs e = null; // TODO: Initialize to an appropriate value
.
                                          ByVal e As EventArgs)
.
                          ByVal e As EventArgs)
.
                             ByVal e As ConditionalEventArgs)
.
                               ByVal e As ReplicatorChildEventArgs)
.

In the case of parallel execution the way to get at the data is the ChildInitialized event. This event has a parameter of type ReplicatorChildEventArgs which in turn contains a property InstanceData which is the data this iteration is going to work with. its your responsibility to pass this InstanceData on to the activity inside the ReplicatorActivity. The usual thing to do here is create a custom, possibly sequence, activity with an extra property to hold the data and store it there in the ChildInitialized event.

.

http://msdn.microsoft.com/en-us/library/system.workflow.activities.externaldataeventargs.waitforidle.aspx