# How can a worker register to a workflow by its name, not interface

**URL:** https://community.temporal.io/t/how-can-a-worker-register-to-a-workflow-by-its-name-not-interface/8077
**Category:** Community Support
**Created:** [April 28, 2023, 7:00pm UTC](https://community.temporal.io/t/how-can-a-worker-register-to-a-workflow-by-its-name-not-interface/8077 "2023-04-28T19:00:13Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![jingpingw](https://avatars.discourse-cdn.com/v4/letter/j/f4b2a3/32.png) [@jingpingw](https://community.temporal.io/u/jingpingw)
#### Post date: [April 28, 2023, 7:00pm UTC](https://community.temporal.io/t/how-can-a-worker-register-to-a-workflow-by-its-name-not-interface/8077/1 "2023-04-28T19:00:13Z")

</div>

I would like to define to the workflows on the temporal client side in Java. On the temporal worker side, it’s GoLang, and I would like to register the worker to those workflows defined in Java only by their names, so that I don’t have duplicate the workflow definition interface again on the worker side in GoLang. How can I do it?

If the workflow definitions are saved in database, can I define create them only one time so that both the client and worker will reference it by name instead of interfaces?

Thanks

---

<div class="post-metadata">

### Author: ![maxim](https://sea2.discourse-cdn.com/flex016/user_avatar/community.temporal.io/maxim/32/8_2.png) [@maxim](https://community.temporal.io/u/maxim)
#### Post date: [April 29, 2023, 9:57am UTC](https://community.temporal.io/t/how-can-a-worker-register-to-a-workflow-by-its-name-not-interface/8077/2 "2023-04-29T09:57:34Z")

</div>

Workflow definitions are not saved anywhere and they should be unique only for a single task queue.

What you are asking doesn’t really make sense as you don’t need to register workflow types in Java if they are implemented by a Go worker.

---

<div class="post-metadata">

### Author: ![jingpingw](https://avatars.discourse-cdn.com/v4/letter/j/f4b2a3/32.png) [@jingpingw](https://community.temporal.io/u/jingpingw)
#### Post date: [May 1, 2023, 6:27pm UTC](https://community.temporal.io/t/how-can-a-worker-register-to-a-workflow-by-its-name-not-interface/8077/3 "2023-05-01T18:27:42Z")

</div>

if the temporal servers are rebooted, will the workflow definitions be all gone? I thought the creation the workflow definition, which only needs once, would be separated for their usage, i.e. the registration by workers and submissions by the client. Was that understanding correct?

---

<div class="post-metadata">

### Author: ![maxim](https://sea2.discourse-cdn.com/flex016/user_avatar/community.temporal.io/maxim/32/8_2.png) [@maxim](https://community.temporal.io/u/maxim)
#### Post date: [May 1, 2023, 7:30pm UTC](https://community.temporal.io/t/how-can-a-worker-register-to-a-workflow-by-its-name-not-interface/8077/4 "2023-05-01T19:30:38Z")

</div>

Workflow types are not registered with the service. They are just strings passed through it.

So the workflow registration is just telling a worker which function to call when a given string for the workflow type is received as a workflow task.
