Skip to content

Conversation

@santiagodoldan
Copy link
Contributor

No description provided.

@santiagodoldan
Copy link
Contributor Author

Hello everyone 👋 , here a small change that will allow the usage of keyword arguments in activities

class MyWorkflow < Temporal::Workflow
  def execute(args)
     MyActivity.execute!(user_id: args[:user_id])

     ...
  end
end

class MyActivity < Temporal::Activity
  def execute(user_id:)
    puts user_id
  end
end

I'm open to discuss any changes and please let me know if you can see any possible issues because of my changes so I can try to fix them 🙌

@santiagodoldan
Copy link
Contributor Author

@santiagodoldan santiagodoldan force-pushed the add-kwargs-support-to-activities branch from 5df9539 to d059356 Compare July 29, 2023 20:42
@DeRauk
Copy link
Contributor

DeRauk commented Jan 4, 2024

@santiagodoldan I missed merging this back in July 😬 . Do you mind rebasing and pushing again to get a new test run? I'd be happy to merge then.

@santiagodoldan santiagodoldan force-pushed the add-kwargs-support-to-activities branch from d059356 to 24343ba Compare January 5, 2024 12:38
@santiagodoldan
Copy link
Contributor Author

@DeRauk Thanks 🙌

@DeRauk
Copy link
Contributor

DeRauk commented Jan 5, 2024

@santiagodoldan could you take a look at the failing tests?

@santiagodoldan santiagodoldan force-pushed the add-kwargs-support-to-activities branch from 24343ba to 9d02ec8 Compare January 5, 2024 15:45
@santiagodoldan
Copy link
Contributor Author

@DeRauk It should be fine now 💯

@DeRauk DeRauk merged commit 95d62d2 into coinbase:master Jan 5, 2024
@santiagodoldan santiagodoldan deleted the add-kwargs-support-to-activities branch January 5, 2024 18:47
peterzhu2118-figma added a commit to figma/temporal-ruby that referenced this pull request Nov 21, 2025
coinbase#255 added support for keyword arguments in
Temporal::Activity. However, there is a bug where if there are no keyword
arguments and the last argument is a hash, then it will end up using that
argument as the keyword argument instead of a positional argument.
peterzhu2118-figma added a commit to figma/temporal-ruby that referenced this pull request Dec 1, 2025
peterzhu2118-figma added a commit to figma/temporal-ruby that referenced this pull request Dec 3, 2025
Revert "Add keyword arguments support to Activity classes (coinbase#255)"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants