# Changing Workflow Inputs

**URL:** <https://community.temporal.io/t/changing-workflow-inputs/1598>\
**Category:** Community Support\
**Tags:** go-sdk\
**Created:** [February 26, 2021, 7:12pm UTC](https://community.temporal.io/t/changing-workflow-inputs/1598 "2021-02-26T19:12:22Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Shannon\_Tan](https://sea2.discourse-cdn.com/flex016/user_avatar/community.temporal.io/shannon_tan/32/131_2.png) [@Shannon\_Tan](https://community.temporal.io/u/Shannon_Tan)\
**Post date:** [February 26, 2021, 7:12pm UTC](https://community.temporal.io/t/changing-workflow-inputs/1598/1 "2021-02-26T19:12:22Z")

</div>

Similar to:

- [Versioning workflow changes](https://community.temporal.io/t/versioning-workflow-changes/489)
- [Versioning | Temporal Documentation](https://docs.temporal.io/docs/go-versioning)

What happens if you try to change the inputs to a workflow, like adding a new parameter? Clearly, you need to add a version check since the new parameter is used somewhere in the workflow, but what about the workflow parameter itself?

Imagine func SomeFunc(workflow.Context) becomes func SomeFunc(workflow.Context, bool). What happens during the deployment process if:

- we still have old pods trying to execute SomeFunc(ctx), and there’s still some pods registered with that
- and there’s some new pods with SomeFunc(ctx, bool) and other executions with SomeFunc(ctx, bool)?

---

<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:** [February 26, 2021, 7:37pm UTC](https://community.temporal.io/t/changing-workflow-inputs/1598/2 "2021-02-26T19:37:48Z")

</div>

Adding and removing parameters at the end of the parameter list is a backwards compatible change.

I still would recommend using a single struct parameter to simplify such changes.

---

<div class="post-metadata">

**Author:** ![Shannon\_Tan](https://sea2.discourse-cdn.com/flex016/user_avatar/community.temporal.io/shannon_tan/32/131_2.png) [@Shannon\_Tan](https://community.temporal.io/u/Shannon_Tan)\
**Post date:** [February 26, 2021, 11:59pm UTC](https://community.temporal.io/t/changing-workflow-inputs/1598/3 "2021-02-26T23:59:23Z")

</div>

How does this work if the input is used? I assume this is covered by the case of workflow versioning?

---

<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:** [February 27, 2021, 12:00am UTC](https://community.temporal.io/t/changing-workflow-inputs/1598/4 "2021-02-27T00:00:14Z")

</div>

The extra arguments are going to have default values. The explicit versioning of backward-incompatible changes to the workflow function is not yet supported.

---

<div class="post-metadata">

**Author:** ![Shannon\_Tan](https://sea2.discourse-cdn.com/flex016/user_avatar/community.temporal.io/shannon_tan/32/131_2.png) [@Shannon\_Tan](https://community.temporal.io/u/Shannon_Tan)\
**Post date:** [February 27, 2021, 2:29am UTC](https://community.temporal.io/t/changing-workflow-inputs/1598/5 "2021-02-27T02:29:08Z")

</div>

Do you recommend using single argument structs for activities too?

---

<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:** [February 27, 2021, 2:32am UTC](https://community.temporal.io/t/changing-workflow-inputs/1598/6 "2021-02-27T02:32:19Z")

</div>

Yes, and for their results if ever expect to change them. Activities and workflows are technically RPC and the majority of existing RPC frameworks (like gRPC) use single input and output structure for each operation.

I even wanted to make it required in Temporal. But the majority of the users voted against such proposal.

---

<div class="post-metadata">

**Author:** ![alankritjoshi](https://sea2.discourse-cdn.com/flex016/user_avatar/community.temporal.io/alankritjoshi/32/2933_2.png) [@alankritjoshi](https://community.temporal.io/u/alankritjoshi)\
**Post date:** [December 13, 2022, 10:45pm UTC](https://community.temporal.io/t/changing-workflow-inputs/1598/7 "2022-12-13T22:45:38Z")

</div>

Thanks for asking this question @Shannon_Tan and for the recommendation @maxim.

I think this information, including the recommendation, should belong in the temporal docs as it helps ensure critical backwards compatibility from the get-go.
