Auditor - Error - ConvertValueToBinary


Author
Message
Rogerio Mauri
Rogerio Mauri
StrataFrame User (303 reputation)StrataFrame User (303 reputation)StrataFrame User (303 reputation)StrataFrame User (303 reputation)StrataFrame User (303 reputation)StrataFrame User (303 reputation)StrataFrame User (303 reputation)StrataFrame User (303 reputation)StrataFrame User (303 reputation)
Group: StrataFrame Users
Posts: 205, Visits: 629
Ivan... Obrigado pela sua atenção, mas, reforçando, o problema não está na classe "Auditor" e poderá, portanto, ter reflexo em outros pontos do SF.

Att

Rogério

Rogério Mauri Smile



Ivan George Borges
Ivan George Borges
Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)
Group: StrataFrame MVPs
Posts: 1.9K, Visits: 21K
Oi Rogério.

Vou passar isto para o pessoal, não sei se estarão dando ênfase ao Auditing neste momento, por isto te sugeri que trabalhasse com a auditoria inserindo código no seu BO base. Neste instante, acredito ser o melhor caminho para todos nós. Eu tenho feito desta maneira. Eles têm feito desta maneira na aplicação médica deles. Mas vou passar adiante o seu post.

Abraços.

Rogerio Mauri
Rogerio Mauri
StrataFrame User (303 reputation)StrataFrame User (303 reputation)StrataFrame User (303 reputation)StrataFrame User (303 reputation)StrataFrame User (303 reputation)StrataFrame User (303 reputation)StrataFrame User (303 reputation)StrataFrame User (303 reputation)StrataFrame User (303 reputation)
Group: StrataFrame Users
Posts: 205, Visits: 629
Ivan... Help me please in the translation.

Econtrei a causa do erro na classe Auditor. Para isso, reconstrui a classe em C# a partir do código fonte que está no projeto "MicroFour.StrataFrame.Base.Security".

Após, identifiquei que o problema, na verdade, está no método "MicroFour.StrataFrame.Data.DataBasics.ConvertTypeToDbType(Type TypeToMap)" da classe "DataBasics" (Namespace Data).

Observe a imagem no link: http://www.licitec.com.br/download/erroSF3.jpg

Passando um "System.Int32" para ConvertTypeToDbType() o retorno está sendo um "AnsiString" e é exatamente isso que provoca o erro no método de conversão de tipos da classe Auditor (método ConverValueToBinary). Ou seja, o problema não é a classe Auditor com erro, mas sim o método de conversão de tipos que está em DataBasics.

Você poderia fazer esses testes?

Aguardo um retorno.

Rogério Mauri Smile



Trent Taylor
Trent Taylor
StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)
Group: StrataFrame Developers
Posts: 6.6K, Visits: 6.9K
Not in a widespread area. The reason we provided this class is so that you, the developer, could customize it to your needs. This control and logic will continue to grow, but for now, Ivan's suggestions are really the best to go with.
Rogerio Mauri
Rogerio Mauri
StrataFrame User (303 reputation)StrataFrame User (303 reputation)StrataFrame User (303 reputation)StrataFrame User (303 reputation)StrataFrame User (303 reputation)StrataFrame User (303 reputation)StrataFrame User (303 reputation)StrataFrame User (303 reputation)StrataFrame User (303 reputation)
Group: StrataFrame Users
Posts: 205, Visits: 629
Hi Trent...

Help me, please.

I would like to use the 'Auditor' without code.

This is possible?

Rogério Mauri Smile



Trent Taylor
Trent Taylor
StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)
Group: StrataFrame Developers
Posts: 6.6K, Visits: 6.9K
We haven't chimed in because we have been watching and Ivan's questions have been very good.  What answer are you looking for here?
Rogerio Mauri
Rogerio Mauri
StrataFrame User (303 reputation)StrataFrame User (303 reputation)StrataFrame User (303 reputation)StrataFrame User (303 reputation)StrataFrame User (303 reputation)StrataFrame User (303 reputation)StrataFrame User (303 reputation)StrataFrame User (303 reputation)StrataFrame User (303 reputation)
Group: StrataFrame Users
Posts: 205, Visits: 629
Ok...

But what the staff of the developmente says?

Rogério Mauri Smile



Ivan George Borges
Ivan George Borges
Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)
Group: StrataFrame MVPs
Posts: 1.9K, Visits: 21K
Hi Rogério.

I think you would be better off using the Auditing programatically.

I do it this way, dealing with most of it on my BaseBO. Follow this post and get the idea of where to put it:

http://forum.strataframe.net/FindPost12173.aspx

You coud do the same before saving a record, when creating a new one and so on. This way, you can make sure you are passing the right data type.

Boa segunda-feira para você! Cool

Rogerio Mauri
Rogerio Mauri
StrataFrame User (303 reputation)StrataFrame User (303 reputation)StrataFrame User (303 reputation)StrataFrame User (303 reputation)StrataFrame User (303 reputation)StrataFrame User (303 reputation)StrataFrame User (303 reputation)StrataFrame User (303 reputation)StrataFrame User (303 reputation)
Group: StrataFrame Users
Posts: 205, Visits: 629
Hi Ivan...



I am using the configurations standards. Without programming code.



a) On InitApplication void:



private static void InitApplication(InitializingApplicationEventArgs e)

{

...

SecurityBasics.AllowAuditDataChanges = true;

...

}




b) On BO Properties:



AuditDataChanges = true



c) On User Properties (Security):



[x] Sempre auditar eventos de dados para este usuário.



If the user modifies only values of the 'string' fields, the event is registered correctly. (SFSAuditDataActions and SFSAuditDataFields tables).



Abraços...


Rogério Mauri Smile

Ivan George Borges
Ivan George Borges
Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)
Group: StrataFrame MVPs
Posts: 1.9K, Visits: 21K
Hi Rogério!

You are adding auditing programatically, right?

Have a look at this post and check the data type you are passing:

http://forum.strataframe.net/FindPost16202.aspx

Abraços.

GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search