I am very new to Drupal (having an excellent experience so far) and am setting up a complex distributed publishing workflow using Maestro (also having a pretty excellent experience - though testing workflows can get quite tedious :) ).
A writer can write a document until they are finished and then mark it as finished. At that point it goes to anyone in the reviewer role. Since there could be many reviewers who are not in close communication, I'd like the reviewer to be able to claim the document with an Interactive Task using accept_reject and have it assigned to themself (i.e. the current user). This is to prevent two reviewers from working on the same document.
How can I create a workflow variable that is 'the current user'? (I naively tried something like current_user = $user->uid but that didn't work - though to Maestro's credit, it didn't blow up either - the document became unassigned).
thank you
Comments
Comment #1
_randy commentedYou would have to create a batch task that would load the node, change the uid and do a node_save. There is no out of the Maestro box functionality that would do this.
The accept/reject task would set a process variable to the user's UID and then you would use that process variable value to set the node's uid property.
Comment #2
kokaku commentedSounds straightfoward enough - I'm an experienced coder, but not familiar w PHP, Drupal or Maestro (all of this neck of the woods is unexplored territory to me) - can you give me a few more minutes and show me some sample code and where it would live for the batch task to recognize it? In the workflow, how is the process variable set - on the workflow or on the task? and can you put PHP code into the value? (what would that look like?)
thank you
Comment #3
mathankumarc commented@kokaku
this may help you.
http://www.nextide.ca/maestro_how_to