Connection Information

To perform the requested action, WordPress needs to access your web server. Please enter your FTP credentials to proceed. If you do not remember your credentials, you should contact your web host.

Connection Type

Canceling pipeline execution – PB Docs 2022 – PowerBuilder Library

Canceling pipeline execution – PB Docs 2022

Canceling pipeline
execution

In many cases you will want to provide users (or the application
itself) with the ability to stop execution of a pipeline while it is in
progress. For instance, you may want to give users a way out if they
start the pipeline by mistake or if execution is taking longer than
desired (maybe because many rows are involved).

To cancel pipeline execution:

  1. Code the Cancel function in an appropriate script

    Make sure that either the user or your application can execute
    this function (if appropriate) once the pipeline has started. When
    Cancel is executed, it stops the piping of any more rows after that
    moment.

    Rows that have already been piped up to that moment may or may
    not be committed to the destination table, depending on the Commit
    property you specified when building your Pipeline object in the
    Data Pipeline painter. You will learn more about committing in the
    next section.

  2. Test the result of the Cancel function

For more information on coding the Cancel function, see the section called “Cancel” in PowerScript Reference.

Example

The following example uses a command button to let users cancel
pipeline execution in the order entry application.

Providing a CommandButton

When creating the w_sales_extract window, include a CommandButton
control named cb_stop. Then write code in a few of the application’s
scripts to enable this CommandButton when pipeline execution starts and
to disable it when the piping is done.

Calling the Cancel function

Next write a script for the Clicked event of cb_stop. This script
calls the Cancel function and tests whether or not it worked
properly:

Together, these features let a user of the application click the
cb_stop CommandButton to cancel a pipeline that is currently
executing.


Document get from Powerbuilder help
Thank you for watching.
Was this article helpful?
Subscribe
Notify of
guest
0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x