0
我創建像條件如下:滴料 - 雙量
$event : EventObject(type=='Sale', $points:points, $playerid:playerid) from
entry-point eventstream
這樣的結果,我需要的變量傳遞到以下幾點:
boolean givePointsToPlayer(String playerId,
String pointType,
double amount,
String notificationMessage)
最簡單的例子下面是我給這個玩家3分
updateAPIv1.givePointsToPlayer($playerid, 'Points', 3, 'Points Awarded');
update(engine.getPlayerById($playerid));
但是,我想通過$ points:points to'double amoun T」。
簡單的問題我知道,但我怎麼做到最好?就像是?
$points=double amount;
updateAPIv1.givePointsToPlayer($playerid, 'Points', amount, 'Points Awarded');
update(engine.getPlayerById($playerid));;
欣賞反饋。謝謝。
***更新我也
$event : EventObject(type=='Sale', $points:points, $playerid:playerid)
from entry-point eventstream
updateAPIv1.givePointsToPlayer($playerid, 'Points', $points, 'Points Awarded');
update(engine.getPlayerById($playerid));
嘗試,但我得到以下錯誤此
"Unable to create Field Extractor for 'points'
Field/method 'points' not found for class 'com.sap.gamification.model.EventObject"
"Rule Compilation error $points cannot be resolved "
對這個有什麼想法?
感謝您的答覆。我已經嘗試過,並沒有奏效,例如:$ event:EventObject(type =='Sale',$ points:points,$ playerid:playerid)from entry-point eventstreamupdateAPIv1.givePointsToPlayer($ playerid,'Points', $積分,'積分獎勵'); update(engine.getPlayerById($ playerid)); – MacAodh
查看更新以上 – MacAodh
請參閱編輯我的答案。 – laune