Skip to main content
Solved

How to create process flow that checks if documents have been uploaded


Alieev
Rookie
Forum|alt.badge.img

So I have been trying to create this process flow - with the help of some amazing developers at Thinkwise - that checks if there are documents uploaded and based on this decision, show a warning message that the user forgot to upload the documents (don’t show any warning if there are already documents, instead run the main task immediately).

So my process flow looks like this (see images through this link https://imgur.com/a/QqBVNpQ). I created a ‘fake’ process action Ready_for_billing_outbound_order (the first one) I give it two output task parameters: outbound_order_id and documents_complete.

I linked this to a decision with no input or output, just a functionality (see third image). Based on the if statement, either the warning is shown or the task runs.

The problem starts when I try to run a creation, I get error(s) and one of them is: No declarable variable @execute_tab_task_outbound_order_check_show_msg_no_proof_of_delivery_invoice

How does this process flow work and what do the error(s) mean?

Best answer by Mark Jongeling

Hi Alieev,

The error message indicates you are using an undefined variable. To fix the code shown in the imgur picture, replace the exec stuff.

Code should look like this I think:

if @document_complete_invoice = 1 -- Has documents
begin
    set @decide_msg_execute_task_has_documents = 1 -- Go to Execute task step

    set @decide_msg_execute_task_has_no_documents = 0 -- Do not show the message
end
else if @document_complete_invoice = 0 -- Has no documents
begin
    set @decide_msg_execute_task_has_documents = 0 -- Do not go to Execute task step

    set @decide_msg_execute_task_has_no_documents = 1 -- Show the message
end

This code sets the variables that determine which process step is followed. In the header of this logic you can see the variables and behind them the variables are explained. More info here: https://docs.thinkwisesoftware.com/docs/sf/process_flows#business-logic-in-a-process-flow

Hope this helps!

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

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

Hi Alieev,

The error message indicates you are using an undefined variable. To fix the code shown in the imgur picture, replace the exec stuff.

Code should look like this I think:

if @document_complete_invoice = 1 -- Has documents
begin
    set @decide_msg_execute_task_has_documents = 1 -- Go to Execute task step

    set @decide_msg_execute_task_has_no_documents = 0 -- Do not show the message
end
else if @document_complete_invoice = 0 -- Has no documents
begin
    set @decide_msg_execute_task_has_documents = 0 -- Do not go to Execute task step

    set @decide_msg_execute_task_has_no_documents = 1 -- Show the message
end

This code sets the variables that determine which process step is followed. In the header of this logic you can see the variables and behind them the variables are explained. More info here: https://docs.thinkwisesoftware.com/docs/sf/process_flows#business-logic-in-a-process-flow

Hope this helps!


Alieev
Rookie
Forum|alt.badge.img
  • Rookie
  • March 22, 2024

Hi Mark,

Thanks for your response. That fixed some of the issues, still got some error(s) left. Now a new challenge arises.


Jeroen van den Belt
Administrator
Forum|alt.badge.img+8

Hi @Alieev,

Do you still need support for the remaining/new challenges? 


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