cancel
Showing results for 
Search instead for 
Did you mean: 

Process Flow sapui5 javascript

Former Member
0 Kudos

Dear experts,

I'm trying to implement an app that use a process flow. I have problem in setting this object and also in a very basic app I always have the same error:

Uncaught Error: found in negative cache: 'sap/suite/ui/commons/ProcessFlow.js' from undefined/sap/suite/ui/commons/ProcessFlow.js: TypeError: Cannot read property 'declare' of undefined.

Could someone please give me any hint? I'm developing with eclipse and testing with chrome.

Thanks a lot.

Luca

<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta http-equiv='Content-Type' content='text/html;charset=UTF-8' />


<script src="https://sapui5.hana.ondemand.com/resources/sap-ui-core.js"
	id="sap-ui-bootstrap" data-sap-ui-xx-bindingSyntax="complex"
	data-sap-ui-theme="sap_bluecrystal"
	data-sap-ui-libs="sap.m, sap.ui.layout, sap.ui.core, sap.suite.ui.commons">
</script>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.js">
</script>




<script>
	var pageFrame = new sap.m.Page();	
	var oProcessFlow = new sap.suite.ui.commons.ProcessFlow();
	pageFrame.addContent(oProcessFlow);
	var oApp = new sap.m.App("App", {
		initialPage : "pageFrame"
	});
	oApp.addPage(pageFrame);
	oApp.placeAt("uiArea");
</script>




	</head>
 <body class="sapUiBody" role="application"> 
	<div id="uiArea"></div>
</body>
</html>

Accepted Solutions (1)

Accepted Solutions (1)

SergioG_TX
Active Contributor

Luca,

you do not need to add the JQuery lib into your app - sapui5 already has it. the "pageFrame" id you had added is needed on the nav container which is not there... here is a semi-solution - i removed the reference to jquery.. and also the pageFrame id...

<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta http-equiv='Content-Type' content='text/html;charset=UTF-8' />
<script src="https://sapui5.hana.ondemand.com/resources/sap-ui-core.js"
id="sap-ui-bootstrap" data-sap-ui-xx-bindingSyntax="complex"
data-sap-ui-theme="sap_bluecrystal"
data-sap-ui-libs="sap.m, sap.ui.layout, sap.ui.core, sap.suite.ui.commons">
</script>
<script>
var pageFrame = new sap.m.Page();
var oProcessFlow = new sap.suite.ui.commons.ProcessFlow();
pageFrame.addContent(oProcessFlow);
var oApp = new sap.m.App("App", {});
oApp.addPage(pageFrame);
oApp.placeAt("uiArea");
</script>
</head>
 <body role="application"> 
<div id="uiArea"></div>
</body>
</html>

you will need to follow the object structure as shown here:

1) process Flow

1.1) nodes

1.1.1) processNodeFlow ... etc

https://sapui5.netweaver.ondemand.com/sdk/explored.html#/sample/sap.suite.ui.commons.sample.ProcessF...

hope you can follow

PS: - i would suggest you use XML views as well, it will be easier to read at the end when you have a lot more code.

good luck1

Answers (1)

Answers (1)

Former Member
0 Kudos

Thank you very much Sergio, now it works!