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

2018-10-25 07:58:18 GMT <alfresco-discord> <anghelutar> in a document model, does the name of the model NEED to be prefixed with one of the namespaces defined in the <namespaces> section?

2018-10-25 08:02:42 GMT <alfresco-discord> <anghelutar> in the documentation https://docs.alfresco.com/5.1/concepts/metadata-model-header.html they don't say

2018-10-25 08:02:44 GMT <alfbot> Title:Model header | Alfresco Documentation (at docs.alfresco.com)

2018-10-25 08:03:01 GMT <alfresco-discord> <anghelutar> but all models seem to respect this

2018-10-25 08:03:07 GMT <Tichodroma> is there reason not to?

2018-10-25 08:03:53 GMT <angelborroy> It’s an attribute

2018-10-25 08:04:03 GMT <angelborroy> https://www.w3.org/TR/REC-xml-names/#defaulting

2018-10-25 08:04:04 GMT <alfbot> Title:Namespaces in XML 1.0 (Third Edition) (at www.w3.org)

2018-10-25 08:04:29 GMT <angelborroy> Default namespaces does not apply to attributes

2018-10-25 08:05:16 GMT <angelborroy> Probably the namespace can be inherited from the element

2018-10-25 08:05:26 GMT <angelborroy> but it’s better to include it explicit

2018-10-25 08:06:45 GMT <angelborroy> Anyway it’s an interesting question, I didn’t thought about it before :)

2018-10-25 08:10:27 GMT <alfresco-discord> <yreg> @anghelutar AFAIK it needs to be either declared or imported in the same file

2018-10-25 08:11:32 GMT <angelborroy> “declared or imported” what?

2018-10-25 08:11:38 GMT <angelborroy> The namespace, the prefix?

2018-10-25 08:12:52 GMT <angelborroy> I though the question was about why to include the prefix of a namespace (imported in the file) before the name declaration attribute

2018-10-25 08:12:59 GMT <angelborroy> But I might be wrong

2018-10-25 08:13:58 GMT <alfresco-discord> <yreg> I could have mis-interpreted the question

2018-10-25 08:17:19 GMT <AFaust> "Why to include the prefix/namespace before the name" => The model name is a QName, so you need to have either (at least an empty namespace like {} )

2018-10-25 08:17:46 GMT <angelborroy> +1

2018-10-25 08:18:37 GMT <alfresco-discord> <anghelutar> question is: can the 2 prefixes be different (both declared in namespaces section)? does it make sense to be different?

2018-10-25 08:19:31 GMT <alfresco-discord> <yreg> @anghelutar as I said, you could use a declared or an imported namespace

2018-10-25 08:20:48 GMT <alfresco-discord> <yreg> AFaust seems to suggest it should be ok as long as it is a valid QName

2018-10-25 08:20:57 GMT <alfresco-discord> <yreg> but I haven't experimented with that before

2018-10-25 08:21:45 GMT <AFaust> As for "does it have to be a namespace defined in the model" => Does not look that way - at the time the QName is resolved, it can access all the namespaces/prefixes defined so far (NOTE: you may not be able to use any namespace due to model load order)

2018-10-25 08:24:01 GMT <AFaust> Ok - going more into detail of the code I can now definitively say: It can only use a namespace defined or imported in the model

2018-10-25 08:24:33 GMT <alfresco-discord> <yreg> Told you so <grin>

2018-10-25 08:24:49 GMT <AFaust> This is the relevant part: https://github.com/Alfresco/alfresco-data-model/blob/c7aaa53cce8245889ef79daffac46b53f827ee0e/src/main/java/org/alfresco/repo/dictionary/CompiledModel.java#L151

2018-10-25 08:24:50 GMT <alfbot> Title:alfresco-data-model/CompiledModel.java at c7aaa53cce8245889ef79daffac46b53f827ee0e · Alfresco/alfresco-data-model · GitHub (at github.com)

2018-10-25 08:25:24 GMT <AFaust> The model QName is resolved inside the M2ModelDefinition constructor, using a namespace prefix resolver initialised from the imports / definitions only

2018-10-25 08:25:42 GMT <alfresco-discord> <anghelutar> thank you very much!

2018-10-25 08:41:40 GMT <alfresco-discord> <bhagyas> Wasn't @ohej the former developer evangelist?

2018-10-25 08:41:46 GMT <alfresco-discord> <bhagyas> What changed?

2018-10-25 08:50:19 GMT <alfresco-discord> <yreg> AFAIK, he took over Gab's position soon after joining Alfresco as dev evangelist, and he just stepped down from PM to dev evangelist again

2018-10-25 09:19:12 GMT <alfresco-discord> <bhagyas> ah okay

2018-10-25 11:38:44 GMT <alfresco-discord> <bhagyas> Just added support for autocompleting file names on the alfresco-cli

2018-10-25 11:38:53 GMT <alfresco-discord> <bhagyas> New release out in a few minutes

2018-10-25 11:41:19 GMT <alfresco-discord> <bhagyas> out now, install with npm install -g alfresco-cli

2018-10-25 13:37:41 GMT <alfresco-discord> <mbui> Is the trashcan cleaner an enterprise only feature? https://docs.alfresco.com/5.2/concepts/trashcan-cleaner.html

2018-10-25 13:37:43 GMT <alfbot> Title:Configuring the Trashcan Cleaner | Alfresco Documentation (at docs.alfresco.com)

2018-10-25 13:41:53 GMT <alfresco-discord> <anghelutar> mbui: check https://community.alfresco.com/thread/232682-trashcan-cleaner-not-working

2018-10-25 13:41:55 GMT <alfbot> Title:Trashcan cleaner not working | Alfresco Community (at community.alfresco.com)

2018-10-25 13:43:35 GMT <angelborroy> mbui it’s also a Community feature

2018-10-25 13:43:43 GMT <angelborroy> @mbui check also https://github.com/keensoft/alfresco-deleted-content-store-cleaner

2018-10-25 13:43:44 GMT <alfbot> Title:GitHub - keensoft/alfresco-deleted-content-store-cleaner: Alfresco Deleted Content Store Cleaner job (at github.com)

2018-10-25 13:43:48 GMT <angelborroy> to understand how it works

2018-10-25 13:46:51 GMT <alfresco-discord> <mbui> angelborroy: Thanks, the addon you linked is essentially not the exact same module as the one I linked? But it does the same?

2018-10-25 13:47:04 GMT <angelborroy> No, it’s the missing part

2018-10-25 13:47:33 GMT <alfresco-discord> <mbui> Yes thanks, I should start reading before asking. 😃

2018-10-25 13:47:40 GMT <angelborroy> trashcan-cleaner moves from orange to grey in the graph

2018-10-25 14:14:53 GMT <alfresco-discord> <bhagyas> angelborroy, is there a REST API for the trash can cleaner?

2018-10-25 14:15:27 GMT <angelborroy> I don’t think so

2018-10-25 14:15:28 GMT <alfresco-discord> <bhagyas> I'm thinking of adding a thirdparty namespace to the alfresco-cli project, to directly invoke the API commands from the interactive shell

2018-10-25 14:15:42 GMT <angelborroy> you can access trashcan

2018-10-25 14:15:45 GMT <angelborroy> but that is all

2018-10-25 14:16:02 GMT <alfresco-discord> <bhagyas> so you can just type thirdparty trashcan-cleaner run or thirdparty trashcan-cleaner stats

2018-10-25 14:17:25 GMT <alfresco-discord> <bhagyas> okay.. ^_^

2018-10-25 14:17:26 GMT <angelborroy> https://github.com/Alfresco/alfresco-remote-api/tree/master/src/main/java/org/alfresco/rest/api/trashcan

2018-10-25 14:17:27 GMT <alfbot> Title:alfresco-remote-api/src/main/java/org/alfresco/rest/api/trashcan at master · Alfresco/alfresco-remote-api · GitHub (at github.com)

2018-10-25 14:17:37 GMT <alfresco-discord> <bhagyas> angelborroy did you try out the today's version for cli? 😄

2018-10-25 14:17:46 GMT <angelborroy> nope

2018-10-25 14:17:50 GMT <alfresco-discord> <bhagyas> it's got autocomplete now

2018-10-25 14:17:58 GMT <angelborroy> I’m working with Ionic now

2018-10-25 14:18:05 GMT <angelborroy> No Alfresco in the last 3 months

2018-10-25 14:18:05 GMT <alfresco-discord> <bhagyas> so if you hit tab, it automatically lists the child nodes

2018-10-25 14:18:15 GMT <angelborroy> nice feature

2018-10-25 14:18:27 GMT <alfresco-discord> <bhagyas> ah okay 😃

2018-10-25 14:19:12 GMT <alfresco-discord> <douglascrp> @bhagyas I am curious about it

2018-10-25 14:19:23 GMT <alfresco-discord> <douglascrp> just let me finish some tasks and I will give it a quick try

2018-10-25 14:20:14 GMT <alfresco-discord> <bhagyas> @douglascrp thank you 😃 be a little careful about the delete function, since it deletes without confirmation, but otherwise its fine xD

2018-10-25 14:20:34 GMT <alfresco-discord> <douglascrp> I thank you for the warning 😮

2018-10-25 14:20:47 GMT <alfresco-discord> <douglascrp> can you list versions already?

2018-10-25 14:20:49 GMT <alfresco-discord> <bhagyas> didn't think of it until Peter pointed it out

2018-10-25 14:21:07 GMT <alfresco-discord> <bhagyas> not yet, will be there in 5 mins

2018-10-25 14:21:08 GMT <alfresco-discord> <bhagyas> 😉

2018-10-25 14:21:09 GMT <alfresco-discord> <douglascrp> and maybe let the user remove the old ones?

2018-10-25 14:21:21 GMT <alfresco-discord> <douglascrp> come on... is it that easy to implement?

2018-10-25 14:21:24 GMT <alfresco-discord> <bhagyas> yeah

2018-10-25 14:21:30 GMT <alfresco-discord> <douglascrp> awesome

2018-10-25 14:21:34 GMT <alfresco-discord> <bhagyas> just read the code

2018-10-25 14:21:46 GMT <alfresco-discord> <bhagyas> i think you can contribute

2018-10-25 14:22:27 GMT <alfresco-discord> <bhagyas> vorpal.command("create person <userName> <password> [email] [firstName] [lastName]", "Creates a new user.") .action((args, callback) => { //alfresco JS API has no endpoint that can serve this request. let self = this; var person: PersonBodyCreate = { id: args.userName, password: args.password, firstName: args.firstName,

2018-10-25 14:22:28 GMT <alfresco-discord> lastName: args.lastName, email: args.email, properties: null }; alfrescoJsApi.core.peopleApi.addPerson(person).then( result => { vorpal.log("Successfully created user.") vorpal.log(JSON.stringify(result)); } ).catch(e => { vorpal.log("Unable to create person."); vorpal.log(e) });

2018-10-25 14:22:28 GMT <alfresco-discord> callback(); });

2018-10-25 14:22:34 GMT <alfresco-discord> <bhagyas> this is just for creating a new user

2018-10-25 14:23:03 GMT <alfresco-discord> <bhagyas> ignore that first line of comment x/

2018-10-25 14:26:52 GMT <alfresco-discord> <bhagyas> ok added

2018-10-25 14:26:54 GMT <alfresco-discord> <bhagyas> lemme publish

2018-10-25 14:27:02 GMT <alfresco-discord> <bhagyas> vorpal.command('list versions <nodeRef>') .action((args, callback) => { getNodeRef(args.nodeRef).then(nodeId => { alfrescoJsApi.core.versionsApi.listVersionHistory(nodeId, {}).then(function(data) { printNodeList(data.list.entries); callback(); }, function(error) { console.error(error); callback();

2018-10-25 14:27:02 GMT <alfresco-discord> }) }) });

2018-10-25 14:27:49 GMT <alfresco-discord> <douglascrp> cool man

2018-10-25 14:27:59 GMT <alfresco-discord> <douglascrp> easy

2018-10-25 14:28:20 GMT <alfresco-discord> <bhagyas> https://cdn.discordapp.com/attachments/451644531323174914/505024817343496212/Screenshot_2018-10-25_at_16.28.04.png

2018-10-25 14:28:39 GMT <alfresco-discord> <bhagyas> ^_^

2018-10-25 15:28:51 GMT <alfresco-discord> <kgastaldo> Just started Office Hours. Hope you can join!

2018-10-25 15:28:52 GMT <alfresco-discord> <kgastaldo> https://alfresco.zoom.us/my/officehours

2018-10-25 15:28:53 GMT <alfbot> Title:Unsupported Operating System - Zoom (at alfresco.zoom.us)

2018-10-25 15:30:04 GMT <alfresco-discord> <kgastaldo> Questions are here - if you'd like to contribute - https://admin.sli.do/event/gfbydtym/questions

