Hexagon Geospatial
MENU

M.App Enterprise

Discuss topics with other M.App Enterprise Product pioneers and experts to get the most out of it.
Showing results for 
Search instead for 
Do you mean 
Reply
Regular Contributor
Posts: 246
Registered: ‎10-26-2015
Accepted Solution

Error viewing attributes of selected object

M.App Enterprise 16.1.1276.0

 

I have a Oracle table of polygons I have setup for display in a Desktop App. I wish to setup a workflow that will allow a user to select a single polygon and then view attributes via a workflow.

 

I setup the following workflow:

 

Workflow Settings:

<?xml version="1.0"?>
<WorkflowRoot xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<WorkflowNode id="Root" label="Workflow Root" follownode="01" />
<WorkflowNode id="01" label="OppList1" controller="List" form="NewList1" follownode="02" />
<WorkflowNode id="02" label="OppForm1" controller="Form" form="OppForm1" emptyform="false" />
</WorkflowRoot>

 

Form Settings:
<?xml version="1.0"?>
<FormList xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<Form name="OppList1" editable="true" idfield="POLYGON_SEQ_ID" table="TBL_USER_OPS" pagesize="20" isfilterareaopen="false">
<FormTab name="NewTabPage2" editable="true" visible="true">
<FormGroup name="NewGroup2" editable="true" visible="true">
<FormField name="POLYGON_SEQ_ID" label="ID" editable="true" visible="list" datatype="number" required="true" persisted="true" saveinsession="false" type="textfield" />
<FormField name="NAME" label="Polygon Name" editable="true" visible="list" datatype="string" required="true" persisted="true" saveinsession="false" type="textfield" />
</FormGroup>
</FormTab>
</Form>
<Form name="OppForm1" label="Opportunity Form" editable="true" idfield="POLYGON_SEQ_ID" table="TBL_USER_OPS">
<FormTab name="OpForm1" label="Opportunity Detail" editable="true" visible="true">
<FormGroup name="Attributes" editable="true" visible="true">
<FormField name="POLYGON_SEQ_ID" label="Polygon ID" editable="true" visible="true" datatype="number" defaultvaluemode="onload" required="true" persisted="true" saveinsession="false" type="textfield" override="false" />
<FormField name="NAME" label="Name" editable="true" visible="true" datatype="string" defaultvaluemode="onload" required="true" persisted="true" saveinsession="false" type="textfield" override="false" />
<FormField name="OWNER" label="Owner" editable="true" visible="true" datatype="string" defaultvaluemode="onload" required="true" persisted="true" saveinsession="false" type="textfield" override="false" />
</FormGroup>
</FormTab>
</Form>
<Form name="NewList1" editable="true" idfield="POLYGON_SEQ_ID" table="TBL_USER_OPS" pagesize="20" isfilterareaopen="false">
<FormTab name="NewTabPage2" editable="true" visible="true">
<FormGroup name="NewGroup2" editable="true" visible="true">
<FormField name="POLYGON_SEQ_ID" label="POLYGON_SEQ_ID" editable="true" visible="list" datatype="number" required="true" persisted="true" saveinsession="false" type="textfield" />
<FormField name="NAME" label="NAME" editable="true" visible="list" datatype="string" required="true" persisted="true" saveinsession="false" type="textfield" />
<FormField name="OWNER" label="OWNER" editable="true" visible="list" datatype="string" required="true" persisted="true" saveinsession="false" type="textfield" />
</FormGroup>
</FormTab>
</Form>
</FormList>

 

I configured the following worfklow action set in the "Top":

Active Layer: TBL_USER_OPS

Min Selection 1

Max Selection 1

Workflow OpportunityPolygons1

Node 02

Location: Frame

 

When I select a single polygon and click the action set I get a 500 Internal Server Error displayed in the frame. From within M.App Studio > Security > Logs I see this error logged:

 

Input string was not in a correct format.

