This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

VAF doesn't have admin right on WF if normal user change state

Hi all,
How to change state from VAF if target state doesn't have a transition from current state.
As we do it in VAF, it's obviously an Admin change.
Why do we have an "Access is denied" if we test it with a "normal user" and how can we avoid it ?
Execution of code must be always executed with upper right, or we cannot put some plus value with code..
Same question with class (changing class and associated workflow in 1 single API call)
Thanks in advance
Fabien

Parents
  • There's a trick to this.

    You're correct that the server will check that the user can make a transition from the starting state to the ending state, which will fail for standard users if there's no valid transition.

    The trick is to alter your workflow slightly. If make the user move the object to state B, then have an automatic state transition to C where your code now is. Because the automatic transition is done by the server, which is an admin, code on state C can move it to anywhere even if there's no defined transition.

    Regards,

    Craig

  • Hi Craig thanks for your answer,
    OK, I can also make a transition from A to B, so user can do it..
    Why is this designed so ? In VAF we have to be admin. If it is not possible to always have admin rights, is it possible to have a SetWorkflowStateAdmin in VAF to do it ?
    I don't want to alter my workflow because such a trick will set the workflow unreadable...
    Regards

  • I don't have an answer to "why", unfortunately, as it was before my time.  I just know that I've had to use that workaround a few times.

Reply Children
No Data