Question

I am using Alfresco 4.0.d and I want to create a dashlet which lists me every workflow I have started, similar to the "Workflows I've Started" Page. I want the dashlet to look like the "My tasks" dashlet. My approach is to reuse the existing my-tasks dashlet and customizing it in a way that it lists workflows instead of tasks.

Now I have problems with understanding how the my-tasks dashlet works and I think that it is crucial to understand it in oder to reuse it and make it work in a similar way with workflows.

What I do not understand is:

  • How is the dashlet populated with data when it is displayed the first time, I mean without using the filter-menu? Is there some kind of initial filter?
  • In my-tasks.get.config.xml it says that the task-instance webscript is used for filtering. But where in the my-tasks webscript is defined, that the task-instance webscript is used? For me it seems magic :).
  • What do i have to do make the model use workflow instances data instead of tasks instances data?

Of course i do not expect a step by step tutorial for my approach. I have the feeling that I am missing something or that I do not understand how the share webscripts interact with data webscripts and how they are populated with data from the repository. I would appreciate explanations for a better understanding and some hints for taking further steps with this approach.

Was it helpful?

Solution

What you are looking for is a javascript file. You can find it here: Alfresco\tomcat\webapps\share\components\dashlets\my-tasks.js

  • "How is the dashlet populated with data ...": Look at the javascript file method onReady()
  • "What do i have to do make the model use workflow instances data instead of tasks instances data?": You need to change webscript url in the javascript file "var webscript"

All the answers your are looking for is in the Alfresco\tomcat\webapps\share\components\dashlets\my-tasks.js file.

Also take a look at Alfresco\tomcat\webapps\share\components\workflow\workflow-list.js (lists workflows in the "Workflows I've Started" Page)

Good luck.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top