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-07-18 14:18:28 GMT <alfresco-discord> <edw24> Is it normal behavior to receive { entry: {} } on successful upload of a node using multipart/form-data and the filedata parameter?? When creating nodes through the API (JSON), I receive a node entry on success but when I use the multipart/form-data method, it returns an empty entry but the node is in the repository I'm using Alfresco 5.2.1 by the way. enterprise

2019-07-18 14:23:27 GMT <d1rewolf> hi guys...anyone aware of a solution for alfresco that allows you to create arbitrary forms, collect data within them, and send them through pre-defined workflows? Things like purchase requests, bill of materials, quotes, etc?

2019-07-18 15:03:24 GMT <alfresco-discord> <dgradecak> isn't that just a "workflow"? like a start form?

2019-07-18 15:21:56 GMT <alfresco-discord> <Douglas Paes (douglascrp)> @d1rewolf search for the alfraca project

2019-07-18 15:22:24 GMT <alfresco-discord> <Douglas Paes (douglascrp)> It is an old one integrating a free forms engine inside alfresco

2019-07-18 15:23:30 GMT <alfresco-discord> <dgradecak> how do you define a free form?

2019-07-18 15:23:50 GMT <alfresco-discord> <Douglas Paes (douglascrp)> "GitHub - cmpaul/alfraca: A demo project that integrates the Alpaca forms engine with Alfresco." https://github.com/cmpaul/alfraca

2019-07-18 15:23:51 GMT <alfbot> Title:GitHub - cmpaul/alfraca: A demo project that integrates the Alpaca forms engine with Alfresco. (at github.com)

2019-07-18 15:24:17 GMT <alfresco-discord> <Douglas Paes (douglascrp)> This is the project

2019-07-18 15:24:54 GMT <alfresco-discord> <Douglas Paes (douglascrp)> I remember it was presented on a video, tech talk live if I am not wrong

2019-07-18 15:24:58 GMT <alfresco-discord> <dgradecak> I mean ... what is meant by a free form? you always have to predefine it right? so I wonder what is a free form?

2019-07-18 15:25:18 GMT <alfresco-discord> <Douglas Paes (douglascrp)> By free, I meant with no cost

2019-07-18 15:25:56 GMT <alfresco-discord> <dgradecak> so in your case free != arbitrary

2019-07-18 15:28:25 GMT <alfresco-discord> <Douglas Paes (douglascrp)> Right

2019-07-18 15:28:55 GMT <alfresco-discord> <Douglas Paes (douglascrp)> But it is old, and I doubt it will work for the current alfresco version

2019-07-18 15:30:12 GMT <alfresco-discord> <dgradecak> seems the guy who asked is not there anyway;) but I understood that he wants arbitrary forms to collect data, which is probably something not well understood

2019-07-18 15:31:56 GMT <alfresco-discord> <Douglas Paes (douglascrp)> Indeed

2019-07-18 15:33:58 GMT <alfresco-discord> <dgradecak> with angular (adf ...) I am using this for now https://ngx-formly.github.io/ngx-formly/guide/getting-started

2019-07-18 15:34:12 GMT <alfresco-discord> <dgradecak> but still, there is nothing arbitrary

2019-07-18 16:26:09 GMT <d1rewolf> guys (dgradecak, douglascrp): that's right...I wish to create a number of different forms of various formats, store the answers/data behind those forms, digitize related documents, and send the forms through predefined workflows

2019-07-18 16:26:30 GMT <d1rewolf> douglascrp: that's for the pointer to alfraca. I'll take a look

2019-07-18 16:40:27 GMT <AFaust> Is there a sed "master" in here? Can't really find what I am looking for in all the manuals / blog posts / badly written SO answers...

2019-07-18 16:41:42 GMT <AFaust> I am trying to use sed in a build of a Docker image to modify Alfresco's default web.xml on the fly and in a mostly version-agnostic way (that's why I don't simply override the whole file)

2019-07-18 16:42:06 GMT <AFaust> ...and want to inject a custom filter before the first filter-mapping (not possible via web-fragment.xml)

2019-07-18 16:42:41 GMT <AFaust> Or at least before the first "meaningful" filter-mapping...

