[Yanel-dev] Workflow UI

Michael Wechner michael.wechner at wyona.com
Tue Nov 23 23:32:58 CET 2010


Hi Rob

On 11/23/10 5:37 PM, Rob Adamson wrote:
> Hi Michael,
>
> On 2 November 2010 09:39, Michael Wechner<michael.wechner at wyona.com>  wrote:
>> We currently have the workflow and versions available via the Yanel Toolbar
>> and also via the page info, e.g.
>>
>> http://www.yanel.org/en/download/unix.html?yanel.resource.meta
>>
>> whereas this is very generic and it  might be sufficient in some cases, but
>> in others it isn't.
>>
>> For example if one has an approve/reject kind of workflow, then it would be
>> nice that the editorial stuff can send/enter a message upon reject. The same
>> could be true for other transitions.
> This sounds familiar :-)


good and not good ;-)


> I have implemented custom functionality to:
> (a) require a reviewer to enter a message to explain why they are
> rejecting an item and
> (b) require a publisher to enter publication and expiry date/times on
> the transition to a live state.
>
> My current implementation of this uses a separate Java class (actually
> an enum) that, given a transition id, can tell whether a message or
> publication dates are required.  I don't particularly like this,
> because it is fragile: it will only work if the transition_ids match,
> and also I don't like having to modify 2 separate files whenever I
> change the workflow.
>
> So I really want to declare this requirement in the workflow XML.
>
> e.g.
> ...
> <transition id="publisher_publishes" from="waiting_for_publication"
> to="published">
> ...
> <extra>publication_dates</extra>
> </transition>
> ...
>
> However, there is currently no way to get access to any extra data
> from the XML, as far as I can tell.

please be aware that the XML is only a particular implementation of the 
interface:

src/core/java/org/wyona/yanel/core/workflow

whereas it is a bit confusing because AFAIK the implementation is using

src/core/java/org/wyona/yanel/core/workflow/WorkflowBuilder.java

which should rather be moved to

src/core/java/org/wyona/yanel/core/workflow/impl

(but in order to "clean" this up we need to be careful re backwards 
compatibility)

> What options can you suggest?

 From my guts feeling I would suggest introduce an enhanced Workflow 
interface or
as alternative if you use within your project a particular 
implementation of the interface, then
implement this there and cast it where necessary.

Of course I think we should give the enhanced workflow interface a 
try/chance and any
suggestions from your side would be very welcome.

>   Is there a recommended way to do this?

I need to understand it better in order to make a good recommendation. Maybe
you can show me off the public mailing list your specific setup such 
that I can
try to come up with a more generic solution.

Cheers

Michael
> Thanks,
> Rob



More information about the Yanel-development mailing list