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

Use name instead of id for instances in Workflows binding #2881

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

sidharthachatterjee
Copy link
Collaborator

This is a breaking chance but the binding is currently experimental so that is okay

The Workflow binding currently accepts an id for its create and get functions. We now allow users to pass in a user defined "instance name". This can be used to lookup instances that were previously created.

@sidharthachatterjee sidharthachatterjee force-pushed the sidharthachatterjee/workflows-instances-name branch from 0310fff to 1459d75 Compare October 9, 2024 20:10
* @param params The payload to send over to this instance
* @returns A promise that resolves with a handle for the Instance
*/
public create(id: string, params: object): Promise<Instance>;
public create(name: string, params: object): Promise<Instance>;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it would be better to create a CreateInstanceParams interface, to allow for better extensibility (we are making breaking changes anyway)

* @param params The payload to send over to this instance
* @returns A promise that resolves with a handle for the Instance
*/
public create(id: string, params: object): Promise<Instance>;
public create(name: string, params: object): Promise<Instance>;
Copy link
Contributor

@LuisDuarte1 LuisDuarte1 Oct 10, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

params should be unknown and not an object

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants