Understand the CommunicationsSequenceActivity Activity

In the Microsoft Lync Server 2010 environment, the CommunicationsSequenceActivity activity is the required container for workflows and also supports multiple call selection and call transfers. It is added by default when creating a new project, and cannot be deleted.

Setting Scope for Commands and Events

CommunicationsSequenceActivity is the container for the activities that perform basic question and answer, prompting, and flow control in a communications workflow application. For example, in the following illustration CommunicationsSequenceActivity contains the activities for a simple call router workflow.

Hh347433.4e1b4e05-ebf7-4da0-97ee-2e669f3fe3eb(en-us,office.14).jpg

CommunicationsSequenceActivity is also the container for commands and communication events. Use commands, for example help or repeat; and events, for example consecutive silences or call disconnect to override the default sequence of activities in a workflow. Deciding which commands and events to monitor at any given moment requires that the workflow manage scope.

The scope for events and commands is set by CommunicationsSequenceActivity. Inner scope overrides outer scope, so when CommunicationsSequenceActivity is nested, the inner activity has the focus. Events and commands contained by the inner CommunicationsSequenceActivity override those in the outer CommunicationsSequenceActivity. For example, in the following illustration the inner QuestionAnswer activity is active, giving focus to the command and event activities contained by it.

Hh347433.6436aacc-54ad-49ac-8e8b-6293b109f90f(en-us,office.14).jpg

Changing the Workflow Execution Path

Use the GoToActivity activity to change the execution path of a workflow. Set the TargetActivityName property to point to the desired target. Valid targets are any activity inside a CommunicationSequenceActivity container, and direct children of a GoToActivity ancestor. An ancestor includes a parent or grandparent of GoToActivity.

To change target activities at design time, use an IfElse branch structure to select among different GoTo activities. During run time, do not change the target of any GotoActivity activity.

Supporting Multiple Calls and Call Transfer

CommunicationsSequenceActivity is a call provider, and can be used to choose between multiple calls. Use the CommunicationsSequenceActivity.CallProvider property to bind to the OutboundCallActivity.CallProvider property, and pass information about which call to use. Nesting one CommunicationsSequenceActivity within another allows switching calls within a workflow. For example, a receptionist finds the destination for a caller, and then rings the destination to confirm whether or not they will accept the call. In the following illustration the CallProvider property on the nested CommunicationsSequenceActivity tells the contained workflow activities which call to use.

Hh347433.3be0a0a2-fe2f-4fa1-aa0e-120de0afd3cd(en-us,office.14).jpg

See Also

Other Resources

Unified Communications Managed API 3.0 Workflow SDK Documentation

Unified Communications Workflow Sample Applications