Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR adds a new activity that makes it simple for workflows to send files to the client (e.g. browser and other HTTP clients).
The activity supports various inputs, such as URLs, Streams and binary data (byte arrays).
BREAKING CHANGES
This PR introduces a breaking DB schema change by adding a new field called
SerializedMetadata
to theStoredBookmarks
table.Usage
The following is a simple example showing that you can provide one or more URLS to download and then send back to the client:
As mentioned, the contents of the array can contain mixed types: Urls (shown above), Streams, binary data and Downloadable object instances.
The Downloadable class looks like this (simplified for brevity):
You can manually construct instances of this type in JavaScript to control the filename to use, for example.
An sample scenario could be where you have a custom activity that loads a file from a protected location and returns it as a stream. You can capture this stream using a workflow variable and then use it in the WriteFileHttpResponse activity using the following JS:
=== auto-pr-body ===
Summary:
This pull request adds new parameters and refactors existing code related to bookmarks. New parameters for IDictionary<string, string> have been added to the CreateBookmark method, CreateBookmarkArgs model and StoredBookmark model. The BookmarkOptions parameter has been renamed to CreateBookmarkArgs and dispatched to methods in ActivityExecutionContext, Event, and BackgroundActivityInvokerMiddleware. Additionally the mods argument has been changed from "Management" to "Runtime" in the update-migrations.sh script.
List of changes:
BookmarkOptions
toCreateBookmarkArgs
inBackgroundActivityInvokerMiddleware.cs
mods
from "Management" to "Runtime" inupdate-migrations.sh
Refactoring Target:
BackgroundActivityInvokerMiddleware.cs
into separate methods.update-migrations.sh
script that are related to different parts of the workflow.