CNG Service Builder

CNG Service Builder



As of the release of the Generic Service Builder, the functionality of CNG Services and the CNG Service Builder has become obsolete. Keep in mind that some of the documentation might be partially outdated.



Service Builder is used for integrating external JSON services capable of populating forms with CNG. These external services need to be able to consume JSON requests sent out by CNG and produce JSON responses as expected by CNG during workflow execution. Basically these external services need to conform to the JSON based message protocol of CNG for form population.

A Service could have multiple operations. For the purpose of form population one such selected operation can be selected & configured in the workflow builder. During workflow execution such configured operation is invoked. CNG passes the applicable form details (including respondent answers) into the service and expects the service to pass back any newly populated answer values. Such returned answer values are then populated back into the form and shown to the respondent.


 


Settings




Properties
Remote Service URLHTTP URL of where the external service is hosted. E.g: https://mortar-traffic.dept/
Mount PointString value. Used for configuring the service in workflow builder. Workflows would refer to services via the mount point.
User NameUsername for authentication*
PasswordPassword for authentication*

[*] Configured username/password would be sent to the external service by CNG during service invocation. External service is responsible for doing the actual authentication. 



Create New Operation



Create New Operation
Operation NameName of the operation. This will be used in configuring the service in workflow builder. E.g: getVehicleRegistraion
Operation Type
Type of operation. Currently only 1 is supported - Generic Incomplete Form Answer Population
Override Remote Operation Name

Optional. When checked additional text field would be provided for specifying the remote operation name which would be used when invoking the service.

E.g.: get-registration-num-v3

The actual end point URL invoked by CNG would take the below form.

  • If remote operation name not specified - 
    • Remote Service URL + "/" + Operation name
      • https://mortar-traffic.dept/getVehicleRegistraion
  • If remote operation name is specified - 
    • Remote Service URL + "/" + Overridden Remote Operation Name
      • https://mortar-traffic.dept/get-registration-num-v3



Please refer CNG services - Population request and response scripting for detailed information about the JSON request & response format.

Please refer CNG Service input variables (form population) for step by step guide on using a Service for form population during different form events.