[Yanel-dev] Storing reviewer comments with workflow transitions

Michael Wechner michael.wechner at wyona.com
Thu Nov 4 00:08:04 CET 2010


On 11/3/10 5:46 PM, Rob Adamson wrote:
> On 3 November 2010 16:39, Michael Wechner<michael.wechner at wyona.com>  wrote:
>> On 11/3/10 4:06 PM, Rob Adamson wrote:
>>> Is there a convenient way to get at the node path from a resource?
>> you mean like the "source node" of a resource?
>>
>> If so, then no, because a resource could be purely dynamic.
>>
>> The trick is to do this through the resource interfaces, e.g.
>>
>> http://www.yanel.org/javadoc/org/wyona/yanel/core/api/attributes/VersionableV2.html#getRevisions()
>>
>> and
>>
>> http://www.yanel.org/javadoc/org/wyona/yanel/core/api/attributes/WorkflowableV1.html#getWorkflowState(REVISION_NUMBER)
>>
>> but maybe I misunderstand you?
> I think I understand.
>
> The problem is that there isn't any way to set a revision property
> through either WorkflowableV1 or VersionableV2.

IIUC you want to set the "reject message" as property (as we discussed 
;-), right?
> So as a work-around, I will take the path of the node as an additional
> request parameter.

or you could try to do this via the Modifiable interface, e.g.

http://www.yanel.org/javadoc/org/wyona/yanel/core/api/attributes/ModifiableV2.html#write(InputStream)

whereas you could generate an InputStream with for example

new java.io.StringBufferInputStream(sb.toString())

and the "write(InputStream)" implementation would read this and set the 
property on the node.

HTH

Michael
>> Can you explain a bit more in which context you try to use this?
> The context is implementing a user action whereby they can execute a
> transition and record a comment to explain why they have executed this
> transition.
>
> Thanks,
>
> Rob



More information about the Yanel-development mailing list