4.2.2 Retrieve User Interface and Localization Information

After opening the existing workflow (2) files, or creating new ones as applicable, the client application needs to know how to display elements of the workflow (conditions and actions (2)) in its UI. To get this information, it uses the FetchLegalWorkflowActions operation on this protocol.

A sample request is similar to the following:

 <soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
    <soap:Body>
       <FetchLegalWorkflowActions xmlns="http://microsoft.com/sharepoint/webpartpages">
       </FetchLegalWorkflowActions>
    </soap:Body>
 </soap:Envelope>

A sample response is similar to the following:

 <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
    <soap:Body><FetchLegalWorkflowActionsResponse xmlns="http://microsoft.com/sharepoint/webpartpages">
       <FetchLegalWorkflowActionsResult>&lt;?xml version="1.0" encoding="utf-8"?&gt;&lt;WorkflowInfo Language="en-us"&gt;&lt;Conditions And="and" Or="or" Not="not" When="If" Else="Else if"&gt;&lt;Default ItemKeyType="Microsoft.SharePoint.Workflow.SPItemKey"&gt;&lt;RuleDesigner Sentence="%1 %2 %3"&gt;&lt;FieldBind Id="1" Field="left" Text="value" DesignerType="TextBox" /&gt;&lt;FieldBind Id="2" Field="operator" DesignerType="Operator" OperatorTypeFrom="left" Text="this test"&gt;&lt;Option Name="equals" Value="Equal" /&gt;&lt;Option Name="not equals" Value="NotEqual" /&gt;&lt;Option Name="is greater than" Value="GreaterThan" TypeFilter="System.Double;System.Int32;System.Uint32;System.DateTime" /&gt;&lt;Option Name="is greater than or equal to" Value="GreaterThanOrEqual" TypeFilter="System.Double;System.Int32;System.Uint32;System.DateTime" /&gt;&lt;Option Name="is less than" Value="LessThan" TypeFilter="System.Double;System.Int32;System.Uint32;System.DateTime" /&gt;&lt;Option Name="is less than or equal to" Value="LessThanOrEqual" TypeFilter="System.Double;System.Int32;System.Uint32;System.DateTime" /&gt;&lt;Option Name="is empty" Value="IsEmpty" TypeFilter="System.String" UnaryHides="right" /&gt;&lt;Option Name="is not empty" Value="NotIsEmpty" TypeFilter="System.String" UnaryHides="right" /&gt;&lt;Option Name="begins with" Value="StartsWith" TypeFilter="System.String" /&gt;&lt;Option Name="does not begin with" Value="NotStartsWith" TypeFilter="System.String" /&gt;&lt;Option Name="ends with" Value="EndsWith" TypeFilter="System.String" /&gt;&lt;Option Name="does not end with" Value="NotEndsWith" TypeFilter="System.String" /&gt;&lt;Option Name="contains" Value="Contains" TypeFilter="System.String" /&gt;&lt;Option Name="does not contain" Value="NotContains" TypeFilter="System.String" /&gt;&lt;Option Name="matches regular expression" Value="Matches" TypeFilter="System.String" /&gt;&lt;Option Name="equals (ignoring case)" Value="EqualNoCase" TypeFilter="System.String" /&gt;&lt;Option Name="contains (ignoring case)" Value="ContainsNoCase" TypeFilter="System.String" /&gt;&lt;Option Name="equals (ignoring time)" Value="EqualNoTime" TypeFilter="System.DateTime" /&gt;&lt;/FieldBind&gt;&lt;FieldBind Id="3" Field="right" Text="value" TypeFrom="left" DesignerType="TextBox" /&gt;&lt;/RuleDesigner&gt;&lt;/Default&gt;&lt;Condition Name="If current item field equals value" AppliesTo="list" UsesCurrentItem="true" ItemKeyType="Microsoft.SharePoint.Workflow.SPItemKey"&gt;&lt;RuleDesigner Sentence="%1 %2 %3"&gt;&lt;FieldBind Id="1" Field="left" DesignerType="FieldNames" Text="field" /&gt;&lt;FieldBind Id="2" Field="operator" DesignerType="Operator" OperatorTypeFrom="left" Text="this test"&gt;&lt;Option Name="equals" Value="Equal" /&gt;&lt;Option Name="not equals" Value="NotEqual" /&gt;&lt;Option Name="is greater than" Value="GreaterThan" TypeFilter="System.Double;System.Int32;System.Uint32;System.DateTime" /&gt;&lt;Option Name="is greater than or equal to" Value="GreaterThanOrEqual" TypeFilter="System.Double;System.Int32;System.Uint32;System.DateTime" /&gt;&lt;Option Name="is less than" Value="LessThan" TypeFilter="System.Double;System.Int32;System.Uint32;System.DateTime" /&gt;&lt;Option Name="is less than or equal to" Value="LessThanOrEqual" TypeFilter="System.Double;System.Int32;System.Uint32;System.DateTime" /&gt;&lt;Option Name="is empty" Value="IsEmpty" TypeFilter="System.String" UnaryHides="right" /&gt;&lt;Option Name="is not empty" Value="NotIsEmpty" TypeFilter="System.String" UnaryHides="right" /&gt;&lt;Option Name="begins with" Value="StartsWith" TypeFilter="System.String" /&gt;&lt;Option Name="does not begin with" Value="NotStartsWith" TypeFilter="System.String" /&gt;&lt;Option Name="ends with" Value="EndsWith" TypeFilter="System.String" /&gt;&lt;Option Name="does not end with" Value="NotEndsWith" TypeFilter="System.String" /&gt;&lt;Option Name="contains" Value="Contains" TypeFilter="System.String" /&gt;&lt;Option Name="does not contain" Value="NotContains" TypeFilter="System.String" /&gt;&lt;Option Name="matches regular expression" Value="Matches" TypeFilter="System.String" /&gt;&lt;Option Name="equals (ignoring case)" Value="EqualNoCase" TypeFilter="System.String" /&gt;&lt;Option Name="contains (ignoring case)" Value="ContainsNoCase" TypeFilter="System.String" /&gt;&lt;Option Name="equals (ignoring time)" Value="EqualNoTime" TypeFilter="System.DateTime" /&gt;&lt;/FieldBind&gt;&lt;FieldBind Id="3" Field="right" Text="value" TypeFrom="left" DesignerType="Dependent" /&gt;&lt;/RuleDesigner&gt;&lt;Parameters&gt;&lt;Parameter Name="operator" Type="System.String, mscorlib" Direction="In" InitialValue="Equal" DesignerType="Dropdown" DisplayName="Operator" Description="Operator to use in comparison." /&gt;&lt;Parameter Name="left" Type="System.Object, mscorlib" Direction="In" DesignerType="FieldNames" DisplayName="LeftOperand" Description="Left operand to use in comparison." /&gt;&lt;Parameter Name="right" Type="System.Object, mscorlib" Direction="In" DesignerType="Dependent" DisplayName="RightOperand" Description="Right operand to use in comparison." /&gt;&lt;/Parameters&gt;&lt;/Condition&gt;&lt;Condition Name="If any value equals value" Type="Advanced" AppliesTo="all" ItemKeyType="Microsoft.SharePoint.Workflow.SPItemKey"&gt;&lt;RuleDesigner Sentence="%1 %2 %3"&gt;&lt;FieldBind Id="1" Field="left" Text="value" DesignerType="TextBox" /&gt;&lt;FieldBind Id="2" Field="operator" DesignerType="Operator" OperatorTypeFrom="left" Text="this test"&gt;&lt;Option Name="equals" Value="Equal" /&gt;&lt;Option Name="not equals" Value="NotEqual" /&gt;&lt;Option Name="is greater than" Value="GreaterThan" TypeFilter="System.Double;System.Int32;System.Uint32;System.DateTime" /&gt;&lt;Option Name="is greater than or equal to" Value="GreaterThanOrEqual" TypeFilter="System.Double;System.Int32;System.Uint32;System.DateTime" /&gt;&lt;Option Name="is less than" Value="LessThan" TypeFilter="System.Double;System.Int32;System.Uint32;System.DateTime" /&gt;&lt;Option Name="is less than or equal to" Value="LessThanOrEqual" TypeFilter="System.Double;System.Int32;System.Uint32;System.DateTime" /&gt;&lt;Option Name="is empty" Value="IsEmpty" TypeFilter="System.String" UnaryHides="right" /&gt;&lt;Option Name="is not empty" Value="NotIsEmpty" TypeFilter="System.String" UnaryHides="right" /&gt;&lt;Option Name="begins with" Value="StartsWith" TypeFilter="System.String" /&gt;&lt;Option Name="does not begin with" Value="NotStartsWith" TypeFilter="System.String" /&gt;&lt;Option Name="ends with" Value="EndsWith" TypeFilter="System.String" /&gt;&lt;Option Name="does not end with" Value="NotEndsWith" TypeFilter="System.String" /&gt;&lt;Option Name="contains" Value="Contains" TypeFilter="System.String" /&gt;&lt;Option Name="does not contain" Value="NotContains" TypeFilter="System.String" /&gt;&lt;Option Name="matches regular expression" Value="Matches" TypeFilter="System.String" /&gt;&lt;Option Name="equals (ignoring case)" Value="EqualNoCase" TypeFilter="System.String" /&gt;&lt;Option Name="contains (ignoring case)" Value="ContainsNoCase" TypeFilter="System.String" /&gt;&lt;Option Name="equals (ignoring time)" Value="EqualNoTime" TypeFilter="System.DateTime" /&gt;&lt;/FieldBind&gt;&lt;FieldBind Id="3" Field="right" Text="value" TypeFrom="left" DesignerType="Dependent" /&gt;&lt;/RuleDesigner&gt;&lt;Parameters&gt;&lt;Parameter Name="operator" Type="System.String, mscorlib" Direction="In" InitialValue="Equal" DesignerType="Dropdown" DisplayName="Operator" Description="Operator to use in comparison." /&gt;&lt;Parameter Name="left" Type="System.Object, mscorlib" Direction="In" DesignerType="Dependent" DisplayName="LeftOperand" Description="Left operand to use in comparison." /&gt;&lt;Parameter Name="right" Type="System.Object, mscorlib" Direction="In" DesignerType="Dependent" DisplayName="RightOperand" Description="Right operand to use in comparison." /&gt;&lt;/Parameters&gt;&lt;/Condition&gt;&lt;Condition Name="Title field contains keywords" FunctionName="WordsInTitle" ClassName="Microsoft.SharePoint.WorkflowActions.Helper" Assembly="Microsoft.SharePoint.WorkflowActions, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" AppliesTo="list" UsesCurrentItem="true" ItemKeyType="Microsoft.SharePoint.Workflow.SPItemKey"&gt;&lt;RuleDesigner Sentence="title field contains %1"&gt;&lt;FieldBind Id="1" Field="_1_" Text="keywords" DesignerType="TextBox" /&gt;&lt;/RuleDesigner&gt;&lt;Parameters&gt;&lt;Parameter Name="_1_" Type="System.String, mscorlib" Direction="In" DisplayName="Keywords" DesignerType="TextBox" Description="Keyword to find in title field." /&gt;&lt;/Parameters&gt;&lt;/Condition&gt;&lt;/Conditions&gt;&lt;Actions Sequential="then" Parallel="and"&gt;&lt;Default&gt;&lt;RuleDesigner Sentence="Run action %1"&gt;&lt;FieldBind Id="1" Function="true" DesignerType="TextBox" /&gt;&lt;/RuleDesigner&gt;&lt;/Default&gt;&lt;Action Name="Send an Email" ClassName="Microsoft.SharePoint.WorkflowActions.EmailActivity" Assembly="Microsoft.SharePoint.WorkflowActions, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" Category="Core Actions" AppliesTo="all"&gt;&lt;RuleDesigner Sentence="Email %1"&gt;&lt;FieldBind Field="To,CC,Subject,Body" Text="these users" DesignerType="Email" Id="1" /&gt;&lt;/RuleDesigner&gt;&lt;Parameters&gt;&lt;Parameter Name="__Context" Type="Microsoft.SharePoint.WorkflowActions.WorkflowContext, Microsoft.SharePoint.WorkflowActions" Direction="In" DesignerType="Hide" /&gt;&lt;Parameter Name="Body" Type="System.String, mscorlib" Direction="Optional" DesignerType="StringBuilder" Description="Body text of the email." /&gt;&lt;Parameter Name="To" Type="System.Collections.ArrayList, mscorlib" Direction="In" DesignerType="Person" Description="Recipients of the email." /&gt;&lt;Parameter Name="CC" Type="System.Collections.ArrayList, mscorlib" Direction="Optional" DesignerType="Person" Description="Carbon copy recipients of the email." /&gt;&lt;Parameter Name="Subject" Type="System.String, mscorlib" Direction="In" DesignerType="StringBuilder" Description="Subject line of the email." /&gt;&lt;Parameter Name="BCC" Type="System.Collections.ArrayList, mscorlib" Direction="Optional" DesignerType="Person" Description="Blind carbon copy recipients of the email." /&gt;&lt;/Parameters&gt;&lt;/Action&gt;&lt;Action Name="Collect Data from a User" ClassName="Microsoft.SharePoint.WorkflowActions.WithKey.CollectDataTask" Assembly="Microsoft.SharePoint.WorkflowActions, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" AppliesTo="all" CreatesTask="true" CreatedTaskFormType="DataCollectTask" Category="Task Actions"&gt;&lt;RuleDesigner Sentence="Collect %1 from %2 (Output to %3)"&gt;&lt;FieldBind Field="Title,ContentTypeId" DesignerType="Survey" Text="data" Id="1" /&gt;&lt;FieldBind Field="AssignedTo" DesignerType="SinglePerson" Text="this user" Id="2" /&gt;&lt;FieldBind Field="TaskId" DesignerType="ParameterNames" Text="collect" Id="3" /&gt;&lt;/RuleDesigner&gt;&lt;Parameters&gt;&lt;Parameter Name="__Context" Type="Microsoft.SharePoint.WorkflowActions.WorkflowContext, Microsoft.SharePoint.WorkflowActions" Direction="In" DesignerType="Hide" /&gt;&lt;Parameter Name="ContentTypeId" Type="System.String, mscorlib" Direction="In" DesignerType="ContentType" DisplayName="ContentType" Description="Content type used for this task." /&gt;&lt;Parameter Name="AssignedTo" Type="System.String, mscorlib" Direction="In" DesignerType="SinglePerson" Description="Person or group to collect data from." /&gt;&lt;Parameter Name="Title" Type="System.String, mscorlib" Direction="In" DesignerType="Hide" /&gt;&lt;Parameter Name="TaskId" Type="Microsoft.SharePoint.Workflow.SPItemKey, Microsoft.SharePoint" Direction="Out" DesignerType="ParameterNames" Description="ID of the task created by this action." /&gt;&lt;/Parameters&gt;&lt;/Action&gt;&lt;Action Name="Do Calculation" ClassName="Microsoft.SharePoint.WorkflowActions.MathActivity" Assembly="Microsoft.SharePoint.WorkflowActions, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" AppliesTo="all" Category="Core Actions"&gt;&lt;RuleDesigner Sentence="Calculate %1 %2 %3 (Output to %4)"&gt;&lt;FieldBind Field="Operand1" Text="value" Id="1" TypeFrom="*ValueType" DesignerType="TextBox" /&gt;&lt;FieldBind Id="2" Field="Operator" DesignerType="Operator" OperatorTypeFrom="Variable" Text="this operation"&gt;&lt;Option Name="plus" Value="add" TypeFilter="System.Double;System.Int32;System.Uint32;System.String" /&gt;&lt;Option Name="minus" Value="sub" TypeFilter="System.Double;System.Int32;System.Uint32" /&gt;&lt;Option Name="multiply by" Value="times" TypeFilter="System.Double;System.Int32;System.Uint32" /&gt;&lt;Option Name="divided by" Value="divide" TypeFilter="System.Double;System.Int32;System.Uint32" /&gt;&lt;Option Name="mod" Value="mod" TypeFilter="System.Double;System.Int32;System.Uint32" /&gt;&lt;/FieldBind&gt;&lt;FieldBind Field="Operand2" Text="value" Id="3" TypeFrom="*ValueType" DesignerType="TextBox" /&gt;&lt;FieldBind Field="Variable,ValueType" Text="calc" Id="4" DesignerType="ParameterNames" /&gt;&lt;/RuleDesigner&gt;&lt;Parameters&gt;&lt;Parameter Name="Variable" Type="System.Object, mscorlib" Direction="Out" DesignerType="ParameterNames" Description="Workflow variable output by this action." /&gt;&lt;Parameter Name="Operand1" Type="System.Object, mscorlib" Direction="In" DesignerType="TextBox" DisplayName="LeftOperand" Description="Left operand to use in calculation." /&gt;&lt;Parameter Name="Operand2" Type="System.Object, mscorlib" Direction="In" DesignerType="TextBox" DisplayName="RightOperand" Description="Right operand to use in calculation." /&gt;&lt;Parameter Name="ValueType" Type="System.String, mscorlib" Direction="In" InitialValue="System.Double, mscorlib" DesignerType="Hide" /&gt;&lt;Parameter Name="Operator" Type="System.String, mscorlib" Direction="In" InitialValue="add" DesignerType="Dropdown" Description="Operator to use in calculation." /&gt;&lt;/Parameters&gt;&lt;/Action&gt;&lt;Action Name="Add a Comment" ClassName="Microsoft.SharePoint.WorkflowActions.CommentActivity" Assembly="Microsoft.SharePoint.WorkflowActions, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" Category="Core Actions" AppliesTo="all"&gt;&lt;RuleDesigner Sentence="Comment: %1"&gt;&lt;FieldBind Field="CommentText" Text="comment text" Id="1" DesignerType="TextArea" /&gt;&lt;/RuleDesigner&gt;&lt;Parameters&gt;&lt;Parameter Name="CommentText" Type="System.String, mscorlib" Direction="In" DesignerType="TextArea" Description="Comment text." /&gt;&lt;/Parameters&gt;&lt;/Action&gt;&lt;/Actions&gt;&lt;CompositeSteps&gt;&lt;CompositeStep Name="Impersonation Sequence" ClassName="Microsoft.SharePoint.WorkflowActions.ImpersonationSequenceActivity" Assembly="Microsoft.SharePoint.WorkflowActions, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" AppliesTo="all" InvocationTags="ImpersonationSequence" ProhibitedInvocationTags="ImpersonationSequence" /&gt;&lt;/CompositeSteps&gt;&lt;VariableTypes&gt;&lt;VariableType Type="System.Boolean" DisplayName="Boolean" CoercionActivity="Microsoft.SharePoint.WorkflowActions.CoerceBooleanActivity" /&gt;&lt;VariableType Type="System.DateTime" DisplayName="Date/Time" CoercionActivity="Microsoft.SharePoint.WorkflowActions.CoerceDateTimeActivity" /&gt;&lt;VariableType Type="System.Double" DisplayName="Number" CoercionActivity="Microsoft.SharePoint.WorkflowActions.CoerceDoubleActivity" /&gt;&lt;VariableType Type="System.Int32" DisplayName="Integer" CoercionActivity="Microsoft.SharePoint.WorkflowActions.CoerceIntActivity" /&gt;&lt;VariableType Type="System.String" Default="true" DisplayName="String" CoercionActivity="Microsoft.SharePoint.WorkflowActions.CoerceStringActivity" /&gt;&lt;VariableType Type="Microsoft.SharePoint.Workflow.SPItemKey" DisplayName="List Item Id" Assembly="Microsoft.SharePoint, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" CoercionActivity="Microsoft.SharePoint.WorkflowActions.CoerceSPItemKeyActivity" ItemIdType="true" /&gt;&lt;/VariableTypes&gt;&lt;AssemblyRedirects&gt;&lt;AssemblyRedirect From="Microsoft.SharePoint, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" To="Microsoft.SharePoint, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" /&gt;&lt;AssemblyRedirect From="Microsoft.SharePoint, Version=12.0.0.0, Culture=neutral, PublicKeyToken=null" To="Microsoft.SharePoint, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" /&gt;&lt;AssemblyRedirect From="Microsoft.SharePoint.WorkflowActions, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" To="Microsoft.SharePoint.WorkflowActions, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" /&gt;&lt;AssemblyRedirect From="Microsoft.SharePoint.WorkflowActions, Version=12.0.0.0, Culture=neutral, PublicKeyToken=null" To="Microsoft.SharePoint.WorkflowActions, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" /&gt;&lt;/AssemblyRedirects&gt;&lt;Coercions&gt;&lt;!-- lookup related --&gt;&lt;Coercion Name="LookupColumnDataOnlyAsDateTime" Assembly="Microsoft.SharePoint.WorkflowActions, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" DisplayName="Lookup Value (as Date/Time)" CatchAll="false" RankDefault="51" SourceType="System.String" SourceFieldType="Lookup" DestinationType="System.DateTime" /&gt;&lt;Coercion Name="LookupColumnDataOnlyAsDouble" Assembly="Microsoft.SharePoint.WorkflowActions, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" DisplayName="Lookup Value (as Number)" CatchAll="false" RankDefault="52" SourceType="System.String" SourceFieldType="Lookup" DestinationType="System.Double" /&gt;&lt;Coercion Name="AsDNString" Assembly="Microsoft.SharePoint.WorkflowActions, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" DisplayName="As String" CatchAll="true" RankDefault="1" DestinationType="System.String" /&gt;&lt;/Coercions&gt;&lt;/WorkflowInfo&gt;</FetchLegalWorkflowActionsResult>
       </FetchLegalWorkflowActionsResponse>
    </soap:Body>
 </soap:Envelope>