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-24 05:17:01 GMT <qwebirc40053> your authentication details have not bee recognised or Alfresco may not be availble at this time i am getting like this when i run in the browser

2017-10-24 06:34:12 GMT <twen> hello

2017-10-24 06:38:14 GMT <yreg> Good morning guys !

2017-10-24 06:39:38 GMT <digcat> morning guys

2017-10-24 06:51:07 GMT <_david_____> greetings!

2017-10-24 08:12:38 GMT <_david_____> OK, I have a question: if I share a document (and make it public with a download link) anyone can, effectively, download it... I recall that in Alfresco 4.2 you could make it so anyone trying to download such a public link had to log onto Alfresco prior to downloading... How can I get this with the latest Alfresco version?

2017-10-24 08:20:53 GMT <yreg> _david_____, is it not the default ? such a behaviour should not change from version to version IMHO

2017-10-24 08:23:26 GMT <_david_____> agreed, it should not... the default is to allow anyone from the Internet to download a shared document... I am wondering how to force them to be Alfresco users

2017-10-24 08:24:05 GMT <yreg> check permissions on the node, if you find a permission for guest switch it to the group everyone

2017-10-24 08:25:04 GMT <yreg> note that the difference between guest (literally everyone and everyone : as in every authenticated user) that probably should do the trick

2017-10-24 08:36:04 GMT <david_____> I will look into that... because the download links are of this sort: https://myalfresco.com/share/s/HFldJsD2T_mZt2bvHeYjzQ and the resulting download link is: https://myalfresco.com/share/proxy/alfresco-noauth/api/internal/shared/node/HFldJsD2T_mZt2bvHeYjzQ/content/The_File.docx?c=force&noCache=1508833877152&a=true

2017-10-24 08:36:27 GMT <david_____> notice the /share/proxy/alfresco-noauth/api call...

2017-10-24 09:27:07 GMT <Tichodroma> quick opinion: Do you think using a ThreadLocal is a reliable way to pass context from a custom API to a BeforeAddAspectPolicy?

2017-10-24 09:41:57 GMT <yreg> Tichodroma, what if your behaviour is called from an async action ? an other thread context ?

2017-10-24 09:42:29 GMT <yreg> if such an edge scenario is not possible, then yes it should be reliable to use ThreadLocal

2017-10-24 09:48:16 GMT <Tichodroma> hm, I cant' say for sure that these scenarios are not possible.

2017-10-24 09:49:18 GMT <Tichodroma> I am mainly interested in not getting the 'wrong' ThreadLocal in the Behaviour. It is fine if the ThreadLocal is not set, in this case the policy defaults to denying the operation.

2017-10-24 09:50:12 GMT <Tichodroma> The idea is to make enough context available for the Behaviour so it can decide if the operation (like adding and aspect) is allowed or not.

2017-10-24 09:50:28 GMT <Tichodroma> any different ideas for achieving this?

2017-10-24 09:59:06 GMT <angelborroy> Tichodroma why AlfrescoTransactionSupport is not an option?

2017-10-24 09:59:21 GMT <Tichodroma> did I say this? ;)

2017-10-24 09:59:42 GMT <angelborroy> I haven’t read previous conversation, but it looks like you are planning something like this https://angelborroy.wordpress.com/2015/05/22/alfresco-implementing-delete-behavior/

2017-10-24 09:59:43 GMT <alfbot> Title: Alfresco – Implementing delete behavior | Programming and So (at angelborroy.wordpress.com)

2017-10-24 09:59:45 GMT <angelborroy> right?

2017-10-24 10:01:18 GMT <Tichodroma> not exactly. I want the give enough context to the policy so it can decide if it allows the operation or not (= throws an Exception that should roll back the transaction)

2017-10-24 10:01:38 GMT <angelborroy> which kind of information will be stored in that “context”?

2017-10-24 10:02:05 GMT <Tichodroma> params of a method call to a custom service method

2017-10-24 10:02:43 GMT <angelborroy> so TransactionListener approach should be enough

2017-10-24 10:02:48 GMT <Tichodroma> a service method like customService.releaseNiceDocument(nodeRef, releaseNote, releasingUser)

2017-10-24 10:03:14 GMT <angelborroy> if you inject TransactionListener to customService, you can share AlfresctoTransactionSupport with behaviour

2017-10-24 10:03:30 GMT <Tichodroma> so AlfrescoTransactionSupport.getResource et al?

2017-10-24 10:03:37 GMT <angelborroy> I think so

2017-10-24 10:04:06 GMT <angelborroy> bindResource in custom and getResource in behaviour

2017-10-24 10:04:08 GMT <angelborroy> it should work

2017-10-24 10:04:17 GMT <Tichodroma> sounds nice, I'll take a look

2017-10-24 10:04:18 GMT <yreg> angelborroy, doesn't that rely on the fact the the behaviour is called within the same transaction ?

2017-10-24 10:04:19 GMT <Tichodroma> thanks

2017-10-24 10:04:33 GMT <angelborroy> yreg yep

2017-10-24 10:05:25 GMT <angelborroy> If you are creating new Threads inside your customService, then this approach will not work

2017-10-24 10:05:44 GMT <Tichodroma> no threads there

2017-10-24 10:06:10 GMT <angelborroy> then it looks safe

2017-10-24 10:08:29 GMT <Tichodroma> hm, any code can init a transaction and put the 'context' required by the Behaviour there, not only the custom service method

2017-10-24 10:09:09 GMT <Tichodroma> so the mere presence of a resource in the transaction is no proof that and how the custom service method was called

2017-10-24 10:09:09 GMT <angelborroy> you have not to init the transaction

2017-10-24 10:09:17 GMT <Tichodroma> true

2017-10-24 10:09:23 GMT <angelborroy> you have to inject the TransactionListener to join any existing transaction

2017-10-24 10:09:43 GMT <angelborroy> and a Service is transactional

2017-10-24 10:10:18 GMT <Tichodroma> is this good or bad?

2017-10-24 10:10:39 GMT <angelborroy> for your purpose, I think is the right scenario

2017-10-24 10:11:03 GMT <yreg> angelborroy, it is transactional if you wrap it with an interceptor to add that

2017-10-24 10:11:21 GMT <AFaust> angelborroy: What are you talking about "injecting the transaction listener" and "init the transaction"? Transaction should typically be already active and using the TransactionalSupport and related classes you interact with them. You implement the transactional listener, not inject it, and then register via the utils

2017-10-24 10:11:35 GMT <angelborroy> AFaust `1

2017-10-24 10:11:37 GMT <yreg> fo for instance, even with OOTB service if you access lower level services you do not have transaction wrapping

2017-10-24 10:11:38 GMT <angelborroy> +1

2017-10-24 10:12:20 GMT <angelborroy> Tichodroma listen to people able to talk properly

2017-10-24 10:12:25 GMT <Tichodroma> I do :)

2017-10-24 10:14:57 GMT <angelborroy> Anyway, even if I was imprecise, the main idea should work

2017-10-24 10:15:00 GMT <rusin> Hi All, I created a custom workflow and based on the requirement I reassign the task to another user. How can I get the user from reassign panel to pass it in my javascript for dynamically add permission to that user.

2017-10-24 10:15:19 GMT <Tichodroma> angelborroy: I think I get the idea, thanks

2017-10-24 10:15:34 GMT <Tichodroma> AFaust: thanks for the clear words (as always :)

2017-10-24 10:22:21 GMT <phenoman> hi

2017-10-24 10:22:51 GMT <phenoman> i have question, where in database can i check who created specific user?

2017-10-24 10:25:46 GMT <Tichodroma> phenoman: I don't think this information is saved.

2017-10-24 10:26:03 GMT <Tichodroma> The table alf_authority does not have such a field

2017-10-24 10:26:28 GMT <phenoman> oh, too bad :(

2017-10-24 10:26:35 GMT <phenoman> thank you :)

2017-10-24 10:27:16 GMT <Tichodroma> do you only have users in the local database or do you use LDAP/Active Directory?

2017-10-24 10:28:13 GMT <phenoman> we also use LDAP, but someone is creating users outside of LDAP so i would like to check who it is

2017-10-24 10:30:33 GMT <phenoman> anyways, thanks for help, live long and prosper.... bye :)

2017-10-24 10:31:02 GMT <angelborroy> phenoman you can check "zones"

2017-10-24 10:31:10 GMT <angelborroy> users from LDAP are in a different zone

2017-10-24 10:31:24 GMT <angelborroy> phonman use Node Browser or something similar to inspect that

2017-10-24 10:31:38 GMT <phenoman> ok, thank you

2017-10-24 10:54:30 GMT <monica> hello everyone. can anybody help me with https://community.alfresco.com/message/822920-trying-to-fetch-number-of-users-available-in-javascript

2017-10-24 10:54:32 GMT <alfbot> Title: trying to fetch number of users available in ja... | Alfresco Community (at community.alfresco.com)

2017-10-24 11:04:05 GMT <angelborroy> monica probably your best option is to implement a BaseProcessorExtension in Java

2017-10-24 11:04:30 GMT <angelborroy> so you can inject (and this time is “inject”) alfresco-global.properties and make validation code for number of users in the repo

2017-10-24 11:04:57 GMT <angelborroy> monica hopefully this could help https://docs.alfresco.com/5.1/references/dev-extension-points-javascript-root-objects.html

2017-10-24 11:04:58 GMT <alfbot> Title: JavaScript Root Objects | Alfresco Documentation (at docs.alfresco.com)

2017-10-24 11:17:17 GMT <angelborroy> monica does it make sense for you?

2017-10-24 11:18:16 GMT <monica> <angelborroy> yes. thank you for your help. I am trying this. hope it helps

2017-10-24 11:18:54 GMT <yreg> ~later tell phenoman you could add a behaviour to auto-add aspect cm:auditable to all person node, and then all newly created persons would have that ino attached

2017-10-24 11:18:54 GMT <alfbot> yreg: The operation succeeded.

2017-10-24 11:20:14 GMT <DarkStar1> douglascrp: ping

2017-10-24 11:21:14 GMT <yreg> angelborroy, your personal blog and the one from keensoft both contain a lot of useful gems !

2017-10-24 11:21:36 GMT <angelborroy> yreg thanks, but when I review some of the blog posts with the time...

2017-10-24 11:21:40 GMT <yreg> Thanks for sharing knowledge !

2017-10-24 11:21:47 GMT <DarkStar1> Agree with yreg on that :)

2017-10-24 11:21:52 GMT <angelborroy> … I find many things to improve!

2017-10-24 11:22:01 GMT <angelborroy> wow, thank you all

2017-10-24 11:22:16 GMT <angelborroy> I’ll try to find more time to write :D

2017-10-24 11:22:52 GMT <angelborroy> now I’m writing a book and my spare time is basically inexistent

2017-10-24 11:22:57 GMT <DarkStar1> Has anyone tried using the new IJ for editing bpmn files?

2017-10-24 11:23:12 GMT <DarkStar1> I found this issue the other day: https://youtrack.jetbrains.com/issue/IDEA-180853

2017-10-24 11:31:16 GMT <yreg> DarkStar1, I use plain activity (usually cloud trial <grin>, but standalone works as well) for the diagram edit and to bootstrap ...

2017-10-24 11:31:41 GMT <yreg> then I use xml editing in IJ for scripting and assignment

2017-10-24 11:31:46 GMT <yreg> ..

2017-10-24 11:36:44 GMT <DarkStar1> yreg: bit of a complicated mess switching back and forth but doesn't look like there's a choice at the moment inthis regard

2017-10-24 11:37:52 GMT <yreg> DarkStar1, there is a plugin from jbpm but it does give a lot of un-necessary crap in the XML and you can't configure the activiti specific fields

2017-10-24 11:39:20 GMT <yreg> IMHO BPMN (as a norm or a standard) is as big of a lie as CMIS... yes it converges a bit but it is definitely not inter-operable and sometimes not consistent from one venor (implementation) to one other

2017-10-24 11:43:59 GMT <yreg> DarkStar1, I just came across this page : http://bpmn-miwg.github.io/bpmn-miwg-tools/

2017-10-24 11:44:22 GMT <yreg> and from the look of it, you might have better chances using the camunda modeler

2017-10-24 11:46:24 GMT <AFaust> yreg: Isn't any standard / norm just a big fat lie?

2017-10-24 11:46:45 GMT <DarkStar1> yreg: Nice bookmark worthy page.

2017-10-24 11:47:59 GMT <yreg> AFaust, to some extent.. maybe..

2017-10-24 11:50:41 GMT <yreg> DarkStar1, just came across http://bpmn.io/ which might also turnout handy

2017-10-24 11:50:42 GMT <alfbot> Title: Web-based tooling for BPMN, DMN and CMMN | bpmn.io (at bpmn.io)

2017-10-24 11:53:42 GMT <DarkStar1> yreg: Came across that the other day but decided to try out the flowable modeller instead.

2017-10-24 11:56:44 GMT <douglascrp> yreg, that page is interesting

2017-10-24 12:14:52 GMT <fwu> hi all!

2017-10-24 12:16:04 GMT <fwu> ppl, can someone explain me why if I config a workflow field as Int and then set the value 2017 I get from the variable this value: 2017.0?

2017-10-24 12:16:30 GMT <fwu> an int with decimal?

2017-10-24 12:17:11 GMT <fwu> <type>d:int</type>

2017-10-24 12:17:45 GMT <yreg> fwu are you acceccing your int from javascript code ?

2017-10-24 12:22:18 GMT <fwu> yes

2017-10-24 12:22:38 GMT <fwu> hmm maybe there is a conversion?

2017-10-24 12:23:44 GMT <fwu> var orderyear = execution.getVariable('tt_yearProp');

2017-10-24 12:23:57 GMT <fwu> the tt:yearProp is an int var

2017-10-24 12:24:48 GMT <fwu> so maybe I need to force the int type making a cast? parseint I suppose

2017-10-24 12:25:50 GMT <yreg> accessing*

2017-10-24 12:25:58 GMT <fwu> yes this was the problem!

2017-10-24 12:26:11 GMT <fwu> thank you yreg!

2017-10-24 12:26:15 GMT <yreg> fwu, just a though, having struggeled alot with rhino and server-side JS in Alfresco

2017-10-24 12:51:31 GMT <douglascrp> fwu, yreg there is a problem there, and I know this is an old one, I guess, related with this problem I described in the community https://community.alfresco.com/thread/211445-javalangclasscastexception-javalangdouble-cannot-be-cast-to-javalanginteger-when-setting-workflow-priority

2017-10-24 12:51:33 GMT <alfbot> Title: java.lang.ClassCastException: java.lang.Double ... | Alfresco Community (at community.alfresco.com)

2017-10-24 12:55:46 GMT <fwu> douglascrp thank you! I didnt know about that problem with the priority field. Nevertheless my problem was related with internal cast. I solve it using parseint!

2017-10-24 13:19:43 GMT <digcat> ~later tell resplin have you seen this https://anchore.io

2017-10-24 13:19:43 GMT <alfbot> digcat: The operation succeeded.

2017-10-24 13:20:57 GMT <digcat> ~later tell resplin ahh i see https://anchore.io/preview/dockerhub/alfresco%2Fprocess-services%3Alatest

2017-10-24 13:20:57 GMT <alfbot> digcat: The operation succeeded.

2017-10-24 15:01:01 GMT *** angelborroy_ is now known as angelborroy

2017-10-24 15:35:10 GMT <AFaust> fcorti: Can you check/ask something internally at Alfresco for me?

2017-10-24 15:35:52 GMT <AFaust> Related to my typically source of agony, APS...

2017-10-24 15:37:26 GMT <AFaust> With 1.7.0 there now is Kerberos SSO support on the activiti-app tier, but the admin-app does not seem to support it. So how in the blazes should the admin-app ever be used in a SSO scenario? Can't find documentation so far...

2017-10-24 15:47:41 GMT <fcorti> hi AFaust, let me try to ask... today and tomorrow I'm in Maidenhead and can directly talk with someone :-P

2017-10-24 15:49:00 GMT <AFaust> FYI: I have already looked at the various JARs, and none provide any Kerberos support. Decompiling the *.class files shows, that the ReST connector the the activiti-app is hard-coded to use HTTP BASIC. So I already am 99.9% confident that this has simply been forgotten as a necessary feature...

2017-10-24 15:50:50 GMT <fcorti> got it, tomorrow I'll ask to the team guys

2017-10-24 15:51:27 GMT <AFaust> So the customer will likely have to decide between a) staying on 1.6.0 and having a system that can be properly managed, or b) continueing with their 3-4 business projects that have already been waiting for fixes for half a year (some still did not make it into 1.7.0 and had to be fixed by us ourselves)

End of Daily Log

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