Alfresco DB I have created one column called tid
whenever user create workflow the tid
generate one key , I want get tid
from DB using activitiIntance id ,Is this possible ? Please help out with reference

- 141
- 1
- 11
2 Answers
You should never use the database directly using repositories. Any repository allows you to work using APIs at a application level without considering the specific DBMS behind Alfresco or Activiti.
I suggest you to follow a different approach using Alfresco and Activiti APIs.
Hope this helps.

- 356
- 1
- 9
It might help you to break the problem down into smaller chunks. For example...
First, create a separate database for this. You never want to touch the Alfresco database or tables.
Next, write a standalone Java class that can connect to the database and perform CRUD functions against entries in that database. As you suggest, you could use the activiti process ID as a primary key if you want, but for now you'll use a fake value. This step is not Alfresco or Activiti related at all so there should be plenty of resources online to help you with this part.
Once you are satisfied that is working, move your code into an Activiti task listener that does what you need it to do in the context of your business process. If your code worked without Alfresco and Activiti it should still work, only now you are hooking it up to your process by grabbing the real process ID.
In your other post I gave you a link to a workflow tutorial that explains how to write a custom task listener.

- 1
- 1

- 10,468
- 17
- 40