<Activity mc:Ignorable="sap sap2010" x:Class="GetTransactionData" xmlns="http://schemas.microsoft.com/netfx/2009/xaml/activities" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:mva="clr-namespace:Microsoft.VisualBasic.Activities;assembly=System.Activities" xmlns:sap="http://schemas.microsoft.com/netfx/2009/xaml/activities/presentation" xmlns:sap2010="http://schemas.microsoft.com/netfx/2010/xaml/activities/presentation" xmlns:scg="clr-namespace:System.Collections.Generic;assembly=mscorlib" xmlns:sd="clr-namespace:System.Data;assembly=System.Data" xmlns:ui="http://schemas.uipath.com/workflow/activities" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"> <x:Members> <x:Property sap2010:Annotation.AnnotationText="Sequential counter of transaction items." Name="in_TransactionNumber" Type="InArgument(x:Int32)" /> <x:Property sap2010:Annotation.AnnotationText="Dictionary structure to store configuration data of the process (settings, constants and assets)." Name="in_Config" Type="InArgument(scg:Dictionary(x:String, x:Object))" /> <x:Property sap2010:Annotation.AnnotationText="Transaction item to be processed." Name="out_TransactionItem" Type="OutArgument(x:String)" /> <x:Property sap2010:Annotation.AnnotationText="Allow the optional addition of information about the transaction item." Name="out_TransactionField1" Type="OutArgument(x:String)" /> <x:Property sap2010:Annotation.AnnotationText="Allow the optional addition of information about the transaction item." Name="out_TransactionField2" Type="OutArgument(x:String)" /> <x:Property sap2010:Annotation.AnnotationText="Transaction ID used for information and logging purposes. Ideally, the ID should be unique for each transaction. " Name="out_TransactionID" Type="OutArgument(x:String)" /> <x:Property sap2010:Annotation.AnnotationText="This variable can be used in case transactions are stored in a DataTable (for example, after being retrieved from a spreadsheet)." Name="io_TransactionData" Type="InOutArgument(scg:List(x:String))" /> <x:Property Name="io_BusinessData" Type="InOutArgument(scg:Dictionary(x:String, x:String))" /> </x:Members> <mva:VisualBasic.Settings> <x:Null /> </mva:VisualBasic.Settings> <sap:VirtualizedContainerService.HintSize>673,947</sap:VirtualizedContainerService.HintSize> <sap2010:WorkflowViewState.IdRef>GetTransactionData_1</sap2010:WorkflowViewState.IdRef> <TextExpression.NamespacesForImplementation> <scg:List x:TypeArguments="x:String" Capacity="24"> <x:String>System.Activities</x:String> <x:String>System.Activities.Statements</x:String> <x:String>System.Activities.Expressions</x:String> <x:String>System.Activities.Validation</x:String> <x:String>System.Activities.XamlIntegration</x:String> <x:String>Microsoft.VisualBasic</x:String> <x:String>Microsoft.VisualBasic.Activities</x:String> <x:String>System</x:String> <x:String>System.Collections</x:String> <x:String>System.Collections.Generic</x:String> <x:String>System.Data</x:String> <x:String>System.Diagnostics</x:String> <x:String>System.Drawing</x:String> <x:String>System.IO</x:String> <x:String>System.Linq</x:String> <x:String>System.Net.Mail</x:String> <x:String>System.Xml</x:String> <x:String>System.Xml.Linq</x:String> <x:String>UiPath.Core</x:String> <x:String>UiPath.Core.Activities</x:String> <x:String>System.Windows.Markup</x:String> <x:String>Microsoft.Activities</x:String> <x:String>System.Xml.Serialization</x:String> <x:String>UiPath.Excel</x:String> </scg:List> </TextExpression.NamespacesForImplementation> <TextExpression.ReferencesForImplementation> <scg:List x:TypeArguments="AssemblyReference" Capacity="23"> <AssemblyReference>System.Activities</AssemblyReference> <AssemblyReference>Microsoft.VisualBasic</AssemblyReference> <AssemblyReference>mscorlib</AssemblyReference> <AssemblyReference>System.Data</AssemblyReference> <AssemblyReference>System</AssemblyReference> <AssemblyReference>System.Drawing</AssemblyReference> <AssemblyReference>System.Core</AssemblyReference> <AssemblyReference>System.Xml</AssemblyReference> <AssemblyReference>System.Xml.Linq</AssemblyReference> <AssemblyReference>PresentationFramework</AssemblyReference> <AssemblyReference>WindowsBase</AssemblyReference> <AssemblyReference>PresentationCore</AssemblyReference> <AssemblyReference>System.Xaml</AssemblyReference> <AssemblyReference>Microsoft.Activities</AssemblyReference> <AssemblyReference>System.ComponentModel.Composition</AssemblyReference> <AssemblyReference>System.ServiceModel</AssemblyReference> <AssemblyReference>Microsoft.VisualStudio.Services.Common</AssemblyReference> <AssemblyReference>System.Data.DataSetExtensions</AssemblyReference> <AssemblyReference>UiPath.System.Activities</AssemblyReference> <AssemblyReference>UiPath.UiAutomation.Activities</AssemblyReference> <AssemblyReference>UiPath.Excel.Activities</AssemblyReference> <AssemblyReference>UiPath.Excel</AssemblyReference> </scg:List> </TextExpression.ReferencesForImplementation> <Sequence sap2010:Annotation.AnnotationText="Get a transaction item from a specified source (e.g., Orchestrator queues, spreadsheets, databases, mailboxes or web APIs). 

