Hi,
I have a process and in it one of the step is to read the BDM Contract’s values to a file and store that.
So far I have managed to get everything related to creating, writing and saving to the file to work.
However, cant get data from the contract to a variable.
As example, I have a BDM ClaimApproval in the process and it has data so all that is fine.The ClaimApproval only has one record. Further the ClaimApproval has an attribute named ClaimRef which contains data “REF123”
How can I read the value of the ClaimRef into a variable? As I’m new to Groovy (Java) an example code would be great.
Have tried working with the ClaimApprovalDAO but without success.
Using CE 7.2.3
ktp
As an example, if I understand right, the “countForFind” function would return the number or records in a BDM. So I tried this but with out any success. I’m most likely missing something here but what…?
import com.company.model.ClaimApproval
import com.company.model.ClaimApprovalDAO
Long i
i = ClaimApprovalDAO.countForFind()
ok, changing line 6 above to start with lower case letter made things better as now I can see in the autoscript the functions that the DAO has.
i = claimApprovalDAO.countForFind()
If I only could now tell that there is data - I’m guessing that I’m missing something that would link (initialize) the claimApprovalDAO to the business variable/contract (BDM)
I think this is the way to do it - the claimApproval is available from the groovy editor under parameters.
String s
ClaimApproval x = new ClaimApproval()
x = claimApproval
s = x.getClaimRef()