Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ZWorkflowOptions errors if options are not in correct order #142

Open
carlosedp opened this issue Dec 13, 2023 · 1 comment
Open

ZWorkflowOptions errors if options are not in correct order #142

carlosedp opened this issue Dec 13, 2023 · 1 comment
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@carlosedp
Copy link
Contributor

While migrating from 0.5 to 0.6, I gound that ZWorkflowOptions is positional.

If I setup as:

client.newWorkflowStub[EchoWorkflow](
                    ZWorkflowOptions
                        .withTaskQueue(TemporalQueues.echoQueue)
                        .withWorkflowId(workflowID)
                        .withWorkflowExecutionTimeout(60.seconds)
                        .withWorkflowRunTimeout(10.seconds)
                        .withRetryOptions(
                            ZRetryOptions.default
                                .withMaximumAttempts(3)
                                .withInitialInterval(300.millis)
                                .withBackoffCoefficient(1)
                        )
                )

I get the error:

[error] -- [E008] Not Found Error: /Users/cdepaula/repos/scala/zio-temporal-hello/webclient/src/WebClient.scala:26:25
[error] 25 |                    ZWorkflowOptions
[error] 26 |                        .withTaskQueue(TemporalQueues.echoQueue)
[error]    |                    ^
[error]    |value withTaskQueue is not a member of object zio.temporal.workflow.ZWorkflowOptions
[error] one error found
1 targets failed

But shuffling up the withWorkflowId, it works:

client.newWorkflowStub[EchoWorkflow](
                    ZWorkflowOptions
                        .withWorkflowId(workflowID)
                        .withTaskQueue(TemporalQueues.echoQueue)
                        .withWorkflowExecutionTimeout(60.seconds)
                        .withWorkflowRunTimeout(10.seconds)
                        .withRetryOptions(
                            ZRetryOptions.default
                                .withMaximumAttempts(3)
                                .withInitialInterval(300.millis)
                                .withBackoffCoefficient(1)
                        )
                )

I think the order shouldn't matter.

@vitaliihonta vitaliihonta added enhancement New feature or request good first issue Good for newcomers labels Dec 15, 2023
@vitaliihonta
Copy link
Owner

Hey @carlosedp, thanks for reaching out! I think it's easy to achieve by duplicating this "builder step".
I'll implement it once I have free time 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants