We should setup a workflow that will listen for at least 2 signals:
addTocart => That will add given product to the user cart
removeToCart => That will remove given product from the user cart
Note that if the workflow state products list is empty then the workflow is not kept alive/evicted.
Also note that for the moment no Node.js API is involved if it's not the ts-nodeclient.ts script.
From now we have a functional and tested workflow that handles additions and deletions from its own productCollection state.
When the products array is empty the workflow is evicted.
Features list
By listing the source Golang repo that we wanna migrate we can find the following features: