[Yanel-dev] Storing reviewer comments with workflow transitions

Rob Adamson bobacus at gmail.com
Thu Nov 4 12:28:14 CET 2010


On 3 November 2010 23:08, Michael Wechner <michael.wechner at wyona.com> wrote:
> 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?

Yes, I thought that was clear from the previous messages in this thread.

>> 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.

I think the problem with this is *knowing* that the implementation
will perform that operation. It did occur to me that we could create a
new interface for this purpose? Or maybe a new version of Versionable,
with a method to set the property of a revision.

Anyway, for now I am explicitly including code to get the repository
path from the resource path.

Thanks,
Rob


More information about the Yanel-development mailing list