In this example, online lookup provides direct interaction between the data requester (client) and the enterprise information system (EIS), supplying real-time EIS data rather than cached data.
This section describes how to invoke the Employee's findByParameter method.
<html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <meta name="HandheldFriendly" content="True" /> <meta http-equiv="PRAGMA" content="NO-CACHE" /> <meta name="viewport" content="initial-scale = 1.0 ,maximum-scale = 1.0" /> <script src="js/PlatformIdentification.js"></script> <script src="js/hwc-api.js"></script> <script src="js/hwc-comms.js"></script> <script src="js/hwc-utils.js"></script> <script src="js/WorkflowMessage.js"></script> <script src="js/HybridApp.js"></script> <script> function findEmp() { var deptID = document.getElementById("deptID").value; emp = new Employee(); emp.deptIdLP = deptID; employee_findByParameter(emp, "supusername=supAdmin&suppassword=s3pAdmin", "onError"); } function onError(e) { alert("An error occurred"); } hwc.processDataMessage = function (incomingDataMessageValue) { if (incomingDataMessageValue.indexOf("<M>") != 0) { alert("An error occurred! " + incomingDataMessageValue); } var workflowMessage = new WorkflowMessage(incomingDataMessageValue); var values = workflowMessage.getValues(); var empList = values.getData("Employee"); var firstEmp = empList.value[0]; var firstName = firstEmp.getData("Employee_emp_fname_attribKey").value; alert("The name of the first employee is " + firstName); } </script> </head> <body> <form>Dept Id: <input type="text" value="100" id="deptID"/></form><br> <button id="findEmpsButton" onclick="findEmp()">Find</button> <button id="closeWorkflow" onclick="hwc.close()">Close</button> </body> </html>