2019-07-18 16:43:21 GMT <AFaust> In Repository web.xml I could use a unique XML comment as the marker to match with my pattern and use the "i" command of sed

2019-07-18 16:43:58 GMT <AFaust> In Share web.xml, this is a bit more difficult, since there is no unique marker, and I have found no way to only insert my filter before the first match...

2019-07-18 16:47:11 GMT <alfresco-discord> <dgradecak> I did somehting like that on a couple of docker images ... hope I will find it immediately

2019-07-18 16:47:33 GMT <alfresco-discord> <dgradecak> I think it is also in some angel's docker file now

2019-07-18 16:49:02 GMT <alfresco-discord> <dgradecak> hm ...

2019-07-18 16:49:07 GMT <alfresco-discord> <dgradecak> RUN echo 'grant codeBase "file:/usr/local/tomcat/modules/platform/-" {permission java.lang.reflect.ReflectPermission "suppressAccessChecks";};' >> conf/catalina.policy

2019-07-18 16:49:19 GMT <alfresco-discord> <dgradecak> this is how I did it to add things

2019-07-18 16:50:21 GMT <alfresco-discord> <dgradecak> but that was inserting something in the file, not replacing

2019-07-18 16:51:00 GMT <AFaust> And it was inserting at the end. I need to insert at a specific point in the file

2019-07-18 16:51:18 GMT <alfresco-discord> <dgradecak> I feel your pain 😉

2019-07-18 16:57:07 GMT <alfresco-discord> <dgradecak> but once I needed to do crazy things like that and I went to the #awk channel on freenode

2019-07-18 16:57:36 GMT <alfresco-discord> <dgradecak> there was a guru sensei or something like that, he is a master you are looking for 😉

2019-07-18 16:58:17 GMT <AFaust> Yeah, I guess I am going to have to go to awk as well. Just hope it is available in the Alfresco images (not necessarily guaranteed)

2019-07-18 16:58:46 GMT <alfresco-discord> <dgradecak> or maybe it will be "deprecated" once you start using it

2019-07-18 17:00:47 GMT <AFaust> Ok, it's extremely easy in awk. Have to consider my "use sed by default" approach...

2019-07-18 17:01:21 GMT <alfresco-discord> <dgradecak> I like awk as well

2019-07-18 17:05:50 GMT <AFaust> The thing I like about sed is that you can change your file on-the-fly. With awk I have to do a little dance with "write into new file", "copy over old file"

2019-07-18 17:06:38 GMT <alfresco-discord> <dgradecak> well you can pipe with sed

2019-07-18 17:06:50 GMT <alfresco-discord> <dgradecak> but indeed

2019-07-18 17:07:09 GMT <alfresco-discord> <dgradecak> awk is actually a program and it has quite a large set of features

2019-07-18 17:07:21 GMT <alfresco-discord> <dgradecak> let me check if I can find my command

2019-07-18 17:09:21 GMT <AFaust> Argh... it worked great as a simple test on the command line, but in my Dockerfile (and with a more elaborate awk command) it fails...

2019-07-18 17:12:26 GMT <angelborroy> https://github.com/aborroy/alfresco-ssl-generator/blob/master/docker-compose/enterprise/alfresco/Dockerfile#L28

2019-07-18 17:12:27 GMT <alfbot> Title:alfresco-ssl-generator/Dockerfile at master · aborroy/alfresco-ssl-generator · GitHub (at github.com)

2019-07-18 17:12:40 GMT <angelborroy> It’s not the same you are looking for, but it can be taken as sample

2019-07-18 17:14:12 GMT <AFaust> angelborroy: Your case works because there is only ever going to be one </Engine>, and you could actually simplify that by using the append command of sed

2019-07-18 17:14:36 GMT <angelborroy> Do you want to add a filter?

2019-07-18 17:15:26 GMT <AFaust> A filter and a filter mapping. But the filter mapping must be before all other filter mappings (not possible via web-fragment.xml or Java annotations)

2019-07-18 17:15:59 GMT <angelborroy> You can replace the first <filter-mapping>

