<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title>Answers to: Handle error in Waiting element</title><link>https://answers.axonivy.com/questions/2828/handle-error-in-waiting-element</link><description>&lt;p&gt;When i use waiting element of Ivy.
In case I call this two time with an eventID. I get a log error and log warning.
So I try to use error element to catch this error to show on UI. But impossible.
How can i do it?&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;    11:31:25.254 ERROR [ch.ivyteam.ivy.system.task.internal] [ivy immediate job pool-thread-19] [executionContext=SYSTEM] 
  Could not process system user task 182,898. The system will try to execute the system user task again after a timeout.
    java.lang.IllegalStateException: An intermediate event for task #182880 with the identical event identifier 'SMART_METER_GAETWAY_METER_CREATE_CONFIRMATION_EVENT_ID_005056b0-f842-1ed7-8daa-75acae8f09b2' already exists. The event identifier of an intermediate event element must always be unique!
        at ch.ivyteam.ivy.workflow.internal.Case.createIntermediateEvent(Case.java:2214)
        at ch.ivyteam.ivy.workflow.internal.Case.createNewTask(Case.java:2150)
        at ch.ivyteam.ivy.workflow.internal.Case.endJoiningTasksAndStartNewTasks(Case.java:1970)
        at ch.ivyteam.ivy.workflow.internal.Case$50.execute(Case.java:1913)
        at ch.ivyteam.ivy.workflow.internal.Case$50.execute(Case.java:1)
        at ch.ivyteam.ivy.persistence.base.AbstractPersistencyService.execute(AbstractPersistencyService.java:169)
        at ch.ivyteam.ivy.persistence.base.AbstractPersistencyService.execute(AbstractPersistencyService.java:226)
        at ch.ivyteam.ivy.persistence.base.ClassPersistencyService.execute(ClassPersistencyService.java:660)
        at ch.ivyteam.ivy.persistence.client.PersistentClientObjectInternal.execute(PersistentClientObjectInternal.java:155)
        at ch.ivyteam.ivy.persistence.client.PersistentClientObject.execute(PersistentClientObject.java:1)
        at ch.ivyteam.ivy.workflow.internal.Case.execute(Case.java:1)
        at ch.ivyteam.ivy.workflow.internal.Case.endJoiningTasksAndStartNewTasks(Case.java:1907)
        at ch.ivyteam.ivy.workflow.internal.WorkflowSession.endJoiningTasksAndStartNewTasks_aroundBody38(WorkflowSession.java:1137)
        at ch.ivyteam.ivy.workflow.internal.WorkflowSession.endJoiningTasksAndStartNewTasks_aroundBody39$advice(WorkflowSession.java:34)
        at ch.ivyteam.ivy.workflow.internal.WorkflowSession.endJoiningTasksAndStartNewTasks(WorkflowSession.java:1)
        at ch.ivyteam.ivy.bpm.exec.restricted.task.TaskSwitchEndJoiner.endJoiningTaskAndStartNewTask(TaskSwitchEndJoiner.java:39)
        at ch.ivyteam.ivy.bpm.exec.restricted.task.TaskSwitchEndRequestExecutor.endJoiningAndSetAutoTaskResumedWhenItExists(TaskSwitchEndRequestExecutor.java:83)
        at ch.ivyteam.ivy.bpm.exec.restricted.task.TaskSwitchEndRequestExecutor.execute(TaskSwitchEndRequestExecutor.java:60)
        at ch.ivyteam.ivy.bpm.engine.internal.core.RequestProcessor.executeRequestEndExecutor(RequestProcessor.java:186)
        at ch.ivyteam.ivy.bpm.engine.internal.core.RequestProcessor.handleRequest(RequestProcessor.java:79)
        at ch.ivyteam.ivy.bpm.engine.internal.BpmEngine.handleNormalRequest(BpmEngine.java:189)
        at ch.ivyteam.ivy.bpm.engine.internal.BpmEngine.handleRequestWithinContext(BpmEngine.java:138)
        at ch.ivyteam.ivy.request.impl.ContextAwareRequestHandler.handleRequest(ContextAwareRequestHandler.java:32)
        at ch.ivyteam.ivy.system.task.internal.SystemTaskJob.executeProcess(SystemTaskJob.java:166)
        at ch.ivyteam.ivy.system.task.internal.SystemTaskJob.executeInternal(SystemTaskJob.java:98)
        at ch.ivyteam.ivy.system.task.internal.SystemTaskJob$1.call(SystemTaskJob.java:67)
        at ch.ivyteam.ivy.security.internal.SecurityManager.executeAsSystem(SecurityManager.java:1440)
        at ch.ivyteam.ivy.system.task.internal.SystemTaskJob.execute(SystemTaskJob.java:62)
        at ch.ivyteam.ivy.job.internal.JobManager$1.call(JobManager.java:267)
        at ch.ivyteam.ivy.job.internal.JobManager$1.call(JobManager.java:1)
        at ch.ivyteam.util.callable.ExecutionContextContainer$ContainerExecutionContext.call(ExecutionContextContainer.java:92)
        at ch.ivyteam.ivy.security.internal.SecurityManager.executeInContext_aroundBody0(SecurityManager.java:1492)
        at ch.ivyteam.ivy.security.internal.SecurityManager.executeInContext_aroundBody1$advice(SecurityManager.java:41)
        at ch.ivyteam.ivy.security.internal.SecurityManager.executeInContext(SecurityManager.java:1)
        at ch.ivyteam.util.callable.ExecutionContextContainer$ContainerExecutionContext.call(ExecutionContextContainer.java:88)
        at ch.ivyteam.util.callable.ExecutionContextContainer.executeInContext(ExecutionContextContainer.java:27)
        at ch.ivyteam.ivy.job.internal.JobManager.execute(JobManager.java:261)
        at ch.ivyteam.ivy.job.internal.Job.run(Job.java:83)
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
        at java.util.concurrent.FutureTask.run(FutureTask.java:266)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
        at java.lang.Thread.run(Thread.java:745)

    11:31:25.264 WARN [ch.ivyteam.ivy.server.persistency.db] [ivy immediate job pool-thread-19] [executionContext=SYSTEM] 
  String An intermediate event for task #182880 with the identical event identifier 'SMART_METER_GAETWAY_METER_CREATE_CONFIRMATION_EVENT_ID_005056b0-f842-1ed7-8daa-75acae8f09b2' already exists. The event identifier of an intermediate event element must always be unique! trunkated because it is to long to store in database column which only supports 200 characters
