Daily Log for #alfresco IRC Channel

Alfresco discussion and collaboration. Stick around a few hours after asking a question.

Official support for Enterprise subscribers: support.alfresco.com.

Joining the Channel:

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.

Getting Help

More help is available in this list of resources.

Daily Log for #alfresco

2017-10-30 07:27:51 GMT <yreg> Morning community

2017-10-30 08:06:51 GMT <digcat> a good morning to you yreg

2017-10-30 08:24:39 GMT <alfbot> angelborroy: Sent 2 days, 18 hours, and 38 minutes ago: <bmejias> Thanks angelborroy for the 5 stars. It has been a productive collaboration between South-Americans :)

2017-10-30 10:51:25 GMT <yreg> Guys, I have this long running query (15s-20s) that is used quite a lot by end users to get the most relevant documents in the welcome screen

2017-10-30 10:52:15 GMT <yreg> and I was wondering if it would be possible to get better performance for it (something like pre-warming or something) is there such a concept in solr 4 ?

2017-10-30 10:53:55 GMT <yreg> Note : The fun thing about this query is that it looking for everything and applying some sorting + calculating some facets

2017-10-30 10:54:13 GMT <angelborroy> yreg probably caches is the right approach

2017-10-30 10:54:16 GMT <yreg> Note 2: this is a system with 15m+ nodes in the repository

2017-10-30 10:54:40 GMT <angelborroy> Is it a custom method?

2017-10-30 10:54:51 GMT <angelborroy> probably you can configure Hazelcast to cache that method

2017-10-30 10:55:27 GMT <yreg> angelborroy, it is actually a custom search webscript using the API to talk with solr

2017-10-30 10:55:44 GMT <angelborroy> In that case, it should work

2017-10-30 10:55:59 GMT <yreg> at least 90% of the time is spent on the solr side of things it seems

2017-10-30 10:56:01 GMT <angelborroy> Main problem is when to invalidate

2017-10-30 10:56:38 GMT <yreg> when I reproduce the query using Postman on solr it takes at least 14s

2017-10-30 10:56:48 GMT <angelborroy> I guess this summarized data is going to change form time to time, right?

2017-10-30 10:56:58 GMT <yreg> when I use Alfresco it takes ~15-16 s

2017-10-30 11:00:31 GMT <yreg> angelborroy, one of the sort criteria is the modification datetime so I expect it to vary constantly but not sure about the frequency

2017-10-30 11:01:50 GMT <angelborroy> In that case I suppose the better approach is to make an intermmediate structure to speed up the process

2017-10-30 11:02:07 GMT <angelborroy> and to cache / serialize this structure

2017-10-30 11:02:20 GMT <angelborroy> which kind of criteria are you including on that query?

2017-10-30 11:18:07 GMT <Tichodroma> anybody using https://github.com/jgoldhammer/alfresco-jscript-extensions ? I have a JS scope problem:

2017-10-30 11:18:08 GMT <alfbot> Title: GitHub - jgoldhammer/alfresco-jscript-extensions: Alfresco repository module with helpful javascript root object extensions which are helpful in much scenarios (at github.com)

2017-10-30 11:18:17 GMT <Tichodroma> https://github.com/jgoldhammer/alfresco-jscript-extensions/issues/19

2017-10-30 11:18:18 GMT <alfbot> Title: org.mozilla.javascript.EcmaError: ReferenceError for function · Issue #19 · jgoldhammer/alfresco-jscript-extensions · GitHub (at github.com)

2017-10-30 11:19:18 GMT <Tichodroma> Any idea how to make a function from an object available inside the alfresco-jscript-extensions bach runner?

2017-10-30 11:23:00 GMT <yreg> Tichodroma, have you tried making it global (lose the var)

2017-10-30 11:24:01 GMT <yreg> angelborroy, as far as I can see it looks for documents of a specific type (there is at least 14M of those) and having a combination of properties

2017-10-30 11:24:49 GMT <angelborroy> yreg so it looks like there is no way of improving the performance (obviously afaik)

2017-10-30 11:26:00 GMT <Tichodroma> yreg: yes, same error

2017-10-30 11:33:53 GMT <Tichodroma> the batch processor calls scriptService.executeScriptString("javascript", "function process(node) { /* ... */ }", model)

2017-10-30 12:08:09 GMT <AFaust> Tichodroma: That issue with your approach is exactly why I found that batch processor idea to be too limited...

2017-10-30 12:08:22 GMT <AFaust> Functions are stringified and executed out-of-context

2017-10-30 12:09:29 GMT <AFaust> But I do believe that people called my script batch processor approach "too complex" / "heavy", because it did try to support exactly such a (common) usage pattern...

2017-10-30 12:14:24 GMT <Tichodroma> AFaust: Do you have any idea how the approach by Jens could be made workable without large changes?

2017-10-30 12:14:50 GMT <Tichodroma> Having it available quick would be a major win for a task to be run over the holidays :)

2017-10-30 12:15:34 GMT <Tichodroma> even this has no visible effect: https://gist.github.com/lutzhorn/76da7a6e5caa02789a8ab9eb6a1d2762

2017-10-30 12:15:35 GMT <alfbot> Title: process.js · GitHub (at gist.github.com)

2017-10-30 12:16:32 GMT <yreg> Tichodroma, Have you considered using care4alf for your batch ?

2017-10-30 12:17:02 GMT <Tichodroma> yreg: this? https://github.com/binduwavell/generator-alfresco/pull/170

2017-10-30 12:17:04 GMT <alfbot> Title: Care4alf by binduwavell · Pull Request #170 · binduwavell/generator-alfresco · GitHub (at github.com)

2017-10-30 12:17:56 GMT <Tichodroma> probably https://mvnrepository.com/artifact/eu.xenit/care4alf/1.1.0

2017-10-30 12:17:57 GMT <alfbot> Title: Maven Repository: eu.xenit » care4alf » 1.1.0 (at mvnrepository.com)

2017-10-30 12:21:24 GMT <yreg> the second one, but it needs dynamic-extensions to be on-board for it to work

2017-10-30 12:22:29 GMT <yreg> it has among others a bulk processor that can be extended with custom workers or you could just use the javascript worker to execute a javascript snippet against the nodes returned by an FTS query

2017-10-30 12:22:37 GMT <yreg> or a list of noderefs from a txt file

2017-10-30 12:24:04 GMT <Tichodroma> the problem is not getting the Nodes, that's fine. But executing complex JS including JS loaded from the classpath is what I try to do.

2017-10-30 12:24:16 GMT <Tichodroma> a snippet of JS would not be enough

2017-10-30 12:24:50 GMT <AFaust> Tichodroma: I guess the only approach that would work with Jens' approach is if you'd use a script action to trigger the other script.

2017-10-30 12:25:49 GMT <Tichodroma> which would require implementing an Action ...

2017-10-30 12:26:32 GMT <AFaust> Not necessarily - you'd only need a Spring configured instance of the default script action that references a classpath script.

2017-10-30 12:26:42 GMT <Tichodroma> good idea

2017-10-30 12:27:11 GMT <Tichodroma> could you help me with a quick example of such a bean?

2017-10-30 12:27:22 GMT <AFaust> Though that is under-documented it is possible last I checked

2017-10-30 12:29:14 GMT <AFaust> The base would be like this: https://github.com/Alfresco/alfresco-repository/blob/develop/src/main/resources/alfresco/action-services-context.xml#L624

2017-10-30 12:29:15 GMT <alfbot> Title: alfresco-repository/action-services-context.xml at develop · Alfresco/alfresco-repository · GitHub (at github.com)

2017-10-30 12:30:04 GMT <AFaust> And you would only need to add a property called "scriptLocation" that is a bean of class org.alfresco.repo.jscript.ClasspathScriptLocation, which you setup via constructor argument = classpath

2017-10-30 12:30:17 GMT <Tichodroma> let me try this

2017-10-30 12:33:36 GMT <alfbot> resplin: Sent 5 days, 23 hours, and 13 minutes ago: <digcat> have you seen this https://anchore.io

2017-10-30 12:33:37 GMT <alfbot> resplin: Sent 5 days, 23 hours, and 12 minutes ago: <digcat> ahh i see https://anchore.io/preview/dockerhub/alfresco%2Fprocess-services%3Alatest

2017-10-30 12:35:55 GMT <resplin> digcat: Thank you for pointing me at ancore.io. That's a useful service. I'll pass it on to the team.

2017-10-30 12:36:26 GMT <digcat> hi resplin hope all good your end, i noticed aps are already on it

2017-10-30 12:38:06 GMT <resplin> I wasn't sure if that was an official image, or someone else submitted it. Interesting.

2017-10-30 12:50:50 GMT <Tichodroma> AFaust: What would be the variable name inside the script when calling myAction.execute(node)?

2017-10-30 12:52:04 GMT <AFaust> As always in scripts: "document"

2017-10-30 12:52:15 GMT <Tichodroma> m(

2017-10-30 12:57:09 GMT <Tichodroma> AFaust: Very nice, works!

2017-10-30 12:57:26 GMT <Tichodroma> a little bit "von hinten durch die Brust ins Auge", but who cares

2017-10-30 12:59:24 GMT <AFaust> Nothing against "Von der Kellertür durch die Küche ins Wohnzimmer" - sometimes called "the art of the bodge"

2017-10-30 12:59:45 GMT <AFaust> Somewhat related: https://www.youtube.com/watch?v=lIFE7h3m40U

2017-10-30 13:00:22 GMT <Tichodroma> thanks again, time for lunch

2017-10-30 13:35:59 GMT <yreg> AFaust, I was looking for a way to speed-up a super slow wildcard query on solr4 and I came across a resource on the net suggesting to add a new/first searcher in the solrConfig.xml

2017-10-30 13:36:33 GMT <yreg> So I though it is better to evaluate possible implications of this before going with it to the client

2017-10-30 13:36:46 GMT <yreg> do you happend to have fiddled with a similar thing before ?

2017-10-30 13:37:49 GMT <AFaust> I have not used the new / first searcher hook to pre-warm the caches / pre-execute queries to speed up performance. I have only used the cache regenerator interface to better control what queries are actually used to warm caches

2017-10-30 13:43:02 GMT <douglascrp> morning

2017-10-30 13:51:05 GMT <fwu> hi all!

2017-10-30 13:51:12 GMT <douglascrp> fwu, hi

2017-10-30 13:51:55 GMT <fwu> douglascrp, hello!

2017-10-30 13:52:59 GMT <fwu> douglascrp, did you look at the word component? Im almost starting to look at it again. But now to create Excel files.

2017-10-30 13:58:31 GMT <fwu> ppl, I have this: node.childByNamePath. How do I get the docid (guid) from this?

2017-10-30 14:02:47 GMT <fwu> of course that this node is a document

2017-10-30 14:11:55 GMT <douglascrp> fwu, not yet

2017-10-30 14:14:05 GMT <douglascrp> fwu, how about this? document.nodeRef.getId();

2017-10-30 14:24:59 GMT <fwu> douglascrp, I will test that. thank you!

2017-10-30 14:25:56 GMT <fwu> regarding the word component. I will update it and then I will give you feedback

2017-10-30 14:26:09 GMT <douglascrp> fwu, ok

2017-10-30 14:26:30 GMT <douglascrp> fwu, I was considering using it, but the priorities changed

2017-10-30 14:26:32 GMT <douglascrp> again

2017-10-30 14:29:07 GMT <fwu> I know how priorities change!

2017-10-30 14:30:07 GMT <fwu> I also have that N level of related combos. Instead of the fixed 2 levels if oyu need it

2017-10-30 15:16:03 GMT <yreg> AFaust, that's interesting, not suitable to my usecase though (at least as far as I can see)

2017-10-30 15:16:45 GMT <yreg> I have here a standalone client (not share) querying for everything (or almost everything) on its first load

2017-10-30 15:17:19 GMT <yreg> and then users rely on facets to refine queries

2017-10-30 15:18:25 GMT <yreg> the initial query is supposed to show most recently edited documents first even though usually the end users do not use results from the first page

2017-10-30 15:21:28 GMT <yreg> so they actually do that initial big fat query only to get the list of facets to be able to refine their query from there

2017-10-30 16:37:39 GMT <AFaust> yreg: Sounds like that JavaScript Console feature that will blast away your caches by querying for 10000000 documents / folders just to display a simple count...

2017-10-30 16:44:14 GMT <yreg> AFaust, Except this is actually relied upon by end users to actually browse in-index using facets

2017-10-30 16:58:34 GMT *** sujaypillai_ is now known as sujaypillai

2017-10-30 17:05:26 GMT <xkahn> resplin: nice! I was just reading the /. answers for the RH CEO and see your question was answered.

2017-10-30 17:07:02 GMT <xkahn> Good question too

2017-10-30 17:07:51 GMT <xkahn> 2 questions!

2017-10-30 17:08:01 GMT <resplin> Three even!

2017-10-30 17:08:08 GMT <resplin> And they are great answers.

2017-10-30 17:08:15 GMT <resplin> I was just forwarding them internally around my team.

2017-10-30 17:08:35 GMT <resplin> In my opinion, Jim Whitehurst is one of the best CEOs today.

2017-10-30 17:09:14 GMT <resplin> ~nolog I forgot how this works

2017-10-30 17:09:14 GMT <alfbot> resplin: Error: "nolog" is not a valid command.

2017-10-30 17:09:46 GMT <resplin> -= THIS MESSAGE NOT LOGGED =-

2017-10-30 17:09:59 GMT <resplin> -= THIS MESSAGE NOT LOGGED =-

2017-10-30 17:10:05 GMT <resplin> ~flush

2017-10-30 17:10:05 GMT <alfbot> resplin: Error: You don't have the owner capability. If you think that you should have this capability, be sure that you are identified before trying again. The 'whoami' command can tell you if you're identified.

2017-10-30 17:10:15 GMT <resplin> ~log flush

2017-10-30 17:10:15 GMT <alfbot> resplin: Error: "log" is not a valid command.

2017-10-30 17:10:36 GMT <xkahn> resplin: Ah yes. I just hit your 3rd answer.

2017-10-30 17:10:43 GMT <xkahn> question

2017-10-30 17:10:51 GMT <xkahn> 3rd question

2017-10-30 17:11:08 GMT <resplin> ~HtmlLogger flushlog

2017-10-30 17:11:08 GMT <alfbot> resplin: Woooosh, your log has been flushed...

2017-10-30 17:11:56 GMT <xkahn> That would be a pretty cool acquisition. I think you would have to argue that you were a platform play.

2017-10-30 17:12:17 GMT <resplin> More of a platform every day!

2017-10-30 17:12:22 GMT <xkahn> A lot of people thought Zimbra would have been a good thing to buy

2017-10-30 17:12:35 GMT <xkahn> But it was too specific and not enough of a platform for us in the end.

2017-10-30 17:13:07 GMT <resplin> Interesting. I always thought it was a good fit, but that makes sense. Especially in light of some of Whitehurst's answers.

2017-10-30 17:14:13 GMT <xkahn> Yeah. I have to say, a lot of his language and answers reflect the internal conversations here.

2017-10-30 17:14:49 GMT <xkahn> It's good to see. Sometimes these answers can be ... misleading.

2017-10-30 17:14:59 GMT <xkahn> But this is really what we talk abotu.

2017-10-30 17:15:21 GMT <resplin> That's good to know.

2017-10-30 17:41:41 GMT *** sujaypillai_ is now known as sujaypillai

2017-10-30 19:49:12 GMT *** resplin_ is now known as resplin

2017-10-30 20:24:07 GMT <ArgentumHeart> Hi, did anyone have any experience in overriding default error.jsp page? (any aikau 500 error being redirected to that page if i understand correctly) Or are there any ways to make custom error page?

2017-10-30 20:24:17 GMT <ArgentumHeart> Thanks in advance!

2017-10-30 20:30:25 GMT <AFaust> ArgentumHeart: No error JSP should actually be used when working with Aikau. All errors should be handled by the web script framework and its status response templates...

2017-10-30 20:31:16 GMT <ArgentumHeart> AFaust: yea, but is there any way to override that page with custom one from amp?

2017-10-30 20:31:25 GMT <AFaust> i.e. http://docs.alfresco.com/5.2/concepts/ws-resp-code-template.html

2017-10-30 20:31:26 GMT <alfbot> Title: Response status code templates | Alfresco Documentation (at docs.alfresco.com)

2017-10-30 20:32:13 GMT <AFaust> Though that documentation is for Repository-tier, it applies to Share as well (with appropriate changes in paths et al)

2017-10-30 20:32:53 GMT <ArgentumHeart> Thanks! I'll try that

2017-10-30 20:33:11 GMT <AFaust> ArgentumHeart: Can you be more specific with regards to the type of error you are dealing with?

2017-10-30 20:33:39 GMT <AFaust> What page are you seeing? Might be ideal if you could provide a screenshot via a sharing service...

2017-10-30 20:36:28 GMT <ArgentumHeart> ok, so there is aikau error page after repo responded with 500

2017-10-30 20:36:29 GMT <ArgentumHeart> https://imgur.com/a/mUa0C

2017-10-30 20:36:30 GMT <alfbot> Title: Imgur: The most awesome images on the Internet (at imgur.com)

2017-10-30 20:36:38 GMT <ArgentumHeart> need to customize that

2017-10-30 20:39:45 GMT <AFaust> That is not an Aikau error page - that is a generic error page in Surf.

2017-10-30 20:40:28 GMT <AFaust> ...or (more generally) Share. This error page also comes up in any non-Aikau pages if there is messed up configuration etc.

2017-10-30 20:41:01 GMT <AFaust> And end-user should never see this if administrators / developers correctly set up a system, so I don't know what you'd want to customise it for...

2017-10-30 20:42:47 GMT <AFaust> That page is primarily configured via I18n message keys (which partially contain HTML markup)

2017-10-30 20:43:21 GMT <AFaust> And indeed - that page is a JSP one.

2017-10-30 20:44:02 GMT <AFaust> This one in particular: https://svn.alfresco.com/repos/alfresco-open-mirror/web-apps/Share/trunk/share/src/main/webapp/error500.jsp

2017-10-30 20:44:03 GMT <alfbot> Title: <%= messages.getString("page.error.500.title")%> (at svn.alfresco.com)

2017-10-30 20:44:35 GMT <AFaust> There is no way to customise it via AMP except by either hard-overriding the file or the I18n message properties

2017-10-30 20:45:13 GMT <ArgentumHeart> AFaust: so if i want to show user-friendly error page what should i look for?

2017-10-30 20:47:09 GMT <AFaust> Again, in a properly set up system no user will ever see that page. I also wonder, what kind of information you would actually display that could be more helpful / friendly than this.

2017-10-30 20:47:16 GMT <AFaust> But of course you are free to override that page.

2017-10-30 20:47:40 GMT <AFaust> Especially if you want to it to fit in with your corporate design...

2017-10-30 20:49:49 GMT <ArgentumHeart> in particular I need to change design and button redirect.

2017-10-30 20:50:15 GMT <ArgentumHeart> "properly set up system" does this mean that there is a way to set up redirect to custom page?

2017-10-30 20:51:18 GMT <ArgentumHeart> In case repo responding with 500: for example user tried to access non existant aikau page. What will share show in "properly set up system"?

2017-10-30 21:16:46 GMT <ArgentumHeart> ok, seems like i can just override messages and get is done. Thx for the help! :)

