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

2019-05-28 07:20:12 GMT <alfbot> angelborroy: Sent 16 hours and 6 minutes ago: <hi-ko> It would help us and maybe others to provide minimal repo version as part of ASS and Share

2019-05-28 07:21:09 GMT <angelborroy> Tichodroma can you ellaborate hi-ko request?

2019-05-28 07:24:56 GMT <alfresco-discord> <dgradecak> morning guys, is there a docker image (compose or whatever ...) for activiti 7 with an all +-in-one package?

2019-05-28 07:28:24 GMT <angelborroy> https://github.com/Activiti/activiti-cloud-examples

2019-05-28 07:28:25 GMT <alfbot> Title:GitHub - Activiti/activiti-cloud-examples: Activiti Cloud Examples using Docker Images from: https://hub.docker.com/u/activiti/dashboard/ (at github.com)

2019-05-28 07:28:47 GMT <angelborroy> https://activiti.gitbook.io/activiti-7-developers-guide/getting-started/getting-started-activiti-cloud/getting-started-docker-compose

2019-05-28 07:30:54 GMT <alfresco-discord> <dgradecak> so there is nothing ready to be run

2019-05-28 07:31:03 GMT <alfresco-discord> <dgradecak> like htis one

2019-05-28 07:31:04 GMT <alfresco-discord> <dgradecak> https://hub.docker.com/r/flowable/all-in-one

2019-05-28 07:31:05 GMT <alfbot> Title:Docker Hub (at hub.docker.com)

2019-05-28 07:36:40 GMT <alfresco-discord> <yreg> @dgradecak all-in-one is against the concept of microservices and cloud architecture

2019-05-28 07:37:51 GMT <alfresco-discord> <yreg> on the other hand the activiti-7 team should (if not already had) publish a comprehensive docker-compose to run their stack with no dependency on kubernetes

2019-05-28 07:38:16 GMT <angelborroy> is that different to the link I pasted before?

2019-05-28 07:39:25 GMT <alfresco-discord> <yreg> I did not see that so it was already done πŸ˜‰

2019-05-28 07:40:02 GMT <alfresco-discord> <yreg> then I do not see any added value in having an ALL-IN-ONE package other then resurrecting a dinosaur

2019-05-28 07:41:01 GMT <angelborroy> Obviously, Activiti is not understood as an ALL-IN-ONE

2019-05-28 07:41:13 GMT <angelborroy> This is why I gave @dgradecak the Docker Compose thing

2019-05-28 07:41:29 GMT <alfresco-discord> <yreg> and that should be more than enough

2019-05-28 07:42:55 GMT <alfresco-discord> <yreg> IMHO

2019-05-28 07:48:09 GMT <redcomm> Morning!, Does anyone know how to get the url to download a document using the REST API?

2019-05-28 07:48:33 GMT <angelborroy> What REST API?

2019-05-28 07:48:47 GMT <redcomm> maybe using "template" entry?

2019-05-28 07:49:00 GMT <redcomm> https://api-explorer.alfresco.com/api-explorer/

2019-05-28 07:49:02 GMT <alfbot> Title:Alfresco Content Services REST API Explorer (at api-explorer.alfresco.com)

2019-05-28 07:49:29 GMT <angelborroy> ah, ok, so the new REST API

2019-05-28 07:49:30 GMT <redcomm> (ACS Rest API?)

2019-05-28 07:49:59 GMT <alfresco-discord> <yreg> angelborroy it's getting old, it's no longer new πŸ˜›

2019-05-28 07:50:08 GMT <redcomm> using search API

2019-05-28 07:50:59 GMT <alfresco-discord> <yreg> redcomm here you go https://api-explorer.alfresco.com/api-explorer/#!/nodes/getNodeContent

2019-05-28 07:51:00 GMT <alfbot> Title:Alfresco Content Services REST API Explorer (at api-explorer.alfresco.com)

2019-05-28 07:51:15 GMT <angelborroy> I was trying to find that on the tutorials from Gav

2019-05-28 07:51:29 GMT <redcomm> "include": ["aspectNames", "properties", "downloadURL"] doesn't works

2019-05-28 07:52:22 GMT <redcomm> thanks @alfresco-discord but I'm interested to know if there is a way to retrieve this URL using Search API only

2019-05-28 07:53:40 GMT <angelborroy> https://community.alfresco.com/community/ecm/blog/2016/11/02/v1-rest-api-part-4-managing-nodes

2019-05-28 07:53:42 GMT <alfbot> Title:v1 REST API - Part 4 - Managing Nodes | Alfresco Community (at community.alfresco.com)

2019-05-28 07:53:47 GMT <redcomm> ok, maybe I can create some "hardcoded" url using this endpoint

2019-05-28 07:54:06 GMT <alfresco-discord> <yreg> redcomm the search API gives you the ID of the entry which you can use to construct the URL for the endpoint I gave you

2019-05-28 07:55:16 GMT <redcomm> sure, thanks!

