# OfficeWorkflowRunner

Runs bounded local conversion and PDF health workflows and publishes validated artifacts atomically.

Class 

`OfficeIMO.Workflows`

**Namespace**

`OfficeIMO.Workflows`

**Assembly**

`OfficeIMO.Workflows`

**Source revision**

`ba882f6b0d07` with working tree changes

**Source**

[OfficeWorkflowRunner.cs:30](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Workflows/OfficeWorkflowRunner.cs#L30)

**Implements**

`IOfficeInvoiceWorkflowRunner` `IOfficeWorkflowRunner` `IOfficeOutputWorkflowRunner` `IOfficeProvenanceWorkflowRunner` `IPdfRedactionWorkflowRunner`

**Modifiers**

sealed

Runs bounded local conversion and PDF health workflows and publishes validated artifacts atomically.

## Inheritance

- object
- OfficeWorkflowRunner

## Usage

Explore 1 API references to this type

This type appears in these public API surfaces even when no hand-authored example is attached directly to the page.

### Returned or exposed by 1

- Method [OfficeWorkflowRunner.ForRegisteredConversions](/api/workflows/officeimo-workflows-officeworkflowrunner/#method-forregisteredconversions-collections-generic-ienumerable-officeimo-workflows-officeworkflowconversionregistration)

Filter members 

Show inherited

## Constructors

OfficeWorkflowRunner 3 overloads

`public OfficeWorkflowRunner()` [#](#constructor-ctor)

[OfficeWorkflowRunner.Provenance.cs:17](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Workflows/OfficeWorkflowRunner.Provenance.cs#L17)

Creates a workflow runner without optional provenance providers.

`public OfficeWorkflowRunner(IOfficeProvenanceVerifier? provenanceVerifier, IEnumerable<IOfficeProvenanceSignalDetector>? provenanceSignalDetectors = null)` [#](#constructor-ctor-officeimo-provenance-iofficeprovenanceverifier-collections-generic-ienumerable-officeimo-provenance-iofficeprovenancesignaldetector)

[OfficeWorkflowRunner.Provenance.cs:23](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Workflows/OfficeWorkflowRunner.Provenance.cs#L23)

Creates a workflow runner with optional cryptographic and provider-specific provenance services.

Parameters

**provenanceVerifier OfficeIMO.Provenance.IOfficeProvenanceVerifier? required**

**provenanceSignalDetectors System.Collections.Generic.IEnumerable<OfficeIMO.Provenance.IOfficeProvenanceSignalDetector>? = null optional**

`public OfficeWorkflowRunner(IOfficeProvenanceVerifier? provenanceVerifier, IEnumerable<IOfficeProvenanceSignalDetector>? provenanceSignalDetectors, IEnumerable<OfficeWorkflowConversionRegistration>? conversions)` [#](#member-7a46e82e600a6a2c8841ae3d)

[OfficeWorkflowRunner.Provenance.cs:30](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Workflows/OfficeWorkflowRunner.Provenance.cs#L30)

Creates a runner with provenance providers and opt-in canonical conversion implementations.

Parameters

**provenanceVerifier OfficeIMO.Provenance.IOfficeProvenanceVerifier? required**

**provenanceSignalDetectors System.Collections.Generic.IEnumerable<OfficeIMO.Provenance.IOfficeProvenanceSignalDetector>? required**

**conversions System.Collections.Generic.IEnumerable<OfficeIMO.Workflows.OfficeWorkflowConversionRegistration>? required**

## Methods

`public async Task<PdfAssemblyResult> AssemblePdfAsync(PdfAssemblyRequest request, IProgress<OfficeWorkflowProgress>? progress = null, CancellationToken cancellationToken = default)` [#](#method-assemblepdfasync-officeimo-workflows-pdfassemblyrequest-iprogress-officeimo-workflows-officeworkflowprogress-threading-cancellationtoken)

Normalizes supported inputs and assembles them into one validated PDF.

Parameters

**request OfficeIMO.Workflows.PdfAssemblyRequest required**

**progress System.IProgress<OfficeIMO.Workflows.OfficeWorkflowProgress>? = null optional**

**cancellationToken System.Threading.CancellationToken = default optional**

Returns

`Task<PdfAssemblyResult>`

`public async Task<PdfPageImageExportResult> ExportPdfPagesAsync(PdfPageImageExportRequest request, IProgress<OfficeWorkflowProgress>? progress = null, CancellationToken cancellationToken = default)` [#](#method-exportpdfpagesasync-officeimo-workflows-pdfpageimageexportrequest-iprogress-officeimo-workflows-officeworkflowprogress-threading-cancellationtoken)

Exports selected PDF pages into a validated image folder.

Parameters

**request OfficeIMO.Workflows.PdfPageImageExportRequest required**

**progress System.IProgress<OfficeIMO.Workflows.OfficeWorkflowProgress>? = null optional**

**cancellationToken System.Threading.CancellationToken = default optional**

Returns

`Task<PdfPageImageExportResult>`

`public static OfficeWorkflowRunner ForRegisteredConversions(IEnumerable<OfficeWorkflowConversionRegistration> conversions)` [#](#method-forregisteredconversions-collections-generic-ienumerable-officeimo-workflows-officeworkflowconversionregistration)

[OfficeWorkflowRunner.Registration.cs:15](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Workflows/OfficeWorkflowRunner.Registration.cs#L15)

Creates a runner whose requests run only the supplied conversions.

Parameters

**conversions System.Collections.Generic.IEnumerable<OfficeIMO.Workflows.OfficeWorkflowConversionRegistration> required**

Returns

`OfficeWorkflowRunner`

`public async Task<PdfSearchableWorkflowResult> MakePdfSearchableAsync(PdfSearchableWorkflowRequest request, IOcrEngine engine, CancellationToken cancellationToken = default)` [#](#method-makepdfsearchableasync-officeimo-workflows-pdfsearchableworkflowrequest-officeimo-ocr-iocrengine-threading-cancellationtoken)

Recognizes an immutable source snapshot, reopens the generated PDF, and publishes after source and host checks.

Parameters

**request OfficeIMO.Workflows.PdfSearchableWorkflowRequest required**

**engine OfficeIMO.Ocr.IOcrEngine required**

**cancellationToken System.Threading.CancellationToken = default optional**

Returns

`Task<PdfSearchableWorkflowResult>`

`public async Task<PdfFormOcrReview> PreparePdfFormOcrAsync(PdfDocument document, IOcrEngine engine, PdfOcrMergeOptions? options = null, OfficeOperationLimits? limits = null, CancellationToken cancellationToken = default)` [#](#method-preparepdfformocrasync-officeimo-pdf-pdfdocument-officeimo-ocr-iocrengine-officeimo-pdf-ocr-pdfocrmergeoptions-officeimo-officeoperationlimits-threading-cancellationtoken)

Prepares a bounded, immutable review of visible values in existing form fields.

Parameters

**document OfficeIMO.Pdf.PdfDocument required**

**engine OfficeIMO.Ocr.IOcrEngine required**

**options OfficeIMO.Pdf.Ocr.PdfOcrMergeOptions? = null optional**

**limits OfficeIMO.OfficeOperationLimits? = null optional**

**cancellationToken System.Threading.CancellationToken = default optional**

Returns

`Task<PdfFormOcrReview>`

`public static OfficeWorkflowDocumentPreview PreviewDocument(byte[] bytes, string extension, CancellationToken cancellationToken = default)` [#](#method-previewdocument-byte-string-threading-cancellationtoken)

[OfficeWorkflowRunner.Preview.cs:21](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Workflows/OfficeWorkflowRunner.Preview.cs#L21)

Creates an in-memory review sample through the existing native conversion route for a supported artifact.

Parameters

**bytes byte[] required**

**extension string required**

**cancellationToken System.Threading.CancellationToken = default optional**

Returns

`OfficeWorkflowDocumentPreview`

`public async Task<ImageOcrWorkflowResult> RecognizeImageAsync(ImageOcrWorkflowRequest request, IOcrEngine engine, CancellationToken cancellationToken = default)` [#](#method-recognizeimageasync-officeimo-workflows-imageocrworkflowrequest-officeimo-ocr-iocrengine-threading-cancellationtoken)

Recognizes an image through Reader.Ocr, reviews the text, and publishes a verified UTF-8 artifact.

Parameters

**request OfficeIMO.Workflows.ImageOcrWorkflowRequest required**

**engine OfficeIMO.Ocr.IOcrEngine required**

**cancellationToken System.Threading.CancellationToken = default optional**

Returns

`Task<ImageOcrWorkflowResult>`

`public Task<OfficeWorkflowResult> RunAsync(OfficeWorkflowRequest request, IProgress<OfficeWorkflowProgress>? progress = null, CancellationToken cancellationToken = default)` [#](#method-runasync-officeimo-workflows-officeworkflowrequest-iprogress-officeimo-workflows-officeworkflowprogress-threading-cancellationtoken)

[OfficeWorkflowRunner.cs:30](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Workflows/OfficeWorkflowRunner.cs#L30)

Runs one workflow request.

Parameters

**request OfficeIMO.Workflows.OfficeWorkflowRequest required**

**progress System.IProgress<OfficeIMO.Workflows.OfficeWorkflowProgress>? = null optional**

**cancellationToken System.Threading.CancellationToken = default optional**

Returns

`Task<OfficeWorkflowResult>`

`public async Task<IReadOnlyList<OfficeWorkflowResult>> RunBatchAsync(IEnumerable<OfficeWorkflowRequest> requests, IProgress<OfficeWorkflowProgress>? progress = null, CancellationToken cancellationToken = default)` [#](#method-runbatchasync-collections-generic-ienumerable-officeimo-workflows-officeworkflowrequest-iprogress-officeimo-workflows-officeworkflowprogress-threading-cancellationtoken)

Runs a batch sequentially so every request shares one predictable local resource budget.

Parameters

**requests System.Collections.Generic.IEnumerable<OfficeIMO.Workflows.OfficeWorkflowRequest> required**

**progress System.IProgress<OfficeIMO.Workflows.OfficeWorkflowProgress>? = null optional**

**cancellationToken System.Threading.CancellationToken = default optional**

Returns

`Task<IReadOnlyList<OfficeWorkflowResult>>`

RunInvoiceAsync 2 overloads

`public Task<OfficeInvoiceStorageWorkflowResult> RunInvoiceAsync(OfficeInvoiceStorageWorkflowRequest request, CancellationToken cancellationToken = default)` [#](#method-runinvoiceasync-officeimo-workflows-officeinvoicestorageworkflowrequest-threading-cancellationtoken)

[OfficeWorkflowRunner.Invoice.cs:13](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Workflows/Invoicing/OfficeWorkflowRunner.Invoice.cs#L13)

Executes a captured invoice request through the portable runner contract.

Parameters

**request OfficeIMO.Workflows.OfficeInvoiceStorageWorkflowRequest required**

**cancellationToken System.Threading.CancellationToken = default optional**

Returns

`Task<OfficeInvoiceStorageWorkflowResult>`

`public Task<OfficeInvoiceStorageWorkflowResult> RunInvoiceAsync(OfficeInvoiceStorageWorkflowRequest request, InvoiceValidator? validator, CancellationToken cancellationToken = default)` [#](#method-runinvoiceasync-officeimo-workflows-officeinvoicestorageworkflowrequest-officeimo-invoicing-validation-invoicevalidator-threading-cancellationtoken)

[OfficeWorkflowRunner.Invoice.cs:23](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Workflows/Invoicing/OfficeWorkflowRunner.Invoice.cs#L23)

Executes a captured invoice request with an explicit standards provider.

Parameters

**request OfficeIMO.Workflows.OfficeInvoiceStorageWorkflowRequest required**

**validator OfficeIMO.Invoicing.Validation.InvoiceValidator? required**

**cancellationToken System.Threading.CancellationToken = default optional**

Returns

`Task<OfficeInvoiceStorageWorkflowResult>`

`public async Task<IReadOnlyList<OfficeOcrSessionResult>> RunOcrSessionAsync(IEnumerable<OfficeOcrSessionRequest> requests, IOcrEngine engine, IProgress<OfficeWorkflowProgress>? progress = null, IProgress<OfficeOcrSessionResult>? resultsProgress = null, CancellationToken cancellationToken = default, IReadOnlyList<string>? protectedOutputPaths = null, IReadOnlyList<OfficeWorkflowProtectedSource>? protectedInputs = null)` [#](#member-1ab1a66261c28ccc01214448)

Runs an ordered OCR session with one caller-owned engine and at most one active recognition/review.

Parameters

**requests System.Collections.Generic.IEnumerable<OfficeIMO.Workflows.OfficeOcrSessionRequest> required**

**engine OfficeIMO.Ocr.IOcrEngine required**

**progress System.IProgress<OfficeIMO.Workflows.OfficeWorkflowProgress>? = null optional**

**resultsProgress System.IProgress<OfficeIMO.Workflows.OfficeOcrSessionResult>? = null optional**

**cancellationToken System.Threading.CancellationToken = default optional**

**protectedOutputPaths System.Collections.Generic.IReadOnlyList<string>? = null optional**

**protectedInputs System.Collections.Generic.IReadOnlyList<OfficeIMO.Workflows.OfficeWorkflowProtectedSource>? = null optional**

Returns

`Task<IReadOnlyList<OfficeOcrSessionResult>>`

`public async Task<OfficeProvenanceWorkflowResult> RunProvenanceAsync(OfficeProvenanceWorkflowRequest request, IProgress<OfficeWorkflowProgress>? progress = null, CancellationToken cancellationToken = default)` [#](#method-runprovenanceasync-officeimo-workflows-officeprovenanceworkflowrequest-iprogress-officeimo-workflows-officeworkflowprogress-threading-cancellationtoken)

Runs one provenance request with bounded input and atomic removal publication.

Parameters

**request OfficeIMO.Workflows.OfficeProvenanceWorkflowRequest required**

**progress System.IProgress<OfficeIMO.Workflows.OfficeWorkflowProgress>? = null optional**

**cancellationToken System.Threading.CancellationToken = default optional**

Returns

`Task<OfficeProvenanceWorkflowResult>`

`public async Task<IReadOnlyList<OfficeProvenanceWorkflowResult>> RunProvenanceBatchAsync(IEnumerable<OfficeProvenanceWorkflowRequest> requests, OfficeProvenanceWorkflowBatchOptions? options = null, IProgress<OfficeWorkflowProgress>? progress = null, CancellationToken cancellationToken = default)` [#](#member-4216de985842d89a9d653e78)

Runs a bounded batch sequentially so providers and parsers share one predictable resource envelope.

Parameters

**requests System.Collections.Generic.IEnumerable<OfficeIMO.Workflows.OfficeProvenanceWorkflowRequest> required**

**options OfficeIMO.Workflows.OfficeProvenanceWorkflowBatchOptions? = null optional**

**progress System.IProgress<OfficeIMO.Workflows.OfficeWorkflowProgress>? = null optional**

**cancellationToken System.Threading.CancellationToken = default optional**

Returns

`Task<IReadOnlyList<OfficeProvenanceWorkflowResult>>`

`public async Task<PdfRedactionWorkflowResult> RunRedactionAsync(PdfRedactionWorkflowRequest request, IProgress<OfficeWorkflowProgress>? progress = null, CancellationToken cancellationToken = default)` [#](#method-runredactionasync-officeimo-workflows-pdfredactionworkflowrequest-iprogress-officeimo-workflows-officeworkflowprogress-threading-cancellationtoken)

Plans, applies, or verifies one PDF redaction workflow.

Parameters

**request OfficeIMO.Workflows.PdfRedactionWorkflowRequest required**

**progress System.IProgress<OfficeIMO.Workflows.OfficeWorkflowProgress>? = null optional**

**cancellationToken System.Threading.CancellationToken = default optional**

Returns

`Task<PdfRedactionWorkflowResult>`

RunRedactionBatchAsync 2 overloads

`public async Task<PdfRedactionBatchResult> RunRedactionBatchAsync(PdfRedactionBatchRequest request, IProgress<OfficeWorkflowProgress>? progress = null, CancellationToken cancellationToken = default)` [#](#method-runredactionbatchasync-officeimo-workflows-pdfredactionbatchrequest-iprogress-officeimo-workflows-officeworkflowprogress-threading-cancellationtoken)

Resolves and runs a deterministic file-set batch.

Parameters

**request OfficeIMO.Workflows.PdfRedactionBatchRequest required**

**progress System.IProgress<OfficeIMO.Workflows.OfficeWorkflowProgress>? = null optional**

**cancellationToken System.Threading.CancellationToken = default optional**

Returns

`Task<PdfRedactionBatchResult>`

`public async Task<PdfRedactionBatchResult> RunRedactionBatchAsync(IEnumerable<PdfRedactionWorkflowRequest> requests, IProgress<OfficeWorkflowProgress>? progress = null, CancellationToken cancellationToken = default)` [#](#method-runredactionbatchasync-collections-generic-ienumerable-officeimo-workflows-pdfredactionworkflowrequest-iprogress-officeimo-workflows-officeworkflowprogress-threading-cancellationtoken)

Runs a bounded all-or-nothing publication batch.

Parameters

**requests System.Collections.Generic.IEnumerable<OfficeIMO.Workflows.PdfRedactionWorkflowRequest> required**

**progress System.IProgress<OfficeIMO.Workflows.OfficeWorkflowProgress>? = null optional**

**cancellationToken System.Threading.CancellationToken = default optional**

Returns

`Task<PdfRedactionBatchResult>`

`public async Task<PdfSplitWorkflowResult> SplitPdfAsync(PdfSplitWorkflowRequest request, IProgress<OfficeWorkflowProgress>? progress = null, CancellationToken cancellationToken = default)` [#](#method-splitpdfasync-officeimo-workflows-pdfsplitworkflowrequest-iprogress-officeimo-workflows-officeworkflowprogress-threading-cancellationtoken)

Splits consecutive pages through the PDF engine and publishes reopened, bounded outputs.

Parameters

**request OfficeIMO.Workflows.PdfSplitWorkflowRequest required**

**progress System.IProgress<OfficeIMO.Workflows.OfficeWorkflowProgress>? = null optional**

**cancellationToken System.Threading.CancellationToken = default optional**

Returns

`Task<PdfSplitWorkflowResult>`

## Inherited Methods

`public virtual bool Equals(object? obj)` [#](#method-equals-object)

Inherited from object

Parameters

**obj object? required**

Returns

`bool`

`public virtual int GetHashCode()` [#](#method-gethashcode)

Inherited from object

Returns

`int`

`public Type GetType()` [#](#method-gettype)

Inherited from object

Returns

`Type`

`public virtual string? ToString()` [#](#method-tostring)

Inherited from object

Returns

`string?`

## Properties

`public IReadOnlyList<OfficeWorkflowRoute> ConversionRoutes { get; }` [#](#property-conversionroutes)

[OfficeWorkflowRunner.Registration.cs:46](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Workflows/OfficeWorkflowRunner.Registration.cs#L46)

Executable routes for this configured runner, including opt-in registrations.

## Fields

`public const int MaximumBatchRequestCount` [#](#field-maximumbatchrequestcount)

[OfficeWorkflowRunner.cs:23](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Workflows/OfficeWorkflowRunner.cs#L23)

Maximum number of requests accepted by one sequential batch.

Value: `250`

<!-- PowerForge markdown artifact sha256:33F5720B85A956A7319E8CAB6BEB208A2D8489139C9A0C01144E9BF202C3EF63 -->
