-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[DOC] Blocking activities has incorrect code examples #5338
Comments
For the most accurate and up-to-date information on how to suspend and resume workflows, I recommend checking the latest official Elsa documentation or the source code directly. If the documentation is indeed outdated, you can open an issue on the Elsa GitHub repository or contact the maintainers to request an update. For now, you can try using the var options = new WorkflowInstanceFilter
{
Id = InstanceId,
};
var workflowInstance = await _workflowInstanceStore.FindAsync(options);
var workflowState = workflowInstance.WorkflowState;
var bookmark = workflowState.Bookmarks.FirstOrDefault(b => /* your condition here */);
var runOptions = new RunWorkflowOptions { BookmarkId = bookmark?.Id };
var result = await _workflowRunner.RunAsync(workflow, runOptions); Please note that the above code is just an example and may need to be adjusted based on the actual API and your specific use case. This comment was generated by Glime. |
Right, in that case the first point can be ignored (since it was mostly a question anyway). The second point still stands and using the RunAsync method like in the example will run the entire workflow, not just resume it. |
Do you know the correct code? I'm trying to do this as well and running into trouble.... |
@douglasg14b their second doc worked for me: https://elsa-workflows.github.io/elsa-documentation/custom-activities.html?section=Programmatic#blocking-activities The IWorkflowRunTime
can execute the workflows again. Only done some light testing so far, but it seems that the entire Activity is getting executed after all - instead of what's been discussed so far. |
Documentation Improvement Request
Documentation Issue Overview
I've been trying to implement the Workflows according to the documentation for Blocking activities.
Would be neat if these things could be fixed - and someone mention here, which method I need to use to suspend/resume a workflow. :)
The text was updated successfully, but these errors were encountered: