Storing Variables to a different database

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-08-2022 08:52 AM
Hi
I am new to Alfresco and i need to know how to store the variables (as in ACT_HI_VARINST) to a different database in real time scenario.
Kindly help me in this
Regards,
Guru
Labels:
- Labels:
-
Alfresco Process Services
1 REPLY 1
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-15-2022 08:45 AM
I think that you can implement this behavior in different ways in APS:
- Adding a custom REST Task for callling an external service via REST: https://docs.alfresco.com/process-services/latest/using/process/bpmn/#rest-call-task. Your external service will be called with a POST call and a JSON body in the request where your service will get values to store on a different data source (MongoDB, other DBMS, file system and so on)
- Using Custom Data Models: https://docs.alfresco.com/process-services/1.9/develop/dev-ext/#custom-data-models
- Implementing your own Service Task as a Java Delegate with your own DAO classes, and here I suggest to use the Spring Framework using Spring Data or Spring JdbcTemplate: https://docs.alfresco.com/process-services/latest/develop/dev-ext/#custom-logic
- Implementing a Task Execution Listener attached to the end event for example with a similar implementation of the Service Task
- Remember that, if you are using a recent version, you can disable the persistence of some variables in the Activiti database: https://docs.alfresco.com/process-services/latest/using/process/persistence/
Hope this helps
