36
Views
3
Comments
Solved by AI
Is it possible to skip a automatic (non-human) activity?
Question

We would like to know if it's possible to skip a automatic activity programmatically.

 'ActivitySkip' system action is only for Human Activity or a Wait Activity.
Is there another action that can skip an automatic activity or (or can this be build) or is there a use-case where you can resume suspended process and skip current activity executing or stuck on?

Looking forward to hearing form you all :)

Thanks in advance!

2023-12-26 10-35-28
OutSystems Neo
Staff
Solution by AI
In OutSystems, the `ActivitySkip` system action is indeed limited to skipping **Human Activities** or **Wait Activities** in a process. Unfortunately, there is no built-in action to directly skip an **Automatic Activity** programmatically, as Automatic Activities are designed to execute as part of the process logic.

However, you can implement a workaround by restructuring the process to allow skipping the logic within the Automatic Activity. Here's an idea on how to do this:

1. **Conditional Branching**: Add a condition before the Automatic Activity to determine whether the activity should be executed or ignored (skipped). For instance, you can use a decision step where the condition is based on a variable or parameter, and if the condition meets the "skip" criteria, route the process flow to the next activity without executing the Automatic Activity logic.

2. **Gracefully End the Automatic Activity**: If restructuring the process isn't an option, you can include logic within the Automatic Activity itself to "skip" its behavior. For example, you can add an `If` statement inside the activity logic, and if a certain variable signals it should be skipped, the activity executes no further actions and ends immediately.

3. **Suspend and Resume**: To skip processes that are currently **stuck**, you can retry or resume the suspended process instance programmatically. If this involves skipping logic, you still need to rely on decision conditions or implement custom mechanisms to bypass specific steps.

Since `ActivitySkip` does not apply here, all custom solutions revolve around either restructuring the process to bypass logic or ensuring the activity itself can handle a "skip" scenario based on a condition.

Hope this helps! Let me know if you need more details or ideas.
2024-01-20 14-53-12
Ahmed Essawy

As you are asking about automatic activity, so one approach could be to develop a custom logic (may be If condition) in your automatic activity to check and, based on certain conditions or flags, decides whether to ignore or complete the business login as needed. 

2023-02-17 10-31-22
Sergi

One problem, it’s hard to currently build a custom logic because the service whom we are integrated with has a complex backend system with a lot of business rules. Right now, we get an “connector  error“ we suspended the process and when we get a “technical error” we re-throw an exception to keep the bpt as active with errors. We would like to be able to skip a suspended BPT process as sometimes when we hit resume the backend already processed the transaction. We can only terminate in this case which is not handy.

I read somewhere else that maybe setting a “wait” activity or a type of human activity to replace the suspended exception handling might be the best thing so that this activity can be skipped via e back-office screen… this is a possible solution but I don’t know if this is practical or not. Any thoughts?

2023-12-26 10-35-28
OutSystems Neo
Staff
Solution by AI
In OutSystems, the `ActivitySkip` system action is indeed limited to skipping **Human Activities** or **Wait Activities** in a process. Unfortunately, there is no built-in action to directly skip an **Automatic Activity** programmatically, as Automatic Activities are designed to execute as part of the process logic.

However, you can implement a workaround by restructuring the process to allow skipping the logic within the Automatic Activity. Here's an idea on how to do this:

1. **Conditional Branching**: Add a condition before the Automatic Activity to determine whether the activity should be executed or ignored (skipped). For instance, you can use a decision step where the condition is based on a variable or parameter, and if the condition meets the "skip" criteria, route the process flow to the next activity without executing the Automatic Activity logic.

2. **Gracefully End the Automatic Activity**: If restructuring the process isn't an option, you can include logic within the Automatic Activity itself to "skip" its behavior. For example, you can add an `If` statement inside the activity logic, and if a certain variable signals it should be skipped, the activity executes no further actions and ends immediately.

3. **Suspend and Resume**: To skip processes that are currently **stuck**, you can retry or resume the suspended process instance programmatically. If this involves skipping logic, you still need to rely on decision conditions or implement custom mechanisms to bypass specific steps.

Since `ActivitySkip` does not apply here, all custom solutions revolve around either restructuring the process to bypass logic or ensuring the activity itself can handle a "skip" scenario based on a condition.

Hope this helps! Let me know if you need more details or ideas.
Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.