Monday, November 24, 2008

Alfresco workflow package actions

I'm writing this post to serve as a reminder for later need because it's a bit difficult to look for it in Alfresco documentation "jungle" :) (no offense, I'm still grateful that I could access Alfresco's documentation).

Each workflow instance in Alfresco works against a document, the start task "submit" the document, the other tasks in the workflow might add another document, edit attached document, remove attached document and only allowed to read the attached document. This behaviour is set in the workflow model by overriding bpm:packageActionGroup and bpm:packageActionItemGroup.

List of action groups available by default :
  • read_package_item_actions
    allow viewing of package items
  • edit_package_item_actions
    above + allow modification (edit, checkout, ...) of package items
  • edit_and_remove_package_item_actions
    above + allow removal of package items
  • remove_package_item_actions
    allow removal (but not modification) of package items
  • add_package_item_actions
    allow addition of new package items
Custom action also supported but up to now I still have to find out how.

Sample model definition which overrides the default action.
<type name="mynamespace:taskname">
<parent>bpm:workflowTask</parent>
<overrides>
<property name="bpm:packageActionGroup">
<default>add_package_item_actions</default>
</property>
<property name="bpm:packageItemActionGroup">
<default>edit_package_item_actions</default>
</property>
</overrides>
</type>


I guess this is enough for now.

4 comments:

Anonymous said...

Hi Santoso

i just wanted to ask how would you go about adding a custom action that would be used to start a workflow from the UI, eg: ad an action groupe that would get a list of all the workflows and start the work flow from there without going through the select workflow wizard

thakn you Innocent
email: innotints@gmail.com

Santoso said...

Hi,

I think you might want to create your custom action, take a look at http://wiki.alfresco.com/wiki/Custom_Actions.

Never tried it though, but it provides way to add custom action that might start the workflow.

sukumar said...

thanks...!!!.. big help.!

Francesco said...

Hi this post is very useful, but can you explain also the difference from bpm:packageActionGroup and bpm:packageActionItemGroup? which is the difference?

Regards...