Hi,
I am checking the best recommended way to perform CRUD operations on an external MySQL database from within a process.
I wish to do it by custom code, which is the best recommended approach for Alfresco Activiti 1.5.3v... Please guide.
Regards
If you are using Activiti Enterprise, then I would strongly suggest you look at the new Data Model feature.https://community.alfresco.com/community/bpm/blog/2016/11/17/activiti-enterprise-developer-series-custom-data-models
By defining custom data entity, you can write your own CRUD class by implemening the com.activiti.api.datamodel.AlfrescoCustomDataModelService interface.Hope this helps,
Greg
https://community.alfresco.com/community/bpm/blog/2016/11/17/activiti-enterprise-developer-series-custom-data-models?sr=search&searchId=08211fec-1beb-4214-9fc5-2b5bfc8d5c6f&searchIndex=3 - Just adding the link Greg suggested.
Thank you Greg and Kristen,
I followed the post and was able to recreate the same process on my Alfresco Activiti Enterprise 1.5.3, The activiti based auto CRUD operations on the process for employee table works... data storage and retrieval... but the custom code in the example does no fetch or store data into the salaries table.
I checked the logs and noticed the below info:
08:31:04,056 [http-nio-8080-exec-3] INFO com.activiti.extension.bean.CustomDataModelServiceImpl - getMappedValue() EntityDefinition [Name=Salary][TableName=null][Id=null][Attributes=4] [fieldName=Employee No] [variableValue=100]08:31:04,146 [http-nio-8080-exec-3] INFO com.activiti.extension.bean.CustomDataModelServiceImpl - getMappedValue() EntityDefinition [Name=Salary][TableName=null][Id=null][Attributes=4] [fieldName=Employee No] [variableValue=100]08:31:05,021 [pool-3-thread-2] INFO com.activiti.service.runtime.ActivitiEventProcessingService - Processed 11 events
The tableName and ID is not getting set (is null) onto the entityDefinition variable.... any help???
I havent actually walked through the blog example, but I think I have a working sample that I can re-test.
Let me validate the blog post and get back to you.
Thanks,
I have finally got around to reviewing the custom data model service and it all appears to work as expected.
Perhaps you have missed something in the mapping.
Dear Greg Harley,
I am not using enterprise edition, I am using community edition. Kindly help to achieve data model concepts in community edition.
Thanks
Amruta Wandakar