*8212* move workflow JS handlers to PKP-lib