plainblack.com
Username Password
search
Bookmark and Share

    

Add Entry Workflow

User wijtten
Date 3/3/2010 10:48 am
Views 348
Rating 1    Rate [
|
]
Previous · Next
User Message
wijtten

Hi,

I would like to automatically add a user to a group when he/she creates a new dataform entry. I guessed, since there seems to be an AddUserToGroup activity I could just add this to the config...

"workflowActivities" : {
    "None" : [
....
],
"WebGUI::AssetCollateral::

DataForm::Entry" : [
       "WebGUI::Workflow::Activity::AddUserToGroup"
    ],
...and then select an entry workflow at the bottom of the dataform edit screen.
However, this does not seem to work. Has anybody done something like this before or know how to make it work? Any help would be appreciated.
Cheers, Zeno

 

--- (Edited on 3/3/2010 10:49 am [GMT-0600] by wijtten) ---



Back to Top
Rate [
|
]
 
 
perlDreamer

Workflows are sorted by which types of objects they work on.  The DataForm will only run workflows that work on WebGUI::AssetCollateral::DataForm::Entry objects.  The AddUserToGroup activity works on a WebGUI::User object.

So, what is needed is a custom Workflow Activity that adds a User to a Group based on the info inside of a DataForm::Entry object.

AddUserToGroupFromDataformEntry

or

AddUserToGroup::DataFormEntry

or something like that.  It would take a DataForm::Entry object as an argument, extract the userId from it, build a User object, and add that user to the configured Group.

--- (Edited on 3/3/2010 8:55 am [GMT-0800] by perlDreamer) ---



Back to Top
Rate [
|
]
 
 
    



© 2012 Plain Black Corporation | All Rights Reserved