cancel
Showing results for 
Search instead for 
Did you mean: 

How to get the table fields?

vamsinipun
Star Contributor
Star Contributor

Hi,

I am using activiti in my spring web application. I was created one listener with implements of TaskListener like as below.

public class MyEventListener implements TaskListener {

      public void notify(DelegateTask delegateTask) {

      List list =         delegateTask.getExecution().getEngineServices().getRuntimeService().createNativeExecutionQuery().sql("select * from act_custom_process").list();
      for (Object object : list) {
          System.out.println("object: "+object);
      }
}

}

}

Here i would like to execute sql query. Now, how can i get the database table fields.

Thanks

1 REPLY 1

daisuke-yoshimo
Star Collaborator
Star Collaborator

If you are writing in Java, you can realize it in your preferred way without using Activiti's features in particular.

However, if you want to do with the function of Activiti, I think that the following will be helpful.

http://www.jorambarrez.be/blog/2014/01/17/execute-custom-sql-in-activiti/