Workflow and the Integration bus

Hughie Coles asked on June 11, 2015 20:21

I'm working with the Kentico Integration Bus. Documents are under a custom workflow. I'm looking to synchronize my documents on the inbound side, but have them initially unpublished.

Currently, when a document is synchronized, the document is automatically published.

Is this possible? Is auto-publishing the normal default behavior?

Thanks Hughie Coles

Recent Answers


Rui Wang answered on June 12, 2015 17:06

Hughie, I think you will need to enable the Workflow for the section of content tree where you want to sync the data to. By default there is no Workflow, so it would be save & publish at the same time. Once enable the workflow, even the basic one, Save and then publish will be come two step which would work for you.

0 votesVote for this answer Mark as a Correct answer

Hughie Coles answered on June 12, 2015 17:11

Thanks for your response Rui.

We have a custom workflow enabled. The issue is that when a document is processed by the integration bus, it skips the initial workflow steps and goes straight to the "Published" step.

My goal is for newly integrated documents to being in the "Edit" step.

0 votesVote for this answer Mark as a Correct answer

Rui Wang answered on June 12, 2015 19:56

Hi Hughie

I just did a test on my local where I don't have Integration Bus setup, but just using API to create a new page. In CMS, I added basic workflow to the root. and this page is to be added to the root as well. The page is create with a red X next to it instead of green check, which means it's not published.

        string pageTitle = txtInput.Text.Trim();

    TreeProvider tree = new TreeProvider(MembershipContext.AuthenticatedUser);  // needs some kind of permission inorder to create a page
    string cultureCode = "en-us";

    TreeNode node = TreeNode.New("CMS.MenuItem", tree);
    node.DocumentName = pageTitle;
    node.DocumentCulture = cultureCode;

    NodeSelectionParameters nsp = new NodeSelectionParameters()
    {
        AliasPath = "/",
        SelectSingleNode = true,
        CultureCode = cultureCode,
        SiteName = SiteContext.CurrentSiteName
    };

    TreeNode parentNode = DocumentHelper.GetDocument(nsp, tree);

    if (parentNode != null)
    {
        DocumentHelper.InsertDocument(node, parentNode, tree);
    }
0 votesVote for this answer Mark as a Correct answer

   Please, sign in to be able to submit a new answer.