Workspace (Executing WorkUnits with UI integration)

Was this article helpful?
0 out of 0 found this helpful

Comments

2 comments
Date Votes
  • Sounds great, but would it be possible to also call WorkFailed() for a synchronous execution that fails? That way, both asynchronous and synchronous execution could share the same basic error handling structure.

    0
  • Hello Matthias,

    Previously, Workspace events were raised during asynchronous execution through the legacy event-based pipeline. Synchronous execution, however, always relied on direct exception propagation.

    In the latest Beta build, we have refined the execution model. Workspace.DoWorkAsync(...) is now fully Task-based and no longer raises Workspace events. The event-driven behavior remains available only through Workspace.StartWork(...), which is now marked as obsolete as part of the legacy model.

    As a result, both synchronous execution and the new DoWorkAsync implementation surface failures through standard exception propagation (directly in synchronous calls, and through the awaited Task in asynchronous calls).

    For this reason, we intentionally do not invoke WorkFailed() during synchronous execution, as the recommended execution model no longer relies on event-based notifications.

    We have just published an updated Beta build and revised this article accordingly.

    0

Please sign in to leave a comment.

Articles in this section

See more