<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title>Answers to: Sending Signals, how to define a Signal only once</title><link>https://answers.axonivy.com/questions/2027/sending-signals-how-to-define-a-signal-only-once</link><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;When using signals, a signal is defined as a string, for example in a Signal Start Event.
This string has to be coded at least twice, when you send a signal and when you receive a signal.
This can produce a spelling mistake easily, for exmple, somebody sends xxx:awaiting_end_of_rejection_period:start, but the SignalStartEvent waits for xxx:await_end_of_rejection_period:start.&lt;/p&gt;
&lt;p&gt;I would like to define all my signal strings in an interface like this in Java:&lt;/p&gt;
&lt;p&gt;public interface SignalCodes {
    public static String INITIALIZE_REQUEST = "xxx:initialize_request:start";
    public static String RECOGNIZE_BUSINESS_CASE = "xxx:recognize_business_case:start";
    public static String IDENTIFY_REQUESTER = "xxx:identify_requester:start";
    public static String CREATE_REQUEST_AND_REQUESTER = "xxx:create_request_and_requester:start";
    public static String RATE_REQUEST = "xxx:rate_request:start";
    public static String AWAIT_END_OF_REJECTION_PERIOD = "xxx:awaiting_end_of_rejection_period:start";
    public static String REJECT_REQUEST = "xxx:reject_request:start";
    public static String PEP_CHECK = "xxx:pep_check:start";
    public static String MANUAL_HANDLING = "xxx:manual_handling:start";
    public static String SEND_CONTRACT_DOCUMENTS = "xxx:send_contract_documents:start"; 
}&lt;/p&gt;
&lt;p&gt;I can use thise definition when i send the signal programmatically, but i can't use it in the SignalStartEvent. There only a hard coded string ca be used.&lt;/p&gt;
&lt;p&gt;Is there a solution for this problem? Define a signal string only once and then use ist on both sides, sender and receiver?&lt;/p&gt;
&lt;p&gt;I think, the CMS should be the right place to define the signal strings.&lt;/p&gt;</description><atom:link href="https://answers.axonivy.com/questions/2027/sending-signals-how-to-define-a-signal-only-once" rel="self"></atom:link><language>en</language><lastBuildDate>Tue, 30 Jul 2024 07:09:57 -0000</lastBuildDate></channel></rss>