I was doing some poc’s in constellation
Requirement: On click of button(custom DX component) i want to execute one activity rule.
I have created a DX custom button and published to pega.
I have successfully mapped it into a text field under details (one column) view.
Now its time to call Activity Rule
So the “Local Action ID” of the DX button take Only flow action rule
I have tried case wide action related flow actions (pyUserCaseDetails) and it worked successfully.
But those are OOTB rules and i want to execute my activity. So i have created one flowAction rule and mapped my activity into post processing.
when i created the case I saw that button is not accepting that flow action its stating that “flow action is not valid “
I have updated the pyCase with the flow action i have created under case wide actions section but still it did not worked
Can you please help me to understand how to achieve this.
I’m not very helpful with debugging custom DX components. However, there might be another way of doing this. There is a pre-built custom DX component that gives you a button and can launch a local action. It’s called Actionable Button, and it’s downloadable from the Constellation UI Gallery. Maybe this does what you need? I’m assuming if it can execute a local action, you should be able to launch your activity from there. Or perhaps you can take a look at how it was built and that can guide you with your own component, since they seem pretty similar.
@KiranM16585101 As a first recommendation, I would steer clear of adding buttons to achieve on-click behavior like in traditional UI. I would much rather use an optional action.
Thank you @LantzAndreas for the suggestion. I agree with your recommendation. I was just exploring the on-click approach out of curiosity and to understand the available options.
If you need to execute an activity when a button is clicked, wrap the activity in a data page and invoke that data page from the component using the DX API (getDataAsync). The logic to be executed should live in the activity that the data page calls