cancel
Showing results for 
Search instead for 
Did you mean: 

How to restrict view existing items & allow add new items?

anthonylau
Champ in-the-making
Champ in-the-making
Hi all,

My scenario is:
Task1: Start workflow with an item
Task2: Only allow add/remove new items and view existing item

I have tried to override the action group with following config.

<property name="bpm:packageActionGroup">
   <default>add_package_item_actions</default>
</property>

There is an add button in the form. The problem is user can remove existing item from the item selection dialog.

How can I allow user to add item but not removing existing item?


Thanks a lot,
Anthony
2 REPLIES 2

angello0571
Champ on-the-rise
Champ on-the-rise
Hi there,

I don't know exactly if this will work but here is my opinion:

1) Create a form type that extends bpmSmiley TongueackageActionGroup type, for example mf:customPackageActionGroup.
2) Use that custom type in the form task that you need to allow add/remove items, and the "original" bpmSmiley TongueackageActionGroup type just show it with read-only attribute set to true.
3)In a script task or a service task, iterate over mf:customPackageActionGroup and inject the nodeRefs of the items added in the task  to the  bpmSmiley TongueackageActionGroup.

I hope that idea works!

Best Regards

anthonylau
Champ in-the-making
Champ in-the-making
Thanks Angello,

I will try to implement your idea and post it if it works!

Best Regards