Logo

    Home

    Documentation

    Use Cases

    Training

    Applications

    Release Notes

    Events: Subscribing to Backend-Events

    Events: Subscribing to Backend-Events

    • Description
    • How to use it

    Description

    Build.One offers the opportunity to subscribe to different events, where the customer generated code will be executed. In the most cases this can be done by adding the function name into the attributes of the Build.One Objects. An example would be: Attribute EventOnInitialize with value #.HelloBuildOne(eventSource); which calls the Function HelloBuildOne() every time the object will be initialised.

    But for some examples you can also subscribe to events in the backend, in this example we focus on the Drag&Drop Events in a TreeGrid

    How to use it

    Afterwards you’ll find an example, which you can adjust and include in a progress procedure. In this example we suggest to use the progress persistent procedures, which will run always after launching, see https://community.progress.com/s/article/P21924

    SUBSCRIBE TO "cpPost_pos.org.brel.psp_pos.org.brel.psp":U ANYWHERE 
        RUN-PROCEDURE "copyEvents":U.
    SUBSCRIBE TO "mvPost_pos.org.fun_pos.org.fun":U ANYWHERE 
        RUN-PROCEDURE "movePostEvents":U.

    Here you’ll find the explanation for the different parts:

    • cpPost/mvPost: Subscribes to the copy (cp) or move (mv) event after the event is thrown (Post)
    • pos.org.brel.psp_pos.org.brel.psp: This defines the event in details, so from which StructNodeType to which other StructNodeType the action happens. In this example it’s the copy from one pos.org.brel.psp to another and the move from pos.org.fun to another.
    • copyEvents: The procedure, which will be called when the event is thrown

    Back to DocumentationDocumentation

    Back to Home Page

    Logo