-
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
Activity fails when resuming with bookmark #5152
Comments
Based on the information provided, it seems that the issue you are encountering is related to the JavaScript expressions To address this issue, you may want to ensure that the outputs of the
If the issue persists, you may want to reach out to the Elsa community or support channels with specific details about your implementation and the errors you are encountering. Additionally, you can review the Elsa documentation and resources for more information on defining and using activities, handling inputs and outputs, and managing workflow execution. Please let me know if you need further assistance or if there are any specific areas you would like me to elaborate on. |
The issue is that activity output is transient, which means that when the workflow enters the Suspended state, the output will be lost. When the workflow is then resumed, the Form Submit activity will fail as you reported, given that it is trying to get activity output that will result in null values being returned. To fix this, you can capture the activities output using a persistent variable. Here's a workflow definition that demonstrates this: ![]() modified-workflow-definition.json This will fix the loss of output values. I have pushed a fix to the main branch for this. If you want to take advantage of this fix, please update your Elsa package references to the latest 3.2.0 preview build (3.2.0-preview.1393 or higher). |
The bot was on to something 😄 |
I will proceed to closing this issue, but feel free to continue the conversation. |
More information about activity output & direct access can be found here: https://elsa-workflows.github.io/elsa-documentation/custom-activities.html#direct-access |
Hi @sfmskywalker Now I have another question: can I instruct the engine to always save the results of the desired activities (or all activities in my workflow) so that I can access them from anywhere in the workflow? And how to enable that if engine allows that. Thanks, have a nice day! |
Hi @msavencov , no worries, I am happy to hear you found a workaround 👍🏻 |
Glad I found this issue, I was tearing my hear out wondering why the outputs were not persisting. This would be a convienient feature for sure. For now I will look into setting global variables as a workaround. Is this something worth creating a separate issue for? |
@gorillapower That’s a good idea 👍 |
Hi, i'm trying to create a blocking activity
FormSubmit
for integration with external app. All works fine but...I have a issue with materialization of my activity after suspension.
Below is shown the faulted activity which cannot resolve the
FormState
input variable because of javascript functiongetOutputFrom("RSPSearch1", "Result")
andgetOutputFrom("RSPSearch2", "Result")
returnsnull
on resuming suspended activity.The
FormSubmit2.FormState
input has the following javascript code:FormSubmit2
successfully reaches theExecuteAsync
method and creates aFormBookmarkPayload
: at this, theFormState
input has a valid json array, concatenated from output of previous two activities.FormSubmit2
becomes suspendedFormBookmarkPayload
bookmarkFormSubmit2
fails before invokingFormSubmit.OnResume
method with exception:===
FormSubmit activitity
===
RSPSearch activitity
===
Workflow Definition
workflow-definition.json
===
Workflow Instance
workflow-instance.json
The text was updated successfully, but these errors were encountered: