Before using pxOpenassignmentLink or WorkLink. Please make sure the application Public URL is set to Pega url that you use for login.
You can check this under Configure> System >Settings >URLs > Public Link URL
You can make use of pxOpenAssignmentLink correspodence fragment for your requirement to open the assignment directly. As a best practice make sure you send the email with assignment link in the pre-processing of the flow action.