What should you do?

You create a list named List1.

You create two workflows named WF1 and WF2 for List1.

You need to ensure that when a new item is created in List1, WF1 starts automatically. WF2 must start automatically after WF1 completes.

What should you do?

You create a list named List1.

You create two workflows named WF1 and WF2 for List1.

You need to ensure that when a new item is created in List1, WF1 starts automatically. WF2 must start automatically after WF1 completes.

What should you do?

A.
Add a Replicator activity to WF2.

B.
Add a SendActivity activity to WF2.

C.
Create a SPWebEventReceiver event receiver.

D.
Create a SPWorkflowEventReceiver event receiver.

Explanation:
MNEMONIC RULE: “Workflow = SPWorkflowEventReceiver”

The SPWorkflowEventReceiver class handles workflow events throughout the lifetime of a workflow.

* Starting: Occurs when a workflow is starting
* Started: Occurs when a workflow is started
* Postponed: Occurs when a workflow is postponed
* Completed: Occurs when a workflow is completed

You can register the SPWorkflowEventReceiver with any site, list, or content type.

Apress – SharePoint 2010 as a Development Platform (book)



Leave a Reply 0

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