2019-07-18 17:16:10 GMT <angelborroy> with your <filter/> and <filter-mapping/>

2019-07-18 17:17:07 GMT <angelborroy> Not “replace”, just “insert before"

2019-07-18 17:18:04 GMT <AFaust> Yeah... and how do you insert only before the first <filter-mapping>? That is precisely my problem that I can so far not solve with sed. And all the more complex examples I have found that allegedly do this, I am having issues to comprehend...

2019-07-18 17:18:25 GMT <angelborroy> “0.” does not work?

2019-07-18 17:19:59 GMT <AFaust> You mean by using an address range like: 0,/pattern/i My Text

2019-07-18 17:20:00 GMT <AFaust> ?

2019-07-18 17:20:23 GMT <AFaust> That is not the same as specifying the first match...

2019-07-18 17:20:29 GMT <angelborroy> I was thinking on that, yes

2019-07-18 17:20:51 GMT <AFaust> It would simply add My Text as the first line of the file

2019-07-18 17:22:24 GMT <angelborroy> gsed '0,/filter-mapping/s/filter-mapping/HELLO/' Downloads/bamboo/web.xml

2019-07-18 17:22:31 GMT <alfresco-discord> <dgradecak> well I am not completely sure what is your use case and if you wnat to change filters on alfresco out of the box urls but via spring itself you cannot do it?

2019-07-18 17:22:41 GMT <angelborroy> This changes the first filter-mapping with HELLO

2019-07-18 17:23:14 GMT <AFaust> Ahh... I now think I know why that multi-line awk command failed in my Dockerfile. May have it working shortly

2019-07-18 17:23:34 GMT <angelborroy> But my ‘0,’ also worked :D

2019-07-18 17:24:43 GMT <AFaust> angelborroy: Right, with s it would work, because you apply it only to a subset where there is only one possible match. But we were talking about the insert command before...

2019-07-18 17:25:12 GMT <angelborroy> I was applying to https://github.com/Alfresco/share/blob/master/share/src/main/webapp/WEB-INF/web.xml

2019-07-18 17:25:13 GMT <alfbot> Title:share/web.xml at master · Alfresco/share · GitHub (at github.com)

2019-07-18 17:25:21 GMT <angelborroy> There are lots of filter-mapping tags

2019-07-18 17:26:00 GMT <AFaust> dgradecak: Well, it is a limitation of the Servlet Spec / API that you cannot have any Java class annotated with @WebFilter or via web-fragment be injected with a URL mapping before any of the mappings of the web.xml file.

2019-07-18 17:27:39 GMT <AFaust> Not sure what hacks Spring offers, but unless it is something that can be done with XML-only, it is not an option.

2019-07-18 17:29:13 GMT <alfresco-discord> <dgradecak> well interceptors might be an option

2019-07-18 17:29:51 GMT <AFaust> Interceptors? That would only work for any filter defined as a bean already. What if I need to run before a bean-defined filter?

2019-07-18 17:29:52 GMT <AFaust> ianw once filed an issue for his similar requirement: https://issues.alfresco.com/jira/browse/ALF-21848

2019-07-18 17:30:30 GMT <AFaust> Ideally though, all the filters / filter mappings in Alfresco apps would be defined as web-fragments rather than hard-coded web.xml...

2019-07-18 17:35:13 GMT <AFaust> For reference, this is now what I have: https://paste.fedoraproject.org/paste/cSDVRxI6qicuy6aAESwqeA

2019-07-18 17:35:14 GMT <alfbot> Title:Untitled - Modern Paste (at paste.fedoraproject.org)

2019-07-18 17:35:18 GMT <AFaust> Similar approach for Share

2019-07-18 17:35:54 GMT <angelborroy> It should be cleaner with “sed"

2019-07-18 17:36:16 GMT <alfresco-discord> <dgradecak> awk is for prestige 😄

2019-07-18 17:36:20 GMT <AFaust> Not with insert, only with replace

2019-07-18 17:37:14 GMT <AFaust> At least with awk I don't have to deal with escaping the text for all those \

2019-07-18 17:37:20 GMT <AFaust> I mean for all those /

