cancel
Showing results for 
Search instead for 
Did you mean: 

Workflow add resource not working

luca
Star Contributor
Star Contributor

Hi all,

I'm using Alfresco 4.2f and I can't add a resource using the UIContentSelector in the StartWorkflowWizard page with every workflow. When I try to hit the search button the result box remains empty.

1 ACCEPTED ANSWER

luca
Star Contributor
Star Contributor

I have put the question here because I have already found the solution and I wanted to share it.

The problems is in the class org.alfresco.web.ui.repo.component.UIContentSelector that is building the query and in particular it is missing to escape double quotes around the search term, so the resultig query is like this:

... +@\{http\://www.alfresco.org/model/content/1.0\}name:"*SEARCH-TERM*"

So you have to modify the method getAvailableOptions and substitute this line (in my version is row 358):

query.append(":\"*" + safeContains + "*\"");

With this:

query.append(":\\\"*" + safeContains + "*\\\"");

View answer in original post

1 REPLY 1

luca
Star Contributor
Star Contributor

I have put the question here because I have already found the solution and I wanted to share it.

The problems is in the class org.alfresco.web.ui.repo.component.UIContentSelector that is building the query and in particular it is missing to escape double quotes around the search term, so the resultig query is like this:

... +@\{http\://www.alfresco.org/model/content/1.0\}name:"*SEARCH-TERM*"

So you have to modify the method getAvailableOptions and substitute this line (in my version is row 358):

query.append(":\"*" + safeContains + "*\"");

With this:

query.append(":\\\"*" + safeContains + "*\\\"");