Question

Postgres Error: 'VwSysModuleEntity does not exist' when using 'Perform Task' element in a Business Process

Hi,
I'm facing a specific database error on my development environment that I'm hoping to get some insight on. The issue only occurs when a business process executes the "Perform Task" element.

The Scenario

  • I have a business process that, at one point, uses the "Perform Task" element. When the process instance reaches this element, it fails and the application log shows the following core error right when the task should be created:
Npgsql.PostgresException (0x80004005): 42P01: relation "public.VwSysModuleEntity"
Like 0

Like

3 comments

Hello,

There are a few things you could check to identify the reason of this error:

 

  1. Verify the existence of VwSysModuleEntity. If it does not exist, it needs to be recreated. you can recreate it using the following SQL script. This script is standard for Creatio installations:

    CREATE OR REPLACE VIEW "public"."VwSysModuleEntity" AS
    SELECT
        sme."Id",
        sme."SysModuleId",
        sme."SysModuleEntityId",
        sme."Position",
        sme."ActionKindCaption",
        sme."ActionKindName",
        sme."TypeColumnValue",
        sme."CardSchemaUId",
        sme."TypeColumnUId",
        sme."Attribute",
        sme."SysPageSchemaUId",
        sme."MiniPageSchemaUId",
        sme."SectionDetailId",
        sme."SysEntitySchemaUId",
        sme."SysEntitySchemaName",
        sme."SysEntitySchemaCaption",
        sme."SysEntitySchemaPrimaryColumnName",
        sme."SysEntitySchemaPrimaryDisplayColumnName",
        sme."SysEntitySchemaPrimaryImageColumnName",
        sme."SysEntitySchemaPrimaryTagColumnName",
        sme."SysEntitySchemaPrimaryColumnUId",
        sme."SysEntitySchemaPrimaryDisplayColumnUId",
        sme."SysEntitySchemaPrimaryImageColumnUId",
        sme."SysEntitySchemaPrimaryTagColumnUId"
    FROM
        "SysModuleEntity" sme;

    After recreating the view, recompile the application to ensure that all metadata is updated. Restart the Creatio application to ensure that all changes are applied and the system can access the recreated view.
  2. If your system has customizations or custom packages, ensure that none of them are interfering with the VwSysModuleEntity view or its related entities. If your system uses custom packages, ensure that all required packages are installed and published. Missing packages can lead to missing views or entities.
  3. Open the business process in the Process Designer and ensure that the "Perform Task" element is correctly configured to reference valid entities and modules.

check your PostgreSQL version. new creatio distributives (8.1.3, I guess) have changed VwSysModuleEntity create script and use any_value group function, which was introduced in PG16

Thank you, Iryna and Oleksandr, for your helpful insights.

I’ve taken the SQL script to recreate the VwSysModuleEntity view from another healthy Creatio environment running the same version (8.2.0). I executed the script using pgAdmin, then recompiled the application and restarted the instance to ensure all changes were properly applied.
After this, the business process successfully proceeds past the “Perform Task” element without any issues.

Really appreciate your support!

Here is the script I used:

-- View: public.VwSysModuleEntity
-- DROP VIEW public."VwSysModuleEntity";
CREATE OR REPLACE VIEW public."VwSysModuleEntity" AS
SELECT 
   "SysModuleEntity"."SysEntitySchemaUId" AS "Id",
   "SysModule"."CreatedOn",
   "SysModule"."CreatedById",
   "SysModule"."ModifiedOn",
   "SysModule"."ModifiedById",
   "VwSysSchemaInWorkspace"."Caption" AS "Name",
   "SysModule"."Image16" AS "Image",
   0 AS "ProcessListeners",
   "VwSysSchemaInWorkspace"."SysWorkspaceId"
FROM 
   "SysModule"
   JOIN "SysModuleEntity" 
       ON "SysModuleEntity"."Id" = "SysModule"."SysModuleEntityId"
   JOIN "VwSysSchemaInWorkspace" 
       ON "VwSysSchemaInWorkspace"."UId" = "SysModuleEntity"."SysEntitySchemaUId"
WHERE 
   "SysModule"."Type" = 0;
ALTER TABLE public."VwSysModuleEntity"
   OWNER TO ppg_sysadmin;
Show all comments