Troubleshooting RPA bot generation in IBM Task Mining

Use these solutions to resolve common problems that you might encounter with RPA bot generation.

Invalid function name of custom bot generator

This issue occurs during script upload when you add or edit a custom vendor.

Symptom

You receive the 400 Bad Request HTTP status code with an error information that the function name of your custom bot generator is invalid.

Workaround

To resolve this issue, change the name of the main function in the RPA bot generator script to generateBot. The following code block shows the generateBot function.

function generateBot(dataModel, snippets, contextual data) {

    const content_xaml = build_xaml(dataModel, snippets, contetualData);

    const xaml_file = {
      "name" : "uipath",
      "extension" : ".xaml",
      "value" : content_xaml
    };

    // Any number of files can be appended to the output object
    const result = {
      "files" : [xaml_file]
    };

    return result;
}

For more information on pluggable RPA bot generator script, see Understanding the pluggable RPA bot generator.

Invalid function arguments list of custom bot generator

This issue occurs during script upload when you add or edit a custom vendor.

Symptom

You receive the 400 Bad Request HTTP status code with an error information that the function argument list of your custom bot generator is invalid.

Workaround

To resolve this issue, provide three function arguments for the generateBot function. The following code block shows the generateBot function.

function generateBot(dataModel, snippets, contextual data) {

    const content_xaml = build_xaml(dataModel, snippets, contetualData);

    const xaml_file = {
      "name" : "uipath",
      "extension" : ".xaml",
      "value" : content_xaml
    };

    // Any number of files can be appended to the output object
    const result = {
      "files" : [xaml_file]
    };

    return result;
}

For more information on pluggable RPA bot generator script, see Understanding the pluggable RPA bot generator.

Input contains no snippets for the custom vendor

This issue occurs when your input contains no snippets for the custom vendor.

Symptom

The error notification is displayed in the Manage RPA vendors dialog when you add or edit a custom vendor.

Workaround

When you upload snippets for a vendor, make sure that the RPA vendor name is correctly updated as the value for the vendor field in the JSON file.

For example, if you are adding or updating a custom vendor redwood, update the value of the vendor field in the JSON file as redwood.

Edit and delete buttons are unavailable

This issue occurs only when the credentials that you are using do not have privileges for editing and deleting custom vendors.

Symptom

The Edit and the Delete buttons in the Manage RPA vendors dialog are unavailable.

Workaround

To edit the tenant permissions in the IBM Process Mining, do the following steps:

  1. Go to Administration > Authorizations.

  2. In the left panel, go to Taskminer > RPA Script.

  3. Search the user credentials that you want to update.

  4. Select the credentials and click Edit.

  5. Choose write permission in the Permissions dropdown.

  6. Click OK to save the changes.

For more information, see Managing authorizations.

Tagged and Published tasks of an activity does not appear in the RPA Script of IBM Task Mining

This error occurs when the tagged and published task is marked as human mandatory.

Symptom

Since the task is marked as human mandatory, the task cannot be automated. The task does not show in the RPA Script tab for snippets allocation.

RPA bot does not open in the vendor application or the completed bot displays errors

This error occurs when the generated script includes an incorrect syntax or when the closing scripts that are required for the specific vendor are missing.

Symptom

The issue occurs when the necessary imports are missing in the file and you receive an error notification.

The generator expects such imports to be supplied through the pre-executionScript in the IBM Process Mining application. The closing statements are normally supplied through the post-executionScript in the IBM Process Mining application.

Workaround

The following example demonstrates a sample pre-execution script that you might use for UiPath. The required headers for the generated bot are defined in the sample script. You can use the following script as a post-execution script for UiPath.

