It may be that first comes Activity2 then Activity?
workflow.ExecuteActivity(ctx, activities.Activity, name).Get(ctx, &result)
workflow.ExecuteActivity(ctx, activities.Activity2, name).Get(ctx, &result)
//register workflows & activities
As per documentation:
Get blocks until the future is ready. When ready it either returns non nil error or assigns result value to the provided pointer.
so the second line of your code (ExecuteActivity → Activity2 ) is not going to be executed until the invocation to the first activity (ExecuteActivity → Activity ) has finished.
Are you experiencing any issues?
so far everything is going well,
I’m studying the documentation .and decided to clarify this point, I was confused by the fact that the workers work asynchronously, for some reason I thought that activities can also work like this
Activities are executed by workers. When you invoke
ExecuteActivity from your workflow code, the SDK will send a command to the server which will create a ScheduleActivityTask, if there is a worker available (for the activityTaskQueue) it will pick up the task and execute it.
The first part of this video mentions it, The 4 Types of Timeouts in Temporal - YouTube I would recommend you to see the full video.
So ExecuteActivity is an asynchronous invocation, calling Get will block your code until the activity is completed/failed.
This repository is a good place to start, GitHub - temporalio/samples-go: Temporal Go SDK samples, just in case you have not heard about it.