I just want to check this status condition through a gateway task, probably using an expression. and if the Status Ok select a one path and if not other path.
I if you want to use an Expression on the JSON you should include Spin. You would need to add Spin as dependency to your pom file and then you can use it to access the variables inside the JSON. ${S(response).prop("Status")}
I would use the expression to save this as an output parameter from the connector and then at the gateway you can use the saved output parameter to evaluate the XOR gateway.
This is what i have implemented from the code level to accept JSON payload and execute above BPMN. But each service task has its connector implementations through the modeler like url,methos,payload likewise. So at that time how can i set a variable like you mentioned?
I am a little bit confused by your code. Where do you use it (I thought you use connectors for your service task implementations?) and why does it contain a message correlation?
I am not 100% sure what you want to achieve. Could you maybe share your BPMN diagram?
If you upload it as bpmn file I can inspect the connector better.
Do I understand it correctly that the evaluation at the XOR gateway is currently failing?
In that file getData service task has a http-connector implementation and that REST call will return a Json response. What i want is to if Status = OK flow goes to lm service task and if Fail then process will be end.
JSON response be like
The problem in your model are the data formats. Your lm_response is stored as a String. Hence the XOR Gateway can’t evaluate the expression afterwards.
Make either sure to use the Spin Extension to store the output as an Object to use Spin already in the output parameters to just store the information about the Status. I hope that helps.