Comments (7)
Based on the information provided, it seems that the issue you are encountering is related to the JavaScript expressions getOutputFrom("RSPSearch1", "Result")
and getOutputFrom("RSPSearch2", "Result")
returning null
when the FormSubmit2
activity is resumed after being suspended. This behavior suggests that the outputs of the RSPSearch1
and RSPSearch2
activities are not being persisted or are not accessible upon resumption.
To address this issue, you may want to ensure that the outputs of the RSPSearch1
and RSPSearch2
activities are being correctly stored and that they are available in the workflow context when the FormSubmit2
activity is resumed. Here are a few steps you can take to troubleshoot and potentially resolve the issue:
- Verify that the outputs of
RSPSearch1
andRSPSearch2
are being set correctly before the workflow is suspended. - Check if the workflow context is being saved and loaded correctly upon suspension and resumption.
- Ensure that the JavaScript functions
getOutputFrom
are implemented correctly and are capable of retrieving the outputs from the specified activities. - Review the workflow definition and instance JSON files to confirm that the outputs are present and correctly formatted.
- If you are using Elsa version 2 or above, make sure you are following the updated way of defining and accessing activity inputs and outputs as per the documentation.
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.
from elsa-core.
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.
The Form Submit activity can then use those variables, which will have a copy of the output values.
Here's a workflow definition that demonstrates this:
modified-workflow-definition.json
This will fix the loss of output values.
However, I ran into another issue that your custom activities uncovered; upon attempting to deserialize the elements of the PersonSearchResults
collection, which is a class that derives from List<PersonSearchResult>
, the serializer fails to recognize that it should deserialize the individual elements as PersonSearchResult
, and instead, deserializes them as ExpandoObjects.
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).
from elsa-core.
Based on the information provided, it seems that the issue you are encountering is related to the JavaScript expressions getOutputFrom("RSPSearch1", "Result") and getOutputFrom("RSPSearch2", "Result") returning null when the FormSubmit2 activity is resumed after being suspended. This behavior suggests that the outputs of the RSPSearch1 and RSPSearch2 activities are not being persisted or are not accessible upon resumption.
The bot was on to something 😄
from elsa-core.
I will proceed to closing this issue, but feel free to continue the conversation.
from elsa-core.
More information about activity output & direct access can be found here: https://elsa-workflows.github.io/elsa-documentation/custom-activities.html#direct-access
from elsa-core.
Hi @sfmskywalker
Thanks for the clarified answer and sorry for the late response (I've been very busy these past weeks).
At that time, I solved the issue in a similar way by setting a variable using the "Set Variable" activity in front of my "Submit Form".
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!
from elsa-core.
Hi @msavencov , no worries, I am happy to hear you found a workaround 👍🏻
For now, the engine doesn't have a configurable way to store an activity's output, but do I have been thinking about adding this capability.
from elsa-core.
Related Issues (20)
- [FEAT] Can UI dropdown support multiple selections?
- [BUG] Flowchart variables are not serialized by FlowchartJsonConverter HOT 1
- [CHORE] Modules depend on each other HOT 3
- [BUG]Jint.Runtime.JavaScriptException+JavaScriptErrorWrapperException HOT 2
- [BUG]如何在Elsa中使用JavaScript表达式? HOT 2
- [CHORE] 如何在Elsa 3.0中使用JavaScript表达式? HOT 2
- [CHORE] 如何在Elsa 3.0中使用switch condition? HOT 2
- [BUG] Workflow Import ID Discrepancy HOT 2
- [BUG] How activity retrieve variable within published workflow HOT 1
- [CHORE] Elsa 3.0在设计器中如何使用Switch(flow)? HOT 1
- [BUG] Restore variables values after resume from a bookmark. HOT 4
- [BUG]curl 如何调用在Elsa 3.0设计器中的创建的工作流? HOT 1
- Expired messages in Workflow Inbox should be ignored HOT 2
- [BUG] There is a BUG when Api project cooperates with swagger. HOT 1
- [ENH] Readonly Workflow Variables HOT 1
- [BUG] Issues with POST and GET Execute APIs HOT 1
- [ENH] MongoDB storage for alterations HOT 4
- [FEAT] Postgresql adapter for Hangfire
- [ENH] Optimize Workflow Import by Storing Raw JSON to Avoid Unnecessary Serialization
- [ENH] Enable and Disable MassTransit Consumers HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from elsa-core.