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