Hi,
In Zeebe while triggering message, along with correlation key, there is an option to pass variable (attached screenshot). Though call is successful, I don’t see those variables in process scope or other scope. So, I’m not getting how to pass them or what is the purpose of these methods.
Can you please provide your input.
Thank you in advance.
Hi @camundabpmlearner ,
For sending the variables into the process during message publish you can try adding them similar to this
final Map<String, Object> variables = new HashMap<String, Object>();
variables.put("name", "John");
variables.put("age", Integer.valueOf("22"));
client.newPublishMessageCommand().messageName("Message-Received").correlationKey("key").variables(variables)
.send().exceptionally(throwable -> {
throw new RuntimeException("Could not publish message", throwable);
});
I did same… but in go lang client… I dont see them in process scope
Unfortunately I’m not very experienced in Go lang
Went through go client documentation
I’m unsure whether it will work, You could try sending the variables from .VariablesFromMap(variables)
1 Like
Hi @camundabpmlearner ,
Hope my answers are helpful
-
That is a screenshot directly from documentation from here
I think it is an existing variable, For your case you need to create a map and assign variables to it
-
It will be a key, value pair and taken as variable name and value in process , The zeebe client will send them to the respective process instance which is triggered after matching global message reference
-
No need to map in output section they will be sent directly to process
-
you can access them anywhere in process
1 Like