Request description
Bonjour,
Je cherche à déposer via une action plusieurs documents via un champ DocumentSet
multi-doc (attribut d’action) et de les répartir dans des enregistrements distincts d’un autre objet Content
, où chaque enregistrement contiendra un attribut document unique.
Je rencontre des difficultés à mettre cela en œuvre,avec la doc j’ai réussi à faire le cas nominal d’un docSimple vers un objet avec attribut document simple
mais le cas avec un attribut d’action multi-document vers un attribut document simple est compliqué . Pourriez-vous m’indiquer la meilleure façon de procéder pour atteindre cet objectif ?
J’ai essayé de voir au niveau des logs ce que getDocuments() me recupere, il me recupere bien les 2 documents mais sans ID ainsi que 4 autre documents non selectionner avec leurs ID, je dois donc mal utiliser cette méthode
Y-a-il une autre méthode ou un code générique pour ce cas générale.
Merci d’avance pour votre aide sur ce point.
Cordialement,
Steps to reproduce
This request concerns an up-to-date Simplicité instance
and these are the steps to reproduce it:
1.Code action java
public String addDocumentWithLanguage(Action action) {
String lang = getGrant().getLang();
ObjectField multiDocField = action.getConfirmField(lang, "DocumentSetContent");
AppLog.info(getClass(), "addDocumentWithLanguage", "multiDocField: " + multiDocField , getGrant());
DocumentDB multiDocs = multiDocField.getDocument(); //BON
List<DocumentDB> docs = multiDocs != null ? multiDocs.getDocuments() : null;
AppLog.info(getClass(), "addDocumentWithLanguage", "Nombre de documents récupérés: " + (docs != null ? docs.size() : 0), getGrant());
if (docs != null) {
for (DocumentDB doc : docs) {
AppLog.info(getClass(), "addDocumentWithLanguage", "Document path: " + doc.getPath(), getGrant());
AppLog.info(getClass(), "addDocumentWithLanguage", "Document rowId: " + doc.getId(), getGrant());
}
}
return null;
}
2.Log associé dans technical information
Technical information
Instance /health
[Platform]
Status=OK
Version=6.1.2
BuiltOn=2024-08-05 20:47
Git=6.1/467048f75ed27520b8cf7eca0ba57eeb2e0e1a0f
Encoding=UTF-8
EndpointIP=100.88.207.56
EndpointURL=http://lbc-77449-app-f4787f7fc-p9r27:8080
TimeZone=Europe/Paris
SystemDate=2024-08-27 17:42:20```
Simplicité logs
2024-08-27 17:35:38,208|SIMPLICITE|INFO||http://lbc-77449-app-f4787f7fc-p9r27:8080||INFO|p124722|com.simplicite.objects.RenaultLBC.LbcLegalText|addDocumentWithLanguage||Evénement: Document rowId: 0
2024-08-27 17:35:38,208|SIMPLICITE|INFO||http://lbc-77449-app-f4787f7fc-p9r27:8080||INFO|p124722|com.simplicite.objects.RenaultLBC.LbcLegalText|addDocumentWithLanguage||Evénement: Document path: DOC-MULTI-2.rtf
2024-08-27 17:35:38,208|SIMPLICITE|INFO||http://lbc-77449-app-f4787f7fc-p9r27:8080||INFO|p124722|com.simplicite.objects.RenaultLBC.LbcLegalText|addDocumentWithLanguage||Evénement: Document rowId: 0
2024-08-27 17:35:38,208|SIMPLICITE|INFO||http://lbc-77449-app-f4787f7fc-p9r27:8080||INFO|p124722|com.simplicite.objects.RenaultLBC.LbcLegalText|addDocumentWithLanguage||Evénement: Document path: DOC-MULTI1.rtf
2024-08-27 17:35:38,208|SIMPLICITE|INFO||http://lbc-77449-app-f4787f7fc-p9r27:8080||INFO|p124722|com.simplicite.objects.RenaultLBC.LbcLegalText|addDocumentWithLanguage||Evénement: Document rowId: 18835
2024-08-27 17:35:38,208|SIMPLICITE|INFO||http://lbc-77449-app-f4787f7fc-p9r27:8080||INFO|p124722|com.simplicite.objects.RenaultLBC.LbcLegalText|addDocumentWithLanguage||Evénement: Document path: LbcLegalText/DocumentSetContent/0/50/CGU_ID_Connect_FR.rtf
2024-08-27 17:35:38,208|SIMPLICITE|INFO||http://lbc-77449-app-f4787f7fc-p9r27:8080||INFO|p124722|com.simplicite.objects.RenaultLBC.LbcLegalText|addDocumentWithLanguage||Evénement: Document rowId: 18858
2024-08-27 17:35:38,208|SIMPLICITE|INFO||http://lbc-77449-app-f4787f7fc-p9r27:8080||INFO|p124722|com.simplicite.objects.RenaultLBC.LbcLegalText|addDocumentWithLanguage||Evénement: Document path: LbcLegalText/DocumentSetContent/0/50/CGU_ID_Connect_FR.rtf
2024-08-27 17:35:38,208|SIMPLICITE|INFO||http://lbc-77449-app-f4787f7fc-p9r27:8080||INFO|p124722|com.simplicite.objects.RenaultLBC.LbcLegalText|addDocumentWithLanguage||Evénement: Document rowId: 19054
2024-08-27 17:35:38,208|SIMPLICITE|INFO||http://lbc-77449-app-f4787f7fc-p9r27:8080||INFO|p124722|com.simplicite.objects.RenaultLBC.LbcLegalText|addDocumentWithLanguage||Evénement: Document path: LbcLegalText/DocumentSetContent/0/50/LEBONN.rtf
2024-08-27 17:35:38,208|SIMPLICITE|INFO||http://lbc-77449-app-f4787f7fc-p9r27:8080||INFO|p124722|com.simplicite.objects.RenaultLBC.LbcLegalText|addDocumentWithLanguage||Evénement: Document rowId: 19106
2024-08-27 17:35:38,208|SIMPLICITE|INFO||http://lbc-77449-app-f4787f7fc-p9r27:8080||INFO|p124722|com.simplicite.objects.RenaultLBC.LbcLegalText|addDocumentWithLanguage||Evénement: Document path: LbcLegalText/DocumentSetContent/0/50/LEBONN.rtf
2024-08-27 17:35:38,208|SIMPLICITE|INFO||http://lbc-77449-app-f4787f7fc-p9r27:8080||INFO|p124722|com.simplicite.objects.RenaultLBC.LbcLegalText|addDocumentWithLanguage||Evénement: Nombre de documents récupérés: 6
2024-08-27 17:35:38,206|SIMPLICITE|INFO||http://lbc-77449-app-f4787f7fc-p9r27:8080||INFO|p124722|com.simplicite.objects.RenaultLBC.LbcLegalText|addDocumentWithLanguage||Evénement: multiDocField: {"precision":0,"rendering":"MBOX","label":"Document","type":17,"fullinput":"DocumentSetContent","filter":"%","input":"DocumentSetContent","default":"","size":11,"name":"DocumentSetContent","id":"8925","value":"","oldvalue":""}```
Browser logs
---paste content of the **relevant** browser-side logs---
Other relevant information
----E.g. type of deployment, browser vendor and version, etc.----