01-23-2017 11:17 AM
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
01-23-2017 01:58 PM
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-cu...
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
01-23-2017 01:58 PM
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-cu...
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
01-23-2017 08:27 PM
https://community.alfresco.com/community/bpm/blog/2016/11/17/activiti-enterprise-developer-series-cu... - Just adding the link Greg suggested.
01-24-2017 10:06 AM
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.CustomData
ModelServiceImpl - getMappedValue() EntityDefinition [Name=Salary][TableName=nu
ll][Id=null][Attributes=4] [fieldName=Employee No] [variableValue=100]
08:31:04,146 [http-nio-8080-exec-3] INFO com.activiti.extension.bean.CustomData
ModelServiceImpl - getMappedValue() EntityDefinition [Name=Salary][TableName=nu
ll][Id=null][Attributes=4] [fieldName=Employee No] [variableValue=100]
08:31:05,021 [pool-3-thread-2] INFO com.activiti.service.runtime.ActivitiEventP
rocessingService - Processed 11 events
The tableName and ID is not getting set (is null) onto the entityDefinition variable.... any help???
01-24-2017 10:16 AM
03-03-2017 04:12 PM
03-03-2017 04:23 PM
Hi Greg,
Thank you for checking on your end...
When I raised the issue I was not quite sure why the logs showed null values for the TableName under:getMappedValue() EntityDefinition [Name=Salary][TableName=null][Id=null],
Later on, I believed the Custom Implementation needs to specify the TableName and write code for performing CRUD operations.
My mistake, I forgot to update this ticket later on.
Appreciate your help as always!!!
Regards
06-12-2017 02:42 AM
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
Explore our Alfresco products with the links below. Use labels to filter content by product module.