Which line of code should you use?

You are creating a custom activity by using Microsoft .NET Framework 3.5. You use Windows Workflow Foundation to create the custom activity. The custom activity is derived from the System.ComponentModel.Workflow.Activity class. The custom activity will idle until an item arrives in a workflow queue.

You write the following code segment for a method contained in the custom activity class.

void queue_QueueItemAvailable(object sender,
QueueEventArgs e)
{

}

The method is an event handler for the QueueItemAvailable event of the workflow queue.

You need to ensure that the event handler notifies the workflow runtime when the custom activity
successfully completes execution.

Which line of code should you use?

You are creating a custom activity by using Microsoft .NET Framework 3.5. You use Windows Workflow Foundation to create the custom activity. The custom activity is derived from the System.ComponentModel.Workflow.Activity class. The custom activity will idle until an item arrives in a workflow queue.

You write the following code segment for a method contained in the custom activity class.

void queue_QueueItemAvailable(object sender,
QueueEventArgs e)
{

}

The method is an event handler for the QueueItemAvailable event of the workflow queue.

You need to ensure that the event handler notifies the workflow runtime when the custom activity
successfully completes execution.

Which line of code should you use?

A.
((ActivityExecutionContext)sender).CloseActivity();

B.
((ActivityExecutionContext)sender).CancelActivity(this);

C.
RaiseEvent(Activity.ClosedEvent, this, new EventArgs());

D.
RaiseEvent(Activity.StatusChangedEvent, this, new EventArgs());



Leave a Reply 0

Your email address will not be published. Required fields are marked *