Search in sources :

Example 6 with TimerJobId

use of org.kie.kogito.jobs.TimerJobId in project kogito-runtimes by kiegroup.

the class RestJobsServiceTest method testGetCallbackEndpoint.

@Test
void testGetCallbackEndpoint() {
    ProcessInstanceJobDescription description = ProcessInstanceJobDescription.of(new TimerJobId(), ExactExpirationTime.now(), "processInstanceId", "processId");
    String callbackEndpoint = tested.getCallbackEndpoint(description);
    assertThat(callbackEndpoint).isEqualTo("http://localhost:80/management/jobs/processId/instances/processInstanceId/timers/" + description.id());
}
Also used : ProcessInstanceJobDescription(org.kie.kogito.jobs.ProcessInstanceJobDescription) TimerJobId(org.kie.kogito.jobs.TimerJobId) Test(org.junit.jupiter.api.Test)

Aggregations

ProcessInstanceJobDescription (org.kie.kogito.jobs.ProcessInstanceJobDescription)6 TimerJobId (org.kie.kogito.jobs.TimerJobId)6 Test (org.junit.jupiter.api.Test)3 KogitoNodeInstance (org.kie.kogito.internal.process.runtime.KogitoNodeInstance)2 JobsService (org.kie.kogito.jobs.JobsService)2 Job (org.kie.kogito.jobs.api.Job)2 Handler (io.vertx.core.Handler)1 URI (java.net.URI)1 Date (java.util.Date)1 InternalAgenda (org.drools.core.common.InternalAgenda)1 InternalKnowledgeRuntime (org.drools.core.common.InternalKnowledgeRuntime)1 BusinessCalendar (org.jbpm.process.core.timer.BusinessCalendar)1 Timer (org.jbpm.process.core.timer.Timer)1 DroolsAction (org.jbpm.workflow.core.DroolsAction)1 WorkflowProcessInstanceImpl (org.jbpm.workflow.instance.impl.WorkflowProcessInstanceImpl)1 KogitoProcessRuntime (org.kie.kogito.internal.process.runtime.KogitoProcessRuntime)1 ExpirationTime (org.kie.kogito.jobs.ExpirationTime)1 TimerInstance (org.kie.kogito.timer.TimerInstance)1