I am running a schedule from my microservice and wants to manipulate its life through the workflow output we get when we run that workflow i.e wants to delete the schedule when workflow output is something I desire. I want a scheduler_handler for it. Can I use workers client when it implements the workflow(if yes, how)?
You can have the last step of a workflow execute an activity that does something with the schedule using a Temporal client.
Thank you, it worked but for every workflow we are creating a client connection, wouldn’t it harm the performance.
I assume you mean “for every activity” since it’s the activity that makes the client call not the workflow. You only need to create the client once and have it as instance state for your activity methods. See this example that shows similar with a mock DB client.
Thank you…