Questions Tagged With business-datahttps://answers.axonivy.com/tags/business-data/?type=rssquestions tagged <span class="tag">business-data</span>enMon, 04 May 2020 06:24:47 -0400ivy.repo.save recursive Errorhttps://answers.axonivy.com/questions/4550/ivy-repo-save-recursive-error<p>Hi Comunity,</p> <p>When i use the ivy.repo.save to save my business data. I got an error as below:</p> <p>java.lang.StackOverflowError JsonMappingException: Infinite recursion (StackOverflowError) (through reference chain: java.util.ArrayList[0]-&gt;ch.ivyteam.ivy.security.internal.Role["users"]-&gt;ch.ivyteam.ivy.persistence.client.PersistentClientObjectList[0]-&gt;ch.ivyteam.ivy.security.internal.User["allRoles"]-&gt;.....</p> <pre><code>IvyRuntimeException: com.fasterxml.jackson.databind.JsonMappingException: Infinite recursion (StackOverflowError) (through reference chain: java.util.ArrayList[0]-&gt;ch.ivyteam.ivy.security.internal.Role["users"]-&gt;ch.ivyteam.ivy.persistence.client.PersistentClientObjectList[0]-&gt;ch.ivyteam.ivy.security.internal.User["allRoles"]..... IvyScriptMethodInvocationException: Error calling method save(Object) on an object of class ch.ivyteam.ivy.business.data.store.internal.BusinessDataRepositoryImpl. IvyScriptRuntimeException: IvyScript Runtime Exception in Instruction: ivy.repo.save(in.groundwaterProtectionZones) </code></pre> <p>Could any one help me to explain why it happen and how to solve it? Thanks</p>pttungMon, 04 May 2020 06:24:47 -0400https://answers.axonivy.com/questions/4550/ivy-repo-save-recursive-errorbusiness-dataivyDeserialization of Map with reference valuehttps://answers.axonivy.com/questions/4242/deserialization-of-map-with-reference-value<p>Dear Ivy team, I face an issue when using Map&lt;String, Object&gt;. I have two key, there has the same value, then it serializes like it:</p> <pre><code>{ "additionalData": { "@class": "Class&amp;lt;java.util.HashMap&amp;gt;", "firstKey": { "@class": "Class&amp;lt;objecttype.Assignee&amp;gt;", "@id": "$Ref-1", "displayName": "Hen" }, "secondKey": "$Ref-1" } } </code></pre> <p>And when deserializes I expect it should be:<br> <b>{firstKey=Assignee [displayName=Hen], secondKey=Assignee [displayName=Hen]}</b></p> <p>But it actual:<br> <b>{firstKey=Assignee [displayName=Hen], secondKey=$Ref-1}</b><br> The second key now map with wrong value.</p> <p>Is there any way to overcome this issue? Thanks a lot!</p>Hen TranThu, 05 Dec 2019 22:19:28 -0500https://answers.axonivy.com/questions/4242/deserialization-of-map-with-reference-valuedeserializationbusiness-dataElastic Search index recreation fails inconsistentlyhttps://answers.axonivy.com/questions/4179/elastic-search-index-recreation-fails-inconsistently<p>When re-starting the Ivy Engine (7.0.11), we found out, that elastic search index recreation fails everytime but with different objects.</p> <p>We then tried to call <code>DiCore.getGlobalInjector().getInstance(IBusinessDataManager.class).startIndexRecreation()</code> directly multiple times and almost every time a different object is reported as having problems, eg:</p> <pre><code>first call: bulk error: id=13a8e230cc9b47338d45e552678c1b10, index=ivy.businessdata-xxx.order, error={"type":"illegal_argument_exception","reason":"mapper [yyy.zzz] cannot be changed from type [float] to [long]"} next call: bulk error: id=0587301dfde5411a9caae3413ed25e7f, index=ivy.businessdata-xxx.order, error={"type":"illegal_argument_exception","reason":"mapper [yyy.zzz] cannot be changed from type [long] to [float]"} next call: bulk error: id=0271c00a7c5543c998bc81e5215e7949, index=ivy.businessdata-xxx.order, error={"type":"illegal_argument_exception","reason":"mapper [yyy.zzz] cannot be changed from type [long] to [float]"} </code></pre> <p>Please also note, that all three examples reference the same field of the same object type. How is this possible and how can we repair our index?</p> <p>TIA</p>petersThu, 21 Nov 2019 10:28:38 -0500https://answers.axonivy.com/questions/4179/elastic-search-index-recreation-fails-inconsistentlyindexbusiness-dataelasticsearchElasticsearchException index read-only if updating/storing BusinessDatahttps://answers.axonivy.com/questions/4038/elasticsearchexception-index-read-only-if-updating-storing-businessdata<p>I can not update and store my Business data and get the following exception if I do it e.g. <code>ivy.repo.save(in.myDossier)</code>:</p> <pre><code>ElasticsearchException: Elasticsearch update index of document failed because of: { "root_cause":[ { "type":"cluster_block_exception", "reason":"index [ivy.businessdata-abc] blocked by: [FORBIDDEN/12/index read-only / allow delete (api)];" } ], "type":"cluster_block_exception", "reason":"index [ivy.businessdata-abc] blocked by: [FORBIDDEN/12/index read-only / allow delete (api)];" } </code></pre> <p>It seems that it is now forbidden to write to the Elasiticsearch index because it is read-only. Why is my index read-only? I did not do anything. It suddenly stopped working.</p>SupportIvyTeamTue, 01 Oct 2019 04:05:17 -0400https://answers.axonivy.com/questions/4038/elasticsearchexception-index-read-only-if-updating-storing-businessdatabusiness-dataelasticsearchHow to persist fields in ivy repo but not index in elastic?https://answers.axonivy.com/questions/4010/how-to-persist-fields-in-ivy-repo-but-not-index-in-elastic<p>For some projects it is interesting to store all data including files to the database so we can run such instances in docker and share the database. This way it would be possible to store the data in the business repo, even as we seen in <a href="https://answers.axonivy.com/questions/1779/how-can-i-persist-a-file-as-blob">https://answers.axonivy.com/questions/1779/how-can-i-persist-a-file-as-blob</a> it is not always efficient. But we would not need to index the base64 conent of the file in elastic. Is it possible?</p>adamfTue, 24 Sep 2019 02:58:44 -0400https://answers.axonivy.com/questions/4010/how-to-persist-fields-in-ivy-repo-but-not-index-in-elasticfilebusiness-dataelasticsearchpersistencerepositoryElasticsearch fail because auto-conversion changes String values into Datehttps://answers.axonivy.com/questions/3903/elasticsearch-fail-because-auto-conversion-changes-string-values-into-date<p>We get an error of the Elasticsearch by saving a BusinessObject over the ivy.repo with a field of type <code>Map&lt; String,String &gt;</code>.</p> <pre><code>Elasticsearch update index of document failed because of: {"root_cause":[{"type":"illegal_argument_exception","reason":"mapper [details.data.Value1] of different type, current_type [text], merged_type [date]"}],"type":"illegal_argument_exception","reason":"mapper [details.data.Value1] of different type, current_type [text], merged_type [date]"}</code></pre> <p>The problem ist clear. The field "details.data.Value1" is a date field and i try to store a String.</p> <p><strong>But</strong> the definition of our BusinessObject is different to that!<br> The field "data" of the "detail" object is defined as a <code>Map&lt; String,String &gt;</code>.<br> We get this error when we run the following code in an IvyScript (we used a helper class for Maps, because IvyScript is not able to handle double generics).</p> <pre><code>JobDetail detail = new JobDetail(); Helper helper = new Helper(); helper.setParam("Value1", (new Date()).toString()); detail.data = helper.getParams(); job.details.add(detail); detail = new JobDetail(); helper.setParam("Value1", "foo"); detail.data = helper.getParams(); job.details.add(detail);</code></pre> <p>Why does Elasticsearch change the given attribute to a date field, although we just fill in String values?<br> Furthermore we defined the value as a Map of Sting-String value pairs.<br> Is there a solution of this issue?</p> <p>We decided not to use JSON objects instead of our Map, because of the easy handling in further uses.</p>Adrian ImfeldWed, 31 Jul 2019 04:33:14 -0400https://answers.axonivy.com/questions/3903/elasticsearch-fail-because-auto-conversion-changes-string-values-into-datebusiness-dataelasticsearchivyscriptIvy business data store rollback in case of problem (transaction management)https://answers.axonivy.com/questions/3828/ivy-business-data-store-rollback-in-case-of-problem-transaction-management<p>Hello IvyTeam,</p> <p>We are using the Ivy.repo() API for storing our data. Let's say we want to save a list of objects and if there is a problem by saving one of them, we should rollback what has been done for the previous ones.</p> <p>Is there a kind of transaction management with the Ivy.repo() API? Can we work like in one "transaction" for having the advantage of such a rollback function?</p> <p>Or should we implement it by our own, like going back to previous objects versions? Do you know how to achieve that?</p> <p>Thanks a lot in advance Emmanuel</p>Emmanuel CombaTue, 28 May 2019 03:40:01 -0400https://answers.axonivy.com/questions/3828/ivy-business-data-store-rollback-in-case-of-problem-transaction-managementbusiness-datatransactionrollbackivySolve read timeout issue while storing BusinessData in repositoryhttps://answers.axonivy.com/questions/3826/solve-read-timeout-issue-while-storing-businessdata-in-repository<p>I have deployed my cool wf-app into production several weeks ago. Now users are complaining about errors occuring on the screen. A first investigation into the logs revealed that there seems to be a connection problem with the elastic search server. I'm using the bundled elastic search server as it is shipped with the Axon.ivy Engine (7.3). Whats the issue here?</p> <p><code>Caused by: java.net.SocketTimeoutException: Read timed out</code></p> <pre><code>[errorId=16AE46D591AAA1BE, request=HTTP POST Start Processes/DepartmentHead.mod/163BB87520D405CF-f3(493708.480005.45511.1), session=524 (a.f@m.ch), task=480005, application=301, requestId=34869, executionContext=524 (a.f@m.ch), pmv=GMAA$hr_pbm_0001_pf$1, client=10.208.68.15, hd=com.axonivy.hrwf.pbm0001.components.ZurueckweisenKommentar, processElement=163BB87520D405CF-f17] Caused by: ch.ivyteam.ivy.business.data.store.search.internal.elasticsearch.ElasticsearchException: Cannot reach Elasticsearch server at ch.ivyteam.ivy.business.data.store.search.internal.elasticsearch.JestOperation.tryToExecute(JestOperation.java:51) at ch.ivyteam.ivy.business.data.store.search.internal.elasticsearch.JestOperation.execute(JestOperation.java:36) at ch.ivyteam.ivy.business.data.store.search.internal.elasticsearch.JestIndexSynchronizer.execute(JestIndexSynchronizer.java:151) at ch.ivyteam.ivy.business.data.store.search.internal.elasticsearch.JestIndexSynchronizer.updateDocument(JestIndexSynchronizer.java:50) at ch.ivyteam.ivy.business.data.store.search.internal.ElasticBusinessDataSearchIndex.update(ElasticBusinessDataSearchIndex.java:33) at ch.ivyteam.ivy.business.data.store.internal.ElasticSystemDbPersistence.lambda$2(ElasticSystemDbPersistence.java:140) ... 174 more Caused by: java.net.SocketTimeoutException: Read timed out at java.net.SocketInputStream.socketRead0(Native Method) at java.net.SocketInputStream.socketRead(SocketInputStream.java:116) at java.net.SocketInputStream.read(SocketInputStream.java:171) at java.net.SocketInputStream.read(SocketInputStream.java:141) at org.apache.http.impl.io.SessionInputBufferImpl.streamRead(SessionInputBufferImpl.java:137) ... at org.apache.http.impl.conn.DefaultHttpResponseParser.parseHead(DefaultHttpResponseParser.java:56) at org.apache.http.impl.io.AbstractMessageParser.parse(AbstractMessageParser.java:259) at org.apache.http.impl.DefaultBHttpClientConnection.receiveResponseHeader(DefaultBHttpClientConnection.java:163) at org.apache.http.impl.conn.CPoolProxy.receiveResponseHeader(CPoolProxy.java:165) at org.apache.http.protocol.HttpRequestExecutor.doReceiveResponse(HttpRequestExecutor.java:273)... at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:108) at io.searchbox.client.http.JestHttpClient.executeRequest(JestHttpClient.java:133) ... at ch.ivyteam.ivy.business.data.store.search.internal.elasticsearch.JestOperation.tryToExecute(JestOperation.java:45) ... 183 more </code></pre>SupportIvyTeamMon, 27 May 2019 03:17:31 -0400https://answers.axonivy.com/questions/3826/solve-read-timeout-issue-while-storing-businessdata-in-repositorybusiness-dataelasticsearchElasticSearch fails to recreate index due to data Field type changehttps://answers.axonivy.com/questions/3791/elasticsearch-fails-to-recreate-index-due-to-data-field-type-change<p>We converted a field of a BusinessData object from <code>long</code> to <code>String</code>. Now we face index recreation problems after upgrading the ivy engine to a new version.</p> <pre><code>2019-05-06 15:36:36.038 ERROR [ch.ivyteam.ivy.business.data.store.search.internal.BusinessDataSearchIndecesRecreator] [ivy immediate job pool-thread-1] [executionContext=SYSTEM] Recreation of business data search index failed [errorId=16A8D5C46C63FD9B, executionContext=SYSTEM] ch.ivyteam.ivy.business.data.store.search.internal.elasticsearch.ElasticsearchException: Elasticsearch add documents to index failed because of: One or more of the items in the Bulk request failed, check BulkResult.getItems() for more information. bulk error: id=f08fe3d90a454be4b95a0b59785686ff, index=ivy.businessdata-com.axonivy.hrwf.vea.arbeitsvertragsaenderungencasemodel, error={"type":"illegal_argument_exception","reason":"mapper [antrag.lohnUndOderArbeitszeitaenderung.baseSalaryPtNew] cannot be changed from type [float] to [long]"} bulk error: id=b15b99eb022b4e1f95cd1b34ee03ae2f, index=ivy.businessdata-com.axonivy.hrwf.vea.arbeitsvertragsaenderungencasemodel, error={"type":"mapper_parsing_exception","reason":"failed to parse [antrag.lohnUndOderArbeitszeitaenderung.expensesPtCurrent]","caused_by":{"type":"number_format_exception","reason":"For input string: \"CHF500\""}} </code></pre> <p>How can we get a proper data store and make the index recreation running?</p>SupportIvyTeamTue, 07 May 2019 04:23:23 -0400https://answers.axonivy.com/questions/3791/elasticsearch-fails-to-recreate-index-due-to-data-field-type-changebusiness-dataelasticsearchThere is a 1-second latency between ivy.repo.save(object) and ivy.repo.search(Object.class)https://answers.axonivy.com/questions/3681/there-is-a-1-second-latency-between-ivy-repo-save-object-and-ivy-repo-search-object-class<p>Hi Axon.ivy Team,</p> <p>Given the snippet of code:</p> <pre><code>Person p = new Person(); p.id = UUID.randomUUID().toString(); p.name = "John Doe"; p.birthdate = LocalDate.now(); ivy.repo.save(p); Object result = ivy.repo.search(Person.class) .textField("id").containsPhrase(p.id) .execute().getFirst(); ivy.log.error("HHH - it is null " + #result); Thread.sleep(TimeUnit.SECONDS.toMillis(1)); result = ivy.repo.search(Person.class) .textField("id").containsPhrase(p.id) .execute().getFirst(); ivy.log.error("HHH - it is null " + #result); </code></pre> <p>I found that there was a <em>1-second</em> latency between the call to <code>ivy.repo.save()</code> and <code>ivy.repo.search()</code>. This is super annoying because we had to wait for <em>1-second</em> every time until the saved object can be searched via the API. Blocking the execution for 1-second to wait until it is indexed to ES <em>every</em> <em>time</em> we save the object into the <code>BusinessDataRepository</code> is a terrible hack.</p> <p>Is it by design? Can this be fixed so that the two calls work?</p> <blockquote> <p>P.S: Please don't advise me to use the returned BusinessData id because it doesn't address my issue. I want to <em>search</em> back the data I save based on the object's field, not fetching it again.</p> <p>P.P.S: Tested with Axon.ivy Designer 7.2.1 on my local workstation.</p> </blockquote> <p><strong>UPDATE</strong></p> <p><em>25.2.2019</em>:</p> <p>In our project, we were able to develop RESTful API for other parties. As we already have persisted our objects (for example <code>Dossier</code>), in <code>BusinessDataRespository</code>, we would want to preserve that behavior.</p> <p>An excerpt from of our OpenAPI spec:</p> <pre><code>paths: /dossiers/{dossier_id}/persons/: post: operationId: addPersonToDossier description: add a single person into an existing Dossier requestbody: 'application/json': schema: $ref: '#/components/schemas/Person' responses: '201': get: operationId: getAllPersonsInDossier description: get *all* existing persons of an existing Dossier responses: '200': content: 'application/json': schema: type: array items: $ref: '#/components/schemas/Person' </code></pre> <p>From our client, after they have already invoked several calls to <code>addPersonToDossier</code>, they may want to invoke <code>getAllPersonsInDossier</code> to fetch all <code>Person</code>s of a <code>Dossier</code>. </p> <p>We persists <code>Person</code> separately from our <code>Dossier</code> to avoid <code>ConcurrentModificationException</code>, each <code>Person</code> holds a reference to its <code>Dossier</code>. Now in order to implement <code>getAllPersonsInDossier</code>, we have to use <code>Ivy.repo().search(..)</code>.</p> <p>Unfortunately, due to the 1-second latency, calling <code>getAllPersonsInDossier</code> too soon will probably return an empty result. This forces us to either:</p> <ul> <li>Require our clients to WAIT on their side for <em>1-second</em> until they can call <code>getAllPersonsInDossier</code>.</li> <li>On the server side, we somehow have to implement a <code>while</code> loop to check until the <code>Person</code> could be found via search API, then we consider the <code>addPersonToDossier</code> finishes (or worse, a <code>Thread.sleep(1000)</code>).</li> </ul> <p>Jack</p>vagabondFri, 22 Feb 2019 01:16:25 -0500https://answers.axonivy.com/questions/3681/there-is-a-1-second-latency-between-ivy-repo-save-object-and-ivy-repo-search-object-classbusiness-dataelasticsearchrepositoryCannot use BusinessDataRepository in JAX-RS resourceshttps://answers.axonivy.com/questions/3641/cannot-use-businessdatarepository-in-jax-rs-resources<p>Hi Axon.ivy team,</p> <p>I know this questions had been asked long time ago at <a href="https://answers.axonivy.com/questions/2777/can-not-use-ivy-repo-in-resfulapi.">https://answers.axonivy.com/questions/2777/can-not-use-ivy-repo-in-resfulapi.</a> But the question was for Axon.ivy 6.3.0 and there was never a resolution of the issue.</p> <p>I am using Axon.ivy 7.0.8 LTS and I still encountered the same issue.</p> <p>I introduce a JAX-RS resource:</p> <pre><code>package com.example.lab; @PermitAll @Path("awesome") public class TheAwesomeApi { @POST @Consume("application/json") @Produces("text/plain") public String saveAwesomeMessage(AwesomeMessage message) { return Ivy.repo().save(message).getId(); } public static class AwesomeMessage { private String content; // getter, setter } } </code></pre> <p>When I tried to call this API, the exception was returned.</p> <pre><code>curl <a href="http://localhost:8081/ivy/api/designer/awesome">http://localhost:8081/ivy/api/designer/awesome</a> \ -H 'Content-Type: application/json' \ -d '{ "content" : "This is an awesome message" }' </code></pre> <blockquote> <p>full stacktrace can be found here: <a href="https://pastebin.com/hXcyQq6h">https://pastebin.com/hXcyQq6h</a></p> </blockquote> <p>Unable to provision, see the following errors:</p> <pre><code>1) Error in custom provider, java.lang.NullPointerException while locating ch.ivyteam.ivy.scripting.dataclass.internal.di.IvyCaseProjectClassLoaderProvider while locating java.lang.ClassLoader annotated with interface ch.ivyteam.ivy.scope.restricted.FromCaseScope Caused by: java.lang.NullPointerException at ch.ivyteam.ivy.scripting.dataclass.internal.di.IvyCaseProjectClassLoaderProvider.get(IvyCaseProjectClassLoaderProvider.java:20) at ch.ivyteam.ivy.scripting.dataclass.internal.di.IvyCaseProjectClassLoaderProvider.get(IvyCaseProjectClassLoaderProvider.java:1) at com.google.inject.internal.ProviderInternalFactory.provision(ProviderInternalFactory.java:81) at com.google.inject.internal.BoundProviderFactory.provision(BoundProviderFactory.java:72) at com.google.inject.internal.ProviderInternalFactory.circularGet(ProviderInternalFactory.java:61) at com.google.inject.internal.BoundProviderFactory.get(BoundProviderFactory.java:62) at com.google.inject.internal.InjectorImpl$2$1.call(InjectorImpl.java:1019) at com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1085) at com.google.inject.internal.InjectorImpl$2.get(InjectorImpl.java:1015) at ch.ivyteam.ivy.business.data.store.restricted.BusinessDataTypeLoader.getContextClassLoader(BusinessDataTypeLoader.java:60) at ch.ivyteam.ivy.business.data.store.internal.BusinessDataRepositoryImpl.serialize(BusinessDataRepositoryImpl.java:369) at ch.ivyteam.ivy.business.data.store.internal.BusinessDataRepositoryImpl.lambda$0(BusinessDataRepositoryImpl.java:196) at ch.ivyteam.ivy.business.data.store.internal.ElasticSystemDbPersistence.lambda$14(ElasticSystemDbPersistence.java:439) at ch.ivyteam.ivy.persistence.base.AbstractPersistencyService.execute(AbstractPersistencyService.java:177) at ch.ivyteam.ivy.persistence.base.ClassPersistencyService.execute(ClassPersistencyService.java:673) at ch.ivyteam.ivy.business.data.store.internal.ElasticSystemDbPersistence.executeInTransaction(ElasticSystemDbPersistence.java:435) at ch.ivyteam.ivy.business.data.store.internal.BusinessDataRepositoryImpl.create(BusinessDataRepositoryImpl.java:194) at ch.ivyteam.ivy.business.data.store.internal.BusinessDataRepositoryImpl.save(BusinessDataRepositoryImpl.java:177) at com.example.lab.axonivy.api.TheAwesomeApi.saveAwesomeMessage(TheAwesomeApi.java:35) .... at java.lang.Thread.run(Thread.java:748) 2) Error in custom provider, com.google.inject.OutOfScopeException: No case available in the current scope/context while locating ch.ivyteam.ivy.workflow.internal.di.CaseProvider while locating ch.ivyteam.ivy.workflow.ICase for field at ch.ivyteam.ivy.scripting.dataclass.internal.di.IvyCaseProjectClassLoaderProvider.caze(IvyCaseProjectClassLoaderProvider.java:1) while locating ch.ivyteam.ivy.scripting.dataclass.internal.di.IvyCaseProjectClassLoaderProvider while locating java.lang.ClassLoader annotated with interface ch.ivyteam.ivy.scope.restricted.FromCaseScope Caused by: com.google.inject.OutOfScopeException: No case available in the current scope/context at ch.ivyteam.ivy.workflow.internal.di.CaseProvider.get(CaseProvider.java:24) at ch.ivyteam.ivy.workflow.internal.di.CaseProvider.get(CaseProvider.java:1) at com.google.inject.internal.ProviderInternalFactory.provision(ProviderInternalFactory.java:81) at com.google.inject.internal.ProvidedByInternalFactory.provision(ProvidedByInternalFactory.java:82) at com.google.inject.internal.ProviderInternalFactory.circularGet(ProviderInternalFactory.java:61) at com.google.inject.internal.ProvidedByInternalFactory.get(ProvidedByInternalFactory.java:71) at com.google.inject.internal.SingleFieldInjector.inject(SingleFieldInjector.java:54) at com.google.inject.internal.MembersInjectorImpl.injectMembers(MembersInjectorImpl.java:132) at com.google.inject.internal.ConstructorInjector.provision(ConstructorInjector.java:120) at com.google.inject.internal.ConstructorInjector.construct(ConstructorInjector.java:90) at com.google.inject.internal.ConstructorBindingImpl$Factory.get(ConstructorBindingImpl.java:268) at com.google.inject.internal.BoundProviderFactory.get(BoundProviderFactory.java:61) at com.google.inject.internal.InjectorImpl$2$1.call(InjectorImpl.java:1019) at com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1085) at com.google.inject.internal.InjectorImpl$2.get(InjectorImpl.java:1015) at ch.ivyteam.ivy.business.data.store.restricted.BusinessDataTypeLoader.getContextClassLoader(BusinessDataTypeLoader.java:60) at ch.ivyteam.ivy.business.data.store.internal.BusinessDataRepositoryImpl.serialize(BusinessDataRepositoryImpl.java:369) at ch.ivyteam.ivy.business.data.store.internal.BusinessDataRepositoryImpl.lambda$0(BusinessDataRepositoryImpl.java:196) at ch.ivyteam.ivy.business.data.store.internal.ElasticSystemDbPersistence.lambda$14(ElasticSystemDbPersistence.java:439) at ch.ivyteam.ivy.persistence.base.AbstractPersistencyService.execute(AbstractPersistencyService.java:177) at ch.ivyteam.ivy.persistence.base.ClassPersistencyService.execute(ClassPersistencyService.java:673) at ch.ivyteam.ivy.business.data.store.internal.ElasticSystemDbPersistence.executeInTransaction(ElasticSystemDbPersistence.java:435) at ch.ivyteam.ivy.business.data.store.internal.BusinessDataRepositoryImpl.create(BusinessDataRepositoryImpl.java:194) at ch.ivyteam.ivy.business.data.store.internal.BusinessDataRepositoryImpl.save(BusinessDataRepositoryImpl.java:177) at com.example.lab.axonivy.api.TheAwesomeApi.saveAwesomeMessage(TheAwesomeApi.java:35) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at ch.ivyteam.ivy.webserver.internal.rest.resource.project.RestPmvInvocationHandler$PmvAwareInvocator.lambda$0(RestPmvInvocationHandler.java:38) at ch.ivyteam.ivy.webserver.internal.rest.resource.project.RestPmvInvocationHandler.executeWithIvyContext(RestPmvInvocationHandler.java:70) at ch.ivyteam.ivy.webserver.internal.rest.resource.project.RestPmvInvocationHandler.access$1(RestPmvInvocationHandler.java:65) at ch.ivyteam.ivy.webserver.internal.rest.resource.project.RestPmvInvocationHandler$PmvAwareInvocator.invoke(RestPmvInvocationHandler.java:50) ... at java.lang.Thread.run(Thread.java:748) 2 errors" </code></pre> <p>Is this issue still a known limitation even with the 7.0 LTS?</p> <p>Thanks for your support!</p> <p>Jack</p>vagabondThu, 24 Jan 2019 00:49:27 -0500https://answers.axonivy.com/questions/3641/cannot-use-businessdatarepository-in-jax-rs-resourcesbusiness-dataKeep BusinessRepo separate between Ivy Applicationshttps://answers.axonivy.com/questions/3628/keep-businessrepo-separate-between-ivy-applications<p>We are deploying 2 applications which has a Class with the same canonical name (e.g. com.example.BusinessObject), we stored instances of this class to Business Repo, now every time I load the instances of BusinessObject, I see all instances from two different applications.</p> <p>Is there any way to limit Business Repo only load instances from the current applications? Is it a bug in Ivy Engine related to this?</p>vinh_Tue, 22 Jan 2019 03:58:10 -0500https://answers.axonivy.com/questions/3628/keep-businessrepo-separate-between-ivy-applicationsbusiness-dataivyCan we persist Elastic Search data to Business Data table?https://answers.axonivy.com/questions/2799/can-we-persist-elastic-search-data-to-business-data-table<p>hi ivyteam</p> <p>As far as i know, when we use ivy.repo() from ivy, data will be stored to table IWA.BusinessData and indexed to Elastic Search cluster. Normally ivy will create that index from that table when it start by this command: <code>DiCore.getGlobalInjector().getInstance(ElasticSearchServerManager.class).startIndexRecreation();</code></p> <p>In my case, i want to do it in opposite way that collecting data from index table then persist to IWA.BusinessData, just imagine that table has lost data for some reasons so i want to recover it. Can i do it in ivy?</p> <p>Thanks</p>trungdvTue, 08 Aug 2017 06:58:47 -0400https://answers.axonivy.com/questions/2799/can-we-persist-elastic-search-data-to-business-data-tablebusiness-datarepositoryCan not use ivy.repo in ResfulAPIhttps://answers.axonivy.com/questions/2777/can-not-use-ivy-repo-in-resfulapi<p>hi all</p> <p>I'm now using Ivy 6.3. When i create ResfulAPI by java (not use ivy element) and in that api i try to use ivy.repo() to store some data, it throw two exception: <img alt="alt text" src="http://answers.axonivy.com/upfiles/img1.png"> and <img alt="alt text" src="http://answers.axonivy.com/upfiles/img2.png"> I guess that because with pure java api, there is no task and case created but why we need them? as my understanding ivy.repo will store data to Ivy System DB and it's different from ivy process data which highly-related to ivy task&amp;case.</p> <p>Anybody can explain ? Thanks a lot</p>trungdvTue, 25 Jul 2017 06:16:41 -0400https://answers.axonivy.com/questions/2777/can-not-use-ivy-repo-in-resfulapicasebusiness-datarepositoryHow to display the ElasticSearch schema of my BusinessDatahttps://answers.axonivy.com/questions/2769/how-to-display-the-elasticsearch-schema-of-my-businessdata<p>I'd like to analyze the BusinessData index created by ElasticSearch. How can I inspect the schema of my BusinessData within the Designer or Engine?</p>SupportIvyTeamTue, 18 Jul 2017 03:28:33 -0400https://answers.axonivy.com/questions/2769/how-to-display-the-elasticsearch-schema-of-my-businessdatabusiness-dataelasticsearchException when querying business data with sortinghttps://answers.axonivy.com/questions/2763/exception-when-querying-business-data-with-sorting<p>Hi ivyTeam</p> <p>Querying data from business data </p> <pre><code>repo().search(getType()).orderBy().textField("processName").ascending().execute().getAll(); </code></pre> <p>It throws the exception:</p> <pre><code>Caused by: ch.ivyteam.ivy.business.data.store.search.internal.elasticsearch.ElasticsearchException: Elasticsearch search documents failed because of: {"root_cause":[{"type":"search_parse_exception","reason":"No mapping found for [processName.ascii] in order to sort on"}],"type":"search_phase_execution_exception","reason":"all shards failed","phase":"query","grouped":true,"failed_shards":[{"shard":0,"index":"ivy.businessdata","node":"swxYYakvQMCJMMyVDyQhfA","reason":{"type":"search_parse_exception","reason":"No mapping found for [processName.ascii] in order to sort on"}}]} at ch.ivyteam.ivy.business.data.store.search.internal.elasticsearch.JestOperation.checkStatusAndThrow(JestOperation.java:62) at ch.ivyteam.ivy.business.data.store.search.internal.elasticsearch.JestOperation.execute(JestOperation.java:40) at ch.ivyteam.ivy.business.data.store.search.internal.elasticsearch.JestSearcher.search(JestSearcher.java:32) at ch.ivyteam.ivy.business.data.store.search.internal.ResultImpl.execute(ResultImpl.java:38) at ch.ivyteam.ivy.business.data.store.search.internal.QueryImpl.raw(QueryImpl.java:128) at ch.ivyteam.ivy.business.data.store.search.internal.QueryImpl.executeQuery(QueryImpl.java:174) at ch.ivyteam.ivy.business.data.store.search.internal.QueryImpl.execute(QueryImpl.java:107) at ch.ivyteam.ivy.business.data.store.search.internal.OrderByFieldOrLimitImpl.execute(OrderByFieldOrLimitImpl.java:29) at ch.ivy.addon.portalkit.service.ExpressProcessService.findAllOrderByName(ExpressProcessService.java:11) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at ch.ivyteam.ivy.scripting.internal.types.IvyJavaMethod.invokeImpl(IvyJavaMethod.java:73) ... 280 more </code></pre> <p>It happens on Axon.ivy Engine RC-6.6.2.55064. In designer, sometimes it happens as well. Could you please guide us how to fix the problem?</p>lttungMon, 17 Jul 2017 05:43:16 -0400https://answers.axonivy.com/questions/2763/exception-when-querying-business-data-with-sortingbusiness-dataelasticsearchHow is the handling when loading Business Data in different PMVshttps://answers.axonivy.com/questions/2364/how-is-the-handling-when-loading-business-data-in-different-pmvs<p>In our application, we store sometimes ids of corrsponding business data to the process data of the current running task. This allows us to load the business data fresh from the repository after a task-switch, by the stored id. </p> <p>Question 1: Is a Business Data linked to the ClassLoader of PMV task/case belongs to?</p> <p>Question 1: When we load a Business Data from a Repository directly, in another PMV (then the Business Data was created), how is the handling? Do this leads to deserialization problems, as it happen with process data, because of conflicting Classloaders?</p>SupportIvyTeamTue, 10 Jan 2017 11:17:35 -0500https://answers.axonivy.com/questions/2364/how-is-the-handling-when-loading-business-data-in-different-pmvsbusiness-data