If there are no transaction items remaining, out_TransactionItem is set to Nothing, which leads to the End Process state. 

For cases in which there is only a single transaction (i.e., a linear process), use an If activity to check whether the argument in_TransactionNumber has the value 1 (meaning it is the first and only transaction) and assign the transaction item to out_TransactionItem. For any other value of in_TransactionNumber, out_TransactionItem should be set to Nothing.

If there are multiple transactions, use the argument in_TransactionNumber as an index to retrieve the correct transaction to be processed. If there are no more transactions left, it is necessary to set out_TransactionItem to Nothing, thus ending the process." DisplayName="Get Transaction Data" sap:VirtualizedContainerService.HintSize="653,796" sap2010:WorkflowViewState.IdRef="Sequence_1"> <sap:WorkflowViewStateService.ViewState> <scg:Dictionary x:TypeArguments="x:String, x:Object"> <x:Boolean x:Key="IsExpanded">True</x:Boolean> <x:Boolean x:Key="IsAnnotationDocked">True</x:Boolean> </scg:Dictionary> </sap:WorkflowViewStateService.ViewState> <ui:CommentOut DisplayName="Comment Out" sap:VirtualizedContainerService.HintSize="611,51" sap2010:WorkflowViewState.IdRef="CommentOut_1"> <ui:CommentOut.Body> <Sequence DisplayName="Ignored Activities" sap:VirtualizedContainerService.HintSize="242,306" sap2010:WorkflowViewState.IdRef="Sequence_4"> <sap:WorkflowViewStateService.ViewState> <scg:Dictionary x:TypeArguments="x:String, x:Object"> <x:Boolean x:Key="IsExpanded">True</x:Boolean> </scg:Dictionary> </sap:WorkflowViewStateService.ViewState> <ui:GetQueueItem TimeoutMS="{x:Null}" sap2010:Annotation.AnnotationText="Get a transaction item from the specified Orchestrator queue.
If queues are not used in this process, replace this activity with the appropriated logic to retrieve transaction items.
For example, if transactions are rows from a DataTable, the row corresponding to the current transaction is retrieved at this point." ContinueOnError="True" DisplayName="Get transaction item" sap:VirtualizedContainerService.HintSize="200,214" sap2010:WorkflowViewState.IdRef="GetQueueItem_1" QueueType="[in_Config("OrchestratorQueueName").ToString]" TransactionItem="[out_TransactionItem]"> <sap:WorkflowViewStateService.ViewState> <scg:Dictionary x:TypeArguments="x:String, x:Object"> <x:Boolean x:Key="IsAnnotationDocked">True</x:Boolean> </scg:Dictionary> </sap:WorkflowViewStateService.ViewState> </ui:GetQueueItem> </Sequence> </ui:CommentOut.Body> <sap:WorkflowViewStateService.ViewState> <scg:Dictionary x:TypeArguments="x:String, x:Object"> <x:Boolean x:Key="IsExpanded">False</x:Boolean> <x:Boolean x:Key="IsPinned">False</x:Boolean> </scg:Dictionary> </sap:WorkflowViewStateService.ViewState> </ui:CommentOut> <ui:CommentOut DisplayName="Comment Out" sap:VirtualizedContainerService.HintSize="611,51" sap2010:WorkflowViewState.IdRef="CommentOut_2"> <ui:CommentOut.Body> <Sequence DisplayName="Ignored Activities" sap:VirtualizedContainerService.HintSize="526,174" sap2010:WorkflowViewState.IdRef="Sequence_5"> <sap:WorkflowViewStateService.ViewState> <scg:Dictionary x:TypeArguments="x:String, x:Object"> <x:Boolean x:Key="IsExpanded">True</x:Boolean> </scg:Dictionary> </sap:WorkflowViewStateService.ViewState> <If sap2010:Annotation.AnnotationText="This optional step can be used to include more information about a transaction item and it is used mainly for logging and visualization purposes.
For example, if transaction items are invoices, then out_TransactionID can be the invoice number, out_TransactionField1 can be the invoice date and out_TransactionField2 can be the invoice amount." Condition="[out_TransactionItem isNot Nothing]" DisplayName="If a new transaction item is retrieved, get additional information about it" sap:VirtualizedContainerService.HintSize="341,273" sap2010:WorkflowViewState.IdRef="If_1"> <sap:WorkflowViewStateService.ViewState> <scg:Dictionary x:TypeArguments="x:String, x:Object"> <x:Boolean x:Key="IsAnnotationDocked">True</x:Boolean> <x:Boolean x:Key="IsExpanded">False</x:Boolean> <x:Boolean x:Key="IsPinned">False</x:Boolean> </scg:Dictionary> </sap:WorkflowViewStateService.ViewState> <If.Then> <Sequence sap2010:Annotation.AnnotationText="Write data to the added log fields that identify the transaction." DisplayName="Add transaction information to log fields" sap:VirtualizedContainerService.HintSize="304,394" sap2010:WorkflowViewState.IdRef="Sequence_3"> <sap:WorkflowViewStateService.ViewState> <scg:Dictionary x:TypeArguments="x:String, x:Object"> <x:Boolean x:Key="IsExpanded">True</x:Boolean> <x:Boolean x:Key="IsAnnotationDocked">True</x:Boolean> </scg:Dictionary> </sap:WorkflowViewStateService.ViewState> <Assign DisplayName="Assign out_TransactionID" sap:VirtualizedContainerService.HintSize="262,60" sap2010:WorkflowViewState.IdRef="Assign_5"> <Assign.To> <OutArgument x:TypeArguments="x:String">[out_TransactionID]</OutArgument> </Assign.To> <Assign.Value> <InArgument x:TypeArguments="x:String">[now.ToString]</InArgument> </Assign.Value> </Assign> <Assign DisplayName="Assign out_TransactionField1" sap:VirtualizedContainerService.HintSize="262,60" sap2010:WorkflowViewState.IdRef="Assign_6"> <Assign.To> <OutArgument x:TypeArguments="x:String">[out_TransactionField1]</OutArgument> </Assign.To> <Assign.Value> <InArgument x:TypeArguments="x:String">[string.Empty]</InArgument> </Assign.Value> </Assign> <Assign DisplayName="Assign out_TransactionField2" sap:VirtualizedContainerService.HintSize="262,60" sap2010:WorkflowViewState.IdRef="Assign_7"> <Assign.To> <OutArgument x:TypeArguments="x:String">[out_TransactionField2]</OutArgument> </Assign.To> <Assign.Value> <InArgument x:TypeArguments="x:String">[string.Empty]</InArgument> </Assign.Value> </Assign> </Sequence> </If.Then> </If> </Sequence> </ui:CommentOut.Body> <sap:WorkflowViewStateService.ViewState> <scg:Dictionary x:TypeArguments="x:String, x:Object"> <x:Boolean x:Key="IsExpanded">False</x:Boolean> <x:Boolean x:Key="IsPinned">False</x:Boolean> </scg:Dictionary> </sap:WorkflowViewStateService.ViewState> </ui:CommentOut> <If Condition="[io_TransactionData.Count >= in_TransactionNumber]" sap:VirtualizedContainerService.HintSize="611,300" sap2010:WorkflowViewState.IdRef="If_2"> <If.Then> <Sequence DisplayName="Формирование " sap:VirtualizedContainerService.HintSize="304,152" sap2010:WorkflowViewState.IdRef="Sequence_6"> <Sequence.Variables> <Variable x:TypeArguments="sd:DataTable" Name="dtTaskData" /> <Variable x:TypeArguments="sd:DataRow" Name="selectedRow" /> </Sequence.Variables> <sap:WorkflowViewStateService.ViewState> <scg:Dictionary x:TypeArguments="x:String, x:Object"> <x:Boolean x:Key="IsExpanded">True</x:Boolean> </scg:Dictionary> </sap:WorkflowViewStateService.ViewState> <Assign DisplayName="Assign transaction item" sap:VirtualizedContainerService.HintSize="262,60" sap2010:WorkflowViewState.IdRef="Assign_8"> <Assign.To> <OutArgument x:TypeArguments="x:String">[out_TransactionItem]</OutArgument> </Assign.To> <Assign.Value> <InArgument x:TypeArguments="x:String">[io_TransactionData(in_TransactionNumber - 1)]</InArgument> </Assign.Value> </Assign> </Sequence> </If.Then> <If.Else> <Assign sap:VirtualizedContainerService.HintSize="262,60" sap2010:WorkflowViewState.IdRef="Assign_10"> <Assign.To> <OutArgument x:TypeArguments="x:String">[out_TransactionItem]</OutArgument> </Assign.To> <Assign.Value> <InArgument x:TypeArguments="x:String">[string.Empty]</InArgument> </Assign.Value> </Assign> </If.Else> </If> </Sequence> </Activity>