2019-07-18 17:37:55 GMT <angelborroy> But you are creating files extra files, renaming it and removing the old one

2019-07-18 17:37:59 GMT <AFaust> Well... it's for an integration test Docker image, not going to use that in production anytime soon...

2019-07-18 17:38:27 GMT <angelborroy> If you are happy with that, I’m happy with that :)

2019-07-18 17:38:56 GMT <alfresco-discord> <dgradecak> I am happy too

2019-07-18 17:39:49 GMT <AFaust> Maybe I'll figure out the insert command for sed until I need it for a real installation (/s would only be last resort)

2019-07-18 17:39:59 GMT <alfresco-discord> <dgradecak> but I am bored with oauth working yesterday, than making me troubles all the daz today ... now it works again ... what tomorrow brings ...who knows

2019-07-18 17:40:38 GMT <AFaust> That reminds me - at some point I have to continue working on my "Keycloak for Share" project...

2019-07-18 17:41:04 GMT <alfresco-discord> <dgradecak> did you ever finished with the azure integration ?=

2019-07-18 17:41:34 GMT <AFaust> Since despite all the intentions and emails from Alfresco, I have not heard aynthing back from them yet on "we are planning to add AIS support to Share"...

2019-07-18 17:42:13 GMT <AFaust> Yeah, that demo was done, albeit with some hacks due to Azure Domain Service being an extremely stunted directory service.

2019-07-18 17:42:48 GMT <AFaust> Also integrated that Keycloak demo with the WordPress companion app in the customer test environment.

2019-07-18 17:42:50 GMT <angelborroy> I think that AIS is dead

2019-07-18 17:42:57 GMT <AFaust> Muahaha...

2019-07-18 17:43:26 GMT <AFaust> Though, last commit was 3 days ago...

2019-07-18 17:43:44 GMT <angelborroy> Really?

2019-07-18 17:43:46 GMT <AFaust> https://github.com/Alfresco/alfresco-identity-service/commits/master

2019-07-18 17:43:48 GMT <alfbot> Title:Commits · Alfresco/alfresco-identity-service · GitHub (at github.com)

2019-07-18 17:43:54 GMT <alfresco-discord> <dgradecak> AIS dead? why?

2019-07-18 17:44:05 GMT <angelborroy> I asked internally who was the owner of the product to include some feature and the reply was: “no one"

2019-07-18 17:44:07 GMT <AFaust> Looks far from dead...

2019-07-18 17:44:12 GMT <angelborroy> I have to ask again

2019-07-18 17:44:37 GMT <alfresco-discord> <dgradecak> maybe "nowan" 😄

2019-07-18 17:44:50 GMT <alfresco-discord> <dgradecak> from far east or so ...

2019-07-18 17:45:04 GMT <AFaust> ba dum dum tsss...

2019-07-18 17:45:41 GMT <AFaust> "How many Mexicans does it take to change a lightbulb?"

2019-07-18 17:46:26 GMT <AFaust> - "Juan"

2019-07-18 17:46:48 GMT <alfresco-discord> <dgradecak> haha ... that is the guz

2019-07-18 17:46:53 GMT <alfresco-discord> <dgradecak> guz

2019-07-18 17:47:01 GMT <angelborroy> As Spanish, I have to say, that it has a limited quality

2019-07-18 17:47:13 GMT <alfresco-discord> <dgradecak> guy ... my kevboard turned to english suddenly

2019-07-18 17:47:15 GMT <angelborroy> The joke, I mean

2019-07-18 17:47:35 GMT <AFaust> It also has a very limited quality for anyone else with more than a few braincells...

2019-07-18 17:48:22 GMT <alfresco-discord> <dgradecak> hmmm ... that speaks about me

2019-07-18 17:49:47 GMT <AFaust> Soo... now that the filter thingy is working in the Docker build, I can write the actual test to verify it works. But that has got to wait for after grocery shopping, dinner and some evening entertainment

2019-07-18 17:49:59 GMT * AFaust looks at the clock with horror...

2019-07-18 17:53:52 GMT <alfresco-discord> <dgradecak> I wish angular with oidc and dynamic env variables was simple as that awk

End of Daily Log

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