Leave feedback
  • Question

    Stop processing (Composition) in runtime after finding wrong data in the input file

Enter a new topic
  • Prasad Shukla Prasad Shukla
    0 likes 1839 views

    We are getting RDI files from SAP and we are composing the documents in StreamIN and PageOUT. We have a requirement to abort the processing of the file if some mandatory data is not passed or wrong values have passed in the RDI variables. We also want to log the error and reject the input file and stop further processing. How do we achieve this? Any suggestions appreciated.

    I know there is a function called skip() but not sure where to write the function to stop the composition. Also after stoping how do I log the error through email to the specific email id.

     

    Thanks

    Thursday 19 August, 2010
  • Best Answer
    Stefan Cohen Stefan Cohen StreamServe Employee Administrator
    0 likes

    You can do your validation in the before process script. Simply set a flag when validation fails and check the flag to skip the processes. Here's an overview of the script execution order.

    Then append what you want to log in the email to a variable and use the callproc() function to call a MailOUT process.

    You can additionally use the Setjobfailed() function to mark the job as failed.

     

    Regards,

    Stefan

    Thursday 19 August, 2010
  • Stefan Cohen Stefan Cohen StreamServe Employee Administrator
    0 likes

    Moved to Data & Design

    Thursday 19 August, 2010
  • Andreas Hjelle Andreas Hjelle
    0 likes

    Hi,

    As I have answered you elsewhere (on it toolbox) on the same question: You can use skip on before message or before process.

    Here's the description from the help file:

    Skip Syntax
    Skip();
    Description Skips the current operation, i.e. the operation to which the script is associated. It can also be used to skip Events, Processes, blocks and fields. The function is useful for more complicated tests than a rule allows for. For example, the function can be used for suppressing page numbers on one-page printouts. Note: The script that contains the skip()function is fully executed including functions invoked after the skip()call.

    If you are not familiar with StreamServe scripting it is highly recommendable to attend training.

     

    To report the aborted job you can add a mail out process (or use one you already have).

    Regards,

    andreas

    Thursday 19 August, 2010

 

Latest from the blogs

Read more