Smart M.App discussions

Looking for answers in regards to M.Apps, M.App Exchange or M.App Studio? Smart M.App Tech Discussion board is where you can search, ask your questions and assist others by sharing your knowledge. Join the conversation, connect, contribute and share.
Showing results for 
Search instead for 
Do you mean 
Reply
Highlighted
Frequent Contributor
Posts: 83
Registered: ‎07-17-2017
Accepted Solution

no output generated after running recipe with javascript in Smart M.App

Hi everyone,

 

I created a vey simple spatial model (see attachment) and executed it from a map panel using following code:

 

var GeoprocessingRequestParams=		
{ path: "api/v1/geoprocesses/03553f4d-d8be-4cad-b20e-68f368fef0de_2c9180826101b2d00161c9ef7aa31238/execute",
  method : 'POST',
  entity:{
        "Inputs": [{
		"Data": { "Input": true, 
			  "Type": "IMAGINE.Double",
			  "Value": "20"
			},
		"Name": "value"
	                },{
        	"Data": { "Input": false,
			  "Type": "IMAGINE.File",
			  "Value": "output.json"
			},
        	"Name": "filename"
            	}],
        	    "Method": "Asynchronous"
                 }
};
        
gsp.m_app.utils.connection(GeoprocessingRequestParams);

I get this response and no file is written to M.App Chest.

{
  "ID": "2e65854b-77e3-488b-b830-e9f77d473b62",
  "Status": "Queued",
  "Progress": 0.0,
  "TaskName": "",
  "Model": "03553f4d-d8be-4cad-b20e-68f368fef0de_2c9180826101b2d00161c9ef7aa31238",
  "SubmittedDateTime": "1519514339302",
  "CompletedDateTime": "0",
  "Outcome": "",
  "OutcomeMessage": ""
}

I'm stuck here, so it would be great to get help to make it run :-)

Marisa

 

Highlighted
Frequent Contributor
Posts: 106
Registered: ‎01-20-2016

Re: no output generated after running recipe with javascript in Smart M.App

Hi Marisa,

 

I guess you need to assign the id of your root folder or of another output folder of M.App Chest together with your output.json,

 

something like

"Value": "fb059245120f3/output.json"

Ruth

 

 

Highlighted
Frequent Contributor
Posts: 83
Registered: ‎07-17-2017

Re: no output generated after running recipe with javascript in Smart M.App

Hi Ruth,

thanks, this solved the problem. I somehow thought that if there is no id given it takes the Root folder as default, but it doesn't.

Great!

Marisa