question

Sebastian Kranzinger avatar image
Sebastian Kranzinger asked

Rule with entity_deleted event doesn't fire.

Hello,

I'm trying to execute a cloud script whenever a group is deleted. Even though the event group_deleted is mentioned in the docs, I cannot select it in the game manager. So I tried to use the playfab.entity.entity_deleted event and manually check if the entity is a group.

Unfortunately, the rule doesn't trigger at all (I also don't get any errors), I checked the PlayStream Monitor and event history.

So, to test things out, I decided to try it with the playfab.entity.entity_created event. When I create a group, the event does fire, the cloud script gets executed but I get an event stating that the action failed, with the error code 1127, "A third-party downstream provider returned an error to the PlayFab service" when Rule is triggered from an entity event." This is odd, since this error code usually only shows up when there is any third party service (Steam, iOS, ...) involved.

I have a three part question:

1. Why can't I select the group_deleted event when creating rules in the Game Manager?

2. Why doesn't the a rule with the entity_deleted event fire?

3. Why does a rule with the entity_created event return error code 1127?

My title Id is D30C.

Thanks in advance,

Sebastian

CloudScriptentities
6 comments
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Sebastian Kranzinger avatar image Sebastian Kranzinger commented ·

EDIT: So I've done a little experimenting and found out, that the action doesn't fail if I disable "Publish results as PlayStream event" in the rule settings. However this still only works with entity_created. A rule with entity_deleted still doesn't trigger at all.

1 Like 1 ·
Citrus Yan avatar image Citrus Yan Sebastian Kranzinger commented ·

Yes, I can reproduce exact the same issue on my testing title, so it might be a general issue, not a user specific error. We're actively investigating on this, I'll keep you updated for further updates, thanks for your understanding!

1 Like 1 ·
Sebastian Kranzinger avatar image Sebastian Kranzinger Citrus Yan commented ·

Hi,

is there any news on this or are you still investigating?

0 Likes 0 ·
Show more comments
Citrus Yan avatar image Citrus Yan commented ·

Hi, thanks for your feedback on this, we're actively investigating this issue with the team, I'll keep you posted for any updates, thanks for your understanding!

0 Likes 0 ·
Sebastian Kranzinger avatar image Sebastian Kranzinger Citrus Yan commented ·

Thanks for your reply. So this might actually be a bug and not a user error from me? If you want to check my event history, i want to run handers.test in the cloud script with the rule names "TestRule". This calls server.WriteTitleEvent() (event name is "one") just to see if it works.

1 Like 1 ·

1 Answer

·
JayZuo avatar image
JayZuo answered

Sorry for the late response. After consulting with our engineering team, we get the following answer for your questions:

1. Why can't I select the group_deleted event when creating rules in the Game Manager?

This is by design. Rules does not support all events. Only supported events will be listed.

2. Why doesn't the a rule with the entity_deleted event fire?

This is because the entity is just gone by the time the event is created in PlayStream. We are not able to use a not existing entity to fire a rule. "entity_deleted" event would be removed from the list for a Rule's event trigger.

3. Why does a rule with the entity_created event return error code 1127?

This is a bug our engineering team is working on the fix. As you've known, currently, we can uncheck "Publish results as PlayStream event" as a workaround.

2 comments
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Sebastian Kranzinger avatar image Sebastian Kranzinger commented ·

So there is no way of actually executing a cloud script when a group is deleted?

0 Likes 0 ·
JayZuo avatar image JayZuo ♦ Sebastian Kranzinger commented ·

Yeah, what we'd suggest is making a proxy before calling the group API to delete the group. You can do this via calling CloudScript. For example, you can kick off what you need by having the client call a CloudScript function that would act as a "pre-group-delete" operation to do what you need before using the group API directly.

0 Likes 0 ·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.