Am 14.06.2007 um 09:34 schrieb Andreas Hartmann:

Jürgen Ragaller schrieb:

Hi


We added a transition to the workflow.xml to give the reviewers the
possibility to publish in one step:

  <transition source="authoring" destination="live">
    <event id="publish"/>
    <condition
class="org.apache.lenya.cms.workflow.RoleCondition">review</ condition>
    <assign variable="is_live" value="true"/>
  </transition>


Two problems arise:

1) The notification of the submitter checkbox in the publishing step is
present - and if checked, it throws an exception (which makes sense,
because there is no submitter). Is it possible to introduce a check,
that the checkbox is only displayed if the document has the state
«review» (and a submitter exists)?

Sure - you should probably put the code in the usecase handler class:

  Workfloable workfloable = WorkflowUtil.getWorkfloable(
      this.manager, getSession(), getLogger(), doc);
  String state = workflowable.getLatestVersion().getState();
  setParameter("state", state);

In your view you can show or hide the checkbox accordingly:

<jx:if test="${usecase.getParameter('state').equals('review')}">
  ...
</jx:if>

Thanks - I'll do that.



2) The update of the lucene index of a document (in workflow state
authoring | live) fails if the modified document is published in one
step (from authoring|live to live). If the publish procedure of the
updated document is done in two steps (submit - publish), the content is
(re)-indexed.

Does it throw an exception, or does it just not update the index?

it just does not update the index - no exception

Would you mind filing a bug and, if possible, attach a patch which
allows to reproduce the problem? TIA!

I'll file a bug - and try to attach a patch with my workflow.xml customization.


Jürgen




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to