12-13-2016 06:04 AM - edited 12-13-2016 06:08 AM
Hi,
I am trying to replicate the Buildings Extension Workflow in our GMSC for demo and learning purposes. However, i have hit a dead end with the errors. Below is the error am getting in the error logs.
13.12.2016 14:41:44 ERROR - Controller Form has raised an exception in Action Index. Intergraph.Emea.Workflows.FormValidationException: The requested form has some validation errors. at Intergraph.Emea.Workflows.XmlDescriptionProvider.DeserializeFormXml(XDocument formListDocument) at Intergraph.Emea.SmartClient.Workflows.SmartClientXmlDescriptionProvider.LoadFormXml(String workflow) at Intergraph.Emea.Workflows.XmlDescriptionProvider.GetFormDescription(String name, String workflow) at Intergraph.Emea.Workflows.FormController.Initialize(RequestContext requestContext) at System.Web.Mvc.Controller.BeginExecute(RequestContext requestContext, AsyncCallback callback, Object state) at System.Web.Mvc.MvcHandler.<BeginProcessRequest>b__4(AsyncCallback asyncCallback, Object asyncState, ProcessRequestState innerState) at System.Web.Mvc.Async.AsyncResultWrapper.WrappedAsyncVoid`1.CallBeginDelegate(AsyncCallback callback, Object callbackState) at System.Web.Mvc.Async.AsyncResultWrapper.WrappedAsyncResultBase`1.Begin(AsyncCallback callback, Object state, Int32 timeout) at System.Web.Mvc.Async.AsyncResultWrapper.Begin[TState](AsyncCallback callback, Object callbackState, BeginInvokeDelegate`1 beginDelegate, EndInvokeVoidDelegate`1 endDelegate, TState invokeState, Object tag, Int32 timeout, SynchronizationContext callbackSyncContext) at System.Web.Mvc.MvcHandler.BeginProcessRequest(HttpContextBase httpContext, AsyncCallback callback, Object state) at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
As you can see, there is a problem with one of my form Actions or something. Unfortunately the error is not definitive and i can't quite tell which form Action has the wrong script. Below is my FormSettings as well. What could i have done wrong here?
Note that am running GMSC 2016 and it's my first time working with GMSC.
<Form name="BuildingExtension" editable="true" idfield="ID" table="BUILDINGEXTENSION" customscript="BuildingExtension.js"> <FormGeometry name="GEOMETRY_SPA" layer="BUILDINGEXTENSION"> <NewActions> <GeometryAction name="GE_NEWPOLYGON" isstartonload="false" /> <GeometryAction name="GE_NEWRECTANGLE" isstartonload="false" /> </NewActions> <EditActions> <GeometryAction name="GE_MODIFY" isstartonload="true" /> </EditActions> </FormGeometry> <FormTab name="General" editable="true" visible="true"> <FormGroup name="Data" editable="true" visible="true"> <FormField name="ID" editable="true" visible="true" datatype="string" required="true" persisted="true" saveinsession="false" type="textfield" /> <FormField name="APPLICATIONNUMBER" label="Application Number" editable="false" visible="true" datatype="string" defaultvalue="SQL[Select Count(ID)+1 From BUILDINGEXTENSION]" required="true" persisted="true" saveinsession="false" type="textfield"> <FormAction name="ShowOnMap" editable="true" visible="SQL[list[SQL[Select count(ID) from BUILDINGEXTENSION where ID={ROW.ID} AND GEOMETRY_SPA Is not NULL]]]" action="SCRIPT[IG.setActiveFeature('BUILDINGEXTENSION');IG.setSelectedElements({ROW.ID});IG.fitSelectedElements();IG.clearSelectedElements();IG.closeWebBrowser();]" submit="false" /> </FormField> <FormField name="STATUS" label="Status" editable="false" visible="true" datatype="number" defaultvalue="0" lov="LIST[0=Pending;1=Approved;2=Declined]" required="true" persisted="false" saveinsession="false" type="combobox" /> <FormField name="EDITOR" label="Editor" editable="false" visible="true" datatype="string" defaultvalue="{USER.NAME}" required="true" persisted="true" saveinsession="false" type="textfield" /> <FormField name="EXTENSIONTYPE_ID" label="Type" editable="true" visible="true" datatype="guidstring" lov="SQL[Select ID,NAME From EXTENSIONTYPE]" required="true" persisted="true" saveinsession="EXTENSIONTYPE.ID" type="combobox" /> <FormField name="COMMENTS" label="Comments" editable="true" visible="true" datatype="string" required="false" persisted="true" saveinsession="false" type="textarea" /> </FormGroup> <FormGroup name="Address" editable="true" visible="true"> <FormField name="DISTRICT" label="City" editable="true" visible="true" datatype="string" lov="SQL[Select Distinct LOCCITY From CCBUS_X Order by LOCCITY]" required="true" persisted="true" saveinsession="false" type="combobox" /> <FormField name="STREET" label="Street" editable="true" visible="true" datatype="string" lov="SQL[Select distinct ADDR From CCBUS_X Where LOCCITY={FORM.DISTRICT} AND LOCZIP={FORM.SUBDISTRICT} Order By ADDR]" required="true" persisted="true" saveinsession="false" type="combobox" /> <FormField name="STREETNUMBER" label="Street No" editable="true" visible="true" datatype="string" lov="SQL[Select distinct STREETNO From CCBUS_X Where LOCCITY={FORM.DISTRICT} AND LOCZIP={FORM.SUBDISTRICT} AND ADDR = {FORM.STREET} Order By STREETNO]" required="true" persisted="true" saveinsession="false" type="combobox" /> <FormField name="X" label="X:" editable="false" visible="true" datatype="number" defaultvalue="SQL[Select TOP 1 CAST(c.Geometry_SPA.STX As int) From CCBUS_X c where c.LOCCITY = {FORM.DISTRICT} and c.LOCZIP = {FORM.SUBDISTRICT} and c.ADDR = {FORM.STREET} and c.STREETNO = {FORM.STREETNUMBER}]" required="false" persisted="false" saveinsession="false" type="textfield" /> <FormField name="Y" label="Y:" editable="false" visible="true" datatype="number" defaultvalue="SQL[Select TOP 1 CAST(c.Geometry_SPA.STY As int) From CCBUS_X c where c.LOCCITY = {FORM.DISTRICT} and c.LOCZIP = {FORM.SUBDISTRICT} and c.ADDR = {FORM.STREET} and c.STREETNO = {FORM.STREETNUMBER}]" required="false" persisted="false" saveinsession="false" type="textfield" /> <FormField name="PARCEL" editable="true" visible="true" datatype="number" defaultvalue="SQL[Select TOP 1 p.ID From PARCELS p,CCBUS_X c where c.LOCCITY = {FORM.DISTRICT} and c.LOCZIP = {FORM.SUBDISTRICT} and c.ADDR = {FORM.STREET} and c.STREETNO = {FORM.STREETNUMBER} and p.PARCEL = c.PARCELNUMB]" required="true" persisted="true" saveinsession="false" type="textfield" /> </FormGroup> <FormAction name="Save" editable="true" visible="true" action="save" submit="true" /> <FormAction name="SaveReload" editable="true" visible="true" action="SCRIPT[IG.saveBuildingExtension('BUILDINGEXTENSION')]" submit="true" /> <FormAction name="Capture" editable="true" visible="true" action="SCRIPT[IG.captureGeometry()]" submit="false" /> <FormAction name="Delete" editable="true" visible="form[SQL[Select count(ID) From BUILDINGEXTENSION Where ID = {FORM.ID} And GEOMETRY Is Not Null]]" action="SCRIPT[IG.confirm({message: 'Do you really want to delete this feature?', title: 'Confirm', okMessage: 'Yes', cancelMessage: 'No', callback: function () { IG.remove();IG.clearSelectedElements();IG.reloadFeatures('BUILDINGEXTENSION');IG.closeWebBrowser() } })]" submit="false" /> </FormTab> </Form>
So far my workflow looks as below in GMSC and only brings up an error when I try opening either of the forms.
Thanks for any suggestions or resources that might help.
Regards,
Elvon.
Solved! Go to Solution.
12-13-2016 08:01 AM
Hi Elvon,
quickly looking at your definition I see a couple of errors in your action ShowOnMap:
visible="list[SQL[Select count(ID) from BUILDINGEXTENSION where ID={ROW.ID} AND GEOMETRY_SPA Is not NULL]]"
HTH,
Stefano
12-14-2016 01:24 AM
Hi Stefano,
Thanks for your response. I was able to do away with the errors up to that point.
Now I have another question in relation to the WorkflowSettings and FormSettings. I am triyng to create an approval form/list. The template am using for the building extension workflow is based on an earlier version of GMSC. The FormSettings has a form section with the "inherits" property set to BuildingExtension form as show below. I am not sure of how to implement the inherits property in Workflow editor 2016. How do i go about it? Should i edit the formsettings manually to add the inherits property?
<Form name="BuildingExtensionApproval" inherits="BuildingExtension" filter="SQL[STATUS=0]"> <FormTab name="General"> <FormGroup name="Data"> <FormField name="ID" /> <FormField name="APPLICATIONNUMBER" /> <FormField name="STATUS" lov="LIST[0=Pending;1=Approved;2=Declined]" editable="true"/> </FormGroup> </FormTab> </Form>
Thanks,
Elvon
12-14-2016 04:55 AM - edited 12-14-2016 04:57 AM
Hi Elvon,
you are right, some of the features previously used are not available in the new GUI. To make it simpler those features have been replaced by different "workflows", different way to achieve them. For instance about inheritance, in the past was quite useful because we had to key in all the settings by hand, so it was worth to use inheritance to make things faster. Now we can easily duplicate a form definition just by using the corresponding button:
Please keep checking the available material on the community and on the online documentation, we will publish information about that soon.
Best regards,
Stefano
12-15-2016 01:55 AM - edited 12-15-2016 01:57 AM
Hi Stefano,
I really appreciate your input. I still have two more question on Workflows.
Note: I understand that i might not be getting things right from the online documentation partly because the worklow manager documentation is based on GMSC version 2015. It would be nice if there was a documentation highlighting the differences between the ealier versions of workflow editor and the new workflow editor(v2016),or just a new documentation for Workflow Manager v2016. I hope this is part of the information to be published soon.
Thanks,
Elvon
12-16-2016 01:54 AM
Hi,
Found this, it highlights the need to create different forms and lists for each of the controllers and a couple other differences between the ealier versions of worklfow editor and the 2016 version. Solves my problem on question 2.
Still looking for a more robust way to debug my workflows though.
Regards,
Elvon.