2017-10-30 21:35:57 GMT <fwu> back

2017-10-30 21:36:39 GMT <fwu> ppl, is there any example for using cmis or other service to upload a document to Alfresco? Maybe a soapui example?

2017-10-30 21:37:27 GMT <fwu> basically I need a soap envelope example

2017-10-30 22:31:47 GMT <HasanAtizaz> i am trying to enforce a rule that incase of any file with extension .exe it, alfresco should not process that file. any help how to achieve it.

2017-10-30 22:41:31 GMT <resplin> HasanAtizaz: What do you mean by "process"?

2017-10-30 23:38:10 GMT <fwu> ppl, is there any problem with the atombinding wsdl in Alfresco 5.2?

2017-10-30 23:38:29 GMT <fwu> using soapui I get this error when trying to import the wsdl:

2017-10-30 23:38:40 GMT <fwu> from this url: http://localhost:8081/alfresco/api/-default-/public/cmis/versions/1.1/atom

2017-10-30 23:39:07 GMT <fwu> WSDLException (at /app:service): faultCode=INVALID_WSDL: Expected element '{http://schemas.xmlsoap.org/wsdl/}definitions'.

2017-10-30 23:57:19 GMT <HasanAtizaz> by process i mean it should not go to another component and execute its bpnm process. It should right away stopp that it will not process any kind of exe.

End of Daily Log

The other logs are at http://esplins.org/hash_alfresco