2018-10-25 15:30:20 GMT <alfresco-discord> <kgastaldo> oh that link may not work for you

2018-10-25 15:31:14 GMT <alfresco-discord> <kgastaldo> https://app.sli.do/event/gfbydtym/questions

2018-10-25 15:31:15 GMT <alfbot> Title:sli.do (at app.sli.do)

2018-10-25 15:31:40 GMT <alfresco-discord> <kgastaldo> or sli.do #6913

2018-10-25 15:32:25 GMT <alfresco-discord> <yreg> the link from the announcement email doesn't work

2018-10-25 15:32:34 GMT <alfresco-discord> <kgastaldo> if you copy/paste, it will

2018-10-25 15:32:54 GMT <alfresco-discord> <kgastaldo> lame, I know

2018-10-25 15:38:36 GMT <alfresco-discord> <MorganP> @bhagyas any help command in the tool?

2018-10-25 15:39:12 GMT <alfresco-discord> <MorganP> Auto-generated help might be useful to be sure there is no hidden commands that nobody is aware of

2018-10-25 15:39:14 GMT <alfresco-discord> <MorganP> ^

2018-10-25 15:40:47 GMT <alfresco-discord> <kgastaldo> @yreg I think I've resolved the link issue in Jive. At least for today!

2018-10-25 16:22:26 GMT <alfresco-discord> <bhagyas> @MorganP there aren’t any hidden commands as of now

2018-10-25 16:22:46 GMT <alfresco-discord> <bhagyas> You can look at src/index.ts

2018-10-25 16:27:16 GMT <alfresco-discord> <MorganP> As of now yeah but for the future it might be useful to get at leat an auto-generated help that you can complete then when you add something new

2018-10-25 16:27:26 GMT <alfresco-discord> <MorganP> I don't know, just a thought

2018-10-25 16:27:47 GMT <alfresco-discord> <bhagyas> It already does have an auto generated help

2018-10-25 16:27:49 GMT <alfresco-discord> <MorganP> That's what I'm trying to do usually when I'm dvlp something in command line

2018-10-25 16:27:52 GMT <alfresco-discord> <bhagyas> Just type —help

2018-10-25 16:28:05 GMT <alfresco-discord> <bhagyas> Also each command has its own help

2018-10-25 16:28:13 GMT <alfresco-discord> <bhagyas> Along with accepted syntax

2018-10-25 16:28:37 GMT <alfresco-discord> <bhagyas> There’s also command auto completion

2018-10-25 16:29:07 GMT <alfresco-discord> <bhagyas> I think it’s too early, but trying to unify it into a easy to use syntax

2018-10-25 16:29:21 GMT <alfresco-discord> <bhagyas> Similar to how Kubernetes provides its resource management cli

2018-10-25 16:30:08 GMT <alfresco-discord> <bhagyas> For now, there are command groups

2018-10-25 16:30:33 GMT <alfresco-discord> <bhagyas> Like ‘change’ , ‘list’

2018-10-25 16:31:13 GMT <alfresco-discord> <bhagyas> Along with aliases like ‘cd’ for ‘change node’ and ‘cd-site’ for changing into a site

2018-10-25 16:31:34 GMT <alfresco-discord> <bhagyas> And ‘ls’ as an alias for ‘list children’

2018-10-25 16:31:51 GMT <alfresco-discord> <bhagyas> And ‘list sites’ for listing sites

2018-10-25 16:33:45 GMT <alfresco-discord> <MorganP> Any ways to add personalized aliases?

2018-10-25 16:34:36 GMT <alfresco-discord> <MorganP> I haven't tried or looked at it yet, I'm on holidays for the past 2 weeks so maybe I'm asking silly questions 😄

2018-10-25 16:35:21 GMT <alfresco-discord> <bhagyas> Yeah, was thinking of it earlier, thinking of creating a ‘thirdparty <modulename> <op>’ and ‘custom <endpoint> [method] <args..>

2018-10-25 16:36:06 GMT <alfresco-discord> <bhagyas> As to make sure anyone can contribute their own modules

2018-10-25 16:36:19 GMT <alfresco-discord> <bhagyas> And use custom webscripts are callable

2018-10-25 16:37:06 GMT <alfresco-discord> <bhagyas> @MorganP you’re missing out

2018-10-25 16:39:16 GMT <alfresco-discord> <bhagyas> 😛

End of Daily Log

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