Possible to name/tag WorkflowTaskCompletedEvent for future use?

I have a use case where at the end of a workflow, we send a message to a third-party system. I would like to be able to resend that message by resetting the workflow to just before that activity. However, I can’t figure out a reliable way to find the step for creating a ResetWorkflowExecutionRequest programmatically as the sequential ids can change depending on workflow conditions - an activity retrying can change what step number I need for the reset. Is there a way I can tag the activity with some metadata that would allow my resend code to find the right place to reset the workflow?

I think the closest thing I’ve found is summary on ActivityOptions. I haven’t found out how to use that on the history side, and it also seems like it doesn’t really fit anyway.

I’m using the Java SDK.

This sounds like abuse of reset. What is the actual business requirement you are trying to implement? Is it to deal with lost notifications or something else?

We do plan to support a workflow API to set a reset point that can be used later.

It’s if the destination system loses the message. In this case it’s JMS, so our final step is to place the message on a queue to them. If they consume it and error, they’ll ask us to resend the same message again once they fix whatever the issue was. My thought was that we already have the send code right there, if we can reset to before the JMS send, but we can certainly construct another workflow to do it too.

Ideally they would send you confirmation that the message is sent and you complete workflow only when the confirmation is received.

I would start a new workflow for this use case.

Funny enough, we have some flows that have acknowledgements. That hasn’t stopped us from having to resend on occasion when they acked a message that had something go wrong with it :slight_smile:

We will create new workflows for this use case. Thanks for the advice.