Process and task mining workflow optimization