Href: http://localhost:80/Workflows/MapState/SaveMapState?workflow=OpportunityPolygons1&tenant=Hexagon&sessionid=004b88a5-0b06-4750-9620-b838ff603539&nodeid=02&debugMode=true
at System.Number.StringToNumber(String str, NumberStyles options, NumberBuffer& number, NumberFormatInfo info, Boolean parseDecimal)
at System.Number.ParseInt64(String value, NumberStyles options, NumberFormatInfo numfmt)
at System.String.System.IConvertible.ToInt64(IFormatProvider provider)
at System.Convert.ChangeType(Object value, Type conversionType, IFormatProvider provider)
at System.ConvertExtension.ChangeType(Object value, Type conversionType, IFormatProvider provider)
at MApp.Workflows.MapStateController.<>c__DisplayClass3_0.<PersistMapStateAsync>b__0(Object f)
at System.Linq.Enumerable.WhereSelectArrayIterator`2.MoveNext()
at System.Linq.Buffer`1..ctor(IEnumerable`1 source)
at System.Linq.Enumerable.ToArray[TSource](IEnumerable`1 source)
at MApp.Workflows.MapStateController.<PersistMapStateAsync>d__3.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at MApp.Workflows.MapStateController.<SaveMapState>d__2.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Web.Mvc.Async.TaskAsyncActionDescriptor.EndExecute(IAsyncResult asyncResult)
at System.Web.Mvc.Async.AsyncControllerActionInvoker.<>c__DisplayClass37.<BeginInvokeAsynchronousActionMethod>b__36(IAsyncResult asyncResult)
at System.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeActionMethod(IAsyncResult asyncResult)
at System.Web.Mvc.Async.AsyncControllerActionInvoker.AsyncInvocationWithFilters.<InvokeActionMethodFilterAsynchronouslyRecursive>b__3d()
at System.Web.Mvc.Async.AsyncControllerActionInvoker.AsyncInvocationWithFilters.<>c__DisplayClass46.<InvokeActionMethodFilterAsynchronouslyRecursive>b__3f()
at System.Web.Mvc.Async.AsyncControllerActionInvoker.AsyncInvocationWithFilters.<>c__DisplayClass46.<InvokeActionMethodFilterAsynchronouslyRecursive>b__3f()
at System.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeActionMethodWithFilters(IAsyncResult asyncResult)
at System.Web.Mvc.Async.AsyncControllerActionInvoker.<>c__DisplayClass21.<>c__DisplayClass2b.<BeginInvokeAction>b__1c()
at System.Web.Mvc.Async.AsyncControllerActionInvoker.<>c__DisplayClass21.<BeginInvokeAction>b__1e(IAsyncResult asyncResult)
at System.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeAction(IAsyncResult asyncResult)
at System.Web.Mvc.Controller.<BeginExecuteCore>b__1d(IAsyncResult asyncResult, ExecuteCoreState innerState)
at System.Web.Mvc.Async.AsyncResultWrapper.WrappedAsyncVoid`1.CallEndDelegate(IAsyncResult asyncResult)
at System.Web.Mvc.Controller.EndExecuteCore(IAsyncResult asyncResult)
at System.Web.Mvc.Async.AsyncResultWrapper.WrappedAsyncVoid`1.CallEndDelegate(IAsyncResult asyncResult)
at System.Web.Mvc.Controller.EndExecute(IAsyncResult asyncResult)
at System.Web.Mvc.MvcHandler.<BeginProcessRequest>b__5(IAsyncResult asyncResult, ProcessRequestState innerState)
at System.Web.Mvc.Async.AsyncResultWrapper.WrappedAsyncVoid`1.CallEndDelegate(IAsyncResult asyncResult)
at System.Web.Mvc.MvcHandler.EndProcessRequest(IAsyncResult asyncResult)
at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)

 

When I open the link referenced in chrome on the server I see this error:

Exception A public action method 'SaveMapState' was not found on controller 'MApp.Workflows.MapStateController'.
Controller MapState
Action SaveMapState
StackTrace at System.Web.Mvc.Controller.HandleUnknownAction(String actionName)
at System.Web.Mvc.Controller.b__1d(IAsyncResult asyncResult, ExecuteCoreState innerState)
at System.Web.Mvc.Async.AsyncResultWrapper.WrappedAsyncVoid`1.CallEndDelegate(IAsyncResult asyncResult)
at System.Web.Mvc.Controller.EndExecuteCore(IAsyncResult asyncResult)
at System.Web.Mvc.Async.AsyncResultWrapper.WrappedAsyncVoid`1.CallEndDelegate(IAsyncResult asyncResult)
at System.Web.Mvc.Controller.EndExecute(IAsyncResult asyncResult)
at System.Web.Mvc.MvcHandler.b__5(IAsyncResult asyncResult, ProcessRequestState innerState)
at System.Web.Mvc.Async.AsyncResultWrapper.WrappedAsyncVoid`1.CallEndDelegate(IAsyncResult asyncResult)
at System.Web.Mvc.MvcHandler.EndProcessRequest(IAsyncResult asyncResult)
at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)

 

How do I configure a workflow to view attributes of data or is there a better way of achieving this, perhaps through queries?

 

Thanks for any replies!

 

Colin

 

 

 

 

Staff
Posts: 998
Registered: ‎10-19-2015

Re: Error viewing attributes of selected object

[ Edited ]

your configuration looks ok: can you please check the data type for your primary key? It might exceed the allowed precision from .NET framework...

Another thing to check: are you using the official 16.1 release? There was a bug in a previous built where numbers were translated to strings...

just noticed you are on the current build.

 

Thanks,

Stefano

 

Stefano Turcato
Presale Engineer
Hexagon Geospatial
Regular Contributor
Posts: 246
Registered: ‎10-26-2015

Re: Error viewing attributes of selected object

Hi Stefano,

The data type for the primary key column POLYGON_SEQ_ID is NUMBER(38,0).

The minimum value in this column is 1 and maximum value is 5338.

Thanks,

Colin

Staff
Posts: 998
Registered: ‎10-19-2015

Re: Error viewing attributes of selected object

Hi Colin,

 

please decrease the precision to something like NUMBER(18,0), because 38 is too much for .NET.

 

Thanks,

Stefano

Stefano Turcato
Presale Engineer
Hexagon Geospatial
Regular Contributor
Posts: 246
Registered: ‎10-26-2015

Re: Error viewing attributes of selected object

Reducing the data type precision to NUMBER(18,0) has resolved the issue viewing attributes of selected object in a workflow.

Thanks for your help.

Do you need immediate support?
If you encounter a critical issue and need immediate assistance please submit a Development Ticket through our Development Ticket Portal.