Workflow and publish set

Wing Ming Chan's Avatar

Wing Ming Chan

06 Aug, 2014 03:09 PM

I have just run into a very strange problem. Before recreating the problem, this is the general setup:

  1. There is a news folder right inside Base Folder, containing news articles
  2. There is an _extra folder, also inside Base folder, containing a folder named news

Here are the steps to create the problem:

  1. Create a new publish set named Automatic News Publish, and set the folder to _extra/news
  2. Create a new workflow named Automatic News Publish (with all actions checked) for automatic publishing, and use the publish set with the following steps:
  <steps>
    <step type="system" identifier="initialize" label="Initialization" >
      <actions>
        <action identifier="publish" label="Publish" move="forward" >
          <trigger name="PublishSet" >
            <parameter>
              <name>name</name>
              <value>Automatic News Publish</value>
            </parameter>
          </trigger>
        </action>
      </actions>
    </step>
    <step type="system" identifier="finished" label="Finished" />
  </steps>
  1. Associate the folder news with the new workflow, and set inherit workflow to No but require workflow to Yes
  2. Create a new article named article inside news

The new article is created alright and can be rendered. The path shows 'news/article'. But the page does not show up in the asset tree. When I click the news folder, it does not contain the article page. I also tried using the id string 'abc672078b7f0856009a98b9cb3228d6' in the URL (http://web.upstate.edu:8080/entity/open.act?id=abc672078b7f0856009a...) and succeeded in bringing up the page. I even tried reading the page using web service code. It reads the page if I use the id string. But it does not work if I use path and site name. When the page is read, the read dump shows that the page parent is news. But when I read the news folder using web service code, its children do not include the new page named article.

Is this a bug? And of what asset? Workflow? Publish set?

There is one more thing. When the article page is brought up, the Edit tab is missing, meaning the page cannot be edited, and there is no Delete in More, meaning the page cannot be deleted. I can use web service code to delete the page though.

Wing

  1. 1 Posted by Wing Ming Chan on 06 Aug, 2014 04:59 PM

    Wing Ming Chan's Avatar

    I checked cascade.log and found that my actions have created a lot of errors:

    2014-08-06 12:40:39,260 ERROR [PermissionsServiceImpl] {User: chanw, id: ac307c2e8b7f0856009a98b9303c58a3, type: page} Got a working copy id='ac307c2e8b7f0856009a98b9303c58a3' of an asset that has no lock.

    2014-08-06 12:42:52,718 ERROR [PermissionsServiceImpl] {User: chanw, id: not specified, type: not specified} Got a working copy id='ac307c2e8b7f0856009a98b9303c58a3' of an asset that has no lock.

    Wing

  2. 2 Posted by Ryan Griffith on 06 Aug, 2014 06:39 PM

    Ryan Griffith's Avatar

    Hi Wing,

    It sounds as though the new asset is in an invalid state due to the creation process and Workflow, almost like it's between draft and working copy.

    One thing I would like for you to try is to add a <trigger name="merge" /> directly before the publish set trigger and to try creating the asset again.

    So your Workflow XML should look as follows:

      <steps>
        <step type="system" identifier="initialize" label="Initialization" >
          <actions>
            <action identifier="publish" label="Publish" move="forward" >
              <trigger name="merge" >
              <trigger name="PublishSet" >
                <parameter>
                  <name>name</name>
                  <value>Automatic News Publish</value>
                </parameter>
              </trigger>
            </action>
          </actions>
        </step>
        <step type="system" identifier="finished" label="Finished" />
      </steps>
    

    Note: make sure the trigger is included at the top of the XML in the <triggers> element:

    <trigger class="com.cms.workflow.function.Merge" name="merge"/>
    

    Please let me know if you have any questions.

    Thanks!

  3. 3 Posted by Wing Ming Chan on 06 Aug, 2014 06:54 PM

    Wing Ming Chan's Avatar

    Ryan,

    I had the merge trigger when I started with the workflow and it was removed later when I tried to delete the newly created page. Now when I add it back, it does allow me to create the page, but then it does not allow me to delete or move the page. This is the error shown in the top red bar:

    Wing

  4. 4 Posted by Ryan Griffith on 06 Aug, 2014 07:50 PM

    Ryan Griffith's Avatar

    Thank you for following up, Wing.

    I believe you will need two separate Workflows for Create/Edit and Delete , because there is no working copy to merge during the Delete operation. I am thinking the same can be said for Copy as well.

  5. 5 Posted by Wing Ming Chan on 07 Aug, 2014 12:49 PM

    Wing Ming Chan's Avatar

    Now I have two separate workflows, one for create/edit, the other for copy/delete (I assume move is also here). I can create new pages. But I still cannot move or delete them. When I try to move a page, I run into the following error. When I try to delete a page, there is no error. But the page stays no matter what.

    Wing

  6. 6 Posted by Ryan Griffith on 29 Aug, 2014 12:33 PM

    Ryan Griffith's Avatar

    Hi Wing,

    My apologies for the delayed response here, I was going over some older discussions and noticed this one is still open. Were you able to get your workflows to work as expected?

    Please feel free to let us know if you have any other questions.

    Thanks!

  7. 7 Posted by Wing Ming Chan on 29 Aug, 2014 12:35 PM

    Wing Ming Chan's Avatar

    Hi Ryan,

    Thank you for getting back. And no, I am still stuck with these errors.

    Wing

  8. 8 Posted by Ryan Griffith on 29 Aug, 2014 12:41 PM

    Ryan Griffith's Avatar

    Thank you for following up, Wing, and my apologies for the inconvenience here.

    When you have a moment, please attach the XML for your two workflows so we can take a closer look.

    Thanks!

  9. 9 Posted by Wing Ming Chan on 29 Aug, 2014 12:47 PM

    Wing Ming Chan's Avatar

    Here they are: create_edit.xml and delete_copy.xml.

    Wing

  10. 10 Posted by Ryan Griffith on 29 Aug, 2014 01:35 PM

    Ryan Griffith's Avatar

    Thank you for attaching your Workflows, Wing.

    Let me have a developer take a closer look at the Workflows an the error message you are encountering. I will be in touch as soon as I hear back.

    In the meantime, can you also provide a screenshot of the parent folder's Workflow screen to confirm both Workflows are being applied. Also, please confirm that your "create/edit" Workflow does in-fact have the Edit Workflow Type checkbox selected.

    As a side note, I am seeing we have sample Workflows that are used for create, edit and copy. I believe you should be able to tweak your create/edit workflow to also include copy, and change your copy/delete workflow to only be delete.

    Please let me know if you have any questions.

    Thanks!

  11. 11 Posted by Wing Ming Chan on 29 Aug, 2014 02:19 PM

    Wing Ming Chan's Avatar

    Ryan,

    I ran into this problem when I was working with a live site. I can no longer play with this site. Therefore, it took me some time to set up a test site to recreate the problem.

    I also followed your suggestions and moved the copy action to the create/edit workflow. By doing this, now I can copy pages. But I still cannot move or delete pages. Here are some screenshots that may help.

    Wing

  12. 12 Posted by Ryan Griffith on 02 Sep, 2014 03:39 PM

    Ryan Griffith's Avatar

    Hi Wing,

    Thank you for the additional information and screenshots.

    Regarding the issue with the delete Workflow. The reason the asset is not deleted is because you are missing a Delete Trigger, which will perform the actual deletion. In this case, I believe the Delete and Unpublish Trigger would be more appropriate since it sounds like you would like to unpublish the asset as well.

    Regarding the issue with the move workflow, the destination folder's workflow definition will be used when moving a page. Can you confirm if the destination folder has an Edit workflow? If it does, does the user performing the move belong to one of the Workflow Definition's Applicable Groups?

    Please let me know if you have any questions.

    Thanks!

  13. 13 Posted by Wing Ming Chan on 02 Sep, 2014 04:22 PM

    Wing Ming Chan's Avatar

    Ryan,

    With the new triggers, the setup seems to work, though I still need to do more tests to confirm this.

    Thank you,
    Wing

  14. 14 Posted by Ryan Griffith on 02 Sep, 2014 05:34 PM

    Ryan Griffith's Avatar

    Thank you for following up, Wing. Please keep me posted on your findings and let me know if you have any additional questions.

    Thanks!

  15. Ryan Griffith closed this discussion on 03 Oct, 2014 07:56 PM.

Discussions are closed to public comments.
If you need help with Cascade CMS please start a new discussion.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac

 

26 Aug, 2016 01:19 PM
25 Aug, 2016 03:02 PM
25 Aug, 2016 12:50 PM
24 Aug, 2016 08:43 PM
24 Aug, 2016 07:20 PM
21 Aug, 2016 01:20 PM