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 Detail

      • send

        void send​(String signalCode)

        Sends a signal with the given signal code

        ivy.wf.signals().send("user:created");

        Parameters:
        signalCode - e.g. "user:created"
        See Also:
        send(SignalCode), send(SignalCode, Object)
        API:
        This public API is available in IvyScript and Java. It has the visibility NOVICE.
      • send

        void send​(SignalCode signalCode)

        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:
        send(String), send(SignalCode, Object)
        API:
        This public API is available in IvyScript and Java. It has the visibility EXPERT.
      • send

        void send​(SignalCode signalCode,
                  Object signalData)

        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:
        send(String), send(SignalCode)
        API:
        This public API is available in IvyScript and Java. It has the visibility EXPERT.
      • 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 IvyScript and Java. It has the visibility EXPERT.
      • 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 IvyScript and Java. It has the visibility EXPERT.