Skip to content

Accessing Execution Logs

Symptoms

These logs are stored in Azure Cosmos MongoDB and may be required to investigate a full execution. The portal's Data Explorer only shows individual records, not an entire execution trace.

Scope

Applies when you need the full execution JSON for a single process instance.

How to export execution logs

  1. Download and extract the MongoDB Database Tools: https://www.mongodb.com/try/download/database-tools
  2. Use the Windows Command Prompt for best results.
  3. Open a command prompt in the tools bin directory.
  4. Create a file called query.json containing the execution CorrelationId (replace the ID):

{ "CorrelationId": "ID" }
4. Set your MongoDB connection string into an environment variable to avoid escaping issues (Windows CMD):

set "AZCOSMOS_URI=YOUR_MONGODB_CONNECTIONSTRING"
5. Run the export:

mongoexport.exe --uri "%AZCOSMOS_URI%" --db npobpmastmdb001custexec --collection ExecutionQueueItem --jsonArray --queryFile query.json --out results.json

Verification checklist

  • [ ] results.json contains the full execution records for the CorrelationId

Notes

  • The portal Data Explorer returns single documents only; exporting is required for full traces.