Updating certain aspects of dynamically created dsl workflows

Hi,

I am trying to experiment with Creating Dymanic workflows using a dsl as described in the examples:

we have a requirement where we want an admin to be able to send the workflow into an require-approval state no matter what state the workflow is in at the moment. for example let’s say if a workflow is currently waiting for some singal. the dsl will be updated such that whatever the current status of the workflow is - it will be updated to the approval workflow. how do I handle this? AFAIK this will go against the determinism principle of the workflow? Thanks for any help.

Thanks and Regards,
Prithwin Rajeeva

From Temporal side you could have admin send a signal and have signal handler call continueasnew with your ApprovalWorkflow workflow type and pass inputs that you need.

From SW sdl perspective i would not bake this into its business logic, but check for a specific admin signal name in your Workflow.registerListener block for signal handler and if received call continueasnew with new workflow type.

Thanks a lot! That works for our use case!