Skip to content
Snippets Groups Projects
Commit 0b5a5de3 authored by David Büchler's avatar David Büchler
Browse files

Refactorings

parent 3dcc0600
No related branches found
No related tags found
No related merge requests found
import("system.process");
import("KeywordRegistry_basic");
import("system.db");
import("ActivityTask_lib");
import("Employee_lib");
import("system.util");
import("system.notification");
......@@ -253,16 +257,16 @@ import("JditoFilter_lib");
////The result values can be accessed as seen above in "formatToJsonAndCallWsCallback"
//let pPossibleDuplicatesRay = DuplicateScannerUtils.ScanForDuplicates(filterName, targetEntity, valuesToCheck, null);
//
//logging.log(" pPossibleDuplicatesRay-> " + pPossibleDuplicatesRay.length);
//logging.log(" pPossibleDuplicatesRay-> " + pPossibleDuplicatesRay);
//
//for (let i = 0; i < pPossibleDuplicatesRay.length; i++)
//{
// logging.log("pPossibleDuplicatesRay[i] -> " + pPossibleDuplicatesRay[i]);
//}
//
//##############################################################################
//################################ entity structure auslesen ##############################################
//var model = project.getEntityStructure("Person_entity");
......@@ -371,26 +375,58 @@ import("JditoFilter_lib");
//
//logging.log("recordBlockSize -> " + recordBlockSize);
try
{
notification.addNotification(util.getNewUUID(), null, null, null, "_____SYSTEM_NOTIFICATION_MESSAGE", notification.PRIO_NORMAL, 1, notification.STATE_UNSEEN, [EmployeeUtils.getCurrentUserId()], "message", "description");
}
catch (exception)
{
logging.log("exception -> " + exception);
}
//notification.addNotification(util.getNewUUID(), null, null, null, notification., notification.PRIO_NORMAL, 2, notification.STATE_UNSEEN, [user], message, description);
//try
//{
// let sourceContactId = "sourceContactId";
// let targetContactId = "targetContactId";
//
// var activityDataForInsert = {
// subject: "Es wurde ein Personendatensatz in diesen integriert",
// content: "Person mit ID " + sourceContactId + " wurde in Person mit ID " + targetContactId + " integriert",
// //categoryKeywordId: $KeywordRegistry.ac
// directionKeywordId: "x",
// responsibleContactId: EmployeeUtils.getCurrentContactId()
// };
//
// var activityLinks = [["Person", "6e667085-bb97-4039-8dfe-2230002985e0"]]
//
// //activityLinks = ArrayUtils.distinct2d(activityLinks);//TODO: better check before adding the elements into the array if it already exists there
//
// var activityRes = ActivityUtils.insertNewActivity(activityDataForInsert, activityLinks, null, db.getCurrentAlias());
//}
//catch (exception)
//{
// logging.log("exception -> " + exception);
//}
////notification.addNotification(util.getNewUUID(), null, null, null, notification., notification.PRIO_NORMAL, 2, notification.STATE_UNSEEN, [user], message, description);
//let currentContactId = EmployeeUtils.getCurrentContactId();
//DuplicateScannerUtils.CreateMergeSuccessActivity("a2e084e2-d68a-4f1e-a1bb-f8d46ad6293d", "6e667085-bb97-4039-8dfe-2230002985e0", currentContactId, "Person");
//logging.log("$KeywordRegistry.activityDirection$internal() -> " + $KeywordRegistry.activityDirection$internal());
//let processParameters = {
// filterName: "PersonDuplicates",
// targetEntity: "Person_entity" //process.execute is only able to handle strings
//}
//let userId = EmployeeUtils.getCurrentUserId();
//if(userId == null)
// userId == "";
//try
//{
// let processId = "manualrun_rebuild_duplicatecache_" + util.getNewUUID();
// process.executeTimer(processId, "RebuildAllDuplicatesCache_serverProcess", 0, true, false, process.TIMERTYPE_SERVER_RUN, userId, false, process.THREADPRIORITY_LOW)
// process.stopTimer(processId);
// logging.log("test -> ");
// process.executeAsync("RebuildAllDuplicateCaches_serverProcess", processParameters, false, userId, process.THREADPRIORITY_LOW)
// logging.log("test2 -> ");
//}
//catch (exception)
//{
// logging.log(" exception-> " + exception);
//}
......@@ -54,6 +54,9 @@ let descriptionText = "%0 duplicates have been identified.";
if(scanResults.length == 1)
descriptionText = "%0 duplicate has been identified."
if(userId == null)
userId = "";
let description = translate.withArguments(descriptionText, [scanResults.length]);
let notificationConfig = notification.createConfig()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment