I am trying to publish a page during Workflow. There are two environments that we publish during the workflow process: one for testing and one for life. During the first automatic activity, we publish for testing, and during this process, the Components on the pages do not need approval. We got it for work.
However, when we claim that the page and page are published for life, we need to make sure that we publish only approved components (i.e. major versions).
In my code, I use the Page.Publish method, but with this I cannot indicate that it should publish only approved elements.
The publish method takes an argument to activateWorkflow . If set to True , it publishes both approved and unapproved items; but when it is set to False , it is added to the queue, and we get a success message, but nothing is published.
Does anyone have any ideas how I can fix this using the publish method and without manually checking?
Thanks.
source share