Hi,
Iam implementing camunda in my project and using AJSC framework.
I tried a basic POC and had this issue.
This is two task and implementing REST in background
ProcessRest Service : Implementation
@Service(“getHelloWorld”)
public class ProcessRestService {
@Transactional
public void getHelloWorldResource(DelegateExecution execution){
RestTemplate restTemplate = new RestTemplate();
ResponseEntity<HelloWorld> responce = restTemplate.getForEntity("http://localhost:8080/restservices/camundaAJSC/v1/service/hello", HelloWorld.class);
System.out.println("value of resp:" + responce.getBody());
StringValue responceBody = Variables.stringValue(responce.getBody().toString());
execution.setVariable( "getHelloWorldResponce", responceBody);
}
ProcessRest Service1 : Implementation
@Service(“processHelloWorld”)
public class ProcessRestService1 {
public void processHelloWorld(DelegateExecution execution){
HelloWorld getHelloWorldResponce = (HelloWorld) execution.getVariable("getHelloWorldResponce");
System.out.println("Responce from REST2 : processHelloWorld :" + getHelloWorldResponce);
}
NOW, execution.getVariable(“getHelloWorldResponce”) = null.
I know both are different task.How do i get the data from task 1 to task 2.
Kindly guide me…!!
Thanks.