<Activity mc:Ignorable="sap sap2010" x:Class="StateMachine" VisualBasic.Settings="{x:Null}" sap:VirtualizedContainerService.HintSize="1054,1362" sap2010:WorkflowViewState.IdRef="ActivityBuilder_1" xmlns="http://schemas.microsoft.com/netfx/2009/xaml/activities" xmlns:av="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 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=System.Private.CoreLib" xmlns:ucas="clr-namespace:UiPath.Core.Activities.SAP;assembly=UiPath.UiAutomation.Activities" xmlns:ui="http://schemas.uipath.com/workflow/activities" xmlns:uix="http://schemas.uipath.com/workflow/activities/uix" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<TextExpression.NamespacesForImplementation>
  <scg:List x:TypeArguments="x:String" Capacity="70">
   <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>System.Windows.Markup</x:String>
   <x:String>UiPath.Core</x:String>
   <x:String>UiPath.Core.Activities</x:String>
   <x:String>GlobalVariablesNamespace</x:String>
   <x:String>GlobalConstantsNamespace</x:String>
   <x:String>System.Collections.ObjectModel</x:String>
   <x:String>UiPath.Core.Activities.SAP</x:String>
   <x:String>System.Security</x:String>
   <x:String>UiPath.UIAutomationCore.Contracts</x:String>
   <x:String>UiPath.Platform.ObjectLibrary</x:String>
   <x:String>System.ComponentModel</x:String>
   <x:String>UiPath.UIAutomationNext.Enums</x:String>
   <x:String>UiPath.UIAutomationNext.Activities</x:String>
   <x:String>UiPath.Shared.Activities</x:String>
   <x:String>System.Reflection</x:String>
   <x:String>UiPath.Platform.Triggers</x:String>
   <x:String>UiPath.Platform.Triggers.Scope</x:String>
   <x:String>System.Runtime.Serialization</x:String>
  </scg:List>
 </TextExpression.NamespacesForImplementation>
 <TextExpression.ReferencesForImplementation>
  <scg:List x:TypeArguments="AssemblyReference" Capacity="46">
   <AssemblyReference>System.Activities</AssemblyReference>
   <AssemblyReference>Microsoft.VisualBasic</AssemblyReference>
   <AssemblyReference>System.Private.CoreLib</AssemblyReference>
   <AssemblyReference>System.Data</AssemblyReference>
   <AssemblyReference>System.Data.DataSetExtensions</AssemblyReference>
   <AssemblyReference>System</AssemblyReference>
   <AssemblyReference>System.Drawing</AssemblyReference>
   <AssemblyReference>System.Core</AssemblyReference>
   <AssemblyReference>System.Xml</AssemblyReference>
   <AssemblyReference>System.Xml.Linq</AssemblyReference>
   <AssemblyReference>System.Xaml</AssemblyReference>
   <AssemblyReference>UiPath.System.Activities</AssemblyReference>
   <AssemblyReference>UiPath.UiAutomation.Activities</AssemblyReference>
   <AssemblyReference>UiPath.Studio.Constants</AssemblyReference>
   <AssemblyReference>System.ObjectModel</AssemblyReference>
   <AssemblyReference>System.Security.Permissions</AssemblyReference>
   <AssemblyReference>System.Runtime.InteropServices</AssemblyReference>
   <AssemblyReference>UiPath.UIAutomationCore</AssemblyReference>
   <AssemblyReference>UiPath.Platform</AssemblyReference>
   <AssemblyReference>UiPath.UIAutomationNext</AssemblyReference>
   <AssemblyReference>UiPath.UIAutomationNext.Activities</AssemblyReference>
   <AssemblyReference>UiPath.Excel.Activities</AssemblyReference>
   <AssemblyReference>UiPath.Mail.Activities</AssemblyReference>
   <AssemblyReference>UiPath.OCR.Activities</AssemblyReference>
   <AssemblyReference>System.ComponentModel.EventBasedAsync</AssemblyReference>
   <AssemblyReference>PresentationFramework</AssemblyReference>
   <AssemblyReference>System.ComponentModel.TypeConverter</AssemblyReference>
   <AssemblyReference>WindowsBase</AssemblyReference>
   <AssemblyReference>Microsoft.Win32.Primitives</AssemblyReference>
   <AssemblyReference>System.ComponentModel</AssemblyReference>
   <AssemblyReference>System.ComponentModel.Primitives</AssemblyReference>
   <AssemblyReference>System.Reflection.DispatchProxy</AssemblyReference>
   <AssemblyReference>System.Reflection.TypeExtensions</AssemblyReference>
   <AssemblyReference>System.Reflection.Metadata</AssemblyReference>
   <AssemblyReference>NPOI</AssemblyReference>
   <AssemblyReference>System.Memory.Data</AssemblyReference>
   <AssemblyReference>System.Console</AssemblyReference>
   <AssemblyReference>System.Configuration.ConfigurationManager</AssemblyReference>
   <AssemblyReference>System.Memory</AssemblyReference>
   <AssemblyReference>System.Private.Uri</AssemblyReference>
   <AssemblyReference>UiPath.Workflow</AssemblyReference>
   <AssemblyReference>System.Private.ServiceModel</AssemblyReference>
   <AssemblyReference>System.Runtime.Serialization.Formatters</AssemblyReference>
   <AssemblyReference>System.Private.DataContractSerialization</AssemblyReference>
   <AssemblyReference>System.Runtime.Serialization.Primitives</AssemblyReference>
  </scg:List>
 </TextExpression.ReferencesForImplementation>

You can use the following tag as the closing tag for the generated script.

</Activity>

Complier error when you open the generated RPA bot in the UiPath Studio

This issue occurs when you try to view the generated RPA bot but the BPMN of the model contains empty rules.

Symptom

The generator execution results in an RPA bot with compilation errors and you receive an error notification that the complier processed an empty rule expression.

Workaround

Do not have rule-based transitions with empty rules. In such a case, the generator puts an empty rule in the conditional transition and continues the generation process. That results in the error.

When this error occurs, verify whether the process model is valid and that you are generating the bot for valid variants.