Jahia Dev Forum > How to change container's...

0 (0 Good)
0 (0 Bad)

How to change container's worklow

by  stonon »  2011/06/07 20:34

Hello,

I'm working with a jahia 5 Sp3 version.

I'm trying to change the worfklow of my containers using the Jahia API with no success.

I use the WorkflowService object with such methods like : changeStagingStatus but it doesn't seems to work.

I tried also the method setWorkflowState(int state) on a JahiaContainer object but, like the precedent method, it does nothing.

I'm just trying to validate the workflow of my container after making changes on it.

Does someone have any idea for validating my new content?

Thank you for you're help.
  • How to change container's worklow
    2011/06/07 20:34

    stonon Hello, <br/><br/>I'm working with a jahia 5 Sp3 version.<br/><br/>I'm trying to change the worfklow of my containers using the Jahia API with no success.<br/><br/>I use the WorkflowService object with such methods like : changeStagingStatus but it doesn't seems to work.<br/><br/>I tried also the method setWorkflowState(int state) on a JahiaContainer object but, like the precedent method, it does nothing.<br/><br/>I'm just trying to validate the workflow of my container after making changes on it.<br/><br/>Does someone have any idea for validating my new content?<br/><br/>Thank you for you're help.

  • Number of messages  3
    Registration date Jun 7, 2011
    0 (0 Good)
    0 (0 Bad)

    Re: How to change container's worklow

    by  dsaulnier »  2011/06/07 20:34

    Hello,

    Here is an example that should help you.
    This code publishes a container for which we have specified the id in request.
    Notice that we have to ensure that the ContentObject has a workflowMode different from Linked before we publish it. Otherwise, as it is linked to the workflow object of a parent contentObject (by default, its page), if you tried to publish it directly, you would publish more than your container (by default, the whole page). So if it has this WF mode, I switch to the Jahia default WF.

    [code:1po10fyg]
    final int ctnrIDToValidate = Integer#46;parseInt(request

    Damien Saulnier (dsaulnier)

    Number of messages  31
    Registration date
    Contact
    Share
    Feedback

    Get in touch

    Whether you are a current user or if you are just evaluating Jahia, we are here to help.

    Contact us

    Share this page