Package ch.ivyteam.ivy.workflow.signal
Interface IBpmSignalService
public interface IBpmSignalService
A service for sending and querying signals.
Example: send a signal:ivy.wf.signals().send("user:created");
- Since:
- 6.1.0
- API:
- This is a public API.
-
Method Summary
Modifier and TypeMethodDescriptionhistory()
Query information about sent signals.Query information about signal receivers, Signal Start- or Signal Boundary-Events.void
send
(SignalCode signalCode) Sends a signal with the given signal codevoid
send
(SignalCode signalCode, Object signalData) Sends a signal with the given signal code and signal data.void
Sends a signal with the given signal code
-
Method Details
-
send
Sends a signal with the given signal code
ivy.wf.signals().send("user:created");
- Parameters:
signalCode
- e.g. "user:created"- See Also:
- API:
- This public API is available in Java.
-
send
Sends a signal with the given signal code
ivy.wf.signals().send(new SignalCode("user:created"));
- Parameters:
signalCode
- e.g. new SignalCode("user:created")- See Also:
- API:
- This public API is available in Java.
-
send
Sends a signal with the given signal code and signal data.
import ch.ivyteam.ivy.process.model.value.SignalCode; ivy.wf.signals().send(new SignalCode("issue:created"), "{\"id\" : \"XIVY-295\" }");
It is not recommended to use data classes as signal data as not all receiving projects might have access to these data classes and therefore cannot access them. Better send an id which references an object in a database or send signal data that is encoded as String (e.g. JSON).
- Parameters:
signalCode
- e.g. new SignalCode("issue:created")signalData
- e.g. {"id" : "XIVY-295"}- See Also:
- API:
- This public API is available in Java.
-
receivers
IBpmSignalReceivers receivers()Query information about signal receivers, Signal Start- or Signal Boundary-Events.- Returns:
- An interface that provides methods for querying signal receivers.
- API:
- This public API is available in Java.
-
history
IBpmSignalHistory history()Query information about sent signals.- Returns:
- An interface that provides methods for querying sent signals.
- API:
- This public API is available in Java.
-