Add DMS error WIP query.
This commit is contained in:
@@ -75,7 +75,7 @@ export function DmsPostForm({ bodyshop, socket, job, logsRef }) {
|
||||
jobid: job.id,
|
||||
txEnvelope: {
|
||||
...values,
|
||||
SubscriptionID: "5b527d7d-baf3-40bc-adae-e7a541e37363" //bodyshop.cdk_dealerid
|
||||
SubscriptionID: bodyshop.cdk_dealerid
|
||||
}
|
||||
});
|
||||
} else {
|
||||
@@ -96,16 +96,6 @@ export function DmsPostForm({ bodyshop, socket, job, logsRef }) {
|
||||
|
||||
return (
|
||||
<Card title={t("jobs.labels.dms.postingform")}>
|
||||
<Button
|
||||
onClick={() =>
|
||||
wsssocket.emit("fortellis-export-job", {
|
||||
txEnvelope: { test: 1, test2: 2, SubscriptionID: "5b527d7d-baf3-40bc-adae-e7a541e37363" },
|
||||
jobid: job.id
|
||||
})
|
||||
}
|
||||
>
|
||||
Test
|
||||
</Button>
|
||||
<Form
|
||||
form={form}
|
||||
layout="vertical"
|
||||
|
||||
@@ -362,6 +362,13 @@ const FortellisActions = {
|
||||
type: "post",
|
||||
apiName: "CDK Drive Post Accounts GL WIP",
|
||||
},
|
||||
QueryErrorWip: {
|
||||
url: isProduction
|
||||
? "https://api.fortellis.io/cdk/drive/glpost/errWIP"
|
||||
: "https://api.fortellis.io/cdk-test/drive/glpost/errWIP",
|
||||
type: "get",
|
||||
apiName: "CDK Drive Post Accounts GL WIP",
|
||||
},
|
||||
ServiceHistoryInsert: {
|
||||
url: isProduction
|
||||
? "https://api.fortellis.io/cdk/drive/post/service-vehicle-history-mgmt/v2/"
|
||||
|
||||
@@ -242,6 +242,8 @@ async function FortellisSelectedCustomer({ socket, redisHelpers, ioHelpers, sele
|
||||
"DEBUG",
|
||||
`{6.1} Getting errors for Transaction ID ${DMSTransHeader.transID}`
|
||||
);
|
||||
|
||||
const DmsError = await QueryDmsErrWip({ socket, redisHelpers, JobData });
|
||||
// socket.DmsError = await QueryDmsErrWip(socket);
|
||||
// //Delete the transaction
|
||||
// CdkBase.createLogEvent(socket, "DEBUG", `{ 6.2 } Deleting Transaction ID ${ socket.DMSTransHeader.transID } `);
|
||||
@@ -1161,34 +1163,32 @@ async function PostDmsBatchWip({ socket, redisHelpers, JobData }) {
|
||||
}
|
||||
}
|
||||
|
||||
// async function QueryDmsErrWip(socket) {
|
||||
// try {
|
||||
// const soapClientAccountingGLInsertUpdate = await soap.createClientAsync(CdkWsdl.AccountingGLInsertUpdate);
|
||||
async function QueryDmsErrWip({ socket, redisHelpers, JobData }) {
|
||||
let DMSTransHeader;
|
||||
try {
|
||||
DMSTransHeader = await redisHelpers.getSessionTransactionData(socket.id, getTransactionType(JobData.id), FortellisCacheEnums.DMSTransHeader);
|
||||
|
||||
// const soapResponseAccountingGLInsertUpdate = await soapClientAccountingGLInsertUpdate.doErrWIPAsync({
|
||||
// arg0: CDK_CREDENTIALS,
|
||||
// arg1: { dealerId: socket.JobData.bodyshop.cdk_dealerid },
|
||||
// arg2: socket.DMSTransHeader.transID
|
||||
// });
|
||||
|
||||
// const [result, rawResponse, , rawRequest] = soapResponseAccountingGLInsertUpdate;
|
||||
const result = await MakeFortellisCall({
|
||||
...FortellisActions.QueryErrorWip,
|
||||
headers: {},
|
||||
redisHelpers,
|
||||
socket,
|
||||
jobid: JobData.id,
|
||||
requestPathParams: DMSTransHeader.transID,
|
||||
body: {
|
||||
|
||||
// CdkBase.createXmlEvent(socket, rawRequest, `soapClientAccountingGLInsertUpdate.doErrWIPAsync request.`);
|
||||
|
||||
// CdkBase.createLogEvent(
|
||||
// socket,
|
||||
// "DEBUG",
|
||||
// `soapClientAccountingGLInsertUpdate.doErrWIPAsync Result ${JSON.stringify(result, null, 2)}`
|
||||
// );
|
||||
// CdkBase.createXmlEvent(socket, rawResponse, `soapClientAccountingGLInsertUpdate.doErrWIPAsync response.`);
|
||||
// CheckCdkResponseForError(socket, soapResponseAccountingGLInsertUpdate);
|
||||
// const PostResult = result && result.return;
|
||||
// return PostResult;
|
||||
// } catch (error) {
|
||||
// CdkBase.createLogEvent(socket, "ERROR", `Error in QueryDmsErrWip - ${error}`);
|
||||
// throw new Error(error);
|
||||
// }
|
||||
// }
|
||||
}
|
||||
});
|
||||
return result;
|
||||
} catch (error) {
|
||||
handleFortellisApiError(socket, error, "PostDmsBatchWip", {
|
||||
transId: DMSTransHeader?.transID,
|
||||
jobId: JobData.id
|
||||
});
|
||||
throw error;
|
||||
}
|
||||
}
|
||||
|
||||
// async function DeleteDmsWip(socket) {
|
||||
// try {
|
||||
|
||||
Reference in New Issue
Block a user