&lt;/code&gt;&lt;/pre&gt;</description><atom:link href="https://answers.axonivy.com/questions/2828/handle-error-in-waiting-element" rel="self"></atom:link><language>en</language><lastBuildDate>Mon, 28 Aug 2017 09:02:47 -0400</lastBuildDate><item><title>Answer by Reguel Wermelinger</title><link>https://answers.axonivy.com/questions/2828/handle-error-in-waiting-element/2829</link><description>&lt;p&gt;Ensure that you use a shorter ID: here you have obiously a length problem: &lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;'SMART_METER_GAETWAY_METER_CREATE_CONFIRMATION_EVENT_ID_005056b0-f842-1ed7-8daa-75acae8f09b2' already exists. The event identifier of an intermediate event element must always be unique! &lt;strong&gt;trunkated because it is to long to store in database column which only supports 200 characters&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;you could shorten the identifier plus use a simpler ID format. Our own ID generator is able to generate shorter unique ids. Just give it a try: &lt;code&gt;ch.ivyteam.util.GuidUtil.generateID()&lt;/code&gt;&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Reguel Wermelinger</dc:creator><pubDate>Mon, 28 Aug 2017 09:02:47 -0400</pubDate><guid>https://answers.axonivy.com/questions/2828/handle-error-in-waiting-element/2829</guid></item></channel></rss>