Skip to main content
Solved

Modify a process variable in process flows


cornevdlinden
Rookie
Forum|alt.badge.img

There is a http request in my workflow. But before sending the http request, I want to compose a process variable with a json format.
I tried this with tasks and functionality, but it's not working. (I checked this in the process flow monitor).

Is there a way to modify a process variable in the process flow, so I can use it further in the process flow?

Best answer by Mark Jongeling

Hi Corne,

Yes, it is possible. To alter a process variable you need to use a Process Procedure on a previous process flow step. (Process procedures are always activates after executing a process action.)

You can enable 'Use process procedure’ here:
 

SF: Process Flows → Process actions

This will enable you to create a Control procedure with codegroup 'PROCESSES’ and assign it to the process action. Be sure to [Generate code group] to see the Program Object.

After task you will see this

In the template you will be able to alter Process variables to your liking:

Also be sure to set the variable for Follow-up process actions. Otherwise the process flow might go different paths than you intent. For example:

if @string is not null
begin
   set @execute_task_start_connection_http_connector = 1
end

This way, if your variable is filled, the http connector will the following action.

Hope this helps you out! If you have any questions, let me know.

Kind regards,
Mark Jongeling

View original
This topic has been closed for comments

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

Hi Corne,

Yes, it is possible. To alter a process variable you need to use a Process Procedure on a previous process flow step. (Process procedures are always activates after executing a process action.)

You can enable 'Use process procedure’ here:
 

SF: Process Flows → Process actions

This will enable you to create a Control procedure with codegroup 'PROCESSES’ and assign it to the process action. Be sure to [Generate code group] to see the Program Object.

After task you will see this

In the template you will be able to alter Process variables to your liking:

Also be sure to set the variable for Follow-up process actions. Otherwise the process flow might go different paths than you intent. For example:

if @string is not null
begin
   set @execute_task_start_connection_http_connector = 1
end

This way, if your variable is filled, the http connector will the following action.

Hope this helps you out! If you have any questions, let me know.

Kind regards,
Mark Jongeling


cornevdlinden
Rookie
Forum|alt.badge.img

Thanks for your quick response!

 

I get this error by adding the this code:

 set @execute_task_start_connection_http_connector = 1

 

 


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

Hey Corne,

My code was an example based on my test and will not function in your situation. The variable I set is this one:
 

 

To​​​ make it work for you, you should set this variable:

@execute_task_test_json_http_connector


So that would mean the code should look a bit like this in your case:

if @json_input is not null
begin
   set @execute_task_test_json_http_connector = 1
end

 

Kind regards,
Mark Jongeling


cornevdlinden
Rookie
Forum|alt.badge.img

That was stupid of me :) Thanks!


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