Skip to content
This repository was archived by the owner on Sep 18, 2023. It is now read-only.
This repository was archived by the owner on Sep 18, 2023. It is now read-only.

[Question] Behaviour when receiving a struct / dataclass #9

@MrSaints

Description

@MrSaints

We are considering implementing activities in Python, and workflows in Go. When calling activities in Go, it is possible to pass a struct to the activity (e.g. https://github.com/uber-common/cadence-samples/blob/56c4ffffd38e8596075c56f03f82c5a80ae77b92/cmd/samples/fileprocessing/activities.go). We are curious about what the behaviour is like when the activity is implemented using this Python client. Judging from

def json_to_args(jsonb: bytes) -> typing.Optional[list]:
, it seems like the argument will simply be a Python dictionary. If this is the case, are there any plans for automatically converting this to say a Python dataclass?

The use-case for using a single parameter (much like a single message) activity is for versioning. It has been mentioned several times, and the solution seems to always point to this approach for dealing with an activity's contract.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions