Deleting a record through a workflow

Is it possible to delete a record through a workflow? For example I have a state machine on entity A with event RecordDeleted. If event is raised I need to delete a record in entity B. What is the best practice to model it?

I usually do it using StateMachine. There your create RecordDeleted event. When it is raised it calls SequentialWorkflow with parameter e.g. parBId. SequentialWorkflow will have tree steps. First, load data using passed parameter parBId. This step loads data into LoadDataToBeDeleted context. Second step will be transformation that copies whatever you want into the same LoadDataToBeDeleted context. Source contex for second step must be again LoadDataToBeDeleted context. Outputh method of the step must be DeleteMatches, see the picture below

And finally third step is simple context store step which is set up as seen below and uses LoadDataToBeDeleted context.

This is the way I do it and have no problems so far. Enjoy it.