How do i trigger the Process externally over a Webserver

hey together,

at first, i am really new in the zeebe thing and i have read the documentation and so on my zeebe-simple-monitor stack is running.

i can trigger an run processes in the simple monitor with the example spring worker from salaboy

and now i have a maybe stupid question.
how can i trigger a already deployed process in zeebe for example over a webserver.

i saw a few examples in the github repo from @salaboy but they are mostly for kubernetes and wroten in nodejs or something like that so i have still no clue how this works.

can somebody give me a example that i can run and test
or is there something i missed in the documentation ?

i am very gratefull for any help :sweat_smile:
Karam

Hi Karam,

it depends on what language you want to use. I am assuming you are implementing in Java and you implement your own web server (e.g. a REST interface).

Then to trigger a new process, this is more or less the code you need:

	//local
	try (final ZeebeClient client = ZeebeClient.newClientBuilder()
			.brokerContactPoint("localhost:26500").usePlaintext().build();) {

		client.newCreateInstanceCommand().bpmnProcessId("[your process ID]").latestVersion().send().join();
	}

The first line creates a Java client against a local Zeebe node with no security configured.

The second line creates the workflow instance.

As dependency you need:

<dependency>
  <groupId>io.zeebe</groupId>
  <artifactId>zeebe-client-java</artifactId>
 <version>${zeebe.version}</version>
</dependency>

Please also look at https://docs.zeebe.io/clients/index.html which has more examples and also for other languages.

There are some Getting Started Guides that use webservers here: https://docs.cloud.camunda.io/docs/welcome.html

Hi together,

@pihme
thanks that helped me a lot.
I think i was a little confused between worker and client :confused:

@jwulf
also thanks i will check that out