Event extends WorkflowSystemTask { @Inject public Event(EventQueues eventQueues, ParametersUtils parametersUtils, ObjectMapper objectMapper) { super(NAME); this.parametersUtils = parametersUtils; this.eventQueues = eventQueues; this.objectMapper = objectMapper; } @Inject  Event(EventQueues eventQueues, ParametersUtils parametersUtils, ObjectMapper objectMapper); @Override void start(Workflow workflow, Task task, WorkflowExecutor provider); @Override boolean execute(Workflow workflow, Task task, WorkflowExecutor provider); @Override void cancel(Workflow workflow, Task task, WorkflowExecutor provider); @Override boolean isAsync(); static final String NAME; }
@Test public void testEvent() { System.setProperty("QUEUE_NAME", "queue_name_001"); String eventt = "queue_${QUEUE_NAME}"; String event = parametersUtils.replace(eventt).toString(); assertNotNull(event); assertEquals("queue_queue_name_001", event); eventt = "queue_9"; event = parametersUtils.replace(eventt).toString(); assertNotNull(event); assertEquals(eventt, event); }