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:
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