I tell you I'm really null in java. In accordance with your recommendations, here is my configuration which does not work. Really, I don't know how to solve my problem.
Code: Select allpackage com.openkm.workflow.ged;
import org.jbpm.graph.def.ActionHandler;
import org.jbpm.graph.exe.ExecutionContext;
import java.util.Calendar;
import java.util.HashMap;
import java.util.Map;
import com.openkm.api.OKMPropertyGroup;
import com.openkm.util.ISO8601;
public class metadonneesinsert implements ActionHandler {
/**
*
*/
private static final long serialVersionUID = 1L;
public static void main(String[] args) {
try {
Map<String, String> properties = new HashMap<>();
properties.put("okp:BonCommande.direction", "new direction");
properties.put("okp:BonCommande.civilite", "new civilite");
properties.put("okp:BonCommande.Ordonnateur", "new Ordonnateur");
properties.put("okp:BonCommande.document", "new document");
properties.put("okp:BonCommande.justificatif", "new justificatif");
properties.put("okp:BonCommande.description", "new description");
properties.put("okp:BonCommande.duree", "new duree");
properties.put("okp:BonCommande.observations", "new observations");
properties.put("okp:BonCommande.avisarchiviste", "new avisarchiviste");
// Date fields must be saved with basic ISO 8601 format
properties.put("okp:BonCommande.date", ISO8601.formatBasic(Calendar.getInstance()));
OKMPropertyGroup.getInstance().setPropertiesSimple(null, "/okm:root/logo.pdf","okg:BonCommande", properties);
} catch (Exception e) {
e.printStackTrace();
}
}
@Override
public void execute(ExecutionContext arg0) throws Exception {
// TODO Auto-generated method stub
}
}