Hey Guys, I have a simple workflow for one of my usecase. Here are the simple steps:
1. output = run_activity_one()
2. url = run_activity_two()
3. output.url = url
4. output.status = "ok"
5. update_activity(output)
Every time it works perfectly as expected, but today I observed a strange behaviour.
For step 5, when I checked the input of the activity, there is
url: url
status: "pending"
which means step 3 was executed but not step 4.
But when I reran the same input, it worked as expected. What could be the reason here? How do you avoid this kind of behavior? Is it expected behavior, or is something wrong here?
There is not enough information here to deduce what happened. Take a look at the workflow history to see which activities were run and what their outputs were.
I checked all the activities. All activities gave the expected results.
This is the simple example. In this workflow, I created a empty object in start, then updating it with results of each activity and in final activity, I am processing those results.
0. output = { status: "pending" }
1. value = run_activity_one() -> ACTIVITY ONE
1.5. output.value = value
2. url = run_activity_two(). -> ACTIVITY TWO
3. output.url = url
4. output.status = "ok".
5. update_activity(output). -> ACTIVITY To Process Output Object
I checked the activity logs very carefully, but the thing is that all activities executed as expected, but only step 4 was not executed. In the input of update_activity, I can see output.url is updated, but output.status is not updated. And I don’t see any programming errors here; as for the similar inputs, it is working as expected.
I need help before moving this to production, I tried my best to convince my team to use Temporal for most of the use-cases, so before moving to production, I want to be 100% sure that it works fine.
Step 4 seems like simple variable assignment. I am afraid this is not enough information for me to debug your issue. Can you provide a small, standalone replication I can run myself?