AnsweredAssumed Answered

Workflow initiation by admin

Question asked by shivangi on Sep 29, 2008
Latest reply on Oct 14, 2008 by vinaxwater
I wish only admin should be able to initiate a workflow.

Kindly tell me how to achieve that ?

I tried following way in which after initiation during the first transition the intiator is checked if its a 'admin'.. which didnt worked for me  :(:(

<swimlane name="initiator"/>
   <start-state name="start">
        <task name="mywf:submitReviewTask" swimlane="initiator" >
       <event type="node-leave">
         <variable name="mywf_StarterName" access="write"/>
                 mywf_StarterName = Authentication.getAuthenticatedActorId();
        <transition name="" to="authorverification">
        <condition>#{mywf_StarterName == "admin"}</condition>
<!– <condition>#{people.getPerson(initiator).properties["cm:userName"] == "admin"}</condition> –>
<!–  <condition>#{ == "admin"}</condition>  –>
<!– <condition>#{Authentication.getAuthenticatedActorId() == "admin"}</condition> –>

Is this the right approach to restrict the users to initiate a workflow??

All the above conditions shows a error:  Caused by: org.jbpm.jpdl.JpdlException: [[ERROR] line 61: cvc-complex-type.2.4.a: Invalid content was found starting with element 'condition'. One of '{"":action, "":script, "":create-timer, "":cancel-timer, "":exception-handler}' is expected.,