Problema con flujo, sus actividades se autorizan pero el estado del flujo es anulado.

El flujo no finalizó a pesar que aparece como autorizada todas sus actividades. Pero en lugar de finalizar, lo anuló. Adicionalmente no se creó el proceso de dicha hora extra. Version Evolution actual: 1.11.0.3

asked 24 Jan '18, 15:16

Sandy's gravatar image

Sandy
(suspended)
accept rate: 16%


¿Qué versión de Evolution es?

De todas formas debería revisar las bitácoras del workflow y del AppJob para tratar de identificar algún problema.

La anulación del flujo solamente se puede dar manualmente, por un administrador del portal autorizado, el código fuente en ningún momento anula el flujo.

Lo que si hace el código fuente es que en casos de que suceda algún error en alguna actividad, marca dicha actividad y el resto que existieran como anuladas y actualiza el estado de flujo a error. Es decir, marca las actividades y no el flujo como anuladas.

link

answered 25 Jan '18, 09:49

Fernando%20Paz's gravatar image

Fernando Paz ♦♦
17.3k81635
accept rate: 51%

En el momento que ocurrió el problema poseían la versión 1.11.0.2 actualmente ya poseen la versión 1.11.0.4

En el link siguiente envío la información detallada. Gracias

Información de flujo

(25 Jan '18, 10:42) Sandy Sandy's gravatar image

En el siguiente link se encontrará los log del dia de la autorización de los flujos.

Adicionalmente no existe ningún registro en la tabla pro_procesos sobre la entidad del flujo.

Gracias

Informacion de log

(25 Jan '18, 16:30) Sandy Sandy's gravatar image

En el mismo log del Workflow se ven excepciones como esta: System.InvalidOperationException: Collection was modified; enumeration operation may not execute

El hotfix 1.11.0.4 tiene modificaciones en el código para mitigar esta excepción. Por lo que en los logs luego de la actualización, ya no deberían de existir o deberían ser muy pocas.

(25 Jan '18, 18:57) Fernando Paz ♦♦ Fernando%20Paz's gravatar image

Al revisar los logs, se ve que la entidad no finalizo, porque el workflow dió un error que se grabó en la bitácora, al momento de terminar la instancia y antes de enviarla a finalización. Por eso es que no generó un registro en la tabla de procesos.

La excepción que se registró es un error de Timeout generado por SQL Server

System.Data.SqlClient.SqlException: Timeout expired.  The timeout period elapsed prior to completion of the operation or the server is not responding

Este error sucede cuando SQL Server no le responde a la aplicación en el tiempo pactado. Puede tener infinidad de causas, desde un problema de Deadlock hasta que el servidor estaba muy cargado de operaciones y no respondió en el tiempo que Evolution lo espera.

Se puede ampliar el tiempo de timetout, modificando los parámetros que existen a nivel de web.config del sitio del Workflow (en este caso fué el workflow el que mostró el error). Recuerde que no es que el proceso esté mal, sino que se superó el tiempo de espera por defecto configurado.

El mensaje completo del error es:

2017-12-15 11:25:09,283 [49] INFO  Aseinfo.VH4.WorkflowServices.Services.AuthorizationWorkflowService - TerminarInstancia: 7b002435-54d1-432b-96f8-6c926143fc30 
Exception:Aseinfo.Infrastructure.Base.Exceptions.AuthorizationWorkflowException: Sucedio un error en el flujo. Se está logueando el exception interno y luego se logueará el que terminará la instancia ---> System.Data.Entity.Core.UpdateException: An error occurred while updating the entries. See the inner exception for details. ---> System.Data.SqlClient.SqlException: Timeout expired.  The timeout period elapsed prior to completion of the operation or the server is not responding. ---> System.ComponentModel.Win32Exception: The wait operation timed out
   --- End of inner exception stack trace ---
   at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)
   at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose)
   at System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady)
   at System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString)
   at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async, Int32 timeout, Task& task, Boolean asyncWrite, SqlDataReader ds, Boolean describeParameterEncryptionRequest)
   at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, TaskCompletionSource`1 completion, Int32 timeout, Task& task, Boolean asyncWrite)
   at System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(TaskCompletionSource`1 completion, String methodName, Boolean sendToPipe, Int32 timeout, Boolean asyncWrite)
   at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
   at System.Data.Entity.Infrastructure.Interception.InternalDispatcher`1.Dispatch[TTarget,TInterceptionContext,TResult](TTarget target, Func`3 operation, TInterceptionContext interceptionContext, Action`3 executing, Action`3 executed)
   at System.Data.Entity.Infrastructure.Interception.DbCommandDispatcher.NonQuery(DbCommand command, DbCommandInterceptionContext interceptionContext)
   at System.Data.Entity.Core.Mapping.Update.Internal.DynamicUpdateCommand.Execute(Dictionary`2 identifierValues, List`1 generatedValues)
   at System.Data.Entity.Core.Mapping.Update.Internal.UpdateTranslator.Update()
   --- End of inner exception stack trace ---
   at System.Data.Entity.Core.Mapping.Update.Internal.UpdateTranslator.Update()
   at System.Data.Entity.Core.Objects.ObjectContext.ExecuteInTransaction[T](Func`1 func, IDbExecutionStrategy executionStrategy, Boolean startLocalTransaction, Boolean releaseConnectionOnSuccess)
   at System.Data.Entity.Core.Objects.ObjectContext.SaveChangesToStore(SaveOptions options, IDbExecutionStrategy executionStrategy, Boolean startLocalTransaction)
   at System.Data.Entity.SqlServer.DefaultSqlExecutionStrategy.Execute[TResult](Func`1 operation)
   at System.Data.Entity.Core.Objects.ObjectContext.SaveChangesInternal(SaveOptions options, Boolean executeInExistingTransaction)
   at Aseinfo.VH4.Data.AppDataContext.SaveChanges(SaveOptions options) in C:\vh4\VH4\Data\AppDataContext.cs:line 98
   at Aseinfo.Infrastructure.Base.Entity.EntityServiceBase`2.SaveChanges() in C:\vh4\Infrastructure\Base\Entity\EntityServiceBase.cs:line 563
   at Aseinfo.VH4.WorkflowServices.Services.AuthorizationWorkflowService.AutorizaInstancia(String codigoInstancia, Nullable`1 codigoExpedienteUsuario, String username) in C:\vh4\VH4\WorkflowServices\WorkflowServices\Services\AuthorizationWorkflowService.cs:line 639
   at Aseinfo.VH4.WorkflowServices.Services.AuthorizationWorkflowService.FinalizaInstanciaRutaAutorizacion(Guid codigoInstancia, EstadoActividadInstancia estadoFinalizacion, Nullable`1 codigoExpedienteUsuario, String username, String entityServiceTypeName, String comentarioUsuario) in C:\vh4\VH4\WorkflowServices\WorkflowServices\Services\AuthorizationWorkflowService.cs:line 191
   at Aseinfo.VH4.WorkflowServices.Services.AuthorizationWorkflowStaticService.FinalizaInstanciaRutaAutorizacion(Guid codigoInstancia, EstadoActividadInstancia estadoFinalizacion, Int32 codigoExpedienteUsuario, String username, String entityServiceTypeName, String comentarioUsuario, WorkflowContext context) in C:\vh4\VH4\WorkflowServices\WorkflowServices\Services\AuthorizationWorkflowStaticService.cs:line 234
   --- End of inner exception stack trace ---
   at System.Activities.Statements.MethodExecutor.InvokeAndUnwrapExceptions(Func`3 func, Object targetInstance, Object[] actualParameters)
   at System.Activities.Statements.MethodResolver.SyncMethodExecutor.BeginMakeMethodCall(AsyncCodeActivityContext context, Object target, AsyncCallback callback, Object state)
   at System.Activities.Statements.MethodExecutor.BeginExecuteMethod(AsyncCodeActivityContext context, AsyncCallback callback, Object state)
   at System.Activities.AsyncCodeActivity.InternalExecute(ActivityInstance instance, ActivityExecutor executor, BookmarkManager bookmarkManager)
   at System.Activities.Runtime.ActivityExecutor.ExecuteActivityWorkItem.ExecuteBody(ActivityExecutor executor, BookmarkManager bookmarkManager, Location resultLocation)
link

answered 25 Jan '18, 18:54

Fernando%20Paz's gravatar image

Fernando Paz ♦♦
17.3k81635
accept rate: 51%

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Evolution en BitBucket

En este sitio puede acceder al código fuente, centro de descargas y reportar bugs, propuestas y mejoras para Evolution.

Evolution en JIRA

En este sitio puedes sugerir nueva funcionalidad para Evolution, o puedes votar por la funcionalidad ya propuesta por otros usuarios.

Tags:

×92

Asked: 24 Jan '18, 15:16

Seen: 585 times

Last updated: 25 Jan '18, 18:57

[Acerca de] [Preguntas Frecuentes] [Privacidad] [Soporte] [Contacto]
Copyright 2013-2018. Asesores en Informática