AnsweredAssumed Answered

Passing collection of variable number of input parameters to activity JavaDelegate

Question asked by chetan5p on Sep 30, 2014
I am working on developing custom tasks which can be used by workflow developers to build/customize the workflows onsite.
One of my requirement is to have a task “DBSelect” which should be generic enough to take two input parameters “query SQL” and “List/Array of query parameters”. The query SQL can have N number of parameters with different datatypes  (e.g. select x from tabA where col1= ? and col2 < ?) so I cannot define static input parameters (fixed number of input parameters) for the task. I need a way to pass some sort of collection having query parameters. I looked at PropertyType. There are basic data types supported but there is no type which will allow to pass a collection. (PropertyType.DATA_GRID also seems not supported in latest version).
I have looked at the forum discussion and understand that passing a JSON string as parameterMap could be an alternative but with this solution I cannot provide input fields based on field data type e.g. date picker, boolean etc. in the activity designer.

Can someone please guide me in understanding how to achieve this functionality in Activiti or suggest any alternative to accomplish same?

Thanks in advance.