编写UiPath Queue生产者时触发IPersistenceBookmarks验证异常求助
Hey there! I've run into this exact IPersistenceBookmarks ValidationException before when working on simple Queue producer projects in UiPath, even without touching bookmarks at all. Let's break down what's going on and how to fix it:
First, a quick note: Bookmarks are UiPath's way of persisting long-running workflows so they can resume from where they left off. You don't need them for a basic queue producer, which is why this error feels confusing—your project shouldn't be triggering bookmark-related checks in the first place.
1. Turn Off Persistence in Project Settings
This is the most common fix for this issue:
- Open your project in UiPath Studio, then go to Project Settings (the gear icon in the top right)
- Navigate to the Persistence tab
- Uncheck the Enable Persistence checkbox
- Save your settings and re-run the project
UiPath enables persistence by default in some project templates, which triggers bookmark validation even if you don't use any bookmark activities. Disabling this will bypass those checks entirely.
2. Verify Orchestrator & Queue Configuration
Sometimes the error is a red herring, and the real issue is with your queue setup:
- Double-check that your robot is properly connected to Orchestrator and has Create permissions for the target queue
- Ensure the queue name in your
Add Queue Itemactivity matches exactly (including capitalization) the queue name in Orchestrator—UiPath is case-sensitive here - Confirm the queue actually exists in your Orchestrator tenant/folder
3. Clean & Rebuild Your Project
Corrupted project files or cached dependencies can also trigger this error:
- Right-click your project in the Project Panel and select Clean
- Next, right-click again and select Rebuild
- If that doesn't work, close UiPath Studio, delete the
.nugetfolder in your project directory, then re-open the project to let it re-download dependencies
4. Check Version Compatibility
Mismatched versions between UiPath Studio, Robot, and Orchestrator can cause unexpected validation errors:
- Ensure all three components are running the same stable version (UiPath recommends using matching versions to avoid compatibility bugs)
- If you're on an older version, try upgrading to the latest LTS release
5. Temporary Workaround: Use Orchestrator API Directly
If you still hit the error, you can bypass the Add Queue Item activity entirely by calling the Orchestrator API with an Invoke Method activity:
- Add an
Invoke Methodactivity to your workflow - Set Method Type to
Static - Set Type to
UiPath.Core.Activities.Orchestrator.HttpClient - Set Method Name to
PostQueueItem - Add parameters for:
queueName: The name of your target queue (string)itemData: ADictionary<string, object>containing your queue item's dataorchestratorUrl: Your Orchestrator instance URL (string)robotKey: Your robot's API key (string)
This skips the UiPath activity's internal persistence checks and directly interacts with the API to add your queue item.
内容的提问来源于stack exchange,提问作者Callie Jones

