Workflow add resource not working

cancel
Showing results for 
Search instead for 
Did you mean: 
luca
Established Member

Workflow add resource not working

Jump to solution

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 Solution

Accepted Solutions
luca
Established Member

Re: Workflow add resource not working

Jump to solution

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 solution in original post

1 Reply
luca
Established Member

Re: Workflow add resource not working

Jump to solution

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 + "*\\\"");