I have an existing version of Process tasks that updates certain set of ac!param

I have an existing version of Process tasks that updates certain set of ac!parameters. when I try to add a new ac! to this node and update it my existing in-flight instances break with an exception "Could not find variable ac!XXXX".

I tried using a some conditions so that only new process instances try to load this component (Text field) and update it and existing in-flights don't load this, no matter whatever i configure in the rules whether it loads the component or not it still verifies for the ac!parameter to be available and thus in-flights fail.

what is the best way to update the ac! in existing nodes as in this case?

OriginalPostID-171192

OriginalPostID-171192

  Discussion posts and replies are publicly visible

  • Manish,
    After upgrading the existing instances, can you restart the nodes ??

    You need to cancel the nodes and restart the nodes in order to solve the issue.
  • Hi Sanjay,
    not sure if I was able to explain the issue properly or not. Let me try explaining it again.

    Node T1 calls rule R1 where I am reading acp and pvs and passing them to R2 that renders the UI. I need to update an extra acp say ac!employee in Node T1, how can i achieve it in a way that already existing instances of the process are not impacted.

    I don't want to run a process migration for a small change as adding a acp to a node, moreover I dont want the existing instances to read or update this. It should only imapct the new one.

    One option that I see is creating a new set or rule R'1 and R'2 and reading the new acp in these and configure the process model to call R'1 instead of R1.

    but I will end up having numerous redundant rules if I follow this, so checking what is the best way to do it.
  • Configure the new user input task T2 that uses the rule R2 to render the interface with an ACP ac!employee. Put an XOR gateway before T1 and T2 to determine which node will be invoked for new and old process instances. Date type constant storing the deployment date can be used to differentiate between new and old process instances. You can consider using upgrade processes if you want to apply these changes to existing process instances.
  • Thanks Amit,

    hope you are doing good :)
    This is the probable solution that we will go ahead with, was just keen to know if there is something that can check if an ac parameter is configured in a node or not e.g isnull(ac!employee) and then we could modify the existing rule to either load the component for new instances or skip it for previous instances.

    creating constants, and multiple UI nodes or creating new set of rules and mapping them to existing node are the possible ways but it will only make the water muddy. Imagine the number of rules created or nodes added down the line after having several enhancements/modifications similar to this.
    In absence of any other option we will have to stick with one of these.

  • Hey Manish, nice to see you on the forum :)

    The scope of the ACP is very limited to the user input task. I don't think so there is any utility to check for the presence of the ACP configured on the form.
    Above mentioned approach works better for the production fixes provided that you defer your changes to a sub process which is manageable enough. Using sub process for manipulating business logic and user input task will make processes scalable and a room for such kind of issues.