Jump to content

Recommended Posts

Posted

Is there a way to make a variable document fail (stop) if a rule is not met rather than it just skipping it and going to the next record.

 

To be a little more specific I used a switch rule with many Protocol numbers. However, in the .csv file one number was not included in the list. Currently it just leaves out that information for the record and goes to the next. Is there a way to have it stop.

 

Thanks for any help.

Posted

In FusionPro 9.2 and later, you can just call this:

FusionPro.Composition.Abort();

You can optionally provide a custom error message:

FusionPro.Composition.Abort("Custom error message");

You can also control whether the entire composition is aborted, or just the record:

FusionPro.Composition.Abort("Custom error message", true); // true to abort record only

You can also cause FusionPro.exe to return a custom error code:

FusionPro.Composition.Abort("Custom error message", false, -10); // return custom error code -10 from FusionPro.exe (FP Server)

 

In older versions of FusionPro (before 9.2), this is harder to do, but you can set the Abort options on the Advanced tab of the Composition Settings dialog. I would try with the error type set to Medium and the "how to abort" set to "Stop composition." Assuming your job composes fine with these settings otherwise, you can trigger a "medium" severity error condition by putting too much text into a frame, say with a rule doing something like this:

return new Array(1000).join("too much text ");

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...