Emit events (bizzStream.emitEvent)
To trigger an event within the BizzStream event framework, you can employ the bizzStream.emitEvent method.
Syntax
bizzStream.emitEvent(type, info)
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| type | String | Yes | The type of the event. |
| info | Object | Yes | The information of the event. |
Return value
None.
Example
The following example shows how to trigger a PURCHASE_ORDER_CREATED event using the bizzStream.emitEvent method:
bizzStream.emitEvent("PURCHASE_ORDER_CREATED", { code: serverDocument.code });