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

feat: add tenantId to both create process and publish message commands #652

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ public interface ICreateProcessInstanceCommandStep2
ICreateProcessInstanceCommandStep3 LatestVersion();
}

public interface ICreateProcessInstanceCommandStep3 : IFinalCommandWithRetryStep<IProcessInstanceResponse>
public interface ICreateProcessInstanceCommandStep3 : IFinalCommandWithRetryStep<IProcessInstanceResponse>, ITenantIdCommandStep<ICreateProcessInstanceCommandStep3>
{
/// <summary>
/// Set the initial variables of the process instance.
Expand Down
2 changes: 1 addition & 1 deletion Client/Api/Commands/IPublishMessageCommandStep1.cs
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ public interface IPublishMessageCommandStep2
IPublishMessageCommandStep3 CorrelationKey(string correlationKey);
}

public interface IPublishMessageCommandStep3 : IFinalCommandWithRetryStep<IPublishMessageResponse>
public interface IPublishMessageCommandStep3 : IFinalCommandWithRetryStep<IPublishMessageResponse>, ITenantIdCommandStep<IPublishMessageCommandStep3>
{
/// <summary>
/// Set the id of the message. The message is rejected if another message is already published
Expand Down
6 changes: 6 additions & 0 deletions Client/Impl/Commands/CreateProcessInstanceCommand.cs
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,12 @@ public ICreateProcessInstanceCommandStep3 Variables(string variables)
return this;
}

public ICreateProcessInstanceCommandStep3 AddTenantId(string tenantId)
{
request.TenantId = tenantId;
return this;
}

public ICreateProcessInstanceWithResultCommandStep1 WithResult()
{
return new CreateProcessInstanceCommandWithResult(client, asyncRetryStrategy, request);
Expand Down
6 changes: 6 additions & 0 deletions Client/Impl/Commands/PublishMessageCommand.cs
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,12 @@ public IPublishMessageCommandStep3 Variables(string variables)
return this;
}

public IPublishMessageCommandStep3 AddTenantId(string tenantId)
{
request.TenantId = tenantId;
return this;
}

public IPublishMessageCommandStep3 TimeToLive(TimeSpan timeToLive)
{
request.TimeToLive = (long)timeToLive.TotalMilliseconds;
Expand Down