How to implement the Change stage local action - pegasystems/mashup-webcomponent GitHub Wiki

The OTB flow actions shipped in the OTB Pega Platform have been created in PRPC 5.5 and earlier and are using some functionality that is not DX API compliant like:

  • non auto-generated control
  • client side condition expressions
  • clipboard pages to source a dropdown

Here are the steps to implement the change stage local action using the DX API (pyChangeStage). Note that the OTB flow action has 2 cascaded dropdown - we will only support the 2nd dropdown that will display the list of stages to pick from.

1/ Create a new Data Page that will be stored to list all the available stages we will call it D_ChangeStages. It is a thread level DP - read only of type 'list' and of class Embed-Stage

image

2/ Create the activity that is used to initialize the DP - we will call it initChangeStages This DP will use the content from the clipboardPage pyStageList created during the pre-activity of the flow action and copy the content into the DP - it will be used to render the dropdown image

the copyInto field value is 'Primary.pxResults()'

Do not forget the loop image

And to populate pages and classes before saving the activity image

3/ Copy the pyChangeStage flow action into your application main work class and replace the postActivity parameter ChangeToNextStage by the value "goto" since we are not implementing the first dropdown

image

4/ Copy the pyChangeStage section into your application main work class and only use the dropdown and the text. Configure the dropdown to use the DP - remove any visible when and any actions on the dropdown image

In the demo, create a new 'Heating install' case - https://pegasystems.github.io/mashup-webcomponent/ Then use the actions menu to perform a change stage - the following UI should render

image

⚠️ **GitHub.com Fallback** ⚠️