Best practice for integrating temporal workflow with frontend

Hi @maxim ,

I am working on an solution where I want to integrate temporal workflow with frontend.

So flow goes like this-

  1. User select the item and then on that selection I want to start workflow and keep it running state and at the same time I want to run the activity and share the response of the activity with the front end.

  2. User does some action on the response which has been returned from the step 1, then frontend will send signal to the workflow then workflow run some activity and provide the response of that activity back to the frontend.

So my first issue is regarding step 1, if i want to run activity inside the @workflowmethod then i have to make the @workflowmethod call sync and that will marks the workflow as completed and not in running state.

My second issue is when I am receiving signal from the user to do some action then at that i am unable to return the response as signal return type is void. So, what will be the solution for this.

The new update feature is what you want for this use case. The caveat is that it is in public preview and is going to become GA later this year.

I can see complete documentation is available on @UpdateMethod so should I use it for now?

If you are OK with using it in production until it is GA (or you don’t plan to go in production soon), then I would recommend using an update.

@maxim We are Currently using updateMethod and plan to go into production within the next 1-2 months. Is it feasible to use this in production?

@Abhiram_Prodduturi

I have asked internally, I will post the answer here once I have it