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
Staff
Posts: 17
Registered: ‎11-30-2016
Accepted Solution

New feature action doesn't get cleared form

Hi,

 

I have some irregular behavior of my workflow. 

I have button which opens form where I add new feature into database. The problem is that sometimes it looks like the app did browse faster than session trigger had clear ID field. It results that form keeps ID of feature I opened before using "add" button. 

In SEC_SESSION I can see that ID field is cleared properly and when I click F5 in form I get this form empty as I wanted.

Guess I need to add somewhere 'IG.reloadPage()' or something like this but I couldn't figure it out where to put it to get wanted result.

 

 

		<FormAction name="Dodaj" label="Dodaj nowy magazyn"  action="SCRIPT[IG.trigger({triggerNames:['GETID']}).done(IG.redirectToWorkflowNode({controller:'Form',nodeid: '3', emptyform:true, closeAction:'reloadPage'}))]" visible="list" />

 

 

	<WorkflowTrigger name="GETID" method="action" type="SessionTrigger" >
		<Param name="Key" value="MAGAZYN.ID"/>
		<Param name="Value" value="0"/>	
	</WorkflowTrigger>

 

Staff
Posts: 1,036
Registered: ‎10-18-2015

Re: New feature action doesn't get cleared form

Hi,

 

looks like you are not clearing the session, you are setting the value to 0. Please try with a RemoveSessionTrigger instead. You may also try the "redirect" action to see if the behavior is the same.

 

HTH,

Stefano

Stefano Turcato
Presale Engineer
Hexagon Geospatial
Staff
Posts: 17
Registered: ‎11-30-2016

Re: New feature action doesn't get cleared form

Hi Stefano,

 

I've tried with RemoveSessionTrigger and result was exactly the same.

 

Could you give me some details how to use "redirect" action? 

Staff
Posts: 1,036
Registered: ‎10-18-2015

Re: New feature action doesn't get cleared form

Hi,

 

sorry I've suggested the wrong method, I was thinking about IG.navigate(). In the example below I'm manipulating the session to change the next object to be displayed in the next form. This is the action in my form configuration:

 

IG.trigger({triggerNames:'NextObjectTrigger'}).done(function(result){IG.navigate('BEEdit');})

and here is my settings in the workflowsettigs file (so I'm basically updating the primary key in the session using a SQL statement):

 

<WorkflowTrigger name="NextObjectTrigger" type="SessionTrigger" method="action">
	<Param name="Key" value="BUILDINGEXTENSION.ID"/>
	<Param name="Value" 
	value="SQL[select top 1 id from BUILDINGEXTENSION where id>{FORM.ID}]"/>
</WorkflowTrigger>

I guess you might want to achieve something comparable, am I wrong?

 

Stefano

Stefano Turcato
Presale Engineer
Hexagon Geospatial
Highlighted
Staff
Posts: 17
Registered: ‎11-30-2016

Re: New feature action doesn't get cleared form

Hi,

 

Couldn't find solution with the method you sugested.

 

I've put 

 

		<WorkflowTrigger name="CLEARID" method="before" type="RemoveSessionTrigger" >
			<Param name="Key" value="MAGAZYN.ID"/>	
		</WorkflowTrigger>

into main list node so everytime I go back to feature list I have ID already cleared - one step before using add action.

Not sure if this is workaround but it work fine for me.

Staff
Posts: 1,036
Registered: ‎10-18-2015

Re: New feature action doesn't get cleared form

Hi,

 

it is not a workaround, just a different way to get it to work.

 

Thanks for sharing.

 

Stefano

Stefano Turcato
Presale Engineer
Hexagon Geospatial
Do you need immediate support?
Please submit a Ticket through our
Development Ticket Portal.