Jump to content

PCF references in Business Processes: test versus live


Berto2002
 Share

Recommended Posts

Hi,

When putting together my next major release of a New Starter workflow, I am using a Test copy of the live PCF. Some of my workflow nodes have Custom Expressions that refer to the values output by choices users make when using that PCF.

image.thumb.png.6b9ec5786be1f8c776947b138b92200b.png

However, when I go live, I will be exporting the definition file from the test PCF and importing that into the Live one to publish. It's occurred to me that many of these references in the BP will have been specified to use the test PCF. The name of the PCF in live is different, i.e. without the "(Test)" in the name.

Is the system 'clever' enough to accept the PCF answers it gets from the live workflow if they are congruent with the outcomes and labels, even if the name of the PCF is different or will it fail all over the place because these expressions will be expecting the output from the "(Test)" PCF?

At present, I have two ways I could handle this risk:

  1. highlight each node that is referencing a test PCF and when I go live, edit all those expressions to the live PCF name
  2. alter my approach so the PCF outcomes are all mapped to custom fields at the start so I have one node to edit and custom expressions then use the custom fields

Thank you for your advice.

Link to comment
Share on other sites

1 hour ago, Berto2002 said:

Is the system 'clever' enough to accept the PCF answers

It is very clever but not AI or that AI ... yet anyway ... so, yes, you need to edit the references to "test" and change them to "live"... 

But why "test" PCs and BPs? The way I would see this testing is using a test service, visible only to certain users (the ones building the PCs and BPs)... create them on the test service and when ready simply switch the live service(s) to use the new PC/BP...

Link to comment
Share on other sites

This a major revision to an existing process that is live. To make such big changes I need to work on copies of the PCF and BP flows with extensive testing. You're right though, in this case, if I start my revised workflow with a name that does not have test in it but is different from the live one, I can alter my single Cat Item for this flow to use the new PCF and workflow without doing all the renaming.

But that approach does not work when I have 50 Cat items using the same PCF/BP because it means I have to alter the Cat Items to use the new PCF/BP names when I change which version I want live.

Link to comment
Share on other sites

@Victor, I don't want to doubt you but I just discovered exactly one of these conditions. My workflow has a legacy PCF reference in it "PBTest_Change_new_model" and it worked to divert the flow to that branch, despite the fact that the PCF used when these CRs are logged is called "xx Change Mgmt v4". What is going on here?

This is the excerpt from the log for that decision:

1.429319s INFO Process Flow Transition from 'Send Calendar Reminder to Owner' (id=flowcode-c68d4708, type=HornbillAutomatiomn) to 'Outage Required' (id=decision-d5dc92bd, type=Decision)
1.466536s INFO Execution Step: currentStage='stage-396555b3', currentNode='decision-d5dc92bd', suspended='false'
1.467779s INFO Decision 'Outage Required' (id=decision-d5dc92bd), evaluating 2 branch expressions
1.467789s INFO Expression matched: [( (typeof functions.pcf("OutageRequired","Outage")==='string' && (functions.pcf("OutageRequired","Outage").toLowerCase() == 'yes' )) || (typeof functions.pcf("OutageRequired","Outage")==='string' && (functions.pcf("OutageRequired","Outage").toLowerCase() == 'not sure' )) )], forwarding to target node: flowcode-3dd54679
1.467875s INFO Process Flow Transition from 'Outage Required' (id=decision-d5dc92bd, type=Decision) to 'Raise Announcement Notification' (id=flowcode-3dd54679, type=HornbillAutomatiomn)

image.thumb.png.b4f1a3baa755770befc7975a2307405f.png

My assessment is that the BP Custom Expression seems to not care about the name of the PCF itself, only the Name of the Node and the Outcome of the node: "OutageRequired","Outage" as per below.

image.thumb.png.d9aece90d578b8a93b6681c04aa5b51f.png

image.thumb.png.a638f633927d30b9220eb03e0f3de17f.png

In short, it suggests that the workflow can survive a change in name of the PCF as long as those two aspects (PCF node name and outcome) remain the same. It's handy if so because it ensures workflow doesn't break if the PCF is renamed!

Can you please validate?

Berto

Link to comment
Share on other sites

  • 1 month later...

@Victor could you please review this one again?

The core question is whether the expressions which use PCF information in BP workflows need to have the correct PCF flow name or whether they only rely on the "Form ID" and "Field ID".

I have evidence that the LATTER is true: so as long as the Form ID and Field ID are correctly named, the PCF name is irrelevant and still successfully processes the inputs. Example expression: "&[functions.pcf("PhysicalAssets","LaptopInTune")]" will work regardless of the name of the PCF. I have also seen this in the Custom Expression builder where the old PCF name from our implementation phase is still listed but it still works with the renamed PCF (as per my post on Nov 5th 2021, above).

The way it is currently working is VERY USEFUL because it means a PCF called "Test PCF" still works with the required BP when we go live and rename it "Live PCF" (for example).

But it looks like it's grey area or a happy accident it works like this and it would be nice to have this confirmed as a feature so we can rely on it.

Thanks, Berto

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...