JSON Data into a Table in embedded Taskform

Hi, first of all, I’m not a Web Guy.
I’ve tried to add a table in an embedded Taskform.

The variable that contains the serialized data is named ops.

The content looks like this:

The Process is this:
image

The htmlcode for the Page is simple:

The Delegate Code to fetch the Data:
public class DataProducer implements JavaDelegate {
@Autowired
OPRepository opr;
private static final Logger log = LoggerFactory.getLogger(DataProducer.class);

@Override
public void execute(DelegateExecution delegateExecution) throws Exception {

    ArrayList<OP> myops = new ArrayList<>();

    opr.findAllOP().forEach((temp)->{
        myops.add(temp);
    });
   List<OP> fulllist = opr.findAllOP();
  // ObjectValue lisPersonSerialized = Variables.objectValue(myops).serializationDataFormat(Variables.SerializationDataFormats.JSON).create();

   ObjectValue lisPersonSerialized = Variables.objectValue(fulllist).serializationDataFormat(Variables.SerializationDataFormats.JSON).create();
    delegateExecution.setVariable("ops", lisPersonSerialized);
}

}

However, I’ll end up with an empty table with only 1 empty row (by adding an Index).

What am I doing wrong here ?

Regards
Eric

In the delegate class, you forgot to add Spring annotation. As of this code, unable to look Springboot repository.

Add @Component annotation for the DataProducer.

Hope this helps.

Hi,
thanks for your remark. DataProducer is working fine. In the Debugger in the Webbrowser, I can see the Data from the Database.
I think, I’ve a problem on the Java Script side.
Cheers
Eric