on 2016 Dec 21 12:08 PM
Hi experts,
I'm currently developing a XSJS service that uses HRF standard xsjslib to execute a RuleService.
Here my snippet:
function runScheduledJob(input) {
var ruleServiceID = input.rule_service_id;
var ruleServiceName = input.rule_service_name;
// Prepare connection
var oConnection = $.hdb.getConnection();
var ruleServiceLib = $.sap.hrf.api.lib.ruleService.lib;
var fnCalcTimeframe = oConnection.loadProcedure("_SYS_BIC", "my.package/CP_MY_PROCEDURE");
var oTimeframeResult = fnCalcTimeframe(ruleServiceID);
oConnection.commit();
oConnection.close();
var oTimeframe = oTimeframeResult.TIMEFRAME["0"];
var oConsumptionBody = {
"parameters": {
"RULE_TIMESTAMP_FROM": a_timestamp,
"RULE_TIMESTAMP_TO": another_timestamp
}
};
var ruleServiceResult = null;
ruleServiceResult = ruleServiceLib.execute(
$.db.getConnection(),
ruleServiceName,
oConsumptionBody
);
/*
SEND RESPONSE AND DO OTHER THINGS...
*/
}
Running this service return following error:
File '/sap/hrf/resources/rule/lib/ruleUtils.xsjslib'
Message: 'runtimeServicesRef is undefined'
and I'm not able to understand what's wrong with it.
To build my service I've followed tutorial delivered within SAP_HRF1_09_DevImpGuide_v1.pdf standard SAP guide.
Can anyone help me? I've debugged both mine and standard code but didn't find cause/solution to this issue.
If you need more infos don't hesitate to ask.
Thanks in advance.
Regards,
Marco
Request clarification before answering.
User | Count |
---|---|
80 | |
30 | |
9 | |
9 | |
9 | |
7 | |
6 | |
6 | |
5 | |
5 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.