The regular use of a IBM CaseManager ScriptAdapter allows you to specify a payload that is (synchronously) emitted after it is triggered by an incoming event. But, did you know it is also an option to asynchronously emit the payload?
Its quite easy, and it’s done by:
- Disabling the default outgoing payload
- Manually call for an emit by calling:
While this may seem like a trivial functionality, it can actually be used to fix challenges such as:
- Emitting a document/folder/task/case(editable) that not yet has its full attributes retrieved. Simply call the retrieveAttributes before emitting.
- Split up payloads by wiring, e.g. handle each result of an ecm.model.SearchQuery.
(for each result -> emit wire -> show document in viewer)
- Waits & polling. E.g. Wait for a certain event to happen, then finally emit.