Hexagon Geospatial
MENU

Developer Discussions

Discuss topics with other Hexagon Geospatial Power Portfolio developers and experts to get the most out of our products.
Showing results for 
Search instead for 
Do you mean 
Reply
Highlighted
Contributor
Posts: 31
Registered: ‎05-30-2016

Comand to refresh CashedOnDemand tile from workflowaction

We have labels at cached on demand features which are based on alpha numeric information of the feature (diameter, length, material).

We need to refresh the tile when saving the workflowform. So the changed alpha numeric information is represented correctely in the label.

We assume it is done with a javascrip command. A regular save action in the form doesn't do it.

What javascript command is used to initiate the refresh of the tile?

 

(We saw that if also geometry is change the new alpha numeric data is appearing)

Technical Evangelist
Posts: 957
Registered: ‎09-11-2015

Re: Comand to refresh CashedOnDemand tile from workflowaction

Hi Gideon,

 

Can you check if the sample at the very bottom of this page would help you?

http://smartclient.intergraph.at/documentation/Integrated_Workflows_in_GeoMedia_Smart_Client

 

Particularly the FormAction:

<FormAction name="SaveReload" action="SCRIPT[IG.saveBuildingExtension('Building Extensions')]" />

Where the IG.saveBuildingExtension('..') would be defined as:

IG.saveBuildingExtension = function(nodeid, feature){
 IG.urlSettings.params.nodeid = nodeid;
 var url = IG.getWorkflowUrl('saveData').setParams(IG.urlSettings.params, true).toString();
    var options = {
        url: url,
        type: 'POST',
        data: IG.form ? IG.form.serialize() : {},
        success: function (data) {
            if (data.Success) {
                var id = data.Data['ID'];
			
                IG.reloadFeatures(feature);
				IG.setActiveFeature(feature);
				IG.setSelectedElements(id);				
                IG.fitSelectedElements();
				IG.clearSelectedElements();				
				IG.closeWebBrowser();
			}
            else {
                if (data.Exception) {
                    IG.alertDialog('Data are not correct: <br /><code>' + data.Exception + '</code>', { title: 'Error' });
                }
                else {
                    IG.alertDialog('Unknown Error', { title: 'Error' });
                }
            }
        }
    };
    $.ajax(options);  
}

I haven't tried this personally but it sounds like it should be similar to your case...

Jan Neumann
Post Sales Engineer Web Applications
Hexagon Geospatial

Contributor
Posts: 31
Registered: ‎05-30-2016

Re: Comand to refresh CashedOnDemand tile from workflowaction

[ Edited ]

HI Jan,

this is using the IG.ReloadFeature and the zoom command, that is not helping us.

The problem is, that only the context of the label is changed and not the geometry of the line and of the label. So the software thinks nothing has changed and it is not recreating the tile. Therefore we would need to have a command that would initiate the recreation of that specific tile.

Regards

Dania

Staff
Posts: 919
Registered: ‎10-18-2015

Re: Comand to refresh CashedOnDemand tile from workflowaction

hi Gideon,

 

there are a couple of triggers to invalidate the tiles that you can use:

  1. InvalidateTileTrigger -> takes FeatureId as parameter, it recreates the tile of the edited feature
  2. LabelTrigger -> takes FeatureId as parameter, it regenerates the labels from parent FeatureId (so in case of database labeling)

So for instance it should be something like:

 

<WorkflowTrigger name="InvalidateTile" method="after" type="InvalidateTileTrigger">
  <Param name="FeatureId" value="1" />
</WorkflowTrigger>

HTH,

Stefano

Stefano Turcato
Presale Engineer
Hexagon Geospatial
Contributor
Posts: 31
Registered: ‎05-30-2016

Re: Comand to refresh CashedOnDemand tile from workflowaction

HI Stefano,

Thanks! For the label it indeed worked.

 

We have a smilar problem when we 'delete' features. They are not really deleted but just get a 'retired' flag: retras=1 instead of retras=0

The features have an Additional Setting filter: retras=0

So when we update a feature to retras=1 it should not be seen on the map anymore. We thought the trigger would work also in this case. But it doesn't. We tried it as an after trigger and an action trigger, that is run in the delete action.

Is there something special with features who have Additional Settings?

Staff
Posts: 919
Registered: ‎10-18-2015

Re: Comand to refresh CashedOnDemand tile from workflowaction

Hi Gideon,

 

so by "delete" you mean just setting "retras=1" and keeping the record? If the row is still there, you must set a filter at featue level, then the trigger should work as after or action method.

 

Stefano

Stefano Turcato
Presale Engineer
Hexagon Geospatial
Contributor
Posts: 31
Registered: ‎05-30-2016

Re: Comand to refresh CashedOnDemand tile from workflowaction

Yes we set in the delete action retras=1.

We already have the filter in the additional settings of the feature as retras=0. (And the layer was published after the change of the additional settings parameter)

So you say it should work like that?

Do you need immediate support?
Please submit a Ticket through our
Development Ticket Portal.