microsoft / powercat-business-approvals-kit

MIT License
35 stars 4 forks source link

[Business Approvals Kit - BUG] Empty name in cat_businessapprovalversion #156

Closed miguelverweij closed 9 months ago

miguelverweij commented 11 months ago

Describe the issue

I followed the instructions from the workshop and ran into an error. I found out that when I publish the approval, the BACore | Publish Process flow is triggered. The child flow BACore | Child | Activate Published Workflow expects three variables, all mandatory. As you can see from my screen dump below, the name isn't. fed. That is because the name value is empty. image

I haven't researched yet where the creation of this version is done. I presume in the custom page of the designer. Because the name is blank, the version isn't published, which leads to not being able to select this workflow in the custom connector in Power Automate.

Expected Behavior

Set a name at creation time, or leave the name out of it. We have a process name and version, which should be unique on itself.

What solution version are you using?

1.0.20231214.1

What app or flow are you having the issue with?

BACore | Publish Process

Steps To Reproduce

the steps described in the workshop.

Anything else?

No response

AB#1831

ArunVRPowerDoc365 commented 11 months ago

@miguelverweij I am also facing the same issues. How do you over come this issues?

Ramakrishnan24689 commented 11 months ago

@miguelverweij, Thanks for helping us improve Approvals kit. we just released a new version of the Approvals kit (BusinessApprovalKit_1.0.20231222.1.) with several fixes. This release also addresses this issue by providing a name to the process template as "Untitled" during the time of creation. Please check and let us know if this works for you.

miguelverweij commented 11 months ago

Hi @Ramakrishnan24689 thanks for the update. The issue isn't fully resolved. It indeed has the Untitled name, but this isn't in line with the naming of the process. I have inspected the Process Designer custom page and found that when we press the save button, we either create a new process, or update it. But the global variable _selectedProcess is left unchanged.

I have updated the OnSelect of the ckMainCommandBar_2 control (see image below).

image

The _btnPublish2 control creates a new version based on that global variable in the OnSelect. Personally, I think it's a better solution to use a with function with a lookup to the actual process before this Patch Defaults operation, to make sure you get the information that is actually used, but the adjustment above will do the job too.

@ArunVRPowerDoc365 This could be a solution for you too. Be aware that this will create an unmanaged layer to your solution.

Grant-Archibald-MS commented 9 months ago

Included with February 2024 release https://github.com/microsoft/powercat-business-approvals-kit/releases/tag/BusinessApprovalKit-February2024