For example if you have declared a process or step contract that is expecting an integer and that is named buttonIndex you just need to configure your button “Data sent on click” to be: {"buttonIndex": $index} that should do the trick.
Bonitasoft empowers development teams with Bonita, the open-source and extensible platform to solve the most demanding process automation use cases. The Bonita platform accelerates delivery of complex applications with clear separation between capabilities for visual programming and for coding. Bonita integrates with existing solutions, orchestrates heterogeneous systems, and provides deep visibility into processes across the organization.