Skip to main content
Solved

Process flow decision seems to ignore the outcome

  • October 28, 2021
  • 3 replies
  • 150 views

Kasper Reijnders
Forum|alt.badge.img+5

I have a question regarding the decision task. I created a small process flow that needs to execute the create wallet task based on whether or not a variable has been set. (see diagram) 

 

 

In order to get this result I have implemented a decision activity and corresponding process functionality. But no matter the outcome it always seems to execute both tasks. 

 

declare @has_wallet bit = 0;

set @has_wallet = (
        select coalesce((
                    select 1
                    from wallet_employee we
                    where we.location_id = @location_id
                        and we.employee_id = @employee_id
                    ), 0)
        )

if @has_wallet = 1
begin
    -- wallet available
    set @has_wallet_execute_task_create_wallet = null;
    set @has_wallet_execute_task_create_employee_lunch_transaction = 10;
end
else if @has_wallet = 0
begin
    -- no wallet available
    set @has_wallet_execute_task_create_wallet = 10;
    set @has_wallet_execute_task_create_employee_lunch_transaction = null;
end

I've tried setting them to null, 0 and -1 but it doesn't seem to matter. I assume that I've probably done something wrong. So here's the question, how do I get the decision to work properly? 

Best answer by Kasper Reijnders

Upgrading the database to the latest version solved the issue.

View original
Did this topic help you find an answer to your question?
This topic has been closed for replies.

3 replies

Mark Jongeling
Administrator
Forum|alt.badge.img+23

Hi Kasper,

This should just work fine:

if @has_wallet = 1
begin
    -- wallet available
    set @has_wallet_execute_task_create_wallet = 0;
    set @has_wallet_execute_task_create_employee_lunch_transaction = 1;
end
else if @has_wallet = 0
begin
    -- no wallet available
    set @has_wallet_execute_task_create_wallet = 1;
    set @has_wallet_execute_task_create_employee_lunch_transaction = 0;
end

But no matter the outcome it always seems to execute both tasks. 

In your process flow that also kind of happens, although Create wallet happens before Create employee lunch transaction. The decision step should not do both steps if one arrow is 0 and the other one 1.

Are you using this process flow in Universal/Windows GUI via SF or via IAM? Maybe the application in IAM does not have an up-to-date process flow design therefore choosing other paths than you would like?


Kasper Reijnders
Forum|alt.badge.img+5

Both Windows GUI via SF as well Universal via SF. Is there a possibility to take a look at it via teams/slack? Maybe at the beginning of next week? 


Kasper Reijnders
Forum|alt.badge.img+5

Upgrading the database to the latest version solved the issue.


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings