I saw one of the YouTube videos on how to connect Camunda to a Java class for twitter.
I tried to do that. However, I don’t know how can we pass parameters back and forth.
I am trying to get my hands dirty so trying a simple use-case for now, I need to authenticate a user, get usename/password and then have a JAVA program authenticate it and return success/deny.
I was able to create the class but I am clueless how to pass those variables. For most of your example programs where you are using a java class, there are no input/output parameters defined in the BPMN file.
I tried searching the documentation and examples but nothing definitive came out.
Please advise/point me in the right direction.
From the Java class I see the following code:
public class TweetContentDelegate implements JavaDelegate { <-- Is this mandatory? and where does JavaDelegate come from?
public void execute(DelegateExecution execution) throws Exception { <-- Is execute an internal function?
String content = (String) execution.getVariable(“content”); <-- The variable “content” I assume is from the BPMN workflow. How do we define them in the workflow itself to be passed to the class? Are all variables passed automatically?
How do we pass/return/modify a variable from the workflow?