{"id":16380,"date":"2024-01-09T09:50:06","date_gmt":"2024-01-09T15:50:06","guid":{"rendered":"https:\/\/sada.services\/?p=16380"},"modified":"2024-01-09T11:35:14","modified_gmt":"2024-01-09T17:35:14","slug":"sigesa-documento-referenciado-agd","status":"publish","type":"post","link":"https:\/\/sada.services\/?p=16380","title":{"rendered":"SIGESA: Documento referenciado AGD"},"content":{"rendered":"\n<ul class=\"wp-block-list\">\n<li>Para agregar la solicitud de un documento referenciado de AGD para un estado del flujo<\/li>\n\n\n\n<li>Debemos sobre escribir el m\u00e9todo actualizarEstado dentro del Bean<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">PlanAporteEstrategicoBean.java<\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Agregamos imports<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-code\"><code>import cr.ac.una.cgi.sdkuna.view.controller.AdjuntoController;\nimport cr.ac.una.cgi.sdkuna.view.controller.MessagesController;<\/code><\/pre>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Agregamos autowired<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-code\"><code>@Autowired\nAdjuntoController adjuntoController;<\/code><\/pre>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Luego vamos a crear la sobreescritura de la actualizaEstado<\/li>\n\n\n\n<li>Y vamos a ver que hay dos formas de comprobar si existen documentos<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-code\"><code>if (adjuntoController.getAllDocumentoAGDs(entity).isEmpty()) {\n                    \/\/eliminaMessageModificado();\n                    this.errorMessage(\"evaluacionOperativa_falta_adjunto_error\");\n                    throw new ValidatorException(new FacesMessage(FacesMessage.SEVERITY_ERROR, \"evaluacionOperativa_falta_adjunto_error_summary\", \"evaluacionOperativa_falta_adjunto_error_detail\"));\n                }<\/code><\/pre>\n\n\n\n<ul class=\"wp-block-list\">\n<li>O esta<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-code\"><code>if (!adjuntoController.hasDocumentoAGD(entity)) {\n                    this.errorMessage(\"planOperativo_falta_adjunto_error\");\n                    throw new ValidatorException(new FacesMessage(FacesMessage.SEVERITY_ERROR, \"planOperativo_error_flujo_aprobacion_summary\", \"planOperativo_error_flujo_aprobacion_detail\"));\n                }<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>PlanAporteEstrategicoBean.java<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[443],"tags":[602,603,599,444],"class_list":["post-16380","post","type-post","status-publish","format-standard","hentry","category-sigesa","tag-agd","tag-documento-referenciado","tag-flujo","tag-sigesa"],"blocksy_meta":[],"_links":{"self":[{"href":"https:\/\/sada.services\/index.php?rest_route=\/wp\/v2\/posts\/16380","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/sada.services\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/sada.services\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/sada.services\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/sada.services\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=16380"}],"version-history":[{"count":4,"href":"https:\/\/sada.services\/index.php?rest_route=\/wp\/v2\/posts\/16380\/revisions"}],"predecessor-version":[{"id":16384,"href":"https:\/\/sada.services\/index.php?rest_route=\/wp\/v2\/posts\/16380\/revisions\/16384"}],"wp:attachment":[{"href":"https:\/\/sada.services\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=16380"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/sada.services\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=16380"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/sada.services\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=16380"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}