2019-05-28 07:55:53 GMT <angelborroy> Yes, it’s not provided by the Search API

2019-05-28 07:58:50 GMT <redcomm> It's a pitty

2019-05-28 07:58:59 GMT <redcomm> ;-)

2019-05-28 08:03:03 GMT <alfresco-discord> <drazen04> (Re-post, i didn't find much) - Hi guys. Someone knows how send a custom email to creator every time a task in a workflow change my variable "state"?

2019-05-28 08:04:21 GMT <alfresco-discord> <yreg> there is nothing out of the box to do so, but you should be able to create a process listener to do just that πŸ˜‰

2019-05-28 08:08:17 GMT <alfresco-discord> <drazen04> I read about it in an example, but i didn't understand if listeners are listening for custom events

2019-05-28 08:08:34 GMT <alfresco-discord> <drazen04> like a behaviour

2019-05-28 09:14:35 GMT <alfresco-discord> <yreg> @drazen04 there are a few variations depending on which kind of listener and how you hook it in, but basically you can create a RuntimeEventListener to listen on all sorts of events from all processes, and start your method body with if clauses to only run your custom logic when applicable πŸ˜‰ something like : public void onEvent(ActivitiEvent event) { if

2019-05-28 09:14:36 GMT <alfresco-discord> (ActivitiEventType.PROCESS_STARTED.equals(event.getType())) { ...

2019-05-28 09:15:19 GMT <alfresco-discord> <drazen04> Thank you @yreg

2019-05-28 09:37:08 GMT <alfresco-discord> <dgradecak> did any of you ( @yreg @angel.borroy ) tried running the activiti activiti-cloud-examples with the latest version?

2019-05-28 09:37:53 GMT <alfresco-discord> <yreg> it has been a while since I tried that, but I remember it being smooth when I did a few months ago

2019-05-28 09:39:51 GMT <alfresco-discord> <dgradecak> well to me it does not look that way right now, not able to use the modeler (JS issues), once I changed the sso to basic auth (for test) on the login screen, cannot click apply to get it back to sso

2019-05-28 09:44:39 GMT <alfresco-discord> <dgradecak> and with all those make commands it looks pretty nice πŸ˜‰

2019-05-28 10:10:24 GMT <alfresco-discord> <Loftux> I have a situation where onAddAspect for ImapModel.ASPECT_IMAP_CONTENT triggers "randomly". I can only find one place in all of Alfresco source code where this aspect is added, but a breakpoint there never stops. Is there any other way to add an aspect besides "addAspect"?

2019-05-28 10:11:35 GMT <alfresco-discord> <Loftux> I must understand why this aspect gets added, it happens even in folders where IMAP is not enabled or present. Only clue is that adding a file to folder of type msg is a trigger

2019-05-28 10:11:39 GMT <alfresco-discord> <yreg> @Loftux when you add properties from an aspect, the aspect is implicitly added

2019-05-28 10:11:58 GMT <alfresco-discord> <yreg> even if you add a single property

2019-05-28 10:12:25 GMT <alfresco-discord> <Loftux> @yreg Ahh okay, will look for that.

2019-05-28 10:12:41 GMT <alfresco-discord> <yreg> when you add a child aspect, all parent aspects get added implicitly as well

2019-05-28 10:13:03 GMT <alfresco-discord> <Loftux> It is not our code, that I know for sure, something in core Alfresco is doing this.

2019-05-28 10:20:56 GMT <alfresco-discord> <Loftux> @yreg That was it. The RFC822MetaDataExtracter.properties has for example messageFrom=imap:messageFrom, cm:originator So that will add the aspect I guess.

2019-05-28 14:47:46 GMT <Tichodroma> Now that integration tests of custom modules are run using Dokcker, I wonder how make additional Spring beans available in this context and how to access existing Spring beans in test classes.

2019-05-28 14:48:20 GMT <Tichodroma> Until Alfresco 5.x, I used to annotate the test class with @ContextConfiguration("classpath:alfresco/application-context.xml"). This made the Spring context available.

2019-05-28 14:49:20 GMT <Tichodroma> To make Spring beans from this context available in the test class, I annotated members like this: @Autowired @Qualifier("authenticationComponent") private AuthenticationComponent authenticationComponent;

2019-05-28 14:50:01 GMT <Tichodroma> In addition I was able to define additional Spring beans in src/test/resources/alfresco/extension/test-context.xml

2019-05-28 14:50:39 GMT <Tichodroma> Is this the approach to use when writing integration tests for 6.x and Docker?

2019-05-28 14:51:26 GMT <Tichodroma> At least the annotation org.springframework.test.context.ContextConfiguration is no longer included in a module build using the Maven 4.0.0 SDK archetype.

2019-05-28 15:00:02 GMT <Tichodroma> This blog post talks about the above mentioned annotations: https://community.alfresco.com/community/ecm/blog/2018/04/24/migrating-alfresco-sdk2-projects-to-acs-6

2019-05-28 15:00:04 GMT <alfbot> Title:Migrating Alfresco SDK2 projects to ACS 6 | Alfresco Community (at community.alfresco.com)

2019-05-28 15:00:40 GMT <Tichodroma> But the dependencies pulled in by the pom.xml created from the SDK 4 archetype don't include these annotations.

2019-05-28 15:01:40 GMT <Tichodroma> A different approach seems to be to only use @RunWith(value = AlfrescoTestRunner.class) on the integration test class. But how do I get the Spring beans like nodeService injected into it?

2019-05-28 15:22:50 GMT <Tichodroma> I've created a Stack Overflow question from the above: https://stackoverflow.com/q/56345430/11044402

2019-05-28 15:22:51 GMT <alfbot> Title:java - Make custom Spring beans available in Alfresco integration test context - Stack Overflow (at stackoverflow.com)

2019-05-28 16:07:32 GMT <alfresco-discord> <Mark> Tichodroma I've answered as well as I can. Hope it helps!

2019-05-28 16:13:42 GMT <alfresco-discord> <Mark> I've been stuck for a very long time now writing a custom permission service platform 5.2 jar module.. I've done this before, but somehow now as soon as I actually add a call to another custom service class, different acegi method interceptors start throwing bizarre NullPointerExceptions, for example when NodeService#getRootNode(StoreRef) is called from ImporterBootstrap but also when

2019-05-28 16:13:43 GMT <alfresco-discord> NodeService#getAspects(NodeRef) is called from the mlContentInterceptor. Thing is, I don't really do anything with the NodeService..

2019-05-28 16:14:18 GMT <alfresco-discord> <Mark> Any "pointers" on how to debug these weird interceptor behaviors?

2019-05-28 16:21:28 GMT <AFaust> Not to mentione / ask the obvious, but why not with a debugger? E.g. attach Eclipse / IDE remote debugger, break at those NPEs or on the reported code lines and inspect the stack to understand the how / why...

2019-05-28 16:28:47 GMT <alfresco-discord> <Mark> Good point Axel, I tried it and I couldn't figure out what was happening either unfortunately. The interceptor methods are hit quite often and travel down an interceptor chain, it's hard to see where it goes wrong exactly. Especially because the exception is always caught by some catch-all mechanism and thus doesn't 'break' the debugger.

2019-05-28 16:28:54 GMT <alfresco-discord> <Mark> Must admit I'm not a star at using the debug tools.

2019-05-28 19:02:44 GMT <alfresco-discord> <Mark> I found out for a call to NodeService#getRootNode that failure happens in the NodeService_security. This is a MethodSecurityInterceptor, specifying an ACL (objectDefinitionSource) and other params. Strangely, these arguments are all null, which causes the NPE. This would be something to go on if I actually did anything with these beans.

2019-05-28 20:06:55 GMT <alfresco-discord> <Mark> Alright so funny story: my CustomPermissionService has an @Autowired dependency on another custom bean that has the actual logic. When I don't have any implementation code but do have that annotation, Alfresco's NodeService_security MethodSecurityInterceptor is initialised wrongly with all-null properties, causing NPEs. If I leave out the @Autowired annotation, all is well.

2019-05-28 20:07:19 GMT <alfresco-discord> <Mark> This has to rank among the most bizarre anomalies I've seen in Alfresco.

2019-05-28 20:07:29 GMT <alfresco-discord> <Mark> Still not the strangest of course..

2019-05-28 20:23:56 GMT <AFaust> This sounds more like you have a cyclic dependency somewhere and the bean(s) are only partially initialised as a result when the first call is made.

2019-05-28 20:24:27 GMT <AFaust> The fact that the @Autowired changes the behaviour is a strong indicator that is has to do with the change in bean wiring that you are introducing

2019-05-28 21:15:52 GMT <alfresco-discord> <Mark> It works exactly the same now, but with a setter method. The bean in question is abstract as well, and used by BeanExtender to override the class impl of permissionServiceImpl. So in that sense permissionServiceImpl gets a dependency on my custom service which in turn requires NodeService which in turn.. you're right!

2019-05-28 21:18:07 GMT <alfresco-discord> <Mark> I suppose the fact that not using Autowired changes this means that the annotation is evaluated eagerly even though it is abstract. Maybe I could use Autowired in conjunction with Lazy then. Interesting point. I'm impressed you pointed that out just by what I shared.

2019-05-28 21:31:50 GMT <alfresco-discord> <Mark> Hmm, that doesn't work. I'm unclear on why it works without the annotation but not with. Must be some difference in loading.

2019-05-28 21:44:13 GMT <AFaust> Well, I never use @Autowired or any of the other annotations as they are often way too brittle for non-trivial use cases.

2019-05-28 21:45:18 GMT <AFaust> BeanExtender also is an annoying utility that Alfresco uses to hard-wire their support for virtual / smart folders.

2019-05-28 21:46:42 GMT <AFaust> ... and I have seen similar issues in customer / partner projects way too often, so it was a "guess" with a high probability.

End of Daily Log

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