how to get drop down data from database in alfresco workflow

cancel
Showing results for 
Search instead for 
Did you mean: 
kranthi
Active Member II

how to get drop down data from database in alfresco workflow

how to get drop down data from database in alfresco workflow starting page.Like city name,country name anyone having idea how we will do in alfresco.

7 Replies
rohit9637
Established Member

Re: how to get drop down data from database in alfresco workflow

Are you talking about list constraint for your property of your workflow model? If not than please elaborate your question.

kranthi
Active Member II

Re: how to get drop down data from database in alfresco workflow

For the list constraint property in workflow model

rohit9637
Established Member

Re: how to get drop down data from database in alfresco workflow

Okay so you want the list constraint on your starting workflow page. Refer the tutorial of Jeff Potts on following link:

https://ecmarchitect.com/alfresco-developer-series-tutorials/workflow/tutorial/tutorial.html#step-1-...

And configure your workflow model to list constraint to your property. 

kranthi
Active Member II

Re: how to get drop down data from database in alfresco workflow

need to get those properties values from database to show in drop down.

rohit9637
Established Member

Re: how to get drop down data from database in alfresco workflow

jpotts
Professional

Re: how to get drop down data from database in alfresco workflow

I am reluctant to populate list constraints in the data model from a database because if/when those records change, you will see constraint violations in your repository. However, if you want to do that, you can just write a custom list constraint class.

If the intent is that you want to have a dropdown that is populated from a database call, there are multiple ways to do that without requiring a custom list constraint.

For example, you could:

1. Write a custom form control and have the form control use an AJAX call to call an external (non-alfresco) service. The service will return the list of items for the dropdown. Where that service gets the list is up to you--it could be a database query.

OR

2. Write a custom form control that makes an AJAX call to a web script. That web script can query the database or some other external service for the dropdown items.

Either of these is probably better than writing a custom list constraint that makes a database call.

douglascrp
Advanced II

Re: how to get drop down data from database in alfresco workflow

The following project can provide some good ideas, not using database as a source though:

GitHub - ITDSystems/alvex-masterdata