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

Add correlation fields to ReqMessage #57

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
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
27 changes: 25 additions & 2 deletions message.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,31 @@ type Message struct {

// ReqMessage a request to send a message
type ReqMessage struct {
MessageName string `json:"messageName"`
BusinessKey string `json:"businessKey"`
// The name of the message to deliver.
MessageName string `json:"messageName,omitempty"`
// Used for correlation of process instances that wait for incoming messages.
// Will only correlate to executions that belong to a process instance with the provided business key.
BusinessKey string `json:"businessKey,omitempty"`
// Used to correlate the message for a tenant with the given id.
// Will only correlate to executions and process definitions which belong to the tenant.
// Must not be supplied in conjunction with a withoutTenantId.
TenantId string `json:"tenantId,omitempty"`
// A Boolean value that indicates whether the message should only be correlated to executions and process definitions which belong to no tenant or not.
// Value may only be true, as false is the default behavior.
// Must not be supplied in conjunction with a tenantId.
WithoutTenantId bool `json:"withoutTenantId,omitempty"`
// Used to correlate the message to the process instance with the given id.
ProcessInstanceId string `json:"processInstanceId,omitempty"`
// Used for correlation of process instances that wait for incoming messages.
// Has to be a JSON object containing key-value pairs that are matched against process instance variables during correlation.
// Each key is a variable name and each value a JSON variable value object with the following properties.
CorrelationKeys map[string]Variable `json:"correlationKeys,omitempty"`
// Local variables used for correlation of executions (process instances) that wait for incoming messages.
// Has to be a JSON object containing key-value pairs that are matched against local variables during correlation.
// Each key is a variable name and each value a JSON variable value object with the following properties.
LocalCorrelationKeys map[string]Variable `json:"localCorrelationKeys,omitempty"`
// A map of variables that is injected into the triggered execution or process instance after the message has been delivered.
// Each key is a variable name and each value a JSON variable value object with the following properties.
ProcessVariables *map[string]Variable `json:"processVariables,omitempty"`
}

Expand Down
Loading