Class: EventSubscription

EventSubscription

The Event Subscription control listens to be called by a control's event or a function, then grabs the event data that was published and performs the logic provided in the On Published Event.  Note that the event is published using the bpmext.ui.publishEvent() method. An EventSubscription control provides the following configuration properties in Process Designer:

Event Name: Name of the subscribed-to event string

Events

On Published Event:
Description: This event is fired when an event is published.
Example:
${SubResult}.setText(me.getEventData())
Note: In order to publish an event, you need to call bpmext.ui.publishEvent(String EventName, String EventData) . The EventSubscription control will read the publication and you can handle the name and data accordingly through the On Published Event.
bpmext.ui.publishEvent(${Name}.getText(), ${Data}.getText())
Javascript expression
Articles
Event Subscription

new EventSubscription()

This constructor is never used explicitly.

Extends

Members

Methods

Retrieve bound data associated this view/control. Only works for views/controls with bound data.
Returns:
Type Description
Object Value of bound data. undefined if the view has no data binding.
Example
var dec1 = MyDecimal.getData();

getEventData(){ANY}

Get the event data (payload) associated with this subscription
Returns:
Type Description
ANY

getEventName(){string}

Get the event name associated with this subscription
Returns:
Type Description
string

getType(){string}

Get descriptive string representing the type of control/section
Returns:
Type Description
string
Indicates bound status of control.
Returns:
Type Description
boolean True if the control is bound to coach data.
Checks if control label is visible
Returns:
Type Description
boolean Label visibility status
Example
var labelVisible = MyView.isLabelVisible();
Propagates value change of control up through parent views
Name Type Description
event Event Value change event (usually an onchange event)
Returns:
Type Description
boolean True if a formula update was triggered on the control's parent, otherwise false
Example
MyView.propagateUp(event);
Set/update bound data associated this view/control. Only works for views/controls with bound data.
Name Type Description
value Object Value of bound data. The type of this parameter must match the type of the bound data.
Example
MyView.setData("TEST"); //Updates bound data to the string 'TEST'

setEventName(eventName)

Set the event name associated with this subscription
Name Type Description
eventName string the event name of the control
Show/hide the label of this view/control
Name Type Description
visible boolean Label visibility flag (true to show view label, false to hide)
Example
MyView.setLabelVisible(false);
Broadcasts the expression trigger for the specified view
Name Type Default Description
phase int bpmext.ui.PHASE_NORMAL optional The phase we are currently in
Example
MyView.triggerFormulaUpdates();