0 votes
723 views
in Coach Views by (21.5k points)

1 Answer

0 votes
by (30.6k points)

Any UI Toolkit control can fire a boundary event of the coach - it is what the Button control does - so "enhancing" a control means calling the coach's event mechanism from the control's own event handler:

// UI Toolkit: any control's event (e.g. Single Select "Country" > On change) can trigger the boundary event of a hidden Button
${GoButton}.click();                        // the Button "GoButton" has its boundary event wired in the CSHS diagram; hide it (visibility NONE)

// or directly from the control's context (works for every coach view):
me.context.trigger(function () { /* callback after the event was handled */ });   // fires the boundary event attached to THIS control in the diagram

In the CSHS diagram, every coach view placed on the coach - not only buttons - can have a boundary event wire (drag from the control's edge); it fires when the control calls context.trigger(). For OOB controls that do not call it themselves (a Single Select, a Table's row selection, a Date Picker), the two lines above do it from their events. Add Stay on page to the wire when the flow should call a service and return to the same coach (typical for "on change > recalculate on the server").

Custom coach view that should behave like a button: wrap the OOB control in your view and expose an Event option or call this.context.trigger() in the load handler's listener (question 2503). Validation before firing: the boundary event honours the coach's validation when the wire's validate option is set in the diagram; to skip validation for a "Cancel" path, untick it on the wire.

References

Related questions

0 votes
1 answer 3.7k views
0 votes
1 answer 1.7k views
0 votes
1 answer 4.0k views
0 votes
1 answer 847 views
0 votes
1 answer 2.6k views
0 votes
1 answer 2.5k views
+1 vote
1 answer 4.9k views
0 votes
1 answer 1.4k views
0 votes
1 answer 1.1k views
0 votes
1 answer 873 views
0 votes
1 answer 1.7k views
0 votes
1 answer 622 views

723 questions

807 answers

98 comments

4.9k users

Join BPM Community Discord Channel

Welcome to BPM Tips Q&A, Community wiki/forum where you can ask questions and receive answers from other IBM BPM experts and members of the community. Users with 2000 points will automatically be promoted to expert level.
Created by Dosvak LLC
Our Youtube Channel
...