How to add pyWorkStatus before we click "begin" and after we click "begin"

Hi all, I have this requirement to add pyWorkStatus before we click the “begin” button, and the status will change after we click the begin button.

See sample scenario as below:

  • When we open the case, the WorkStatus is “Pending-Review” (before we click the begin button)

  • Once we click the “begin” button, the WorkStatus will change to “Review”

I tried to add the status in preDT and postDT but only the “Review” status appeared in the screen and the “Pending” status only display in the audit.

Can someone help me the solution please?

@JubelynMaeC17092380

Can you add it on the shape where the case is currently standing? So the status should change when the process enters the shape, then when the case is opened the new status should reflect.

@JubelynMaeC17092380

As Soham mentioned, You can keep the “Pending-Review” status on the assignment level in the flow, so that the default status assigned to those cases are pending review before you start working on them.

on the flow action Pre DT, you can add the “Review” status so that when you click on begin button, it changes the status as provided in the pre DT for the flow action.

@PrakashDeep

Hi I did try your suggestion, and it is working. However, when I click the “begin” button the status still in “Pending-Review” but with I click “Refresh” option from the action Tab, the assignment status changed to “Review” status.

I think case status issue is more likely solved, except for the “refresh” option.

I did try to call the OOTB activity from pre DT in the flow actiob to refresh the harness but it is not working

Do you have any suggestion to automatically refresh the harness once I click begin?

Thank you :slight_smile:

@JubelynMaeC17092380

You can write one javascript which will refresh the harness onload of the section. you can take a look at pega.desktop.showHarness function for reference.

@PrakashDeep

Thank you for your response and suggestion. Do you have a link for pega.desktop.showHarness function ?

@JubelynMaeC17092380 The pega.desktop.showHarness function in Pega is a JavaScript method used to display a specific harness dynamically without reloading the entire page. This function is useful when you want to update the user interface with a new harness, such as opening a form or refreshing a section. Thanks