I was working with Switchyard Rule Service and now face with problem of retracting in Working Memory.
I have such configuration of my rules service:
xmlns:rules="urn:switchyard-component-rules:config:1.0" agent="true" eventProcessing="CLOUD">
<rules:action name="sendData" type="FIRE_ALL_RULES" />
<rules:mapping expression="message.content.modifiedOrderList" variable="modifiedOrderList" />
I use Stateful session and every time when I invoke sendData method, service inserts message.content.data fact into WorkingMemory. If i invoke this method multiple times, i have a lot of facts in WorkingMemory, but i want to retract inserted facts after method execution or have in memory only the latest one. Can i do retracting using switchyard rule service configuration
There is no action type (or any other mechanism) in SwitchYard's Rules component that will retract facts for you. However, you can do this via DRL itself, or you can register an event listener (of your own implementation) in the Rules component where you do this work yourself.