Preflight for copy flow status

Build 1501 on 14/Nov/2017  This topic last edited on: 24/Oct/2016, at 18:44

The preflight test for copy flow status includes:

Copy flow status

Description

Code

If no text is currently in editing

This test will fail if any linked story is under editing.

4

If all linked stories have specified workstate

This test will fail if any linked story is not in a folder with required workstate.

2

If all linked images have specified workstate

This test will fail if any linked image is not in a folder with required workstate.

32

If all linked images are not dummy anymore

This test will fail if any linked image is still dummy.

8

If all linked images are already up-to-date

This test will fail if for any linked image there's a newer version, but the page is not updated.

16

If items cannot be viewed

This test will fail if any linked text or image is actually in a folder where the current user has no view privileges.

512

To perform such a test from scripting, assuming the workstate id for articles is 123, and workstate id for images is 456, the script should look like:

Relaxed test (can proceed with errors)

dim test = 2+4+32+8+16+512

Page.PageTest(2, test, 123, 456, False)

Strict test (cannot proceed with errors)

dim test = 2+4+32+8+16+512

Page.PageTest(1, test, 123, 456, False)

Silent test (custom handler for errors)

dim test = 2+4+32+8+16+512

if Page.PageTest(0, test, 123, 456, False)=0 then

  'here put the commands if there are no errors

else

  'here put the actions if there are errors

end if