Call to Gen action block fails after HPVP setting changed
search cancel

Call to Gen action block fails after HPVP setting changed

book

Article ID: 380576

calendar_today

Updated On:

Products

Gen Gen - Workstation Toolset

Issue/Introduction

In a Gen 8.6 model an old common action block CAB1 was changed to have High Performance View Passing (HPVP) enabled.
(new action blocks have it enabled by default)

After regenerating CAB1 and rebuilding the Window Manager for the Procedure Step that calls CAB1, that call then fails.

Cause

The calling Procedure Step had not also been regenerated.

Resolution

The calling Procedure Step or action block also needs to be regenerated after a called action block has its HPVP setting changed.
That is because the generated code for the view passing between the caller and called will be different when HPVP is enabled on the called i.e. the generator takes into account the caller's HPVP setting when generation both action blocks.

Regeneration of both is also stated as required per Properties for Action Diagram/Operation.

*****
High Performance View Passing
This option makes it possible to efficiently pass data between action blocks. The High Performance View Passing feature is available for process action diagrams and action blocks. The feature is not available for derived algorithm action blocks and procedure action diagrams.
Selecting this feature enables the action block to be called as externals by another model.
High Performance View Passing is the default value for action blocks and process action blocks created using COOL:Gen version 3.0 and higher.
The High Performance View Passing option can be selected for process action diagrams and action blocks created before COOL:Gen3.0. After selecting this option, it is necessary to regenerate the action block and all of the action blocks, process action diagrams, and procedure action diagrams that USE the selected action block.
...
*****

The difference with the view passing with HPVP off/on is also described in this KB article: Does Gen "High Performance View Passing" (HPVP) apply to Java and .NET (C#) which explains why regeneration of using (caller) and used (called) is required:
*****
When HPVP is disabled: 

  • Copies are made of the Used Action Block views.
  • Prior to calling the Used Action Block, the Using Action Block's views are moved to those copies. The copies are then passed on the actual call statement.
  • After returning from the Used Action Block, the copies are moved back to the Using Action Block's views. 

When HPVP is enabled (and the views match exactly): 

  • It is not necessary to make copies of the Used Action Block views because a reference can be passed to the Using Action Block views themselves.

*****

Additional Information

After a HPVP change only the changed Action Block itself and the immediate callers of the changed Action Block need to be regenerated. The Manager modules should not be impacted at all.