import javax.ws.rs.core.MediaType;\r
import javax.ws.rs.core.Response;\r
\r
-import org.codehaus.jackson.map.ObjectMapper;\r
-import org.codehaus.jackson.map.SerializationConfig;\r
+import com.fasterxml.jackson.databind.ObjectMapper;\r
+import com.fasterxml.jackson.databind.SerializationFeature;\r
\r
\r
@Path("/tasks")\r
public class ManualTasks {\r
private static MsoLogger msoLogger = MsoLogger.getMsoLogger (MsoLogger.Catalog.APIH);\r
private static MsoAlarmLogger alarmLogger = new MsoAlarmLogger ();\r
- public final static String MSO_PROP_APIHANDLER_INFRA = "MSO_PROP_APIHANDLER_INFRA"; \r
\r
@POST\r
@Path("/{version:[vV]1}/{taskId}/complete")\r
"Mapping of request to JSON object failed. " + e.getMessage(),\r
ErrorNumbers.SVC_BAD_PARAMETER, null);\r
\r
- msoLogger.error (MessageEnum.APIH_REQUEST_VALIDATION_ERROR, MSO_PROP_APIHANDLER_INFRA, "", "", MsoLogger.ErrorCode.SchemaError, request, e);\r
+ msoLogger.error (MessageEnum.APIH_REQUEST_VALIDATION_ERROR, Constants.MSO_PROP_APIHANDLER_INFRA, "", "", MsoLogger.ErrorCode.SchemaError, request, e);\r
msoLogger.recordAuditEvent (startTime, MsoLogger.StatusCode.ERROR, MsoLogger.ResponseCode.SchemaError, "Mapping of request to JSON object failed");\r
msoLogger.debug ("End of the transaction, the final response is: " + (String) response.getEntity ());\r
return response;\r
String camundaJsonReq = null;\r
try {\r
ObjectMapper mapper = new ObjectMapper();\r
- mapper.configure(SerializationConfig.Feature.WRAP_ROOT_VALUE, true);\r
+ mapper.configure(SerializationFeature.WRAP_ROOT_VALUE, true);\r
camundaJsonReq = mapper.writeValueAsString(variablesForComplete);\r
msoLogger.debug("Camunda Json Request: " + camundaJsonReq);\r
} catch(Exception e){\r
"Mapping of JSON object to Camunda Request failed. " + e.getMessage(),\r
ErrorNumbers.SVC_GENERAL_SERVICE_ERROR, null);\r
\r
- msoLogger.error (MessageEnum.APIH_GENERAL_EXCEPTION, MSO_PROP_APIHANDLER_INFRA, "", "", MsoLogger.ErrorCode.UnknownError, request, e);\r
+ msoLogger.error (MessageEnum.APIH_GENERAL_EXCEPTION, Constants.MSO_PROP_APIHANDLER_INFRA, "", "", MsoLogger.ErrorCode.UnknownError, request, e);\r
msoLogger.recordAuditEvent (startTime, MsoLogger.StatusCode.ERROR, MsoLogger.ResponseCode.InternalError, "Mapping of JSON object to Camunda request failed");\r
msoLogger.debug ("End of the transaction, the final response is: " + (String) response.getEntity ());\r
return response;\r
MsoAlarmLogger.CRITICAL,\r
Messages.errors.get (ErrorNumbers.NO_COMMUNICATION_TO_BPEL));\r
msoRequest.updateFinalStatus (Status.FAILED);\r
- msoLogger.error (MessageEnum.APIH_BPEL_COMMUNICATE_ERROR, MSO_PROP_APIHANDLER_INFRA, "", "", MsoLogger.ErrorCode.AvailabilityError, "Exception while communicate with BPMN engine");\r
+ msoLogger.error (MessageEnum.APIH_BPEL_COMMUNICATE_ERROR, Constants.MSO_PROP_APIHANDLER_INFRA, "", "", MsoLogger.ErrorCode.AvailabilityError, "Exception while communicate with BPMN engine");\r
msoLogger.recordAuditEvent (startTime, MsoLogger.StatusCode.ERROR, MsoLogger.ResponseCode.CommunicationError, "Exception while communicate with BPMN engine");\r
msoLogger.debug ("End of the transaction, the final response is: " + (String) resp.getEntity ());\r
return resp;\r
ErrorNumbers.SVC_NO_SERVER_RESOURCES,\r
null);\r
msoRequest.updateFinalStatus (Status.FAILED);\r
- msoLogger.error (MessageEnum.APIH_BPEL_COMMUNICATE_ERROR, MSO_PROP_APIHANDLER_INFRA, "", "", MsoLogger.ErrorCode.BusinessProcesssError, "Null response from BPEL");\r
+ msoLogger.error (MessageEnum.APIH_BPEL_COMMUNICATE_ERROR, Constants.MSO_PROP_APIHANDLER_INFRA, "", "", MsoLogger.ErrorCode.BusinessProcesssError, "Null response from BPEL");\r
msoLogger.recordAuditEvent (startTime, MsoLogger.StatusCode.ERROR, MsoLogger.ResponseCode.InternalError, "Null response from BPMN");\r
msoLogger.debug ("End of the transaction, the final response is: " + (String) resp.getEntity ());\r
return resp;\r
String completeResp = null;\r
try {\r
ObjectMapper mapper = new ObjectMapper();\r
- mapper.configure(SerializationConfig.Feature.WRAP_ROOT_VALUE, true);\r
+ mapper.configure(SerializationFeature.WRAP_ROOT_VALUE, true);\r
completeResp = mapper.writeValueAsString(trr);\r
}\r
catch (Exception e) {\r