51
Views
5
Comments
Question about changing BPTs and impact on running process.
Question
Application Type
Reactive
Platform Version
11.12.2 (Build 30755)

Hello all, 

A client wants to be able to change a workflow "on the fly" when a process is running, this is add a new step or skip a step or request more information needed for future steps in the process and that does not impact other Process instances (this is that the change is for one single request) . This is because, in the process that is being digitized, sometimes, the user, require and additional approval or an exception, and since the processes, and always affect one single request,  they don't want to "cancel" the request and start over and that the change impact other instances running.

I wonder if this is possible, changing the workflow and deploy them for a specific, unique process exception without aborting that process and without impacting other processes running.

For the part of preventing to affect other process, just  add a condition in the BPT to ensure it only applies for that single instance.


Thanks for your help.

2025-01-09 14-56-57
IQ78

Hi,

May be you can put conditional (if this order no or if time > today) for the new process flow. Or just create another BPT and launch it conditionally.

regards

2019-01-07 16-04-16
Siya
 
MVP

While developing BPTs, ensure all conditions are in place, as you cannot modify the workflow at runtime. If you plan to deploy a new version of the BPT, please refer to the documentation on the impact here (refer the subsections too for the details ).

UserImage.jpg
Armando Ponce

Thanks Siya, I'll take a look at the Upgrade Processes documentation.

2021-11-12 04-59-31
Manikandan Sambasivam

In OutSystems, modifying a workflow "on the fly" for a specific process instance without affecting other instances is a challenging requirement, but it can be addressed through careful design of the Business Process Technology (BPT). Here’s a high-level approach to achieve this:

  1. Dynamic Workflow Steps: Design the workflow to support dynamic steps. Use conditions and sub-processes to determine which steps to execute based on specific instance requirements.

  2. Flexible Process Design: Create a process with optional steps that can be included or skipped based on certain conditions. You can use decision points in your BPT to determine the path based on the specific instance's requirements.

  3. Configuration Table: Use a configuration table to store the dynamic steps or conditions for each process instance. This table can hold flags or statuses indicating whether a particular step should be executed.

  4. Instance-Specific Conditions: Add conditions in the BPT that check the configuration table for the specific instance. This ensures that changes only affect the designated process instance.

Steps to Implement the Solution:

  1. Create a Configuration Entity: Define an entity to store the instance-specific configuration. This entity should have fields like ProcessInstanceId, StepId, IsActive, and any other necessary attributes.

  2. Modify BPT with Conditions: In the BPT, add conditions before each step to check the configuration entity.Based on the result, decide whether to execute the step.

  3. Admin Interface for Changes: Develop an admin interface that allows users to modify the configuration for a specific process instance. This interface should let users add new steps, skip steps, or request additional information.
  4. Implement Conditional Steps: In the BPT, implement logic to dynamically execute or skip steps based on the configuration. For instance, use If widgets or decision nodes to branch the process flow.
  5. Ensure Process Continuity: Ensure that changes to the process configuration are applied in a way that does not disrupt the ongoing process instance. This might involve checking the current state of the process before applying changes.


2024-05-14 06-49-08
Karnika-EONE

Hi @Armando Ponce 



1.Create a central point in your workflow where you can introduce conditional logic (e.g., an If/Else or Switch activity) based on a flag or data point. This point should be located before the step that might require modification.

2.Store the current process instance ID in a temporary variable or entity to ensure targeted modifications.

3.Design dedicated BPT branches for each modification option (adding a step, skipping a step, requesting information).

4.Dynamic Modification:

When a change is needed, update the relevant flag or data point in the database or temporary storage associated with the specific process instance using an external process/service. For example, an admin interface could be created to trigger this update.

During subsequent execution, the workflow encounters the conditional branching point and takes the appropriate path based on the modified flag/data.

Process State Management and Event Triggers:

BPT Design:

Define clear states for your process (e.g., "Initial," "Awaiting Approval," "Completed"). Store the current state in a process variable or entity attribute.

Implement event triggers on state changes. These triggers can be external processes or services that execute specific logic based on state transitions.

Dynamic Modification:

When a change is needed, use a separate process/service to update the current state of the specific process instance.

The corresponding event trigger associated with the new state will fire and execute the appropriate modification logic (adding a step, skipping a step, retrieving information).

You need to add like this in your logic (conditional branching)

// Assuming variables 'ProcessInstanceID' (current instance ID) and 'ModificationFlag' (indicates change type) are set elsewhereIf (ProcessInstanceID == CurrentProcessInstanceID && ModificationFlag == "AddApproval") {  // Add approval step logic here (e.g., call an external service to send an approval request)} Else If (ProcessInstanceID == CurrentProcessInstanceID && ModificationFlag == "SkipStep") {  // Skip step logic here (e.g., jump to the next activity)} Else If (ProcessInstanceID == CurrentProcessInstanceID && ModificationFlag == "RequestInformation") {  // Request information logic here (e.g., display a user interface to collect additional data)} Else {  // Normal workflow execution}

Best regards 

Thanks

Karnika.K

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.