Showing posts with label Utilities3E. Show all posts
Showing posts with label Utilities3E. Show all posts

Wednesday, 28 August 2013

External Assemblies - Referencing, Packaging and Applying Across Instances

To reference an external .net assembly in an application object:

  • First add the DLL to the \inetpub\webui\bin folder.
  • Go to the Code page of the app. object and select the References tab. 
  • Click the Add button next to References and in the popup window, scroll the tabs right and select the .net Assemblies tab.
  • Select the name of the assembly, click the Select button then click OK.
When packaging an extracted object from another instance that references an external assembly, first copy the external assembly to the \utilities\utilities3e folder. Otherwise critical errors will be reported in the Utilities3e Package step and the operation will fail.

Wednesday, 9 November 2011

Transaction Service - GetArchetypeData

In a previous post, the GetData method of the Transaction Service was explained. An altogether more useful method is the GetArchetypeData method, taking any well-formed XOQL query and returning a dataset.

The input parameter must be encapsulated in a QUERY node (note the caps) in the namespace "http://elite.com/schemas/query".

Example:
<QUERY xmlns="http://elite.com/schemas/query">
[XOQL statement]
</QUERY>

An XOQL statement can be obtained from Utility3e's OQL Analyser by creating the query in OQL first, executing it and then copying the contents contained in the XOQL tab.

Friday, 4 November 2011

Time Out During Upgrade - Toggle READ_COMMITTED_SNAPSHOT Failed

Utilities 3e can sometimes fail when running the Upgrade process and throws a time out error. The Upgrade process then hangs and doesn't respond to the stop command/button. The only way out is to close the whole Utilities app.

The error message has a comment of "Toggle READ_COMMITTED_SNAPSHOT Failed" with extra info along the lines of "Error executing System.Data.SqlClient.SqlException: Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding."

The reason for this is the database has its READ_COMMITTED_SNAPSHOT setting turned OFF before upgrading and does not turn it back ON before failing. Utilities 3e fails to function correctly, as does the IDE and the front end!

The database can become inaccessible in Sql Query Analyser / SSMS, preventing queries being ran against it. Taking the database offline then bringing it back online solves this problem.

What's required is to turn READ_COMMIT_SNAPSHOT back on. This is typically done by running this on the DB in question:

ALTER DATABASE <DATABASE_NAME> SET READ_COMMITTED_SNAPSHOT ON

However, this statement can fail to run correctly and endlessly run in Query Analyser, never completing. A better option (for Sql Server 2005 - i.e. 3e 2.5 and below) is:

IF(CHARINDEX('Microsoft SQL Server 2005',@@VERSION) > 0)
BEGIN
    DECLARE @sql VARCHAR(8000)
    SELECT @sql = '
    ALTER DATABASE ' + DB_NAME() + ' SET SINGLE_USER WITH ROLLBACK IMMEDIATE;
    ALTER DATABASE ' + DB_NAME() + ' SET READ_COMMITTED_SNAPSHOT ON;
    ALTER DATABASE ' + DB_NAME() + ' SET MULTI_USER;'
    EXEC(@sql)
END

An IIS Reset may be needed after this, but after that all 3e systems should be running as before. The Update from within Utilities3e always seems to work the second time around.

Friday, 16 September 2011

Circular Dependency

Circular dependency in objects is not checked for on the save or build of individual files.

However, errors can arise when trying to:

  • Using 'Build Project' from the context menu of a project in IDE.
  • Using 'Update 3E - Extract' in the Upgrades section of Utilities 3E.

If both of these processes fail, chances are that a circular dependency exists in at least one of the project's objects.

To find the culprit, build each object individually with a Build Type of 'All AppObjects that use <Obj_Name> (Runtime Only)'. A circular dependency exception will show in the build output of the problem object.

Saturday, 26 March 2011

Update 3E - "Some record(s) already exist in the table NxMsg" Extract Error

In Utilities 3E, the following error may be seen in the Update 3E - Update process (part of Upgrades) when running the Apply and Repairs action:
"Some record(s) already exist in the table NxMsg for <GUID>"




To fix the problem, let the process finish then change the Source Directory by clicking Browse. Navigate to <ProjectFolder>\Logs\<ApplyFolder>\ErrorReRun e.g. \IM_CR2043_DL_CostCardTrans\Logs\2011.03.26.10.04.35Apply\ErrorReRun then re-run the Apply and Repair action.

Tuesday, 22 March 2011

Update 3E - "Could not find AppObject" Extract Error

In Utilities 3E, the following error may be seen in the Update 3E - Extract process (part of Upgrades):
"Could not find AppObject. If the AppObject does exist, verify the ID matches in the MetaXML and table. There is a Stock version, but this is a Custom extract."




This error is usually due to a stock object that is added to the Project that has no custom version, i.e. no changes have been made to it. Identify the object from the error message grid and remove it from the Project in the IDE. After saving the Project, the error should no longer appear when extracting.