Temporal IO running activities of a workflow outside the parent workflow JAR

I am using temporal SDKs with Java to run a temporal workflow, which has a few activities.
The last activity is to create and send a JMS message to a message queue for asynchronous processing. Since there are no steps after sending the JMS message, the temporal workflow is deemed to be completed. The process looks like this:

Temporal workflow -> Activity 1 -> Activity 2 -> Activity 3 (Send JMS message)

However, once the JMS message is received by the listener component, I want to continue the steps carried out in this listener component as activities of the same temporal workflow (which ended when the message was sent to the JMS queue).

How do I continue the activities of the existing workflow from the listener JMS component once the JMS message is sent from the temporal workflow?
The process that I require is:

Temporal workflow -> Activity 1 -> Activity 2 -> Activity 3 (Send JMS message)
Receive JMS message (in separate component/JAR) -> Activity 4 -> Activity 5

Reasons for using a JMS consumer for Activity 4 and 5 is to process these steps asynchronously and one at a time for multiple temporal workflow executions in the order JMS messages are received. Since the JMS consumer count is 1, a new message will not be consumed and processed until the activity 4 and 5 of the previous workflow execution are completed.

I have gone through the temporal documentation, but could not find anything to run Temporal activities outside of the code where the Temporal workflow is defined.

Stack overflow link for the same question: https://stackoverflow.com/questions/78472180/temporal-io-running-activities-of-a-workflow-outside-the-parent-workflow-jar

Why do you use JMS with Temporal? It is not needed, as Temporal supports asynchronous processing out of the box.

JMS is required for asynchronous running of activities which should run one at a time. Eg: There can be multiple workflow executions at a time, but the JMS consumer should execute the activity 4 and 5 for only one message at a time. Once the message is processed, the next message is received and the activity 4 and 5 are executed for the next workflow run.

You can configure a Temporal activity worker to process one activity at a time.

I am unable to find the docs for this configuration. Can you please share the docs link on how to implement in java? I can refer and try to implement, and see if it solves my use-case