Sitelet https://github.com/dapr/java-sdk/issues/931
Skip to content

Provide getGuid() method in java workflow SDK #931

Description

@skyao

Describe the proposal

As required by documentation "Workflow functions must call deterministic APIs"

https://docs.dapr.io/developing-applications/building-blocks/workflow/workflow-features-concepts/#workflow-functions-must-call-deterministic-apis

// DON'T DO THIS!
DateTime currentTime = DateTime.UtcNow;
Guid newIdentifier = Guid.NewGuid();
string randomString = GetRandomString();
DateTime currentTime = context.CurrentUtcDateTime;
Guid newIdentifier = context.NewGuid();
string randomString = await context.CallActivityAsync<string>("GetRandomString");

Now in java workflow SDK, we don't provide such getGuid() method (yeat context.getCurrentInstant() method is provided) .

We need to improve our java workflow sdk to provide this getGuid() method.

And this getGuid() method is NOT provided by durable task java SDK, so we need to update durable task java SDK first.

This improvement should be included in next release.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions