diff --git a/pom.xml b/pom.xml index fcd46a9..85b9692 100644 --- a/pom.xml +++ b/pom.xml @@ -13,7 +13,7 @@ com.netgrif etask - 1.0.0 + 1.1.0-SNAPSHOT eTask backend eTask application is a quick way to start with Netgrif Application Engine @@ -27,6 +27,7 @@ + NETGRIF, s.r.o. https://netgrif.com @@ -58,13 +59,27 @@ 11 + + + oss.snapshots + OSSRH SNAPSHOT + https://s01.oss.sonatype.org/content/repositories/snapshots + + false + + + true + + + + com.netgrif application-engine - 6.3.1 + 6.4.0-SNAPSHOT org.springframework.boot diff --git a/src/main/groovy/com/netgrif/etask/EtaskActionDelegate.groovy b/src/main/groovy/com/netgrif/etask/EtaskActionDelegate.groovy index ec6f613..13be10a 100644 --- a/src/main/groovy/com/netgrif/etask/EtaskActionDelegate.groovy +++ b/src/main/groovy/com/netgrif/etask/EtaskActionDelegate.groovy @@ -22,56 +22,6 @@ class EtaskActionDelegate extends ActionDelegate { @Autowired private UriNodeDataRepository uriNodeDataRepository - /** - * create or update menu item of specified type - * @param id - * @param uri - * @param type - * @param query - * @param icon - * @param title - * @param allowedNets - * @param roles - * @param bannedRoles - * @return - */ - Case createOrUpdateMenuItem(String id, String uri, String type, String query, String icon, String title, List allowedNets, Map roles = [:], Map bannedRoles = [:]) { - collectRolesForPreferenceItem(roles) - Case menuItem = findMenuItem(id) - if (!menuItem) { - Case filter = createFilter(title, query, type, allowedNets, icon, "private", null) - createUri(uri, UriContentType.DEFAULT) - return createMenuItem(uri, id, filter, roles, bannedRoles) - } else { - Case filter = getFilterFromMenuItem(menuItem) - changeFilter filter query { query } - changeFilter filter allowedNets { allowedNets } - changeFilter filter title { title } - changeFilter filter icon { icon } - changeMenuItem menuItem allowedRoles { roles } - changeMenuItem menuItem bannedRoles { bannedRoles } - changeMenuItem menuItem uri { uri } - changeMenuItem menuItem filter { filter } - return workflowService.findOne(menuItem.stringId) - } - } - - private Map collectRolesForPreferenceItem(Map roles) { - Map temp = [:] - return roles.collectEntries { entry -> - if (!temp.containsKey(entry.value)) { - temp.put(entry.value, petriNetService.getNewestVersionByIdentifier(entry.value)) - } - PetriNet net = temp[entry.value] - def foundEntry = net.roles.find { it.value.importId == entry.key } - if (!foundEntry) { - throw new IllegalArgumentException("No role $entry.key $net.identifier") - } - ProcessRole role = foundEntry.value - return [(role.importId + ":" + net.identifier), ("$role.name ($net.title)" as String)] - } as Map - } - /** * update menu item property * @param id @@ -101,7 +51,7 @@ class EtaskActionDelegate extends ActionDelegate { List nets = uriPaths.collect { UriNode node = getUri(it) as UriNode if (!node) return null - return petriNetService.findAllByUri(node.id) + return petriNetService.findAllByUriNodeId(node.id) }.findAll { it != null }.flatten() as List List roleIds = nets.collect { it.roles.keySet() as List }.flatten() as List setUriNodeDataRoles(uri, roleIds) @@ -127,11 +77,11 @@ class EtaskActionDelegate extends ActionDelegate { */ void setUriNodeDataFilters(String uri, List menuItemIdentifiers) { UriNode uriNode = getUri(uri) as UriNode - uriNodeDataRepository.findByUriNodeId(uriNode.getId()).ifPresentOrElse(data -> { + uriNodeDataRepository.findByUriNodeId(uriNode.getStringId()).ifPresentOrElse(data -> { data.setMenuItemIdentifiers(menuItemIdentifiers) uriNodeDataRepository.save(data) }, () -> { - uriNodeDataRepository.save(new UriNodeData(uriNode.getId(), null, null, false, false, null, menuItemIdentifiers)) + uriNodeDataRepository.save(new UriNodeData(uriNode.getStringId(), null, null, false, false, null, menuItemIdentifiers)) }) } @@ -142,11 +92,11 @@ class EtaskActionDelegate extends ActionDelegate { */ void setUriNodeDataRoles(String uri, List roleIds) { UriNode uriNode = getUri(uri) as UriNode - uriNodeDataRepository.findByUriNodeId(uriNode.getId()).ifPresentOrElse(data -> { + uriNodeDataRepository.findByUriNodeId(uriNode.getStringId()).ifPresentOrElse(data -> { data.setProcessRolesIds(roleIds as Set) uriNodeDataRepository.save(data) }, () -> { - uriNodeDataRepository.save(new UriNodeData(uriNode.getId(), null, null, false, false, roleIds as Set, null)) + uriNodeDataRepository.save(new UriNodeData(uriNode.getStringId(), null, null, false, false, roleIds as Set, null)) }) } @@ -164,7 +114,7 @@ class EtaskActionDelegate extends ActionDelegate { UriNode uriNode = getUri(uri) as UriNode uriNode.setName(title) uriService.save(uriNode) - uriNodeDataRepository.findByUriNodeId(uriNode.getId()).ifPresentOrElse(data -> { + uriNodeDataRepository.findByUriNodeId(uriNode.getStringId()).ifPresentOrElse(data -> { data.setIcon(icon) data.setSection(section) data.setIconSvg(isSvgIcon) @@ -172,7 +122,7 @@ class EtaskActionDelegate extends ActionDelegate { data.setHidden(isHidden) uriNodeDataRepository.save(data) }, () -> { - uriNodeDataRepository.save(new UriNodeData(uriNode.getId(), section, icon, isSvgIcon, isHidden, roleIds as Set, null)) + uriNodeDataRepository.save(new UriNodeData(uriNode.getStringId(), section, icon, isSvgIcon, isHidden, roleIds as Set, null)) }) } diff --git a/src/main/java/com/netgrif/etask/petrinet/responsebodies/EtaskUriNode.java b/src/main/java/com/netgrif/etask/petrinet/responsebodies/EtaskUriNode.java index 3490260..ae77334 100644 --- a/src/main/java/com/netgrif/etask/petrinet/responsebodies/EtaskUriNode.java +++ b/src/main/java/com/netgrif/etask/petrinet/responsebodies/EtaskUriNode.java @@ -34,6 +34,6 @@ public class EtaskUriNode extends UriNode { protected boolean isHidden = false; public EtaskUriNode(UriNode node) { - super(node.getId(), node.getUriPath(), node.getName(), node.getParentId(), node.getParent(), node.getChildrenId(), node.getChildren(), node.getLevel(), node.getContentTypes()); + super(node.get_id(), node.getUriPath(), node.getName(), node.getParentId(), node.getParent(), node.getChildrenId(), node.getChildren(), node.getLevel(), node.getContentTypes()); } } diff --git a/src/main/java/com/netgrif/etask/petrinet/service/UriCountService.java b/src/main/java/com/netgrif/etask/petrinet/service/UriCountService.java index 400a5b2..06ffd11 100644 --- a/src/main/java/com/netgrif/etask/petrinet/service/UriCountService.java +++ b/src/main/java/com/netgrif/etask/petrinet/service/UriCountService.java @@ -11,7 +11,6 @@ import com.netgrif.etask.EtaskActionDelegate; import com.netgrif.etask.petrinet.service.interfaces.IUriCountService; import com.netgrif.etask.petrinet.web.requestbodies.UriCountRequest; -import org.springframework.beans.factory.annotation.Autowired; import org.springframework.data.domain.PageRequest; import org.springframework.stereotype.Service; @@ -70,34 +69,34 @@ protected Map countByLegacyQueries(Map queries, List allUri = StreamSupport.stream(uriNodeRepository.findAll().spliterator(), false).collect(Collectors.toList()); allUri.forEach(uriNode -> { if (uriNode.getLevel() != 0) { - UriNode parent = allUri.stream().filter(uri -> Objects.equals(uri.getId(), uriNode.getParentId())).findFirst().orElse(null); + UriNode parent = allUri.stream().filter(uri -> Objects.equals(uri.getStringId(), uriNode.getParentId())).findFirst().orElse(null); uriNode.setParent(parent); } if (uriNode.getChildrenId() != null && !uriNode.getChildrenId().isEmpty()) { - Set childrens = allUri.stream().filter(uri -> uriNode.getChildrenId().contains(uri.getId())).collect(Collectors.toSet()); + Set childrens = allUri.stream().filter(uri -> uriNode.getChildrenId().contains(uri.getStringId())).collect(Collectors.toSet()); uriNode.setChildren(childrens); } }); queries.forEach((key, uriId) -> { - UriNode uriNode = allUri.stream().filter(uri -> Objects.equals(uri.getId(), uriId)).findFirst().orElse(null); + UriNode uriNode = allUri.stream().filter(uri -> Objects.equals(uri.getStringId(), uriId)).findFirst().orElse(null); if (uriNode != null) { List filters = resolveUriTree(uriNode).stream().map(uriIdd -> CaseSearchRequest.builder() .uriNodeId(uriIdd) - .process(List.of(new CaseSearchRequest.PetriNet(FilterRunner.PREFERRED_FILTER_ITEM_NET_IDENTIFIER))) + .process(List.of(new CaseSearchRequest.PetriNet(FilterRunner.PREFERRED_ITEM_NET_IDENTIFIER))) .build()).collect(Collectors.toList()); List filterItems = elasticCaseService.search(filters, user.transformToLoggedUser(), PageRequest.ofSize(10000), locale, false).getContent(); - List filterss = workflowService.findAllById(filterItems.stream() + List localFilters = workflowService.findAllById(filterItems.stream() .map(aCase -> (List) aCase.getDataField("filter_case").getValue()) .flatMap(Collection::stream) .collect(Collectors.toList())); - List queres = filterss.stream() + List localQueries = localFilters.stream() .map(aCase -> CaseSearchRequest.builder() .query((String) aCase.getDataField("filter").getValue()) .build()) .collect(Collectors.toList()); - count.put(key, (int) elasticCaseService.count(queres, user.transformToLoggedUser(), locale, false)); + count.put(key, (int) elasticCaseService.count(localQueries, user.transformToLoggedUser(), locale, false)); } }); @@ -107,7 +106,7 @@ protected Map countByLegacyQueries(Map queries, private Set resolveUriTree(UriNode uriNode) { Set uriNodeIdTree = new HashSet<>(); if (uriNode.getLevel() != 0) { - uriNodeIdTree.add(uriNode.getId()); + uriNodeIdTree.add(uriNode.getStringId()); } resolveUriTree(uriNode.getChildren(), uriNodeIdTree); @@ -117,8 +116,8 @@ private Set resolveUriTree(UriNode uriNode) { private void resolveUriTree(Set uriNodes, Set uriNodeIdTree) { if (uriNodes != null && !uriNodes.isEmpty()) { uriNodes.forEach(uriNode -> { - if (!uriNodeIdTree.contains(uriNode.getId())) { - uriNodeIdTree.add(uriNode.getId()); + if (!uriNodeIdTree.contains(uriNode.getStringId())) { + uriNodeIdTree.add(uriNode.getStringId()); resolveUriTree(uriNode.getChildren(), uriNodeIdTree); } }); diff --git a/src/main/java/com/netgrif/etask/petrinet/web/EtaskUriController.java b/src/main/java/com/netgrif/etask/petrinet/web/EtaskUriController.java index 48e3fab..294c72d 100644 --- a/src/main/java/com/netgrif/etask/petrinet/web/EtaskUriController.java +++ b/src/main/java/com/netgrif/etask/petrinet/web/EtaskUriController.java @@ -94,7 +94,7 @@ protected EtaskUriNode populateDirectRelatives(EtaskUriNode customUriNode) { protected EtaskUriNode loadUriNode(UriNode node) { EtaskUriNode customUriNode = new EtaskUriNode(node); - repository.findByUriNodeId(node.getId()).ifPresent(data -> { + repository.findByUriNodeId(node.getStringId()).ifPresent(data -> { customUriNode.setRoleIds(data.getProcessRolesIds()); customUriNode.setMenuItemIdentifiers(data.getMenuItemIdentifiers()); customUriNode.setIcon(data.getIcon()); diff --git a/src/main/resources/application.properties b/src/main/resources/application.properties index 4df50c9..1efe47c 100644 --- a/src/main/resources/application.properties +++ b/src/main/resources/application.properties @@ -21,9 +21,12 @@ spring.servlet.multipart.max-request-size=${MAX_UPLOAD_FILE_SIZE:50MB} spring.data.mongodb.uri=${MONGO_URI:mongodb://localhost:27017} spring.data.mongodb.database=${DATABASE_NAME:etask} spring.data.mongodb.drop=false +spring.data.mongodb.runner-ensure-index=true +spring.data.mongodb.auto-index-creation=true # Elasticsearch spring.data.elasticsearch.cluster-name=elasticsearch +spring.data.elasticsearch.index.petriNet=${DATABASE_NAME:etask}_petrinet spring.data.elasticsearch.index.case=${DATABASE_NAME:etask}_case spring.data.elasticsearch.index.task=${DATABASE_NAME:etask}_task nae.uri.index=${DATABASE_NAME:etask}_uri diff --git a/src/main/resources/petriNets/configuration_tiles.xml b/src/main/resources/petriNets/configuration_tiles.xml index 1e76936..cd4778a 100644 --- a/src/main/resources/petriNets/configuration_tiles.xml +++ b/src/main/resources/petriNets/configuration_tiles.xml @@ -10,25 +10,29 @@ menu_import - - createOrUpdateMenuItem("general", "general", "Case", - "NOT (processIdentifier:\"filter\" OR processIdentifier:\"import_filters\" OR " + + def body = new com.netgrif.application.engine.workflow.domain.menu.MenuItemBody("/general", "general", "All cases", "settings") + createOrUpdateMenuItemAndFilter(body,"NOT (processIdentifier:\"filter\" OR processIdentifier:\"import_filters\" OR " + "processIdentifier:\"export_filters\" OR processIdentifier:\"org_group\" OR " + "processIdentifier:\"impersonation_config\" OR " + "processIdentifier:\"impersonation_users_select\" OR " + "processIdentifier:\"preference_filter_item\")", - "folder", - "All cases", []) - - createOrUpdateMenuItem("general_system", "general", "Case", - "_exists_:processIdentifier", - "settings", - "All system cases", []) + "Case", + "private", + [""] + ) - setUriNodeData("general", "General", null, "folder") - setUriNodeDataFilters("general", ["general"]) + setUriNodeData("/general", "General", null, "folder") + setUriNodeDataFilters("/general", ["general"]) + + + def body = new com.netgrif.application.engine.workflow.domain.menu.MenuItemBody("/general", "general_system", "All system cases", "settings") + createOrUpdateMenuItemAndFilter(body,"_exists_:processIdentifier", + "Case", + "private", + [""] + ) diff --git a/src/main/resources/petriNets/engine-processes/preference_filter_item.xml b/src/main/resources/petriNets/engine-processes/preference_filter_item.xml deleted file mode 100644 index 91dfa97..0000000 --- a/src/main/resources/petriNets/engine-processes/preference_filter_item.xml +++ /dev/null @@ -1,964 +0,0 @@ - - - preference_filter_item - PFI - Preference filter item - list - true - false - - - - - - - menu_identifier - Identifier of menu which is this menu entry part of. - default - - - entry_name - - - - entry_default_name - Menu item title - - - entry_marker - - - - move_option_up - - Up - - parentId: f.parentId; - - if (!task.isPresent()) { - return; - } - - def parentCase = findCase({it._id.eq(new org.bson.types.ObjectId(parentId.value))}); - - def previousTaskRefValue = parentCase.dataSet.get("filter_tasks").value - - def currentIndex = previousTaskRefValue.findIndexOf({ id -> id == task.get().stringId}) - - if (currentIndex != 0) { - previousTaskRefValue.remove(currentIndex) - previousTaskRefValue.add(currentIndex - 1, task.get().stringId) - - def parentTask = findTask({it.caseId.eq(parentId.value).and(it.transitionId.eq("navigationMenuConfig"))}) - - setDataWithPropagation(parentTask, [ - "filter_tasks": ["type": "taskRef", "value": previousTaskRefValue] - ]) - } - - - - move_option_down - - Down - - parentId: f.parentId; - - if (!task.isPresent()) { - return; - } - - def parentCase = findCase({it._id.eq(new org.bson.types.ObjectId(parentId.value))}); - - def previousTaskRefValue = parentCase.dataSet.get("filter_tasks").value - - def currentIndex = previousTaskRefValue.findIndexOf({ id -> id == task.get().stringId}) - - if (currentIndex != previousTaskRefValue.size() - 1) { - previousTaskRefValue.remove(currentIndex) - previousTaskRefValue.add(currentIndex + 1, task.get().stringId) - - def parentTask = findTask({it.caseId.eq(parentId.value).and(it.transitionId.eq("navigationMenuConfig"))}) - - setDataWithPropagation(parentTask, [ - "filter_tasks": ["type": "taskRef", "value": previousTaskRefValue] - ]) - } - - - - remove_option - - Remove - - parentId: f.parentId, - filterCase: f.filter_case; - - if (!task.isPresent()) { - return; - } - - def parentCase = findCase({it._id.eq(new org.bson.types.ObjectId(parentId.value))}); - - - def previousTaskRefValue = parentCase.dataSet.get("filter_tasks").value - - def currentIndex = previousTaskRefValue.findIndexOf({ id -> id == task.get().stringId}) - - previousTaskRefValue.remove(currentIndex) - - - def previousCaseRefValue = parentCase.dataSet.get("referenced_filters").value - - currentIndex = previousCaseRefValue.findIndexOf({id -> id == filterCase.value[0]}) - - previousCaseRefValue.remove(currentIndex) - - - def parentTask = findTask({it.caseId.eq(parentId.value).and(it.transitionId.eq("navigationMenuConfig"))}) - - setDataWithPropagation(parentTask, [ - "filter_tasks": ["type": "taskRef", "value": previousTaskRefValue], - "referenced_filters": ["type": "caseRef", "value": previousCaseRefValue], - ]) - async.run { - workflowService.deleteCase(useCase.stringId) - } - - - - filter_preview - - - - filter_case - - - filter - - - - parentId - - - - use_icon - Display menu icon? - true - - - icon_preview - Menu icon preview - - htmltextarea - - - - - icon_name - Menu icon identifier - Material icon identifier. List of icons with identifiers is available online. - - iconIdentifier: f.this, - iconPreview: f.icon_preview; - - if (iconIdentifier.value == "") { - change iconPreview value {"""]]>} - return; - } - - change iconPreview value { - """]]> + iconIdentifier.value + """]]> - } - - - - add_allowed_roles - - Allow view for roles - - allowedRoles: f.allowed_roles, - processesAvailable: f.processes_available, - rolesAvailable: f.roles_available; - - change allowedRoles options {return configurableMenuService.addSelectedRoles(allowedRoles, processesAvailable, rolesAvailable)} - - change rolesAvailable value {[]} - change rolesAvailable options {[:]} - change processesAvailable value {null} - - - - remove_allowed_roles - - Remove from allowed roles - - allowedRoles: f.allowed_roles, - processesAvailable: f.processes_available, - rolesAvailable: f.roles_available; - - change allowedRoles options {return configurableMenuService.removeSelectedRoles(allowedRoles)} - - change allowedRoles value {[]} - change rolesAvailable value {[]} - change rolesAvailable options {[:]} - change processesAvailable value {null} - - - - add_banned_roles - - Ban view for roles - - bannedRoles: f.banned_roles, - processesAvailable: f.processes_available, - rolesAvailable: f.roles_available; - - change bannedRoles options {return configurableMenuService.addSelectedRoles(bannedRoles, processesAvailable, rolesAvailable)} - - change rolesAvailable value {[]} - change rolesAvailable options {[:]} - change processesAvailable value {null} - - - - remove_banned_roles - - Remove from banned roles - - bannedRoles: f.banned_roles, - processesAvailable: f.processes_available, - rolesAvailable: f.roles_available; - - change bannedRoles options {return configurableMenuService.removeSelectedRoles(bannedRoles)} - - change bannedRoles value {[]} - change rolesAvailable value {[]} - change rolesAvailable options {[:]} - change processesAvailable value {null} - - - - processes_available - Your processes - Select a process containing roles you wish to add to allowed or banned roles lists. - - processes: f.this; - - change processes options {return configurableMenuService.getNetsByAuthorAsMapOptions(loggedUser(), org.springframework.context.i18n.LocaleContextHolder.locale)} - - - processes: f.this, - allowedRoles: f.allowed_roles, - bannedRoles: f.banned_roles, - rolesAvailable: f.roles_available; - - change rolesAvailable options {return configurableMenuService.getAvailableRolesFromNet(processes, allowedRoles, bannedRoles)} - change rolesAvailable value {[]} - - - - roles_available - Available roles from selected process - - - allowed_roles - Allowed roles - List of roles allowed to view this menu entry. - - - banned_roles - Banned roles - List of roles not allowed to view this menu entry. - - - new_filter_id - - </data> - <data type="text" immediate="true"> - <id>menu_item_identifier</id> - <title>Identifikátor (Filter API) - - - create_case_button_title - "New case" button title - - - create_case_button_icon_preview - Menu icon preview - - htmltextarea - - - - create_case_button_icon - "New case" button icon identifier - - create_case_button_icon_preview: f.create_case_button_icon_preview, - create_case_button_icon: f.create_case_button_icon; - - - if (create_case_button_icon.value == "") { - change create_case_button_icon_preview value {"""]]>} - return; - } - - change create_case_button_icon_preview value { - """]]> + create_case_button_icon.value + """]]> - } - - - - - default_headers - Set default headers - - - - allowed_nets - Allowed nets - - - - case_require_title_in_creation - Require title input in case creation? - true - - - enable_case_title - Open menu for case creation? - true - - - - - - - - - - - - - - - - - - - - - - Názov položky menu - Posunúť nahor - Posunúť nadol - Odstrániť - Zobrazovať ikonu? - Náhľad ikony - Identifikátor ikony - Identifikátor Material ikony. Zoznam ikon s identifikátormi je dostupný online. - Pridaj k povoleným roliam - Odstráň z povolených rolí - Pridaj k zakázaným roliam - Odstráň zo zakázaných rolí - Vaše procesy - Vyberte proces obsahujúci roly ktoré chcete pridať do zoznamu povolených alebo zakázaných rolí. - Dostupné roly - Povolené roly - Zoznam rolí ktoré budú upravovaný menu záznam vidieť. - Zakázané roly - Zoznam rolí pre ktoré bude upravovaný menu záznam skrytý. - Názov tlačidla "Nová inštancia" - Identifikátor ikony tlačidla "Nová inštancia" - Náhľad ikony - Predvolené hlavičky - Vyžadujem zadanie názvu prípadu pri vytvorení ? - Otvor menu pre vytvorenie prípadu? - - - Menüpunkttitel - nach oben - nach unten - entfernen - Menüikone anzeigen - Ikonevorschau - Ikone ID - Material Ikone ID. Liste den Ikonen mit IDs ist online verfügbar. - Zu zulässigen Rollen hinzufügen - Aus zulässigen Rollen entfernen - Zu verbotenen Rollen hinzufügen - Aus verbotenen Rollen entfernen - Ihre Prozesse - Wählen Sie einen Prozess mit Rollen aus, die Sie zu Listen mit zulässigen oder verbotenen Rollen hinzufügen möchten. - Verfügbare Rollen - Zulässige Rollen - Liste der Rollen, die diesen Menüeintrag anzeigen dürfen. - Verbotene Rollen - Liste der Rollen, die diesen Menüeintrag nicht anzeigen dürfen. - Schaltflächentitel "Neuer Fall" - Ikone ID - Ikonevorschau - Anzuzeigende Attributmenge auswählen - Benötige ich beim Erstellen einen Fallnamen? - Das Menü öffnen, um einen Fall zu erstellen? - - - - init - 420 - 260 - - 0 - - - - filter_case - - forbidden - - - 1 - 0 - 1 - 2 - - - - - filterTaskRef: f.filter_preview, - filterCaseRef: f.filter_case, - entryDefaultName: f.entry_default_name, - entryName: f.entry_name, - icon: f.icon_name; - - def filterCase = findCase({it._id.eq(filterCaseRef.value[0])}) - - change entryDefaultName value {return filterCase.title} - - change entryName value {return filterCase.dataSet["i18n_filter_name"].value} - - change filterTaskRef value {return [findTask({it.caseId.eq(filterCase.stringId).and(it.transitionId.eq("view_filter"))}).stringId]} - - change icon value {filterCase.icon} - - - - - parentId - - editable - - - - icon_name - - editable - - - - - view - 660 - 260 - - 5 - 0 - - - - DataGroup_0 - - grid - - entry_default_name - - editable - - entryName: f.entry_name, - filterTask: f.filter_preview, - filterCaseRef: f.filter_case, - entryDefaultName: f.entry_default_name; - - def filterCase = findCase({it._id.eq(new org.bson.types.ObjectId(filterCaseRef.value[0]))}) - filterCase.setTitle(entryDefaultName.value) - workflowService.save(filterCase) - def filterTask = findTask({ it._id.eq(filterTask.value[0])}) - setData(filterTask, [ - "new_title": ["type":"text", "value": entryDefaultName.value] - ]) - - change entryName value {return new com.netgrif.application.engine.petrinet.domain.I18nString(entryDefaultName.value)} - - - - 0 - 0 - 1 - 2 - 0 - - outline - - - - move_option_up - - editable - - - 2 - 0 - 1 - 1 - 0 - - fill - - - - move_option_down - - editable - - - 3 - 0 - 1 - 1 - 0 - - - - - remove_option - - editable - - - 4 - 0 - 1 - 1 - 0 - - - - - processes_available - - editable - - - 0 - 1 - 2 - 1 - 0 - - outline - - - - roles_available - - editable - - - 1 - 1 - 2 - 1 - 0 - - outline - - - - add_allowed_roles - - editable - - - 2 - 1 - 1 - 1 - 0 - - - - - allowed_roles - - editable - - - 3 - 1 - 1 - 1 - 0 - - outline - - - - remove_allowed_roles - - editable - - - 4 - 1 - 1 - 1 - 0 - - - - - add_banned_roles - - editable - - - 2 - 2 - 1 - 1 - 0 - - - - - banned_roles - - editable - - - 3 - 2 - 1 - 1 - 0 - - outline - - - - remove_banned_roles - - editable - - - 4 - 2 - 1 - 1 - 0 - - - - - use_icon - - editable - - - 0 - 3 - 1 - 1 - 0 - - - - 0 - - - trans: t.this, - iconPreview: f.icon_preview, - iconName: f.icon_name, - useIcon: f.use_icon; - - make iconPreview,visible on trans when {useIcon.value} - make iconName,editable on trans when {useIcon.value} - - make iconPreview,hidden on trans when {!useIcon.value} - make iconName,hidden on trans when {!useIcon.value} - - - - - - icon_preview - - visible - - - 1 - 3 - 1 - 1 - 0 - - - - icon_name - - editable - - iconIdentifier: f.icon_name, - filterCaseId: f.filter_case; - - def filterCase = findCase({it._id.eq(new org.bson.types.ObjectId(filterCaseId.value[0]))}) - filterCase.setIcon(iconIdentifier.value) - workflowService.save(filterCase) - - - - 2 - 3 - 1 - 2 - 0 - - - - filter_preview - - editable - - - 0 - 3 - 1 - 5 - 0 - - outline - - - - entry_marker - - hidden - - - 0 - 4 - 1 - 1 - 0 - - - - - - entry_name - - hidden - - - 1 - 4 - 1 - 1 - 0 - - - - - - create_case_button_title - - editable - - - 0 - 5 - 1 - 2 - 0 - - outline - - - - create_case_button_icon_preview - - visible - - - 2 - 5 - 1 - 1 - 0 - - outline - - - - create_case_button_icon - - editable - - - 3 - 5 - 1 - 2 - 0 - - outline - - - - default_headers - - editable - - - 0 - 6 - 1 - 4 - 0 - - outline - - - - default_headers - - editable - - - 0 - 6 - 1 - 4 - 0 - - outline - - - - enable_case_title - - editable - - - 0 - 7 - 1 - 4 - 0 - - outline - - - - case_require_title_in_creation - - editable - - - 0 - 8 - 1 - 4 - 0 - - outline - - - - - - - change_filter - 420 - 350 - - - - new_filter_id - - editable - required - - - set_event_0 - - - new_filter_id: f.new_filter_id, - filterTaskRef: f.filter_preview, - filterCaseRef: f.filter_case, - entryDefaultName: f.entry_default_name, - entryName: f.entry_name, - icon: f.icon_name; - - change filterCaseRef value { [new_filter_id.value] } - def filterCase = findCase({it._id.eq(filterCaseRef.value[0])}) - - change entryDefaultName value {return filterCase.title} - - change entryName value {return filterCase.dataSet["i18n_filter_name"].value} - - change filterTaskRef value {return [findTask({it.caseId.eq(filterCase.stringId).and(it.transitionId.eq("view_filter"))}).stringId]} - - change icon value {filterCase.icon} - - - - - - - - p1 - 300 - 260 - - 1 - false - - - p2 - 540 - 260 - - 0 - false - - - - a4 - regular - p1 - init - 1 - - - a5 - regular - init - p2 - 1 - - - a6 - read - p2 - view - 1 - - - a7 - read - p2 - change_filter - 1 - -