Alfresco-ephesoft conversion problem

cancel
Showing results for 
Search instead for 
Did you mean: 
tomak
Member II

Alfresco-ephesoft conversion problem

Jump to solution

Hello,

In ephesoft, I have an index field of data type float. I map it to an alfresco property of type d:float.

In ephesoft I manually enter the value 11.11 for the index field but in alfresco it gives me 11.1099995676.

What is the problem?

1 Solution

Accepted Solutions
krutik_jayswal
Senior Member II

Re: Alfresco-ephesoft conversion problem

Jump to solution

Declaring alfresco type as d:double should do the trick.I think Smiley Happy

View solution in original post

4 Replies
krutik_jayswal
Senior Member II

Re: Alfresco-ephesoft conversion problem

Jump to solution

Must say nice catch..Now lets see the problem..

I am not sure which exact file is having the problem.I look at the code on below link.

CMIS example: Uploading multiple files to a CMIS repository | ECM Architect 

and found that alfresco is using similar code like below to import float value in alfresco.

props.put("cmisbook:gpsLatitude", BigDecimal.valueOf(Float.parseFloat(lat)));

Now if you execute below code in normal java file.

String ni="11.11";
System.out.println(BigDecimal.valueOf(Float.parseFloat(ni)));

 

It will give output as 11.109999656677246.

tomak
Member II

Re: Alfresco-ephesoft conversion problem

Jump to solution

What do you advise? I can't find any exact information on the data types in ephesoft. What the 11.11 represents is an amount of money. Maybe another datatype would be more interesting. I suppose that if I use a string datatype in ephesoft, and a string datatype in alfresco, there will be no "conversion". but I suppose I will also loose any possibility of doing calculations in alfresco.

PS: I am a real beginner  I'm a mathematician doing a student job on alfresco and ephesoft and I'm a bit overwhelmed by all the programming aspects

krutik_jayswal
Senior Member II

Re: Alfresco-ephesoft conversion problem

Jump to solution

Declaring alfresco type as d:double should do the trick.I think Smiley Happy

tomak
Member II

Re: Alfresco-ephesoft conversion problem

Jump to solution

I just changed alfresco to double and ephesoft to double and it works Smiley Happy thanks