Skip to content

Instantly share code, notes, and snippets.

@talfco
Last active March 30, 2019 17:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save talfco/37f030a08350649eb038b537f1bd5c15 to your computer and use it in GitHub Desktop.
Save talfco/37f030a08350649eb038b537f1bd5c15 to your computer and use it in GitHub Desktop.
package net.cloudburo.task.saga1;
import org.flowable.engine.delegate.DelegateExecution;
import org.flowable.engine.delegate.JavaDelegate;
import java.util.HashMap;
import java.util.Map;
public class InitVariablesTask implements JavaDelegate {
public void execute(DelegateExecution execution) {
Map<String, Object> variables = new HashMap<String, Object>();
variables.put("input","{ 'name' : 'Hello World'}");
Map<String, String> outputMap = new HashMap<String,String>();
variables.put("outputMap",outputMap);
execution.setVariables(variables);
System.out.println("Input Variable Set To "+execution.getVariable("input"));
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment