I could successfully created and started the workflow in orkes playground. Now, coming to Java (SpringBoot) code, I entered the conductor.server.url as https://play.orkes.io/api I created two more properties in application.properties with key and secret My Java code looks like this:
TaskClient taskClient = new TaskClient();
String url=env.getProperty("conductor.server.url");
System.out.println("conductor.server.url is "+url);
But, I don't see that we are reading the key & secret from application.properties into this Java code. If I run like this, I get the error "com.netflix.conductor.client.exception.ConductorClientException: Token cannot be null or empty"
Could you please help me to fix this?
In your Spring Boot application, create 2 beans as follow:
Then you can create your worker class such as:
Conductor SDK has also a spring support that wires things automatically (no need to create the beans). Creating a worker is as simple as follow:
Full example here: https://github.com/conductor-sdk/orkes-java-springboot2-example/blob/main/src/main/java/io/orkes/example/banking/workers/ConductorWorkers.java#L27-L35