• Emil Brolin
    March 30, 2017 at 5:10 am #4071

    Hello!

    I tried to follow the tutorial from the link below, to see if the event handling there would work. I.E the on_click event.
    I’ve tried with my own custom CV first, but I didn’t succeed. I even used the supplied file from the tutorial, and still
    nothing seems to happen, when I press the button. Please see attached file.

    https://salientprocess.zendesk.com/hc/en-us/articles/217879818-Creating-Your-Own-Control

    SPARK Support
    March 30, 2017 at 10:14 am #4074

    Hi Emil,

    I deleted your TWX from your post due to security concerns.  I will continue to take a look at the issue.

    Regards,

    Stephen P.

    SPARK Support
    March 30, 2017 at 4:08 pm #4076

    Hi Emil,

    Your MyButton.js file was registering and executing

    bpmext.ui.registerEventHandlingFunction(this,”onclickEvent”);

    and

    btn.onclick = function() {
    bpmext.ui.executeEventHandlingFunction(view, “onclickEvent”);

    just as in our example code.  However, your MyButton Coach View contained eventON_Click in the Configuration Options under Variable Declarations instead of onclickEvent.  If you correct the variable name, the event will fire correctly.

    Regards,

    Stephen P.

    Emil Brolin
    March 30, 2017 at 10:51 pm #4077

    Oups.. Embarassing.. You look and you look, and you still fail on such things.. *Gaah*

    With the correct variable name, the event handling worked, but the binding to the end state in the diagram does not. I have selected the MyButton in the binding, but no action.

    SPARK Support
    March 31, 2017 at 8:12 am #4078

    Hi Emil,

    You need to add this from your btn.onclick() function:

    view.context.trigger();

     

    Regards,

    Stephen P.

Viewing 5 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic.

Start typing and press Enter to search