Skip to content
Snippets Groups Projects
Commit d7dda789 authored by Sebastian Listl's avatar Sebastian Listl :speech_balloon:
Browse files

Scan Service fixes

parent da46407f
No related branches found
No related tags found
No related merge requests found
Showing
with 40 additions and 51 deletions
......@@ -4,7 +4,6 @@
<majorModelMode>DISTRIBUTED</majorModelMode>
<documentation>%aditoprj%/entity/AnyContact_entity/documentation.adoc</documentation>
<contentTitleProcess>%aditoprj%/entity/AnyContact_entity/contentTitleProcess.js</contentTitleProcess>
<afterUiInit>%aditoprj%/entity/AnyContact_entity/afterUiInit.js</afterUiInit>
<initFilterProcess>%aditoprj%/entity/AnyContact_entity/initFilterProcess.js</initFilterProcess>
<imageProcess>%aditoprj%/entity/AnyContact_entity/imageProcess.js</imageProcess>
<recordContainer>db</recordContainer>
......
......@@ -8,7 +8,6 @@
<grantUpdateProcess>%aditoprj%/entity/Contact_entity/grantUpdateProcess.js</grantUpdateProcess>
<grantDeleteProcess>%aditoprj%/entity/Contact_entity/grantDeleteProcess.js</grantDeleteProcess>
<contentTitleProcess>%aditoprj%/entity/Contact_entity/contentTitleProcess.js</contentTitleProcess>
<afterUiInit>%aditoprj%/entity/Contact_entity/afterUiInit.js</afterUiInit>
<onValidation>%aditoprj%/entity/Contact_entity/onValidation.js</onValidation>
<initFilterProcess>%aditoprj%/entity/Contact_entity/initFilterProcess.js</initFilterProcess>
<iconId>VAADIN:USERS</iconId>
......
import("KeywordRegistry_basic");
import("system.translate");
import("system.result");
import("system.vars");
......
......@@ -1012,7 +1012,6 @@
<title>New task</title>
<onActionProcess>%aditoprj%/entity/Person_entity/entityfields/newtask/onActionProcess.js</onActionProcess>
<iconId>VAADIN:TASKS</iconId>
<iconIdProcess>%aditoprj%/entity/Person_entity/entityfields/newtask/iconIdProcess.js</iconIdProcess>
</entityActionField>
<entityActionField>
<name>addToCampaign</name>
......@@ -1141,12 +1140,6 @@
<iconId>VAADIN:ENVELOPE</iconId>
<stateProcess>%aditoprj%/entity/Person_entity/entityfields/newletter/stateProcess.js</stateProcess>
</entityActionField>
<entityActionField>
<name>openTaskView</name>
<isMenuAction v="false" />
<isObjectAction v="false" />
<stateProcess>%aditoprj%/entity/Person_entity/entityfields/opentaskview/stateProcess.js</stateProcess>
</entityActionField>
<entityActionField>
<name>startWorkflow</name>
<title>Start workflow</title>
......@@ -1583,9 +1576,6 @@
<recordfield>PERSON.PERSONID</recordfield>
<aggregateType>COUNT</aggregateType>
</aggregateFieldDbMapping>
<dbRecordFieldMapping>
<name>COUNT.value</name>
</dbRecordFieldMapping>
</recordFieldMappings>
<filterExtensions>
<filterExtensionSet>
......
......@@ -7,6 +7,7 @@
<grantCreate v="false" />
<grantUpdateProcess>%aditoprj%/entity/WorkflowTask_entity/grantUpdateProcess.js</grantUpdateProcess>
<grantDelete v="false" />
<afterSave>%aditoprj%/entity/WorkflowTask_entity/afterSave.js</afterSave>
<imageProcess>%aditoprj%/entity/WorkflowTask_entity/imageProcess.js</imageProcess>
<titlePlural>Tasks</titlePlural>
<recordContainer>jdito</recordContainer>
......
import("system.neon");
import("system.workflow");
import("system.vars");
var entityData = vars.get("$local.entitydata");
//open the next workflow task if one exists
if (entityData["FORMRESULT"])
{
var processInstanceId = entityData["PROCESSINSTANCE_ID"];
var createTime = entityData["CREATE_TIME"];
var loadConfig = workflow.createConfigForLoadingTasks()
.processInstanceId(processInstanceId);
var startVal = {
id : null,
createTime : new Date(+createTime).toString()
};
var newestTask = JSON.parse(workflow.getTasks(loadConfig)).reduce(function (prev, curr)
{
var prevTime = Date.parse(prev.createTime);
var currTime = Date.parse(curr.createTime);
return prevTime > currTime ? prev : curr;
}, startVal);
if (newestTask.id !== null)
neon.openContext("WorkflowTask", "WorkflowTaskPreview_view", [newestTask.id], neon.OPERATINGSTATE_VIEW, null);
else
{
var params = {
"TaskTitle_param" : rowData["NAME.value"]
};
//if you try to open the task now, it will display "Task done"
neon.openContext("WorkflowTask", "WorkflowTaskPreview_view", [rowData["UID.value"]], neon.OPERATINGSTATE_VIEW, params);
}
}
\ No newline at end of file
......@@ -18,39 +18,5 @@ vars.get("$local.changed").forEach(function (field)
if (!rowData["ASSIGNEE.value"] && !vars.get("$field.ASSIGNEE"))
workflow.setTaskAssignee(taskId, EmployeeUtils.getCurrentUserId());
workflow.completeTaskWithFormData(taskId, JSON.parse(value));
_openNextTaskIfExists(rowData["PROCESSINSTANCE_ID.value"], rowData["CREATE_TIME.value"]);
}
});
/*
* checks if a new task has been created for that process instance,
* if that's the case the new task will be opened
*/
function _openNextTaskIfExists (pProcessInstanceId, pCreateTime)
{
var loadConfig = workflow.createConfigForLoadingTasks()
.processInstanceId(pProcessInstanceId);
var startVal = {
id : null,
createTime : new Date(+pCreateTime).toString()
};
var newestTask = JSON.parse(workflow.getTasks(loadConfig)).reduce(function (prev, curr)
{
var prevTime = Date.parse(prev.createTime);
var currTime = Date.parse(curr.createTime);
return prevTime > currTime ? prev : curr;
}, startVal);
if (newestTask.id !== null)
neon.openContext("WorkflowTask", "WorkflowTaskPreview_view", [newestTask.id], neon.OPERATINGSTATE_VIEW, null);
else
{
var params = {
"TaskTitle_param" : rowData["NAME.value"]
};
//if you try to open the task now, it will display "Task done"
neon.openContext("WorkflowTask", "WorkflowTaskPreview_view", [rowData["UID.value"]], neon.OPERATINGSTATE_VIEW, params);
}
}
\ No newline at end of file
......@@ -3,8 +3,6 @@
<name>Social</name>
<title>Social</title>
<majorModelMode>DISTRIBUTED</majorModelMode>
<mainView></mainView>
<filterView>&lt;null value&gt;</filterView>
<entity>Social_entity</entity>
<references>
<neonViewReference>
......
......@@ -91,9 +91,6 @@
</genericViewTemplate>
<scoreCardViewTemplate>
<name>Scores</name>
<fieldActions>
<element>openTaskView</element>
</fieldActions>
<entityField>#ENTITY</entityField>
<fields>
<entityFieldLink>
......
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