Main changes and deprecated features (v5.3 > v5.7)

Main changes

Cron Cron (Cron.js) – historical scheduled tasks

As part of the cron adjustments, if there are any historical scheduled tasks in the system that have not yet been executed, after upgrading to version 5.7 the Cron (cron.js) will pick them up and run them. There are two possible solutions:

1) Define in the Cron from which date scheduled tasks should be executed.

2) Switch to PostponedTaskCron and also set a timestamp. It is possible to clone PostponedTaskCron and configure it to process multiple tasks in parallel – see Parallel cron - PostponedTaskCron

Scripting adjustments for Progress

In TAS 5.7 we are working with users with the Display Name parameter. For this reason, it is also necessary to modify the scripts that plot the process progress on the Case Overview or on tasks (Progress). The scripts can be taken from the New Origin instance (if you have access) or contact support.

Adjustment in the behavior of hidden columns in the DŘ

Within the DŘ, a change was made so that by default the value of hidden columns is transferred when copying. The original behavior was that the value was not transferred.

Consultant check: Need to check if a blank value is not expected in the calculations in the hidden column.

The setting can be adjusted in the column definition for the DŘ using the "copy" parameter.

Using LoggedUserStore on dynamic conditions

In case of using LoggedUserStore and expecting userNickName in the returned object, the parameter has changed. Currently, from v5.7, instead of the userNickName parameter, use userName

 const LoggedUserStore = Require.stores.LoggedUserStore;

let {
roles,
// userNickName,
userName
} = LoggedUserStore.state;

Using LoggedUserStore is not the right approach, LoggedUserStore is not observable within development. If necessary, it is possible to complete functions that replace the use of LoggedUserStore.

Defunct functions

Due to the development of new technologies, it happens that some functions are no longer supported or are replaced by better and more secure functions. For these reasons, it is sometimes necessary to replace some functions and 100% backward compatibility cannot be maintained. Here are described the functions that need to be replaced when switching from version 5.3 to version 5.7. To find these functions in the environment, you can use one of the validation functions .

lib.dmsPdfFileToText

This function is no longer available, it has been replaced by the lib.pdfToText function.

The function currently returns all extracted content from the pdf. The consultant then has full control over the data and can use what he needs (e.g. metadata about the document).

Here is a sample example of how the function can be used to process a pdf stored in the contractCleanCopy variable:

 const extractTextFromPdfJson = (pdfToJsonContent) => {
const texts = [];
proc.warn("data", {
pdfToJsonContent
})
if (!pdfToJsonContent || !Array.isArray(pdfToJsonContent.Pages)) {
return texts;
}

for (let pageIndex = 0; pageIndex < pdfToJsonContent.Pages.length; pageIndex++) {
const page = pdfToJsonContent.Pages[pageIndex];
if (!page || !Array.isArray(page.Texts)) {
continue;
}

for (let textIndex = 0; textIndex < page.Texts.length; textIndex++) {
const textObj = page.Texts[textIndex];
if (!textObj || !Array.isArray(textObj.R)) {
continue;
}

for (let r = 0; r < textObj.R.length; r++) {
const textRun = textObj.R[r];
if (textRun && typeof textRun.T === 'string') {
try {
texts.push(decodeURIComponent(textRun.T));
} catch (e) {
proc.warn("Failed to decode text:", textRun.T, e);
}
}
}
}
}

return texts;
}

const pdfToText = lib.pdfToText(vars['contractCleanCopy'].getValue()[0])
const texts = extractTextFromPdfJson(pdfToText);
const fullText = texts.join('');

Alternatively, you can use the following script to process the content obtained using the lib.pdfToText function

 const transformPdfToJsonResponse = (input) => {
const pages = [];

input.Pages.forEach((page, i) => {
const words = [];

page.Texts?.forEach((text) => {
text.R?.forEach((row) => {
if (row.T) {
words.push(decodeURIComponent(row.T));
}
});
});

if (words.length) {
pages.push(`--- Page ${i + 1} ---\n${words.join("")}`);
}
});

return pages.join("\n\n");
}

In version 5.7.50, the search over Cases, Tasks, Variables and Cases using the Magnifier on the home screen was restored. However, this search has limitations and can cause a large DB load on large environments. If the search was previously enabled in the configuration, it will still be enabled after the update, you need to check and possibly disable it.

Frantisek Brych Updated by Frantisek Brych

Lodash upgrade v4.17.x (>v5.5)

Highlighting variables in Read-only status (>v5.7.58)

Contact

Syca (opens in a new tab)

Powered by HelpDocs (opens in a new tab)