Alfresco discussion and collaboration. Stick around a few hours after asking a question.
Official support for Enterprise subscribers: support.alfresco.com.
Join in the conversation by getting an IRC client and connecting to #alfresco at Freenode. Our you can use the IRC web chat.
More information about the channel is in the wiki.
More help is available in this list of resources.
2019-09-18 05:43:13 GMT <alfresco-discord> <pbk1973> Hi All
2019-09-18 05:43:46 GMT <alfresco-discord> <pbk1973> I am new to this channel and have few queries related alfresco cmis 1.1
2019-09-18 05:44:12 GMT <alfresco-discord> <pbk1973> let me know if this is the right channel to ask questions.
2019-09-18 07:02:21 GMT <alfresco-discord> <lars> Hi @pbk1973 (or @pbk1973 , there seem to be multiple of you 🙂 ) this is the right place for any alfresco discussion, including questions. While I can't help you with cmis, feel free to ask your question. Usually people who can help you will pop in once there is a concrete question
2019-09-18 07:22:50 GMT <alfresco-discord> <pbk1973> Hi All, I am downloaded the the docker setup for Alfresco (CMIS 1.1) and the instance is running perfectly. I tried creating folder/document using apache java cmis library and its working. But i was trying creating item(cmis:item) and policy(cmis:policy), but getting error. Below is the sample java code Item Folder parent = session.getRootFolder(); Map<String, Object> properties = new
2019-09-18 07:22:51 GMT <alfresco-discord> HashMap<String, Object>(); properties.put(PropertyIds.NAME, "a new item"); properties.put(PropertyIds.OBJECT_TYPE_ID, "cmis:item"); Item createItem = parent.createItem(properties); Policy Folder parent = session.getRootFolder(); Map<String, Object> properties = new HashMap<String, Object>(); properties.put(PropertyIds.NAME, "a new policy"); properties.put(PropertyIds.OBJECT_TYPE_ID, "cmis:policy");
2019-09-18 07:22:51 GMT <alfresco-discord> properties.put(PropertyIds.POLICY_TEXT, "my policy description"); Policy newPolicy = parent.createPolicy(properties); For above both I am getting below error Exception in thread "main" org.apache.chemistry.opencmis.commons.exceptions.CmisConstraintException: Type is not creatable! at
2019-09-18 07:22:52 GMT <alfresco-discord> org.apache.chemistry.opencmis.client.bindings.spi.browser.AbstractBrowserBindingService.convertStatusCode(AbstractBrowserBindingService.java:284) at org.apache.chemistry.opencmis.client.bindings.spi.browser.AbstractBrowserBindingService.post(AbstractBrowserBindingService.java:426) at org.apache.chemistry.opencmis.client.bindings.spi.browser.ObjectServiceImpl.createPolicy(ObjectServiceImpl.java:216) at
2019-09-18 07:22:52 GMT <alfresco-discord> org.apache.chemistry.opencmis.client.runtime.SessionImpl.createPolicy(SessionImpl.java:1362) at org.apache.chemistry.opencmis.client.runtime.FolderImpl.createPolicy(FolderImpl.java:151) at org.apache.chemistry.opencmis.client.runtime.FolderImpl.createPolicy(FolderImpl.java:488) at cmis.Main.main(Main.java:185) Not sure, if I am missing anything or is there any configuration changes required.
2019-09-18 07:53:08 GMT <Tichodroma> Strange observation: In beforeRemoveAspect(NodeRef, QName) of BeforeRemoveAspectPolicy the properties of the to be removed aspect are not available using NodeService methods.
2019-09-18 07:53:27 GMT <Tichodroma> hm, maybe not
2019-09-18 07:53:39 GMT <Tichodroma> I'll try a different thing.
2019-09-18 09:20:09 GMT <Tichodroma> never mind, found the problem
2019-09-18 12:53:34 GMT <alfresco-discord> <kanat> https://cdn.discordapp.com/attachments/451644531323174914/623864182336651265/unknown.png
2019-09-18 12:53:52 GMT <alfresco-discord> <kanat> NET::ERR_CERT_COMMON_NAME_INVALID Subject: secure04.lithium.com Issuer: DigiCert SHA2 High Assurance Server CA Expires on: 4 нояб. 2019 г. Current date: 18 сент. 2019 г.
2019-09-18 12:54:02 GMT <AFaust> @pbk1973: I see no answers to your question(s) yet, so I'll give it a brief shot. The error message is pretty clear: Alfresco does not support creating policy instances. Alfresco maps aspects to policies, and since aspects are only useful as secondary types, you cannot create a node with "just" and aspect.
2019-09-18 12:54:38 GMT <AFaust> Also, you cannot create an instance of cmis:item because cmis:item is just a generic base type for any non-file/folder types.
2019-09-18 12:55:23 GMT <AFaust> To be honest, I don't believe you can create any cmis:item or derived type instances via CMIS in Alfresco at all, though you can surely navigate / query / access any existing instances in CMIS 1.1
2019-09-18 12:55:49 GMT <alfresco-discord> <kgastaldo> @kanat - We're in the process of moving from Jive to Khoros (and going live today!) and as you can see, we've hit a snag. We're working to resolve. As soon as the new forums are up and running, I'll post in here!
2019-09-18 14:22:44 GMT <alfresco-discord> <jpotts> @pbk1973: I agree with AFaust. If you download the Chemistry Workbench you can browse the types and aspects in the system. You can then inspect them to see which ones are creatable.
2019-09-18 14:22:44 GMT <alfresco-discord> <jpotts> https://cdn.discordapp.com/attachments/451644531323174914/623886621640622116/Screen_Shot_2019-09-18_at_9.21.03_AM.png
2019-09-18 14:23:57 GMT <alfresco-discord> <jpotts> @pbk1973: I am pretty sure you can create instances that are defined as sub-types of cmis:item, though. Data list items are examples.
2019-09-18 14:25:55 GMT <AFaust> How do you specify the location of the item to create? Since cmis:item is not fileable, I would not know how you can "properly" create an item with location in Alfresco...
2019-09-18 14:26:21 GMT <AFaust> e.g. primary parent / type of child association
2019-09-18 14:27:08 GMT <AFaust> Data list items are also not a good example, because they are derived from cm:content and thus are handled just like any other fileable document
2019-09-18 14:27:41 GMT <AFaust> *should be handled* (I have not actually used data list items via CMIS)
2019-09-18 14:27:47 GMT <alfresco-discord> <jpotts> Hmm
2019-09-18 14:29:44 GMT <AFaust> Best example would be cm:person - if anyone can show me how to create a cm:person node in the sys:people container, I will believe that you can create "any" cmis:item
2019-09-18 14:31:28 GMT <alfresco-discord> <jpotts> How about categories? Those have cmis:item as a base type and are marked creatable.
2019-09-18 14:32:35 GMT <AFaust> They may be marked createable, but how do you actually create them in a hierarchy that makes sense?
2019-09-18 14:33:44 GMT <alfresco-discord> <jpotts> Yeah, I know it. It is strange that Alfresco reports things that are creatable but also not fileable and does not supported unfiled objects.
2019-09-18 14:36:04 GMT <alfresco-discord> <jpotts> On a completely separate topic, here's a question. I've got a list constrained property. I know how to specify properties so that the form field will render externalized labels instead of the actual property values. But is there a syntax for specifying those props so that facet values will also render the externalized labels? How I've done it so far is to create a simple FacetLabelDisplayHandler, but
2019-09-18 14:36:04 GMT <alfresco-discord> that seems like more trouble than I should have to go to.
2019-09-18 14:37:05 GMT <AFaust> Oh...you are quite brave in trying to customise the default facet search...
2019-09-18 14:38:14 GMT <angelborroy> Not sure if this helps
2019-09-18 14:38:14 GMT <angelborroy> https://angelborroy.wordpress.com/2016/02/03/alfresco-5-customizing-facet-filter-for-future-dates/
2019-09-18 14:38:15 GMT <alfbot> Title:Alfresco 5: Customizing facet filter for future dates | Programming and So (at angelborroy.wordpress.com)
2019-09-18 14:38:43 GMT <AFaust> Yes, they should have considered to have some trivial default fallback / support for d:text properties with a LoV constraint, but looks like the PM responsible for the feature did no specify it and the engineer was too frontend centric to actually know what you can do with Alfresco in the backend...
2019-09-18 14:39:40 GMT <alfresco-discord> <jpotts> Right, that's what I did, but it felt ridiculous to have to write a Java class that just maps the property values to message bundle keys. Alfresco should do that for me, I think.
2019-09-18 14:40:36 GMT <alfresco-discord> <jpotts> <snark>That wouldn't be the first time I had to do something the hard way that should have been done for me, though.</snark>
2019-09-18 14:40:57 GMT <angelborroy> I’m not sure where to do that feature
2019-09-18 14:41:22 GMT <angelborroy> I don’t think that can be done in SOLR
2019-09-18 14:41:29 GMT <angelborroy> But I’ll take a look
2019-09-18 14:41:55 GMT <alfresco-discord> <jpotts> I'll push what I've done to a public GitHub repo and link it here in case it is helpful
2019-09-18 14:42:10 GMT <AFaust> It needs to be done in the Repository where the translation of facet values is handled, not in SOLR...
2019-09-18 14:42:26 GMT <angelborroy> I guessed so
2019-09-18 14:42:33 GMT <angelborroy> But that is “out of my scope”, you know
2019-09-18 14:42:57 GMT <AFaust> jpotts: I believe I have done something like this some years ago, but don't know which of the customer projects it was and whether I could share it if I found it again (all projects should be backed up at home on my NAS)
2019-09-18 14:44:49 GMT <AFaust> It is "out of scope" for anyone at Alfresco, because such debts of "prototype features" are never tackled. Same thing for smart folders...
2019-09-18 14:44:53 GMT <alfresco-discord> <jpotts> I've got it working with the label display handler, I just wanted to double-check that there wasn't an easier way. Sounds like not.
2019-09-18 14:46:50 GMT * AFaust is going back to dealing with Oracle query plan analysis, which is causing me about the same snarky / annoyed mood as the facet label thingy is/was for jpotts
2019-09-18 14:48:22 GMT <alfresco-discord> <jpotts> This is an out-of-the-box SDK 3.0.1 project with the default ACME model modified to add a multi-value prop called acme:categories. The categories have externalized labels in a Share props file. To get those same labels to show for facet values, I had to write a custom display label handler that maps the category value to the Share message bundle property key. https://github.com/jpotts/facet-test
2019-09-18 14:48:23 GMT <alfbot> Title:GitHub - jpotts/facet-test: Shows how to externalize the display of facet values in the Share faceted search page. (at github.com)
2019-09-18 14:48:53 GMT <alfresco-discord> <jpotts> The class could be made more generic, obviously, but this was just a little test to see how it works.
2019-09-18 14:50:15 GMT <AFaust> Ehm... why are the labels maintained in Share at all? They should typically be maintained in Repository along with model I18n...
2019-09-18 14:50:20 GMT <alfresco-discord> <jpotts> The relevant bean is here: https://github.com/jpotts/facet-test/blob/6a8efa34c71084c90a628b81d6c9e717b408d304/facet-test-platform-jar/src/main/resources/alfresco/module/facet-test-platform-jar/context/bootstrap-context.xml#L46
2019-09-18 14:50:21 GMT <alfbot> Title:facet-test/bootstrap-context.xml at 6a8efa34c71084c90a628b81d6c9e717b408d304 · jpotts/facet-test · GitHub (at github.com)
2019-09-18 14:51:03 GMT <alfresco-discord> <jpotts> And the display handler class is here: https://github.com/jpotts/facet-test/blob/master/facet-test-platform-jar/src/main/java/com/metaversant/alfresco/ConstraintDisplayHandler.java
2019-09-18 14:51:04 GMT <alfbot> Title:facet-test/ConstraintDisplayHandler.java at master · jpotts/facet-test · GitHub (at github.com)
2019-09-18 14:53:08 GMT <AFaust> ... at least that is the way it is done for core models and how I have always done it (https://github.com/Alfresco/alfresco-repository/blob/master/src/main/resources/alfresco/messages/bpm-messages.properties#L84)
2019-09-18 14:53:09 GMT <alfbot> Title:alfresco-repository/bpm-messages.properties at master · Alfresco/alfresco-repository · GitHub (at github.com)
2019-09-18 14:54:09 GMT <alfresco-discord> <jpotts> Yes, I have seen that. It doesn't solve the facet problem though.
2019-09-18 14:54:44 GMT <AFaust> Couldn't you just use the dictionary constraint to pre-calculate the label in your custom class?
2019-09-18 14:55:14 GMT <alfresco-discord> <jpotts> Yes
2019-09-18 15:55:32 GMT <alfresco-discord> <Toon Geens> That is one of the many paper-cut reasons we maintain our own REST API layer
2019-09-18 15:55:50 GMT <alfresco-discord> <Toon Geens> https://github.com/xenit-eu/alfred-api/blob/master/apix-impl/src/main/java/eu/xenit/apix/alfresco/search/SearchFacetsServiceImpl.java#L308
2019-09-18 15:55:51 GMT <alfbot> Title:alfred-api/SearchFacetsServiceImpl.java at master · xenit-eu/alfred-api · GitHub (at github.com)
2019-09-18 15:55:54 GMT <alfresco-discord> <Toon Geens> almost open sourced now 🙂
2019-09-18 16:31:48 GMT <alfresco-discord> <kgastaldo> Hi All - We’ve had some challenges with switching our redirects from community to hub during today's planned launch. The good news is they’re all resolved and we’re set to go! We plan to make the final switch on Thursday 19th September.
The other logs are at http://esplins.org/hash_alfresco