cancel
Showing results for 
Search instead for 
Did you mean: 

Read-only properties until task ownership set?

jdbrown
Champ in-the-making
Champ in-the-making
I have some workflow properties in the manage task dialog that I would like to be read-only until the task is owned.  Once a user takes ownership of the task, those properties would then be editable.  Is there a way to do this?

Thanks.
4 REPLIES 4

dhalupa
Champ on-the-rise
Champ on-the-rise
Just to give you some ideas, this is how I would approach the problem. Please, have in mind that I did not actually try that Smiley Happy
1. Extend the class org.alfresco.web.bean.workflow.ManageTaskDialog and add a method which would return boolean indicating whether task has been assigned or not (I guess this could be determined by checking the bpm:assignee property)

public boolean getTaskNotAssigned(){
//Determine whether task is assigned
}
2. Copy jsp/workflow/manage-task-dialog.jsp to some your custom directory and change
<r:propertySheetGrid id="task-props" value="#{DialogManager.bean.taskNode}"
var="taskProps" columns="1" externalConfig="true" />

to
<r:propertySheetGrid id="task-props" value="#{DialogManager.bean.taskNode}"
var="taskProps" columns="1" externalConfig="true" readOnly="#{DialogManager.bean.taskNotAssigned}/>

3. Register your new bean, register your new dialog with new managed bean and new jsp view.
4. Look at web-client-config-dialogs.xml for example how to configure that  custom dialog gets called for your custom tasks

Hope I was helpfull

Denis

jdbrown
Champ in-the-making
Champ in-the-making
Denis, thank you for the suggestion and it looks like it should work.  I will give it a try and report back.  Thanks again!

Jeff

jdbrown
Champ in-the-making
Champ in-the-making
Works like a charm - thanks again.

dhalupa
Champ on-the-rise
Champ on-the-rise
Great!

I'm glad I was helpfull

Kind regards,

Denis