Bonjour Candice, merci pour ton retour
Apres avoir appliquer tes conseils je n’ai plus d’erreur au niveau de mes uses cases :
Lors de l’abandon dans la page d’introduction, on est bien rediriger vers la liste sans erreur, et lors des étapes suivantes on est aussi rediriger avec la suppression de l’objet en cours( via son row_id), voici le code associé à cela :
@Override
public Message preAbandon() {
ActivityFile endAct = getContext(getActivity("CPAE-END"));
if (endAct != null) {
endAct.setDataFile("Forward", "Page", HTMLTool.getListURL("LbcLegalText", null));
AppLog.info(getClass(), "preAbandon", "Redirection vers la liste.", getGrant());
}
return null;
}
@Override
public void postAbandon() {
Activity a = getActivity("CPAE-INTRO");
if (a != null) {
String rowId = getContext(a).getDataValue("Field", "row_id");
AppLog.info(getClass(), "postAbandon", "ID de l'objet récupéré = " + rowId, getGrant());
if (rowId == null || "0".equals(rowId)) {
AppLog.info(getClass(), "postAbandon", "Aucun objet à supprimer car ID = 0", getGrant());
return;
}
ObjectDB o = getGrant().getProcessObject("LbcLegalText");
if (o != null && rowId != null) {
o.delete();
AppLog.info(getClass(), "postAbandon", "Objet supprimé après abandon du processus", getGrant());
}
}
}
Mon dernier soucis est que à la fin de chaque processus, qu’il soit terminer sans abandon ou abandonner à une étape , je me retrouve avec ses erreurs au niveau de mes logs.
Logs
2024-10-16 14:53:58,873|SIMPLICITE|ERROR||http://lbc-77449-app-846c7ffb59-f4g97:8080||ECOREDB001|system|com.simplicite.util.engine.ObjectManager|query||Error SQL query: jdbc/simplicite: select t.row_id, t.acf_activity_id, t_acf_activity_id.acy_process_id, null, t_acy_process_id.pcs_name, t_acf_activity_id.acy_step, t_acf_activity_id.acy_type, t_acf_activity_id.acy_name, t.acf_status, t.acf_plan_dt, t.acf_start_dt, t.acf_deadline_dt, t.acf_end_dt, t.acf_waiting, t.acf_pcf_id, t_acf_pcf_id.pcf_serial, t_acf_pcf_id.pcf_process_id, t_pcf_process_id.pcs_name, t.acf_serial, t_acf_pcf_id.pcf_status, t_acf_pcf_id.pcf_start_dt, t_acf_pcf_id.pcf_deadline_dt, t_acf_pcf_id.pcf_end_dt, t_acf_pcf_id.pcf_object, t.acf_data, t.acf_owner_id, t_acf_owner_id.usr_login, t_acf_owner_id.usr_last_name, t_acf_owner_id.usr_first_name, t_acf_owner_id.usr_email, t_acf_owner_id.usr_work_num, t.created_dt, t.created_by, t.updated_dt, t.updated_by from bpm_activity_file t left outer join bpm_activity t_acf_activity_id on (t.acf_activity_id=t_acf_activity_id.row_id) left outer join bpm_process t_acy_process_id on (t_acf_activity_id.acy_process_id=t_acy_process_id.row_id) left outer join bpm_process_file t_acf_pcf_id on (t.acf_pcf_id=t_acf_pcf_id.row_id) left outer join bpm_process t_pcf_process_id on (t_acf_pcf_id.pcf_process_id=t_pcf_process_id.row_id) left outer join m_user t_acf_owner_id on (t.acf_owner_id=t_acf_owner_id.row_id) where (acf_pcf_id=p124722:6F6D533FCAD0AF91304AFCFE21B3D2D7:CPAE and acf_status in ('R')) order by t_acy_process_id.pcs_name asc,t_acf_pcf_id.pcf_serial asc,t.acf_serial asc, t.row_id asc
org.postgresql.util.PSQLException: ERROR: syntax error at or near ":"
Position: 1265
at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2733)
at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:2420)
at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:372)
at org.postgresql.jdbc.PgStatement.executeInternal(PgStatement.java:517)
at org.postgresql.jdbc.PgStatement.execute(PgStatement.java:434)
at org.postgresql.jdbc.PgPreparedStatement.executeWithFlags(PgPreparedStatement.java:194)
at org.postgresql.jdbc.PgPreparedStatement.executeQuery(PgPreparedStatement.java:137)
at org.apache.tomcat.dbcp.dbcp2.DelegatingPreparedStatement.executeQuery(DelegatingPreparedStatement.java:123)
at org.apache.tomcat.dbcp.dbcp2.DelegatingPreparedStatement.executeQuery(DelegatingPreparedStatement.java:123)
at com.simplicite.util.engine.DBAccess.query(DBAccess.java:672)
at com.simplicite.util.engine.ObjectManager.search(ObjectManager.java:412)
at com.simplicite.util.engine.ObjectManager.search(ObjectManager.java:325)
at com.simplicite.util.engine.ObjectDirect.search(ObjectDirect.java:304)
at com.simplicite.util.ObjectDB.search(ObjectDB.java:932)
at com.simplicite.util.ObjectDB.search(ObjectDB.java:920)
at com.simplicite.util.engine.ProcessManager.terminateInstance(ProcessManager.java:275)
at com.simplicite.util.engine.ProcessManager.terminate(ProcessManager.java:231)
at com.simplicite.bpm.ProcessusDirect.terminate(ProcessusDirect.java:195)
at com.simplicite.bpm.Processus.terminate(Processus.java:169)
at com.simplicite.util.engine.ProcessManager.next(ProcessManager.java:1042)
at com.simplicite.util.engine.ProcessManager.validate(ProcessManager.java:476)
at com.simplicite.util.engine.ProcessManager.next(ProcessManager.java:1253)
at com.simplicite.util.engine.ProcessManager.validate(ProcessManager.java:476)
at com.simplicite.bpm.ProcessusDirect.validate(ProcessusDirect.java:277)
at com.simplicite.bpm.Processus.validate(Processus.java:299)
at com.simplicite.webapp.ProcessJson.validate(ProcessJson.java:390)
at com.simplicite.webapp.tools.JSONServletTool.businessProcessService(JSONServletTool.java:672)
at com.simplicite.webapp.servlets.AbstractJSONServlet.process(AbstractJSONServlet.java:161)
at com.simplicite.webapp.servlets.AbstractJSONServlet.service(AbstractJSONServlet.java:129)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:623)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:199)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:144)
at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:51)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:168)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:144)
at com.simplicite.webapp.filters.HTTPHeadersFilter.doFilter(HTTPHeadersFilter.java:39)
at com.simplicite.webapp.filters.AbstractFilter.doFilter(AbstractFilter.java:49)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:168)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:144)
at com.simplicite.webapp.filters.AuthMethodFilter.doFilter(AuthMethodFilter.java:222)
at com.simplicite.webapp.filters.AbstractFilter.doFilter(AbstractFilter.java:49)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:168)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:144)
at com.simplicite.webapp.filters.RewriteFilter.doFilter(RewriteFilter.java:68)
at com.simplicite.webapp.filters.AbstractFilter.doFilter(AbstractFilter.java:49)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:168)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:144)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:156)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:90)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:482)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:130)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:93)
at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:660)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:74)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:346)
at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:383)
at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:63)
at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:936)
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1791)
at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:52)
at org.apache.tomcat.util.threads.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1190)
at org.apache.tomcat.util.threads.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:659)
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:63)
at java.base/java.lang.Thread.run(Thread.java:1583)
2024-10-16 14:53:58,870|SIMPLICITE|ERROR||http://lbc-77449-app-846c7ffb59-f4g97:8080||ECOREDB001|system|com.simplicite.util.engine.ObjectManager|query||Error SQL query: jdbc/simplicite: select t.row_id, t.acf_activity_id, t_acf_activity_id.acy_process_id, null, t_acy_process_id.pcs_name, t_acf_activity_id.acy_step, t_acf_activity_id.acy_type, t_acf_activity_id.acy_name, t.acf_status, t.acf_plan_dt, t.acf_start_dt, t.acf_deadline_dt, t.acf_end_dt, t.acf_waiting, t.acf_pcf_id, t_acf_pcf_id.pcf_serial, t_acf_pcf_id.pcf_process_id, t_pcf_process_id.pcs_name, t.acf_serial, t_acf_pcf_id.pcf_status, t_acf_pcf_id.pcf_start_dt, t_acf_pcf_id.pcf_deadline_dt, t_acf_pcf_id.pcf_end_dt, t_acf_pcf_id.pcf_object, t.acf_data, t.acf_owner_id, t_acf_owner_id.usr_login, t_acf_owner_id.usr_last_name, t_acf_owner_id.usr_first_name, t_acf_owner_id.usr_email, t_acf_owner_id.usr_work_num, t.created_dt, t.created_by, t.updated_dt, t.updated_by from bpm_activity_file t left outer join bpm_activity t_acf_activity_id on (t.acf_activity_id=t_acf_activity_id.row_id) left outer join bpm_process t_acy_process_id on (t_acf_activity_id.acy_process_id=t_acy_process_id.row_id) left outer join bpm_process_file t_acf_pcf_id on (t.acf_pcf_id=t_acf_pcf_id.row_id) left outer join bpm_process t_pcf_process_id on (t_acf_pcf_id.pcf_process_id=t_pcf_process_id.row_id) left outer join m_user t_acf_owner_id on (t.acf_owner_id=t_acf_owner_id.row_id) where (acf_pcf_id=p124722:6F6D533FCAD0AF91304AFCFE21B3D2D7:CPAE and acf_status in ('P','W')) order by t_acy_process_id.pcs_name asc,t_acf_pcf_id.pcf_serial asc,t.acf_serial asc, t.row_id asc
org.postgresql.util.PSQLException: ERROR: syntax error at or near ":"
Position: 1265
at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2733)
at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:2420)
at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:372)
at org.postgresql.jdbc.PgStatement.executeInternal(PgStatement.java:517)
at org.postgresql.jdbc.PgStatement.execute(PgStatement.java:434)
at org.postgresql.jdbc.PgPreparedStatement.executeWithFlags(PgPreparedStatement.java:194)
at org.postgresql.jdbc.PgPreparedStatement.executeQuery(PgPreparedStatement.java:137)
at org.apache.tomcat.dbcp.dbcp2.DelegatingPreparedStatement.executeQuery(DelegatingPreparedStatement.java:123)
at org.apache.tomcat.dbcp.dbcp2.DelegatingPreparedStatement.executeQuery(DelegatingPreparedStatement.java:123)
at com.simplicite.util.engine.DBAccess.query(DBAccess.java:672)
at com.simplicite.util.engine.ObjectManager.search(ObjectManager.java:412)
at com.simplicite.util.engine.ObjectManager.search(ObjectManager.java:325)
at com.simplicite.util.engine.ObjectDirect.search(ObjectDirect.java:304)
at com.simplicite.util.ObjectDB.search(ObjectDB.java:932)
at com.simplicite.util.ObjectDB.search(ObjectDB.java:920)
at com.simplicite.util.engine.ProcessManager.terminateInstance(ProcessManager.java:268)
at com.simplicite.util.engine.ProcessManager.terminate(ProcessManager.java:231)
at com.simplicite.bpm.ProcessusDirect.terminate(ProcessusDirect.java:195)
at com.simplicite.bpm.Processus.terminate(Processus.java:169)
at com.simplicite.util.engine.ProcessManager.next(ProcessManager.java:1042)
at com.simplicite.util.engine.ProcessManager.validate(ProcessManager.java:476)
at com.simplicite.util.engine.ProcessManager.next(ProcessManager.java:1253)
at com.simplicite.util.engine.ProcessManager.validate(ProcessManager.java:476)
at com.simplicite.bpm.ProcessusDirect.validate(ProcessusDirect.java:277)
at com.simplicite.bpm.Processus.validate(Processus.java:299)
at com.simplicite.webapp.ProcessJson.validate(ProcessJson.java:390)
at com.simplicite.webapp.tools.JSONServletTool.businessProcessService(JSONServletTool.java:672)
at com.simplicite.webapp.servlets.AbstractJSONServlet.process(AbstractJSONServlet.java:161)
at com.simplicite.webapp.servlets.AbstractJSONServlet.service(AbstractJSONServlet.java:129)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:623)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:199)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:144)
at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:51)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:168)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:144)
at com.simplicite.webapp.filters.HTTPHeadersFilter.doFilter(HTTPHeadersFilter.java:39)
at com.simplicite.webapp.filters.AbstractFilter.doFilter(AbstractFilter.java:49)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:168)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:144)
at com.simplicite.webapp.filters.AuthMethodFilter.doFilter(AuthMethodFilter.java:222)
at com.simplicite.webapp.filters.AbstractFilter.doFilter(AbstractFilter.java:49)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:168)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:144)
at com.simplicite.webapp.filters.RewriteFilter.doFilter(RewriteFilter.java:68)
at com.simplicite.webapp.filters.AbstractFilter.doFilter(AbstractFilter.java:49)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:168)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:144)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:156)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:90)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:482)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:130)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:93)
at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:660)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:74)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:346)
at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:383)
at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:63)
at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:936)
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1791)
at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:52)
at org.apache.tomcat.util.threads.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1190)
at org.apache.tomcat.util.threads.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:659)
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:63)
at java.base/java.lang.Thread.run(Thread.java:1583)