Trying to set the http-connector statusCode as an output variable

683 views
Skip to first unread message

kc7b...@gmail.com

unread,
Dec 15, 2014, 1:49:59 PM12/15/14
to camunda-...@googlegroups.com
I have a serviceTask where I setup a http-connector. My connector gets call fine and returns a statusCode of 200. I want to forward that status code out from the serviceTask so I can test to see if my call was successful. I've tried the following:

<camunda:outputParameter name="air_status_code">${connector.statusCode}</camunda:outputParameter>

but it complains that it cannot find the parameter "connector". Is there a better way of doing this?
David

Sebastian Menski

unread,
Dec 15, 2014, 2:36:18 PM12/15/14
to camunda-...@googlegroups.com, kc7b...@gmail.com
Hi David,

you can directly call ${statusCode}.

<bpmn2:serviceTask id="ServiceTask_1" name="My service task">
 
<bpmn2:extensionElements>
   
<camunda:connector>
     
<camunda:connectorId>http-connector</camunda:connectorId>
     
<camunda:inputOutput>
       
<camunda:inputParameter name="url">http://camunda.org</camunda:inputParameter>
       
<camunda:inputParameter name="method">GET</camunda:inputParameter>
       
       
<camunda:outputParameter name="returnCode">${statusCode}</camunda:outputParameter>

     
</camunda:inputOutput>
   
</camunda:connector>
 
</bpmn2:extensionElements>
</bpmn2:serviceTask>

Cheers,
Sebastian
Reply all
Reply to author
Forward
0 new messages